@property
    def data(self):
        # encode smart poster payload as ndef message
        message = Message(UriRecord(self._uri))
        for lang, text in self.title.iteritems():
            message.append(TextRecord(text=text, language=lang))
        for image_type, image_data in self.icons.iteritems():
            message.append(Record("image/"+image_type, data=image_data))
        if self._action >= 0:
            message.append(Record("urn:nfc:wkt:act", data=chr(self._action)))
        if self._res_size:
            size = struct.pack('>L', self._res_size)
            message.append(Record("urn:nfc:wkt:s", data=size))
        return str(message)
dataset/ETHPy150Open javgh/greenaddress-pos-tools/nfc/ndef/smart_poster.py/SmartPosterRecord.data/original