LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
textrecord.hpp
Go to the documentation of this file.
1
7#ifndef LOGICALACCESS_TEXTRECORD_HPP
8#define LOGICALACCESS_TEXTRECORD_HPP
9
11
12namespace logicalaccess
13{
14 enum UTF
15 {
16 UTF_8 = 0x00,
17 UTF_16 = 0x01
18 };
19
20class LLA_CORE_API TextRecord : public NdefRecord
21{
22 public:
24 : NdefRecord(), m_utf(UTF_8)
25 {
26 }
27 virtual ~TextRecord()
28 {
29 }
30
31 void init(TNF tnf, ByteVector type, ByteVector id, ByteVector payload) override;
32 void setLanguage(std::string language, UTF utf = UTF_8);
33 std::string getLanguage() const;
34 void setCleanPayload(std::string cleanPayload);
35 std::string getCleanPayload() const;
36 void setUTF(UTF utf);
37 UTF getUTF() const;
38 void updatePayload();
39 private:
40 std::string m_language;
41 std::string m_cleanPayload;
43};
44}
45
46#endif
Definition: ndefrecord.hpp:28
Definition: textrecord.hpp:21
std::string m_language
Definition: textrecord.hpp:40
TextRecord()
Definition: textrecord.hpp:23
UTF m_utf
Definition: textrecord.hpp:42
std::string m_cleanPayload
Definition: textrecord.hpp:41
virtual ~TextRecord()
Definition: textrecord.hpp:27
std::vector< uint8_t > ByteVector
Definition: lla_fwd.hpp:80
Definition: asn1.hpp:9
TNF
Definition: ndefrecord.hpp:16
UTF
Definition: textrecord.hpp:15
@ UTF_8
Definition: textrecord.hpp:16
@ UTF_16
Definition: textrecord.hpp:17