|
LibLogicalAccess
2.5.0
An Open Source RFID Library
|
#include <ndefmessage.hpp>
Public Member Functions | |
| NdefMessage () | |
| NdefMessage (const ByteVector &data) | |
| virtual | ~NdefMessage () |
| ByteVector | encode () |
| void | addRecord (std::shared_ptr< NdefRecord > record) |
| void | removeRecord (unsigned int i) |
| void | addTextRecord (std::string text, std::string language, UTF utf=UTF_8) |
| void | addEmptyRecord () |
| void | addUriRecord (std::string uri, UriType uritype) |
| void | addMimeMediaRecord (std::string mimeType, ByteVector payload) |
| size_t | getRecordCount () const |
| std::vector< std::shared_ptr< NdefRecord > > & | getRecords () |
| void | serialize (boost::property_tree::ptree &parentNode) override |
| Serialize object to Xml Node. | |
| void | unSerialize (boost::property_tree::ptree &node) override |
| UnSerialize object from a Xml Node. | |
| std::string | getDefaultXmlNodeName () const override |
| Get the default Xml Node name for this object. | |
Public Member Functions inherited from logicalaccess::NfcData | |
| NfcData () | |
| NfcData (char type) | |
| ~NfcData () | |
| void | serialize (boost::property_tree::ptree &parentNode) override |
| Serialize object to Xml Node. | |
| void | unSerialize (boost::property_tree::ptree &node) override |
| UnSerialize object from a Xml Node. | |
| std::string | getDefaultXmlNodeName () const override |
| Get the default Xml Node name for this object. | |
| char | getType () const |
| void | setType (char type) |
Public Member Functions inherited from logicalaccess::XmlSerializable | |
| virtual | ~XmlSerializable ()=default |
| virtual std::string | serialize () |
| Serialize object to Xml Node string. | |
| virtual std::string | serializeWithHeaders () |
| Serialize object to Xml Node string, with xml headers. | |
| virtual void | serialize (boost::property_tree::ptree &parentNode)=0 |
| Serialize object to Xml Node. | |
| virtual void | serializeToFile (const std::string &filename) |
| Serialize object to a Xml file. | |
| virtual void | unSerialize (boost::property_tree::ptree &node)=0 |
| UnSerialize object from a Xml Node. | |
| virtual void | unSerialize (const std::string &xmlstring, const std::string &rootNode) |
| UnSerialize object from a Xml Node string. | |
| virtual void | unSerialize (std::istream &is, const std::string &rootNode) |
| UnSerialize object from a Xml node. | |
| virtual void | unSerialize (boost::property_tree::ptree &node, const std::string &rootNode) |
| UnSerialize object from a Xml node. | |
| virtual void | unSerializeFromFile (const std::string &filename) |
| UnSerialize object from a Xml file. | |
| virtual std::string | getDefaultXmlNodeName () const =0 |
| Get the default Xml Node name for this object. | |
Static Public Member Functions | |
| static std::shared_ptr< NdefMessage > | TLVToNdefMessage (ByteVector tlv) |
| static ByteVector | NdefMessageToTLV (std::shared_ptr< NdefMessage > record) |
Static Public Member Functions inherited from logicalaccess::NfcData | |
| static ByteVector | dataToTLV (std::shared_ptr< NfcData > data) |
| static std::vector< std::shared_ptr< NfcData > > | tlvToData (ByteVector tlv) |
Static Public Member Functions inherited from logicalaccess::XmlSerializable | |
| static std::string | removeXmlDeclaration (const std::string &xmlstring) |
| Remove Xml declaration from a xml string. | |
| static ByteVector | formatHexString (std::string hexstr) |
| Format hex string to hex string with space. | |
Private Attributes | |
| std::vector< std::shared_ptr< NdefRecord > > | m_records |
Additional Inherited Members | |
Static Protected Member Functions inherited from logicalaccess::XmlSerializable | |
| static unsigned long long | atoull (const std::string &str) |
Protected Attributes inherited from logicalaccess::NfcData | |
| char | m_type |
| logicalaccess::NdefMessage::NdefMessage | ( | ) |
|
explicit |
|
inlinevirtual |
| void logicalaccess::NdefMessage::addEmptyRecord | ( | ) |
| void logicalaccess::NdefMessage::addMimeMediaRecord | ( | std::string | mimeType, |
| ByteVector | payload | ||
| ) |
|
inline |
| void logicalaccess::NdefMessage::addTextRecord | ( | std::string | text, |
| std::string | language, | ||
| UTF | utf = UTF_8 |
||
| ) |
| void logicalaccess::NdefMessage::addUriRecord | ( | std::string | uri, |
| UriType | uritype | ||
| ) |
| ByteVector logicalaccess::NdefMessage::encode | ( | ) |
|
overridevirtual |
Get the default Xml Node name for this object.
Implements logicalaccess::XmlSerializable.
|
inline |
|
inline |
|
static |
| void logicalaccess::NdefMessage::removeRecord | ( | unsigned int | i | ) |
|
overridevirtual |
Serialize object to Xml Node.
| os | The XML stream. |
Implements logicalaccess::XmlSerializable.
|
static |
|
overridevirtual |
UnSerialize object from a Xml Node.
| node | The Xml node. |
Implements logicalaccess::XmlSerializable.
|
private |
1.9.6