NotificationInfo

NAOqi Core - Overview | API | NotificationInfo



#include <alproxies/notificationinfo.h>

Expose all information required for a notification.

NotificationInfo::NotificationInfo(const std::string& message, const std::string& severity, bool removeOnRead)

Constructor using a set of values to create a NotificationInfo.

NotificationInfo::NotificationInfo(const AL::ALValue& notification)

Constructor using an ALValue to create the NotificationInfo (see ALValue NotificationInfo).

int NotificationInfo::id()
Returns: The unique identifier of the notification.
std::string NotificationInfo::message()
Returns: The message of the notification.
std::string NotificationInfo::severity()

The severity. 3 levels of severity:

  • “info”
  • “warning”
  • “error”
Returns: The severity of the notification.
bool NotificationInfo::removeOnRead()

If the value is true, once read, the notification is removed from the list of pending notifications.

Returns: True if, once read, the notification must be removed from the list of pending notifications, false otherwise.
AL::ALValue NotificationInfo::toALValue()

Converts the NotificationInfo object as an ALValue. ALValue NotificationInfo

Returns: The ALValue representation of the NotificationInfo object.

ALValue NotificationInfo

The ALValue NotificationInfo is an array of n-pair (key, value).

In order to exchange this object with other modules, the Notification object can be represented as ALValue with the following structure:

key value type default value
“id” int -1
“message” string “”
“severity” string “info”
“removeOnRead” bool true

Empty values will take default value.