struct CCL::INotificationCenter
Overview
Notification center interface. More…
#include <inotificationcenter.h> struct INotificationCenter: public CCL::Alert::IReporter { // structs struct Stats; // methods virtual INotification*CCL_API createNotification ( const NotificationProperties& properties, const IAttributeList* attributes = nullptr, const NotificationActionProperties actionProperties [] = nullptr, int actionCount = 0 ) const = 0; virtual tresult CCL_API addNotification (INotification* n) = 0; virtual tresult CCL_API removeNotification (INotification* n) = 0; virtual void CCL_API setInAppNotificationIcon (IImage* icon) = 0; virtual INotification*CCL_API sendInAppNotification ( StringRef title, StringRef body, const IAttributeList* attributes = nullptr, const NotificationActionProperties actionProperties [] = nullptr, int actionCount = 0 ) = 0; virtual IUnknownIterator*CCL_API createIterator () const = 0; virtual INotification*CCL_API findNotification (StringID id) const = 0; virtual tresult CCL_API setState (INotification* n, int state) = 0; virtual tresult CCL_API triggerAction (INotification* n, StringID actionId) const = 0; virtual void CCL_API getStats (Stats& stats, StringID category = nullptr) const = 0; virtual tresult CCL_API registerHandler (INotificationActionHandler* handler) = 0; virtual tresult CCL_API unregisterHandler (INotificationActionHandler* handler) = 0; DECLARE_STRINGID_MEMBER (kNotificationAdded); };
Inherited Members
public: // methods virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0; virtual unsigned int CCL_API retain () = 0; virtual unsigned int CCL_API release () = 0; virtual void CCL_API reportEvent (const Event& e) = 0; virtual void CCL_API setReportOptions (Severity minSeverity, int eventFormat) = 0;
Detailed Documentation
Notification center interface.
Threading Policy: Called from main thread only.
Methods
virtual INotification*CCL_API createNotification ( const NotificationProperties& properties, const IAttributeList* attributes = nullptr, const NotificationActionProperties actionProperties [] = nullptr, int actionCount = 0 ) const = 0
Create notification (owned by caller).
Optionally a list of actions can be added to the notification. The first action in the array will be the default action.
virtual tresult CCL_API addNotification (INotification* n) = 0
Add and display notification (takes ownership).
Existing notification with same id will be updated.
virtual tresult CCL_API removeNotification (INotification* n) = 0
Remove notification (owned by caller).
virtual void CCL_API setInAppNotificationIcon (IImage* icon) = 0
Set icon used for in-app notifications.
virtual INotification*CCL_API sendInAppNotification ( StringRef title, StringRef body, const IAttributeList* attributes = nullptr, const NotificationActionProperties actionProperties [] = nullptr, int actionCount = 0 ) = 0
Create and add an in-app notification.
virtual IUnknownIterator*CCL_API createIterator () const = 0
Create iterator of existing notifications.
virtual INotification*CCL_API findNotification (StringID id) const = 0
Find existing notification.
virtual tresult CCL_API setState (INotification* n, int state) = 0
Set notification state (seen by user).
virtual tresult CCL_API triggerAction (INotification* n, StringID actionId) const = 0
Trigger notification action.
virtual void CCL_API getStats (Stats& stats, StringID category = nullptr) const = 0
Get notification statistics, can be filtered by category.
virtual tresult CCL_API registerHandler (INotificationActionHandler* handler) = 0
Register action handler in the notification center.
virtual tresult CCL_API unregisterHandler (INotificationActionHandler* handler) = 0
Unregister action handler in the notification center.
DECLARE_STRINGID_MEMBER (kNotificationAdded)
< Notification has been removed (args[0]: INotification)
< Notification has been updated (args[0]: INotification) < Notification was seen by user (args[0]: INotification) < Notification statistics changed