2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #ifndef _NDEFRECORD_H_
20 #define _NDEFRECORD_H_
23 #include <API/NFC/INdefRecord.h>
26 using namespace TizenApis::Api::NFC;
32 class NdefRecord : public INdefRecord
34 friend class NFCFactory;
36 NdefRecord(const NdefRecordProperties &ndefRecordProperties, std::vector<unsigned char> payload);
37 NdefRecord(void *recordhandle);
38 NdefRecord(const std::string &text, const std::string &langCode, const short encodeType);
39 NdefRecord(const std::string &uri);
40 NdefRecord(const std::string &mimeType, const std::vector<unsigned char> data);
41 virtual ~NdefRecord();
42 virtual void *getHandle();
43 virtual NdefRecordProperties getNDEFRecordProperties();
44 virtual std::vector<unsigned char> getPayload();
45 virtual bool getText(char **text);
46 virtual bool getLangCode(char **landCode);
47 virtual bool getEncodeType(nfcTextEncodeUTF *encodeType);
48 virtual bool getUri(char **uri);
49 virtual bool getMimeType(char **mimeType);
52 nfc_ndef_record_h handle;
53 nfc_encode_type_e _convertToEncodeType(const nfcTextEncodeUTF type);
54 nfcTextEncodeUTF _convertToNfcEncodeType(const nfc_encode_type_e type);
61 #endif /* _NDEFRECORD_H_ */