7#ifndef LOGICALACCESS_NDEFMESSAGE_HPP
8#define LOGICALACCESS_NDEFMESSAGE_HPP
17 #define NDEF_MESSAGE 0x03
37 m_records.push_back(record);
39 void removeRecord(
unsigned int i);
40 void addTextRecord(std::string text, std::string language,
UTF utf = UTF_8);
41 void addEmptyRecord();
42 void addUriRecord(std::string uri,
UriType uritype);
43 void addMimeMediaRecord(std::string mimeType,
ByteVector payload);
47 return m_records.size();
54 void serialize(boost::property_tree::ptree &parentNode)
override;
55 void unSerialize(boost::property_tree::ptree &node)
override;
56 std::string getDefaultXmlNodeName()
const override;
58 static std::shared_ptr<NdefMessage> TLVToNdefMessage(
ByteVector tlv);
60 static ByteVector NdefMessageToTLV(std::shared_ptr<NdefMessage> record);
Definition: ndefmessage.hpp:25
void addRecord(std::shared_ptr< NdefRecord > record)
Definition: ndefmessage.hpp:35
virtual ~NdefMessage()
Definition: ndefmessage.hpp:29
std::vector< std::shared_ptr< NdefRecord > > & getRecords()
Definition: ndefmessage.hpp:49
size_t getRecordCount() const
Definition: ndefmessage.hpp:45
std::vector< std::shared_ptr< NdefRecord > > m_records
Definition: ndefmessage.hpp:63
Definition: nfcdata.hpp:16
std::vector< uint8_t > ByteVector
Definition: lla_fwd.hpp:80
NdefType
Definition: ndefmessage.hpp:19
@ Uri
Definition: ndefmessage.hpp:21
@ Text
Definition: ndefmessage.hpp:20
UriType
Definition: urirecord.hpp:18
UTF
Definition: textrecord.hpp:15