Re-organized sub-directory by category
[staging/basesystem.git] / service / native / notification_persistent_service / server / include / ns_npp_regular_notification.h
1 /*
2  * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 ////////////////////////////////////////////////////////////////////////////////////////////////////
18 /// \defgroup <<Group Tag>> <<Group Name>>
19 /// \ingroup  tag_NS_NPPService
20 /// .
21 ////////////////////////////////////////////////////////////////////////////////////////////////////
22
23 ////////////////////////////////////////////////////////////////////////////////////////////////////
24 /// \ingroup  tag_NS_NPPService
25 /// \brief    This file contains declaration of class CRegularNotification.
26 ///
27 ////////////////////////////////////////////////////////////////////////////////////////////////////
28
29 #ifndef NOTIFICATION_PERSISTENT_SERVICE_SERVER_INCLUDE_NS_NPP_REGULAR_NOTIFICATION_H_
30 #define NOTIFICATION_PERSISTENT_SERVICE_SERVER_INCLUDE_NS_NPP_REGULAR_NOTIFICATION_H_
31
32 ////////////////////////////////////////////////////////////////////////////////////////////////////
33 // Include Files
34 ////////////////////////////////////////////////////////////////////////////////////////////////////
35 #include <string>
36 #include "ns_npp_notification.h"
37
38 /**
39  *  This class inherits CNotification class and implements regular notification related operations.
40  */
41 class CRegularNotification : public CNotification {
42  private:
43   // no members in private
44
45  public:
46   ////////////////////////////////////////////////////////////////////////////////////////////////
47   /// CRegularNotification
48   /// Constructor of CRegularNotification class
49   ///
50   /// \param  [IN] f_cnotificationname
51   ///     std::string - Notification name
52   ///
53   /// \param  [IN] f_uimaxmsgsize
54   ///     UI_32 - Maximum size of notification data
55   ///
56   /// \return
57   ///
58   ////////////////////////////////////////////////////////////////////////////////////////////////
59   CRegularNotification(const std::string &f_cnotificationname,
60                        const UI_32 f_uimaxmsgsize);
61
62   ////////////////////////////////////////////////////////////////////////////////////////////////
63   /// ~CRegularNotification
64   /// Destructor of CRegularNotification class
65   ///
66   /// \param
67   ///
68   /// \return
69   ///
70   ////////////////////////////////////////////////////////////////////////////////////////////////
71   ~CRegularNotification();
72
73   ////////////////////////////////////////////////////////////////////////////////////////////////
74   /// AddEventReciever
75   /// This function adds the name of the application to receiver list of particular notification.
76   ///
77   /// \param  [IN] f_csubscribername
78   ///     std::string - name of application subscribing for notification
79   ///
80   /// \return EFrameworkunifiedStatus
81   //      EFrameworkunifiedStatus - success or failure status
82   ///
83   ////////////////////////////////////////////////////////////////////////////////////////////////
84   EFrameworkunifiedStatus AddEventReciever(const std::string &f_csubscribername);
85
86   ////////////////////////////////////////////////////////////////////////////////////////////////
87   /// Publish
88   /// This function publishes the notification to subscribed clients.
89   ///
90   /// \param  [IN] f_cservicename
91   ///     std::string - name of service publishing the notification
92   ///
93   /// \param  [IN] f_pmessage
94   ///     std::string - data of notification
95   ///
96   /// \param  [IN] f_uimsgsize
97   ///     std::string - length of data
98   ///
99   /// \return EFrameworkunifiedStatus
100   //      EFrameworkunifiedStatus - success or failure status
101   ///
102   ////////////////////////////////////////////////////////////////////////////////////////////////
103   EFrameworkunifiedStatus Publish(const std::string &f_cservicename,
104                      PVOID f_pmessage,
105                      const UI_32 f_uimsgsize);
106 };
107
108
109 #endif  // NOTIFICATION_PERSISTENT_SERVICE_SERVER_INCLUDE_NS_NPP_REGULAR_NOTIFICATION_H_