Mistake on this page?
Report an issue in GitHub or email us
Public Types | Public Member Functions
SmartPoster Class Reference

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...
 

Detailed Description

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:

Note
It obeys to value semantic and can be copied around.

Definition at line 39 of file SmartPoster.h.

Member Enumeration Documentation

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.

Constructor & Destructor Documentation

SmartPoster ( const URI uri)

Construct a smart poster.

Parameters
uriThe URI to the resource.

Member Function Documentation

bool append_record ( MessageBuilder ndef_builder,
bool  is_last_record 
) const

Append the smart poster as a ndef record.

Parameters
ndef_builderThe message builder where the record is appended.
is_last_recordIndicates if this message is the last one.
Returns
true if the message has been appended to the builder or false otherwise.
void set_action ( action_t  action)

Set the action to trigger upon smart poster reception.

Parameters
actionThe action to do upon reception.
void set_icon ( const Mime icon)

Set the icon of the resource.

Parameters
iconThe icon to set.
void set_resource_size ( uint32_t  size)

Set the size of the resource.

Parameters
sizeThe size of the resource.
void set_resource_type ( mbed::Span< const uint8_t > &  resource_type)

Set the type of the resource.

Parameters
resource_typeThe type of the resource pointed by the URI.
void set_title ( const Text text)

Set the title of the resource.

Parameters
textThe title of the resource to set.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.