Smart poster object. More...
#include <SmartPoster.h>
| Public Types | 
| Public Member Functions | |
| SmartPoster (const URI &uri) | |
| Construct a smart poster.  More... | |
| void | set_title (const Text &text) | 
| Set the title of the resource.  More... | |
| void | set_icon (const Mime &icon) | 
| Set the icon of the resource.  More... | |
| void | set_action (action_t action) | 
| Set the action to trigger upon smart poster reception.  More... | |
| void | set_resource_size (uint32_t size) | 
| Set the size of the resource.  More... | |
| void | set_resource_type (mbed::Span< const uint8_t > &resource_type) | 
| Set the type of the resource.  More... | |
| bool | append_record (MessageBuilder &ndef_builder, bool is_last_record) const | 
| Append the smart poster as a ndef record.  More... | |
Smart poster object.
A smart poster is one of the basic use case of NFC. It encapsulates a URI to a resource and meta-data of the resource.
Meta-data are optional, they can be:
Definition at line 39 of file SmartPoster.h.
| enum action_t | 
Type of actions that should be executed upon smart poster reception.
| Enumerator | |
|---|---|
| EXECUTE | EXECUTE. | 
| SAVE | SAVE. | 
| EDIT | EDIT. | 
Definition at line 49 of file SmartPoster.h.
| SmartPoster | ( | const URI & | uri | ) | 
Construct a smart poster.
| uri | The URI to the resource. | 
| bool append_record | ( | MessageBuilder & | ndef_builder, | 
| bool | is_last_record | ||
| ) | const | 
Append the smart poster as a ndef record.
| ndef_builder | The message builder where the record is appended. | 
| is_last_record | Indicates if this message is the last one. | 
| void set_action | ( | action_t | action | ) | 
Set the action to trigger upon smart poster reception.
| action | The action to do upon reception. | 
| void set_icon | ( | const Mime & | icon | ) | 
Set the icon of the resource.
| icon | The icon to set. | 
| void set_resource_size | ( | uint32_t | size | ) | 
Set the size of the resource.
| size | The size of the resource. | 
| void set_resource_type | ( | mbed::Span< const uint8_t > & | resource_type | ) | 
Set the type of the resource.
| resource_type | The type of the resource pointed by the URI. | 
| void set_title | ( | const Text & | text | ) | 
Set the title of the resource.
| text | The title of the resource to set. |