\r
#include <string>\r
#include "NSMediaContents.h"\r
+#include "OCRepresentation.h"\r
\r
namespace OIC\r
{\r
/** NSMessageType - enumeration for Notification service MessageType*/\r
enum class NSMessageType\r
{\r
- NS_MESSAGE_ALERT = 0,\r
- NS_MESSAGE_NOTICE = 1,\r
- NS_MESSAGE_EVENT = 2,\r
- NS_MESSAGE_INFO = 3,\r
+ NS_MESSAGE_ALERT = 1,\r
+ NS_MESSAGE_NOTICE = 2,\r
+ NS_MESSAGE_EVENT = 3,\r
+ NS_MESSAGE_INFO = 4,\r
+ NS_MESSAGE_WARNING = 5,\r
};\r
\r
/**\r
* Constructor of NSMessage.\r
*/\r
- NSMessage(): m_mediaContents(new NSMediaContents) { }\r
+ NSMessage(): m_messageId(0), m_type(NSMessageType::NS_MESSAGE_ALERT), m_ttl(0),\r
+ m_mediaContents(new NSMediaContents), m_extraInfo(OC::OCRepresentation())\r
+ {\r
+ }\r
\r
/**\r
* Constructor of NSMessage.\r
NSMessage(::NSMessage *msg);\r
\r
/**\r
+ * Copy Constructor of NSMessage.\r
+ *\r
+ * @param msg - NSMessage to initialize.\r
+ */\r
+ NSMessage(const NSMessage &msg);\r
+\r
+ /**\r
+ * Copy assignment operator of NSMessage.\r
+ *\r
+ * @param msg - NSMessage to initialize.\r
+ * @return NSMessage object reference\r
+ */\r
+ NSMessage &operator=(const NSMessage &msg);\r
+\r
+ /**\r
* Destructor of NSMessage.\r
*/\r
- ~NSMessage() = default;\r
+ ~NSMessage();\r
\r
/**\r
* This method is for getting Message Id from the Notification service Message.\r
/**\r
* This method is for setting Title from the Notification service Message.\r
*\r
- * @param Title as string.\r
+ * @param title as string.\r
*/\r
void setTitle(const std::string &title);\r
\r
/**\r
* This method is for setting contentText from the Notification service Message.\r
*\r
- * @param contentText as string.\r
+ * @param contextText as string.\r
*/\r
void setContentText(const std::string &contextText);\r
\r
*/\r
void setMediaContents(NSMediaContents *mediaContents);\r
\r
+ /**\r
+ * This method is for getting Topic from the Notification service Message.\r
+ *\r
+ * @return Topic as string.\r
+ */\r
+ std::string getTopic() const;\r
+\r
+ /**\r
+ * This method is for setting Topic for the Notification service Message.\r
+ *\r
+ * @return Topic as string.\r
+ */\r
+ void setTopic(const std::string &topic);\r
+\r
+ /**\r
+ * This method is for getting extraInfo from the Notification service Message.\r
+ *\r
+ * @return extraInfo as OCRepresentation.\r
+ */\r
+ OC::OCRepresentation getExtraInfo() const;\r
+\r
+ /**\r
+ * This method is for setting extraInfo for the Notification service Message.\r
+ *\r
+ * @return extraInfo as OCRepresentation.\r
+ */\r
+ void setExtraInfo(const OC::OCRepresentation &extraInfo);\r
\r
private:\r
uint64_t m_messageId;\r
std::string m_contentText;\r
std::string m_sourceName;\r
NSMediaContents *m_mediaContents;\r
+ std::string m_topic;\r
+ OC::OCRepresentation m_extraInfo;\r
\r
};\r
}\r