This plugin sample delete a selected notification from the current system.
More...
#include <DeleteNotification.h>
This plugin sample delete a selected notification from the current system.
Definition at line 12 of file DeleteNotification.h.
Inherits CppSamples::Common::Plugin.
CppSamples::Notifications::DeleteNotification::DeleteNotification |
( |
const std::string |
description | ) |
|
|
inline |
Definition at line 14 of file DeleteNotification.h.
Plugin is the abstract class which can be a menu item and/or a sample. Every sample and menu item mus...
CppSamples::Notifications::DeleteNotification::~DeleteNotification |
( |
| ) |
|
|
inline |
Get a collection of notifications from the given VideoExpert system.
- Parameters
-
vxSystem | Pointer to the VideoExpert system. |
- Returns
- A collection of notifications.
Definition at line 45 of file DeleteNotification.cpp.
49 if (result == VxResult::kInsufficientSize) {
virtual VxResult::Value GetNotifications(VxCollection< IVxNotification ** > ¬ificationCollection) const =0
Prints the given collection of notifications to the screen.
- Parameters
-
notificationCollection | Collection of notifications. |
Definition at line 62 of file DeleteNotification.cpp.
64 cout << notificationCollection.
collectionSize <<
" notifications found." <<
"\n";
68 cout <<
"---------------------------------------------------------------------------------------------";
72 cout <<
"\n" << (i + 1);
73 cout <<
"\t" << notification->
id;
78 if (result == VxResult::kInsufficientSize) {
82 cout <<
"\t" << roles.
collectionSize <<
" role(s) associated with this.";
84 cout <<
"\n\t\t" << (i + 1) <<
"." << (j + 1) <<
"\t" << roles.
collection[j]->
name;
86 cout <<
"\n---------------------------------------------------------------------------------------------\n";
virtual VxResult::Value GetRoles(VxCollection< IVxRole ** > &roleCollection) const =0
Delete a selected notification from the current system.
- Parameters
-
dataModel | Instance of data model. |
Implements CppSamples::Common::Plugin.
Definition at line 13 of file DeleteNotification.cpp.
14 Utility::ClearScreen();
24 if (result == VxResult::kOK)
25 cout <<
"\n" <<
"Notification deleted succesfully.\n";
27 cout <<
"\n" <<
"Failed to delete notification!!\n";
VxSdk::IVxSystem * VxSystem
Represents a VideoXpert system and allows the user to manage the system and devices.
static VxSdk::VxCollection< VxSdk::IVxNotification ** > GetNotifications(VxSdk::IVxSystem *vxSystem)
Get a collection of notifications from the given VideoExpert system.
static void PrintNotifications(VxSdk::VxCollection< VxSdk::IVxNotification ** > notificationCollection)
Prints the given collection of notifications to the screen.
Plugin * GetParent() const
Gets the reference to the parent of this plugin.
virtual VxResult::Value DeleteNotification() const =0
int SelectNotificationIndex(VxSdk::VxCollection< VxSdk::IVxNotification ** > ¬ifications)
Select a notification from the given collection by user input.
Select a notification from the given collection by user input.
- Parameters
-
notifications | Collection of notification. |
- Returns
- Index of the selected notification in the given collection.
Definition at line 94 of file DeleteNotification.cpp.
97 cout <<
"\n" <<
"Enter notification number [1-" << notifications.
collectionSize <<
"] : ";
98 int index = Utility::ReadInt();
105 cout <<
"\n" <<
"Invalid Option !!!";
107 cout <<
"\n" <<
"Enter 0 to go back.";
The documentation for this class was generated from the following files: