IoTivity C++ SDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OIC::Service::NSMessage Class Reference

This class provides a set of APIs for Notification service Message . More...

Public Types

enum  NSMessageType {
  NSMessageType::NS_MESSAGE_ALERT = 1, NSMessageType::NS_MESSAGE_NOTICE = 2, NSMessageType::NS_MESSAGE_EVENT = 3, NSMessageType::NS_MESSAGE_INFO = 4,
  NSMessageType::NS_MESSAGE_WARNING = 5
}
 NSMessageType - enumeration for Notification service MessageType. More...
 

Public Member Functions

 NSMessage ()
 Constructor of NSMessage. More...
 
 NSMessage (::NSMessage *msg)
 Constructor of NSMessage. More...
 
 NSMessage (const NSMessage &msg)
 Copy Constructor of NSMessage. More...
 
NSMessageoperator= (const NSMessage &msg)
 Copy assignment operator of NSMessage. More...
 
 ~NSMessage ()
 Destructor of NSMessage. More...
 
uint64_t getMessageId () const
 This method is for getting Message Id from the Notification service Message. More...
 
std::string getProviderId () const
 This method is for getting Provider Id from the Notification service Message. More...
 
NSMessageType getType () const
 This method is for getting type from the Notification service Message. More...
 
void setType (const NSMessageType &type)
 This method is for setting type from the Notification service Message. More...
 
std::string getTime () const
 This method is for getting time from the Notification service Message. More...
 
void setTime (const std::string &time)
 This method is for setting time from the Notification service Message. More...
 
uint64_t getTTL () const
 This method is for getting time to live from the Notification service Message. More...
 
void setTTL (const uint64_t &ttl)
 This method is for setting time to live from the Notification service Message. More...
 
std::string getTitle () const
 This method is for getting Title from the Notification service Message. More...
 
void setTitle (const std::string &title)
 This method is for setting Title from the Notification service Message. More...
 
std::string getContentText () const
 This method is for getting contentText from the Notification service Message. More...
 
void setContentText (const std::string &contextText)
 This method is for setting contentText from the Notification service Message. More...
 
std::string getSourceName () const
 This method is for getting sourceName from the Notification service Message. More...
 
void setSourceName (const std::string &sourceName)
 This method is for setting sourceName from the Notification service Message. More...
 
NSMediaContentsgetMediaContents () const
 This method is for getting mediaContents from the Notification service Message. More...
 
void setMediaContents (NSMediaContents *mediaContents)
 This method is for setting mediaContents from the Notification service Message. More...
 
std::string getTopic () const
 This method is for getting Topic from the Notification service Message. More...
 
void setTopic (const std::string &topic)
 This method is for setting Topic for the Notification service Message. More...
 
OC::OCRepresentation getExtraInfo () const
 This method is for getting extraInfo from the Notification service Message. More...
 
void setExtraInfo (const OC::OCRepresentation &extraInfo)
 This method is for setting extraInfo for the Notification service Message. More...
 

Detailed Description

This class provides a set of APIs for Notification service Message .

Member Enumeration Documentation

NSMessageType - enumeration for Notification service MessageType.

Enumerator
NS_MESSAGE_ALERT 
NS_MESSAGE_NOTICE 
NS_MESSAGE_EVENT 
NS_MESSAGE_INFO 
NS_MESSAGE_WARNING 

Constructor & Destructor Documentation

OIC::Service::NSMessage::NSMessage ( )
inline

Constructor of NSMessage.

OIC::Service::NSMessage::NSMessage ( ::NSMessage msg)

Constructor of NSMessage.

Parameters
msg- pointer to NSMessage struct to initialize.
OIC::Service::NSMessage::NSMessage ( const NSMessage msg)

Copy Constructor of NSMessage.

Parameters
msg- NSMessage to initialize.
OIC::Service::NSMessage::~NSMessage ( )

Destructor of NSMessage.

Member Function Documentation

std::string OIC::Service::NSMessage::getContentText ( ) const

This method is for getting contentText from the Notification service Message.

Returns
contentText as string.
OC::OCRepresentation OIC::Service::NSMessage::getExtraInfo ( ) const

This method is for getting extraInfo from the Notification service Message.

Returns
extraInfo as OCRepresentation.
NSMediaContents* OIC::Service::NSMessage::getMediaContents ( ) const

This method is for getting mediaContents from the Notification service Message.

Returns
mediaContents as NSMediaContents pointer.
uint64_t OIC::Service::NSMessage::getMessageId ( ) const

This method is for getting Message Id from the Notification service Message.

Returns
Id as uint64_t.
std::string OIC::Service::NSMessage::getProviderId ( ) const

This method is for getting Provider Id from the Notification service Message.

Returns
Id as string.
std::string OIC::Service::NSMessage::getSourceName ( ) const

This method is for getting sourceName from the Notification service Message.

Returns
sourceName as string.
std::string OIC::Service::NSMessage::getTime ( ) const

This method is for getting time from the Notification service Message.

Returns
time as string.
std::string OIC::Service::NSMessage::getTitle ( ) const

This method is for getting Title from the Notification service Message.

Returns
Title as string.
std::string OIC::Service::NSMessage::getTopic ( ) const

This method is for getting Topic from the Notification service Message.

Returns
Topic as string.
uint64_t OIC::Service::NSMessage::getTTL ( ) const

This method is for getting time to live from the Notification service Message.

Returns
ttl as uint64_t.
NSMessageType OIC::Service::NSMessage::getType ( ) const

This method is for getting type from the Notification service Message.

Returns
type as NSMessageType.
NSMessage& OIC::Service::NSMessage::operator= ( const NSMessage msg)

Copy assignment operator of NSMessage.

Parameters
msg- NSMessage to initialize.
Returns
NSMessage object reference
void OIC::Service::NSMessage::setContentText ( const std::string &  contextText)

This method is for setting contentText from the Notification service Message.

Parameters
contextTextas string.
void OIC::Service::NSMessage::setExtraInfo ( const OC::OCRepresentation extraInfo)

This method is for setting extraInfo for the Notification service Message.

Returns
extraInfo as OCRepresentation.
void OIC::Service::NSMessage::setMediaContents ( NSMediaContents mediaContents)

This method is for setting mediaContents from the Notification service Message.

Parameters
mediaContentsas NSMediaContents pointer.
void OIC::Service::NSMessage::setSourceName ( const std::string &  sourceName)

This method is for setting sourceName from the Notification service Message.

Parameters
sourceNameas string.
void OIC::Service::NSMessage::setTime ( const std::string &  time)

This method is for setting time from the Notification service Message.

Parameters
timeas string.
void OIC::Service::NSMessage::setTitle ( const std::string &  title)

This method is for setting Title from the Notification service Message.

Parameters
titleas string.
void OIC::Service::NSMessage::setTopic ( const std::string &  topic)

This method is for setting Topic for the Notification service Message.

Returns
Topic as string.
void OIC::Service::NSMessage::setTTL ( const uint64_t &  ttl)

This method is for setting time to live from the Notification service Message.

Parameters
ttlas uint64_t.
void OIC::Service::NSMessage::setType ( const NSMessageType type)

This method is for setting type from the Notification service Message.

Parameters
typeas NSMessageType.

The documentation for this class was generated from the following file: