Remove unused directories and files in video_in_hal
[staging/basesystem.git] / service / native / notification_persistent_service / server / src / ns_npp_notification.cpp
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 /// \ingroup  tag_NS_NPPService
19 /// \brief    This file contains implementation of CNotification class.
20 ///       It define functionalities common to all types of notification.
21 ///
22 ////////////////////////////////////////////////////////////////////////////////////////////////////
23
24 ////////////////////////////////////////////////////////////////////////////////////////////////////
25 // Include Files
26 ////////////////////////////////////////////////////////////////////////////////////////////////////
27
28 #include <native_service/frameworkunified_framework_if.h>
29 #include <native_service/ns_message_center_if.h>
30 #include <native_service/ns_np_service_protocol.h>
31 #include <utility>
32 #include <iostream>
33 #include <string>
34 #include <native_service/ns_mc_system_info.h>
35 #include "ns_npp_notificationpersistentservicelog.h"
36 #include "ns_npp_handlelist.h"
37 #include "ns_npp_notification.h"
38
39
40 ////////////////////////////////////////////////////////////////////////////////////////////////////
41 /// CNotification
42 /// Constructor of CNotification class
43 ////////////////////////////////////////////////////////////////////////////////////////////////////
44 CNotification::CNotification() {  // LCOV_EXCL_START 8: dead code
45   AGL_ASSERT_NOT_TESTED();  // LCOV_EXCL_LINE 200: test assert
46   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+");
47
48   m_cNotificationName = "";
49   m_uiMaxMsgSize = 0;
50   m_ePersistentType = eFrameworkunifiedUnknown;
51
52   m_cServiceName = "";
53
54   m_pmSubscribersList = NULL;
55
56   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "-");
57 }
58 // LCOV_EXCL_STOP
59
60 ////////////////////////////////////////////////////////////////////////////////////////////////////
61 /// CNotification
62 /// Constructor of CNotification class
63 ////////////////////////////////////////////////////////////////////////////////////////////////////
64 CNotification::CNotification(const std::string &f_cnotificationname,
65                              const UI_32 f_uimaxmsgsize) {
66   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+");
67
68   m_cNotificationName = "";
69   m_uiMaxMsgSize = 0;
70   m_ePersistentType = eFrameworkunifiedUnknown;
71   m_pmSubscribersList = NULL;
72
73   if (!f_cnotificationname.empty()) {  // LCOV_EXCL_BR_LINE 200: f_cnotificationname can't be empty
74     m_cNotificationName = f_cnotificationname;
75     m_uiMaxMsgSize = f_uimaxmsgsize;
76 //    m_ePersistentType = eFrameworkunifiedUnknown;
77
78     m_cServiceName = "";
79
80     m_pmSubscribersList = new(std::nothrow) NotifReceiver_Type();  // LCOV_EXCL_BR_LINE 11:unexpected branch
81   } else {
82     // LCOV_EXCL_START 200: f_cnotificationname can't be empty
83     AGL_ASSERT_NOT_TESTED();  // LCOV_EXCL_LINE 200: test assert
84     FRAMEWORKUNIFIEDLOG(ZONE_NPP_INFO, __FUNCTION__, "Notification String is Empty");
85
86     CNotification();
87     // LCOV_EXCL_STOP
88   }
89
90   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "-");
91 }
92
93
94 ////////////////////////////////////////////////////////////////////////////////////////////////////
95 /// ~CNotification
96 /// Destructor of CNotification class
97 ////////////////////////////////////////////////////////////////////////////////////////////////////
98 CNotification::~CNotification() {
99   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+");
100
101   // iterator of CNotificationReceiver map
102   NotifReceiver_Iterator_Type l_itNotifReceiver;
103
104   CNotificationReceiver *l_pNotificationReceiver = NULL;
105
106   if (NULL != m_pmSubscribersList) {  // LCOV_EXCL_BR_LINE 6: m_pmSubscribersList can't be NULL
107     if (!m_pmSubscribersList->empty()) {
108       for (l_itNotifReceiver = m_pmSubscribersList->begin();
109            l_itNotifReceiver != m_pmSubscribersList->end();
110            l_itNotifReceiver++) {
111         l_pNotificationReceiver = (*l_itNotifReceiver).second;
112
113         if (NULL != l_pNotificationReceiver) {  // LCOV_EXCL_BR_LINE 6: l_pNotificationReceiver can't be NULL
114           // NOTE: Uncomment following code when implementation of the function RemoveHandleFromList
115           // is available. To find the reason why it is not implemented, see the function definition.
116           // CHandleList *l_hHandleList = CHandleList::GetHandleList();
117           // l_hHandleList->RemoveHandleFromList((*l_itNotifReceiver).first);
118
119           delete l_pNotificationReceiver;    // LCOV_EXCL_BR_LINE 11: unexpected branch
120           l_pNotificationReceiver = NULL;
121         }
122       }
123
124       // clear the map
125       m_pmSubscribersList->clear();
126     }
127
128     delete m_pmSubscribersList;    // LCOV_EXCL_BR_LINE 11: unexpected branch
129     m_pmSubscribersList = NULL;
130   }
131
132   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "-");
133 }
134
135 ////////////////////////////////////////////////////////////////////////////////////////////////////
136 /// AddEventReciever
137 /// This function adds the name of the application to receiver list of particular notification.
138 ////////////////////////////////////////////////////////////////////////////////////////////////////
139 EFrameworkunifiedStatus CNotification::AddEventReciever(const std::string &f_csubscribername) {
140   EFrameworkunifiedStatus l_estatus = eFrameworkunifiedStatusOK;
141   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+");
142
143   if (!f_csubscribername.empty()) {  // LCOV_EXCL_BR_LINE 6: f_csubscribername can't be empty
144     l_estatus = AddReceiverInMap(f_csubscribername);
145   } else {
146     AGL_ASSERT_NOT_TESTED();  // LCOV_EXCL_LINE 200: test assert
147     l_estatus = eFrameworkunifiedStatusInvldParam;  // LCOV_EXCL_LINE 6: f_csubscribername can't be empty
148   }
149
150   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "-");
151   return l_estatus;
152 }
153
154 ////////////////////////////////////////////////////////////////////////////////////////////////////
155 /// Publish
156 /// This function publishes the notification to subscribed clients.
157 ////////////////////////////////////////////////////////////////////////////////////////////////////
158 EFrameworkunifiedStatus CNotification::Publish(const std::string &f_cservicename,
159                                   PVOID f_pmessage,
160                                   const UI_32 f_uimsgsize) {
161   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+");
162   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "-");
163   return eFrameworkunifiedStatusFail;
164 }
165
166 ////////////////////////////////////////////////////////////////////////////////////////////////////
167 /// DeleteEventReciever
168 /// This function deletes the name of application from receivers list.
169 ////////////////////////////////////////////////////////////////////////////////////////////////////
170 EFrameworkunifiedStatus CNotification::DeleteEventReciever(const std::string &f_csubscribername) {
171   EFrameworkunifiedStatus l_estatus = eFrameworkunifiedStatusOK;
172   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+");
173
174   // iterator of CNotificationReceiver map
175   NotifReceiver_Iterator_Type l_iterator;
176
177   CNotificationReceiver *l_pNotificationReceiver = NULL;
178
179   if (!f_csubscribername.empty()) {  // LCOV_EXCL_BR_LINE 6: double check, f_csubscribername can't be empty
180     l_iterator = m_pmSubscribersList->find(f_csubscribername);
181
182
183     if (l_iterator != m_pmSubscribersList->end()) {
184       l_pNotificationReceiver = (*l_iterator).second;
185
186       if (NULL != l_pNotificationReceiver) {  // LCOV_EXCL_BR_LINE 6: l_pNotificationReceiver can't be NULL
187         // NOTE: Uncomment following code when implementation of the function RemoveHandleFromList
188         // is available. To find the reason why it is not implemented, see the function definition.
189         // CHandleList *l_hHandleList = CHandleList::GetHandleList();
190         // l_hHandleList->RemoveHandleFromList((*l_iterator).first);
191
192         delete l_pNotificationReceiver;  // LCOV_EXCL_BR_LINE 11: unexpected branch
193         l_pNotificationReceiver = NULL;
194       }
195
196       m_pmSubscribersList->erase(l_iterator);
197       FRAMEWORKUNIFIEDLOG(ZONE_NPP_INFO, __FUNCTION__, "Subscriber successfully deleted");  // LCOV_EXCL_BR_LINE 15:marco defined in "native_service/ns_logger_if.h"  // NOLINT[whitespace/line_length]
198     } else {
199       FRAMEWORKUNIFIEDLOG(ZONE_INFO, __FUNCTION__, "Invalid Iterator");
200     }
201   } else {
202     // LCOV_EXCL_START 6: double check, f_csubscribername can't be empty
203     AGL_ASSERT_NOT_TESTED();  // LCOV_EXCL_LINE 200: test assert
204     FRAMEWORKUNIFIEDLOG(ZONE_ERR, __FUNCTION__, "Subscriber Name String is Empty");
205     l_estatus = eFrameworkunifiedStatusFail;
206     // LCOV_EXCL_STOP
207   }
208
209   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "-");
210   return l_estatus;
211 }
212
213 ////////////////////////////////////////////////////////////////////////////////////////////////////
214 /// SetNewSubscribersList
215 /// This function sets the subscribers list of notification
216 ////////////////////////////////////////////////////////////////////////////////////////////////////
217 EFrameworkunifiedStatus CNotification::SetNewSubscribersList(CNotification *f_pnotification) {
218   EFrameworkunifiedStatus l_estatus = eFrameworkunifiedStatusOK;
219   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+");
220
221   // iterator of CNotificationReceiver map
222   NotifReceiver_Iterator_Type l_itNotifReceiver;
223
224   std::string l_cSubscriberName;
225
226   if (NULL != f_pnotification && NULL != f_pnotification->m_pmSubscribersList) {  // LCOV_EXCL_BR_LINE 6: f_pnotification and f_pnotification->m_pmSubscribersList can't be empty  // NOLINT[whitespace/line_length]
227     if (!f_pnotification->m_pmSubscribersList->empty()) {
228       for (l_itNotifReceiver = f_pnotification->m_pmSubscribersList->begin();
229            l_itNotifReceiver != f_pnotification->m_pmSubscribersList->end();
230            l_itNotifReceiver++) {
231         l_cSubscriberName = (*l_itNotifReceiver).first;
232         AddReceiverInMap(l_cSubscriberName);  // LCOV_EXCL_BR_LINE 11: unexpected branch
233       }
234     } else {
235       FRAMEWORKUNIFIEDLOG(ZONE_ERR, __FUNCTION__, "Subscriber List Empty");
236     }
237   } else {
238     AGL_ASSERT_NOT_TESTED();  // LCOV_EXCL_LINE 200: test assert
239     l_estatus = eFrameworkunifiedStatusNullPointer;  // LCOV_EXCL_LINE 6: f_pnotification and f_pnotification->m_pmSubscribersList can't be empty  // NOLINT[whitespace/line_length]
240   }
241
242   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "-");
243   return l_estatus;
244 }
245
246 ////////////////////////////////////////////////////////////////////////////////////////////////////
247 /// SetEventPublisher
248 /// This function set the publisher name to current received service name
249 ////////////////////////////////////////////////////////////////////////////////////////////////////
250 EFrameworkunifiedStatus CNotification::SetEventPublisher(const std::string &f_cservicename) {
251   EFrameworkunifiedStatus l_estatus = eFrameworkunifiedStatusOK;
252   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+");
253
254   if (!f_cservicename.empty()) {
255     m_cServiceName = f_cservicename;
256     FRAMEWORKUNIFIEDLOG(ZONE_NPP_INFO, __FUNCTION__, "Service successfully set");  // LCOV_EXCL_BR_LINE 15: marco defined in "native_service/ns_logger_if.h"  // NOLINT[whitespace/line_length]
257   } else {
258     FRAMEWORKUNIFIEDLOG(ZONE_ERR, __FUNCTION__, "Service Name String is Empty");
259     l_estatus = eFrameworkunifiedStatusFail;
260   }
261
262   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "-");
263   return l_estatus;
264 }
265
266
267 ////////////////////////////////////////////////////////////////////////////////////////////////////
268 /// ResetEventPublisher
269 /// This function resets the publisher name
270 ////////////////////////////////////////////////////////////////////////////////////////////////////
271 EFrameworkunifiedStatus CNotification::ResetEventPublisher(const std::string &f_cservicename) {
272   EFrameworkunifiedStatus l_estatus = eFrameworkunifiedStatusOK;
273   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+");
274
275   if (f_cservicename.empty()) {  // LCOV_EXCL_BR_LINE 6: f_cservicename can't be empty
276     AGL_ASSERT_NOT_TESTED();  // LCOV_EXCL_LINE 200: test assert
277     l_estatus = eFrameworkunifiedStatusInvldParam;  // LCOV_EXCL_LINE 6: f_cservicename can't be empty
278   } else {
279     if (0 == m_cServiceName.compare(f_cservicename)) {
280       m_cServiceName = "";
281       FRAMEWORKUNIFIEDLOG(ZONE_NPP_INFO, __FUNCTION__, "Service successfully reset");  // LCOV_EXCL_BR_LINE 15: marco defined in "native_service/ns_logger_if.h"  // NOLINT[whitespace/line_length]
282     } else {
283       FRAMEWORKUNIFIEDLOG(ZONE_ERR, __FUNCTION__, "Service  Name Not Registered");  // LCOV_EXCL_BR_LINE 15: marco defined in "native_service/ns_logger_if.h"  // NOLINT[whitespace/line_length]
284       l_estatus = eFrameworkunifiedStatusFail;
285     }
286   }
287
288   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "-");
289   return l_estatus;
290 }
291
292 EFrameworkunifiedStatus CNotification::AddReceiverInMap(const std::string &f_csubscribername) {
293   EFrameworkunifiedStatus l_estatus = eFrameworkunifiedStatusOK;
294   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+");
295
296   // Message Queue Handle for passsing messages
297   HANDLE l_hMsgSenQueHandle = NULL;
298
299   // Pointer to class CNotificationReceiver
300   CNotificationReceiver *l_pCNotificationReceiver = NULL;
301
302   // Iterator for Notification Receiver map
303   NotifReceiver_Iterator_Type l_itrNotifReceiver;
304
305   if (!f_csubscribername.empty()) {  // LCOV_EXCL_BR_LINE 6: f_csubscribername can't be empty
306     FRAMEWORKUNIFIEDLOG(ZONE_NPP_INFO, __FUNCTION__, "Message Queue Handle Set");  // LCOV_EXCL_BR_LINE 15:marco defined in "native_service/ns_logger_if.h"  // NOLINT[whitespace/line_length]
307
308     CHandleList *l_hHandleList = CHandleList::GetHandleList();
309
310     l_hMsgSenQueHandle = l_hHandleList->GetSubscriberMqHandle(f_csubscribername);  // LCOV_EXCL_BR_LINE 11: unexpected branch  // NOLINT[whitespace/line_length]
311
312     // If handle not found
313     if (NULL == l_hMsgSenQueHandle) {
314       // Open a handle for sending messages to another message queue
315       l_hMsgSenQueHandle = McOpenSender(f_csubscribername.c_str());
316       l_hHandleList->AddHandleInList(f_csubscribername, l_hMsgSenQueHandle);  // LCOV_EXCL_BR_LINE 11: unexpected branch  // NOLINT[whitespace/line_length]
317     }
318
319     if (NULL !=  m_pmSubscribersList) {  // LCOV_EXCL_BR_LINE 6: m_pmSubscribersList can't be NULL
320       l_pCNotificationReceiver = new(std::nothrow) CNotificationReceiver();  // LCOV_EXCL_BR_LINE 11: unexpected branch
321
322       if (NULL != l_pCNotificationReceiver) {  // LCOV_EXCL_BR_LINE 5: l_pCNotificationReceiver can't be NULL
323         l_pCNotificationReceiver->m_MsgQHandle = l_hMsgSenQueHandle;
324
325         // Insert Subscriber name and associated message queue handle in the map
326         m_pmSubscribersList->insert(make_pair(f_csubscribername, l_pCNotificationReceiver));
327       } else {
328         // LCOV_EXCL_START 5: l_pCNotificationReceiver can't be NULL
329         AGL_ASSERT_NOT_TESTED();  // LCOV_EXCL_LINE 200: test assert
330         FRAMEWORKUNIFIEDLOG(ZONE_ERR, __FUNCTION__, "l_pCNotificationReceiver is NULL");
331         l_estatus = eFrameworkunifiedStatusNullPointer;
332         // LCOV_EXCL_STOP
333       }
334     } else {
335       // LCOV_EXCL_START 6: m_pmSubscribersList can't be NULL
336       AGL_ASSERT_NOT_TESTED();  // LCOV_EXCL_LINE 200: test assert
337       FRAMEWORKUNIFIEDLOG(ZONE_ERR, __FUNCTION__, "m_pmSubscribersList is NULL");
338       l_estatus = eFrameworkunifiedStatusNullPointer;
339       // LCOV_EXCL_STOP
340     }
341
342     if (eFrameworkunifiedStatusNullPointer == l_estatus) {
343       // close the queue handle
344       // NOTE: Uncomment following code when implementation of the function RemoveHandleFromList
345       // is available. To find the reason why it is not implemented, see the function definition.
346       // CHandleList *l_hHandleList = CHandleList::GetHandleList();
347       // l_hHandleList->RemoveHandleFromList(f_csubscribername);
348     }
349   } else {
350     AGL_ASSERT_NOT_TESTED();  // LCOV_EXCL_LINE 200: test assert
351     l_estatus = eFrameworkunifiedStatusInvldParam;  // LCOV_EXCL_LINE 6: f_csubscribername can't be empty
352   }
353
354   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "-");
355   return l_estatus;
356 }
357
358 ////////////////////////////////////////////////////////////////////////////////////////////////////
359 /// PublishData
360 /// This function publishes the notification to client.
361 ////////////////////////////////////////////////////////////////////////////////////////////////////
362 EFrameworkunifiedStatus CNotification::PublishData(HANDLE f_hmsgqhandle,
363                                       const PVOID f_pmessage,
364                                       const UI_32 f_uimsgsize) {
365   EFrameworkunifiedStatus l_estatus = eFrameworkunifiedStatusOK;
366   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+");
367
368   if (NULL != f_hmsgqhandle) {  // LCOV_EXCL_BR_LINE 6: f_hmsgqhandle can't be NULL
369     // Notification Name
370     PSTR l_cNotificationName = const_cast<PSTR>(m_cNotificationName.c_str());
371
372     if (eFrameworkunifiedStatusOK != (l_estatus = McSendWithSysInfo(f_hmsgqhandle, AppName, NPS_NOTIFY_EV_REQ, l_cNotificationName, f_uimsgsize, f_pmessage, 0))) {  // LCOV_EXCL_BR_LINE 4: NSFW error case  // NOLINT[whitespace/line_length]
373       // LCOV_EXCL_START 4: NSFW error case.
374       AGL_ASSERT_NOT_TESTED();  // LCOV_EXCL_LINE 200: test assert
375       FRAMEWORKUNIFIEDLOG(ZONE_ERR, __FUNCTION__, "PublishData failed while McSend for Notification %s, Error Status: 0x%x",
376              l_cNotificationName, l_estatus);
377       // LCOV_EXCL_STOP
378     }
379   } else {
380     // LCOV_EXCL_START 6: f_hmsgqhandle can't be NULL
381     AGL_ASSERT_NOT_TESTED();  // LCOV_EXCL_LINE 200: test assert
382     FRAMEWORKUNIFIEDLOG(ZONE_ERR, __FUNCTION__, "MsgQ Handle NULL");
383     l_estatus = eFrameworkunifiedStatusNullPointer;
384     // LCOV_EXCL_STOP
385   }
386
387   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "-");
388   return l_estatus;
389 }
390
391 ////////////////////////////////////////////////////////////////////////////////////////////////////
392 /// IsServiceRegistered
393 /// This function checks whether the notification is registered with any service or not.
394 ////////////////////////////////////////////////////////////////////////////////////////////////////
395 BOOL CNotification::IsServiceRegistered() {
396   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+");
397
398   if (!m_cServiceName.empty()) {
399     return TRUE;
400   } else {
401     return FALSE;
402   }
403 }
404
405 ////////////////////////////////////////////////////////////////////////////////////////////////////
406 /// IsSubscribersListEmpty
407 /// This function is used to check whether any service is subscribed to notification
408 ////////////////////////////////////////////////////////////////////////////////////////////////////
409 BOOL CNotification::IsSubscribersListEmpty() {
410   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+");
411
412   if (NULL != m_pmSubscribersList) {  // LCOV_EXCL_BR_LINE 6: m_pmSubscribersList can't be NULL
413     if (m_pmSubscribersList->empty()) {
414       return TRUE;
415     }
416   }
417
418   return FALSE;
419 }
420
421 ////////////////////////////////////////////////////////////////////////////////////////////////////
422 /// GetNotificationName
423 /// This function is used to get the notification name.
424 ////////////////////////////////////////////////////////////////////////////////////////////////////
425 std::string CNotification::GetNotificationName() {
426   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+");
427
428   return m_cNotificationName;
429 }
430
431 ////////////////////////////////////////////////////////////////////////////////////////////////////
432 /// GetPublisherName
433 /// This function is used to get the publisher name of notification.
434 ////////////////////////////////////////////////////////////////////////////////////////////////////
435 std::string CNotification::GetPublisherName() {
436   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+");
437
438   return m_cServiceName;
439 }
440
441 ////////////////////////////////////////////////////////////////////////////////////////////////////
442 /// GetPersistenceType
443 /// This function is used to get the type of notification.
444 ////////////////////////////////////////////////////////////////////////////////////////////////////
445 EFrameworkunifiedNotificationType CNotification::GetNotificationType() {
446   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+");
447
448   return m_ePersistentType;
449 }
450
451 ////////////////////////////////////////////////////////////////////////////////////////////////////
452 /// GetMaxMessageSize
453 /// This function is used to get the max size of data of notification message.
454 ////////////////////////////////////////////////////////////////////////////////////////////////////
455 UI_32 CNotification::GetMaxMessageSize() {
456   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+");
457
458   return m_uiMaxMsgSize;
459 }
460
461 ////////////////////////////////////////////////////////////////////////////////////////////////
462 /// ResetMaxMessageSize
463 /// This function reset the max size of data that can be published with notification.
464 ////////////////////////////////////////////////////////////////////////////////////////////////
465 EFrameworkunifiedStatus CNotification::ResetMaxMessageSize(const UI_32 f_uilength) {
466   EFrameworkunifiedStatus l_estatus = eFrameworkunifiedStatusOK;
467   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+");
468
469   m_uiMaxMsgSize = f_uilength;
470
471   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "-");
472   return l_estatus;
473 }
474
475 #ifdef NPP_PROFILEINFO_ENABLE
476
477 ////////////////////////////////////////////////////////////////////////////////////////////////
478 /// GetSubscriberList
479 /// Returns the list of subscribers subscribed to notification
480 ////////////////////////////////////////////////////////////////////////////////////////////////
481 NotifReceiver_Type *CNotification::GetSubscriberList() {
482   return m_pmSubscribersList;
483 }
484
485 #endif