summaryrefslogtreecommitdiffstats
path: root/nsframework/notification_persistent_service/server/include/ns_npp_persistence_manager.h
blob: 99f98d7e83c187872bbaff61fc798c076f5ac927 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
/*
 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

////////////////////////////////////////////////////////////////////////////////////////////////////
/// \ingroup  tag_NPPService
/// \brief    The file contains declaration of CPersistenceManager class.
///           This class acts as a manager for notification persistent data storage
///           and file and folder persistence.
///
///
////////////////////////////////////////////////////////////////////////////////////////////////////

#ifndef NOTIFICATION_PERSISTENT_SERVICE_SERVER_INCLUDE_NS_NPP_PERSISTENCE_MANAGER_H_
#define NOTIFICATION_PERSISTENT_SERVICE_SERVER_INCLUDE_NS_NPP_PERSISTENCE_MANAGER_H_


#include <native_service/frameworkunified_types.h>
#include <native_service/ns_np_service.h>
#include <map>
#include <string>
#include <vector>
#include "ns_npp_types.h"
#include "ns_npp_persistent_accesser.h"

class CPersistence;
class CPersistentData;
class CNotificationsToPersist;

////////////////////////////////////////////////////////////////////////////////////////////////////
/// vector of all available persistent notification and its data.
////////////////////////////////////////////////////////////////////////////////////////////////////
typedef std::vector<CNotificationsToPersist *> Persistent_Notification_List_Type;

////////////////////////////////////////////////////////////////////////////////////////////////////
/// Map of all persist file type. i.e. FilePersistence and FolderPersistence
////////////////////////////////////////////////////////////////////////////////////////////////////
typedef std::map<ENotificationpersistentservicePersistType, CPersistence *> Persist_Type;

typedef Persist_Type::iterator Persist_Type_Iter;

/**
 *  This class acts as a manager for storing notification data,file and folder in
 *  persistent memory.
 */
class CPersistenceManager {
 public:
  /// Disable Persistence
  static BOOL m_bPersistenceDisabled;  // NOLINT (readability/naming)

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// CPersistenceManager
  /// Constructor of CPersistenceManager class
  ///
  /// \param
  ///
  /// \return
  ///
  ////////////////////////////////////////////////////////////////////////////////////////////////
  CPersistenceManager();

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// ~CPersistenceManager
  /// Destructor of CPersistenceManager class
  ///
  /// \param
  ///
  /// \return
  ///
  ////////////////////////////////////////////////////////////////////////////////////////////////
  ~CPersistenceManager();

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// NotificationpersistentserviceRegister
  /// Registers a tag for the file or folder. This tag will be used for releasing or loading a
  /// file or folder.
  ///
  /// \param [IN] f_cappname
  ///      string - Name of the application requesting for persistence
  ///
  /// \param [IN] f_ctag
  ///      string - File/Folder will be persist against this tag.
  ///
  /// \param [IN] f_epersisttype
  ///      ENotificationpersistentservicePersistType - ENOTIFICATIONPERSISTENTSERVICEPERSISTFILE - Tag to register is for a file
  ///                ENOTIFICATIONPERSISTENTSERVICEPERSISTFOLDER - Tag to register is for a folder
  ///
  /// \param [IN] bisuserpersistence

  ///      BOOL - TRUE if user persistence else FALSE
  ///
  /// \return EFrameworkunifiedStatus
  ///     EFrameworkunifiedStatus - success or failure status
  ///
  ///
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus NotificationpersistentserviceRegister(std::string f_cappname,
                         std::string f_ctag,
                         ENotificationpersistentservicePersistType f_epersisttype,
                         BOOL bisuserpersistence);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// NotificationpersistentserviceRelease
  /// Entry for the file or folder is stored in map for persistence.
  /// If f_bPersist is TRUE file or folder will be persist immediately else will be persist
  /// on shutdown
  ///
  /// \param [IN] f_cappname
  ///      string - Name of the application requesting for persistence
  ///
  /// \param [IN] f_ctag
  ///      string - File/Folder will be persist against this tag.
  ///
  /// \param [IN] f_cmempath
  ///      string - File/Folder which needs to persist.
  ///
  /// \param [IN] enotificationpersistentservicereleasetype
  ///      EFrameworkunifiedReleaseType - eFrameworkunifiedNotOnRelease = 0  :not on release
  ///                        eFrameworkunifiedPersistOnShutdown :persist on shutdown
  ///                        eFrameworkunifiedPersistInstantly  :persist instantly
  ///
  /// \param [IN] f_epersisttype
  ///      ENotificationpersistentservicePersistType - ENOTIFICATIONPERSISTENTSERVICEPERSISTFILE - Persist a file to a persistent memory
  ///                ENOTIFICATIONPERSISTENTSERVICEPERSISTFOLDER - Persist a folder to a persistent memory
  ///
  /// \param [IN] f_cusername
  ///      std::string - If tag is registered as user, then f_cusername holds the name of user,
  ///            else an empty string
  ///
  /// \return EFrameworkunifiedStatus
  //      EFrameworkunifiedStatus - success or failure status
  ///
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus NotificationpersistentserviceRelease(std::string f_cappname,
                        std::string f_ctag,
                        std::string f_cmempath,
                        EFrameworkunifiedReleaseType enotificationpersistentservicereleasetype,
                        ENotificationpersistentservicePersistType f_epersisttype,
                        std::string f_cusername);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// NotificationpersistentserviceLoad
  ///  Load file/folder from persistent memory to the specified location.
  ///
  /// \param [IN] f_cappname
  ///      string - Name of the application requesting for persistence
  ///
  /// \param [IN] f_ctag
  ///      string - File/Folder corresponding to this tag will be retrieved.
  ///
  /// \param [IN] f_cretrievepath
  ///      string - Filepath for retrieved file/folder.
  ///
  /// \param [IN] f_epersisttype
  ///      ENotificationpersistentservicePersistType - ENOTIFICATIONPERSISTENTSERVICEPERSISTFILE - Load a file from persistent memory
  ///                ENOTIFICATIONPERSISTENTSERVICEPERSISTFOLDER - Load a folder from persistent memory
  ///
  /// \param [IN] f_cusername
  ///      std::string - If tag is registered as user, then f_cusername holds the name of user,
  ///            else an empty string
  ///
  /// \return
  ///
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus NotificationpersistentserviceLoad(std::string f_cappname,
                     std::string f_ctag,
                     std::string f_cretrievepath,
                     ENotificationpersistentservicePersistType f_epersisttype,
                     std::string f_cusername);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// AckReceivedFromWorker
  ///  Send release ack to file/folder persistence object.
  ///
  /// \param [IN] f_csource
  ///      PCSTR - Source of released file/folder
  ///
  /// \param [IN] f_ctag
  ///      PCSTR - Tag of released file/folder
  ///
  /// \param [IN] f_epersisttype
  ///      ENotificationpersistentservicePersistType - ENOTIFICATIONPERSISTENTSERVICEPERSISTFILE - Ack for file persistence object
  ///                ENOTIFICATIONPERSISTENTSERVICEPERSISTFOLDER - Ack for folder persistence object
  ///
  /// \param [in] f_bcopystatus
  ///         BOOL - Status of file/folder copy by worker.
  ///
  /// \param [in] f_eloadtype
  ///         ENPS_Loadtype - Type of load release or load.
  ///
  /// \return
  ///
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus AckReceivedFromWorker(PCSTR f_csource, PCSTR f_ctag, ENotificationpersistentservicePersistType f_epersisttype,
                                   BOOL f_bcopystatus, ENPS_Loadtype f_eloadtype);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// NotificationpersistentserviceSaveNotificationData
  /// Save notification data in a persistent file.
  ///
  /// \param [IN] f_vpersistentnotificationlist
  ///      Persistent_Notification_List_Type - List of all notifications and corresponding data.
  ///
  /// \return EFrameworkunifiedStatus
  ///     EFrameworkunifiedStatus - success or failure status
  ///
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus NotificationpersistentserviceSaveNotificationData(Persistent_Notification_List_Type *f_vpersistentnotificationlist);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// NotificationpersistentserviceSaveUserNotificationData
  /// Save notification data of user in a persistent file.
  ///
  /// \param [IN] f_vpersistentnotificationlist
  ///      Persistent_Notification_List_Type - List of all notifications and corresponding data.
  ///
  /// \return EFrameworkunifiedStatus
  ///     EFrameworkunifiedStatus - success or failure status
  ///
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus NotificationpersistentserviceSaveUserNotificationData(Persistent_Notification_List_Type *f_vpersistentnotificationlist);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// NotificationpersistentserviceReadNotificationData
  /// Get the list of all persistent notifications from a persistent memory and store it in a map.
  ///
  /// \param [OUT] f_vpersistentnotificationlist
  ///      Persistent_Notification_List_Type - Retrieved list of all notifications and corresponding data
  ///
  /// \return EFrameworkunifiedStatus
  ///     EFrameworkunifiedStatus - success or failure status
  ///
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus NotificationpersistentserviceReadNotificationData(Persistent_Notification_List_Type *&f_vnotificationlist); // NOLINT (runtime/references)

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// NotificationpersistentserviceReadUserNotificationData
  /// Get the list of all user persistent notifications from a persistent memory and store it in a map.
  ///
  /// \param [OUT] f_vpersistentnotificationlist
  ///      Persistent_Notification_List_Type - Retrieved list of all notifications and corresponding data
  ///
  /// \return EFrameworkunifiedStatus
  ///     EFrameworkunifiedStatus - success or failure status
  ///
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus NotificationpersistentserviceReadUserNotificationData(Persistent_Notification_List_Type *&f_vnotificationlist); // NOLINT (runtime/references)

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// NotificationpersistentserviceReadNorNotificationData
  /// Get the list of all Nor persistent notifications from a persistent memory and store it in a map.
  ///
  /// \param [OUT] f_vpersistentnotificationlist
  ///      Persistent_Notification_List_Type - Retrieved list of all notifications and corresponding data
  ///
  /// \return EFrameworkunifiedStatus
  ///     EFrameworkunifiedStatus - success or failure status
  ///
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus NotificationpersistentserviceReadNorNotificationData(Persistent_Notification_List_Type *&f_vnotificationlist); // NOLINT (runtime/references)

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// PersistAllReleaseRequests
  /// Persist all files and folder contained in the map in persistent memory.
  ///
  /// \param [in] f_uinotificationpersistentservicepersistcategoryflag
  ///     UI_32 - Hex value from enum EFrameworkunifiedPersistCategory, representing data to persist
  ///     0 - persist orignal data and
  ///     1 - persist default data
  ///
  /// \return EFrameworkunifiedStatus
  ///     EFrameworkunifiedStatus - success or failure status
  ///
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus PersistAllReleaseRequests(UI_32 f_uinotificationpersistentservicepersistcategoryflag);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// NotificationpersistentservicePersistAllUserRequests
  /// Persist all user files and folder contained in the map in persistent memory.
  ///
  ///
  /// \return EFrameworkunifiedStatus
  ///     EFrameworkunifiedStatus - success or failure status
  ///
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus NotificationpersistentservicePersistAllUserRequests();

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// SetReadThreadHandle
  /// Pass the handle of the read thread to the object of file/folder persistence
  ///
  /// \param [IN] f_hreadthread
  ///      HANDLE - Handle of read thread.
  ///
  /// \return
  ///
  ///
  ////////////////////////////////////////////////////////////////////////////////////////////////
  VOID SetReadThreadHandle(HANDLE f_hreadthread);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// SetWriteThreadHandle
  /// Pass the handle of the write thread to the object of file/folder persistence
  ///
  /// \param [IN] f_hwritethread
  ///      HANDLE - Handle of write thread.
  ///
  /// \return
  ///
  ///
  ////////////////////////////////////////////////////////////////////////////////////////////////
  VOID SetWriteThreadHandle(HANDLE f_hwritethread);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// SetNorPersistenceThreadHandle
  /// Pass the handle of the Nor persistence write thread to the object of file/folder persistence
  ///
  /// \param [IN] f_hwritethread
  ///      HANDLE - Handle of write thread.
  ///
  ///
  ////////////////////////////////////////////////////////////////////////////////////////////////
  VOID SetNorPersistenceThreadHandle(HANDLE f_hwritethread);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// SetUserPersistentPath
  /// Set user persistent path.
  ///
  /// \param [IN] f_cusername
  ///      std::string - Name of user
  ///
  /// \return
  ///
  ///
  ////////////////////////////////////////////////////////////////////////////////////////////////
  VOID SetUserPersistentPath(std::string f_cusername);

  ////////////////////////////////////////////////////////////////////////////////////////////
  /// IsUserPersistence
  /// Check if the persistence is user specific
  ///
  /// \param [in] - f_ctag
  ///         std::string - File/folder Tag
  ///
  /// \param [in] - f_epersisttype
  ///         ENotificationpersistentservicePersistType - persistent type
  ///
  /// \return status
  ///         BOOL - TRUE for user specific persistence
  ///          FALSE  for global persistence
  ///////////////////////////////////////////////////////////////////////////////////////////
  BOOL IsUserPersistence(std::string f_ctag, ENotificationpersistentservicePersistType f_epersisttype);

  ////////////////////////////////////////////////////////////////////////////////////////////
  /// HaveAllReleaseRequestsPersisted
  /// Checks if all files and immediate persistent data are persisted.
  ///
  /// \param
  ///
  /// \return BOOL
  ///         TRUE if all release requests are processed else false
  ////////////////////////////////////////////////////////////////////////////////////////////
  BOOL HaveAllReleaseRequestsPersisted();

  ////////////////////////////////////////////////////////////////////////////////////////////
  /// ResetPersistFlag
  /// Resets persist flag.
  ///
  /// \param none
  ///
  /// \return none
  ////////////////////////////////////////////////////////////////////////////////////////////
  VOID ResetPersistFlag();

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// ClearPersistenceData
  ///  Deletes the data from the persistent memory
  ///
  /// \param [in] f_enotificationpersistentserviceclearpersistencescope
  ///         EFrameworkunifiedClearPersistence - data to be deleted from memory
  ///
  /// \return EFrameworkunifiedStatus
  ///     EFrameworkunifiedStatus - success or failure
  ///
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus ClearPersistenceData(const EFrameworkunifiedClearPersistence &f_enotificationpersistentserviceclearpersistencescope);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// NotificationpersistentserviceSetPersistentCategory
  /// Sets the persist type of file or folder
  ///
  /// \param [IN] f_crequestorname
  ///      string - Application name
  ///
  /// \param [IN] f_ctag
  ///      string - File/Folder will be persist against this tag.
  ///
  /// \param [IN] f_epersistcategory
  ///      EFrameworkunifiedPersistCategory - persistent category
  ///
  /// \param [IN] f_bPersist
  ///      ENotificationpersistentservicePersistType - file or folder
  ///
  /// \return EFrameworkunifiedStatus
  //      EFrameworkunifiedStatus - success or failure status
  ///
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus NotificationpersistentserviceSetPersistentCategory(std::string f_crequestorname,
                                      std::string f_ctag,
                                      EFrameworkunifiedPersistCategory f_epersistcategory,
                                      ENotificationpersistentservicePersistType f_epersisttype);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// PersistNORData
  /// Sends the message to Immediate Persistence Thread to Persists the data immediately or reset
  /// the NOR data depending on persist category flag during shutdown irrespective of delay.
  ///
  /// \param f_eshutdowntype
  ///        EFrameworkunifiedShutdownType - shutdown type - normal, quick, data reset
  ///
  /// \param f_uinotificationpersistentservicepersistcategoryflag
  ///      UI_32 - flag representing whether to persist or reset data.
  ///
  /// \return EFrameworkunifiedStatus
  //      EFrameworkunifiedStatus - success or failure status
  ///
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus PersistNORData(EFrameworkunifiedShutdownType f_eshutdowntype, UI_32 f_uinotificationpersistentservicepersistcategoryflag);

  ////////////////////////////////////////////////////////////////////////////////////////////
  /// SetImmediateDataPersistedStatus
  /// Set/Reset the persistence status of immediate persistence data
  ///
  /// \param [in] - f_bstatus
  ///               BOOL
  ///                 TRUE  - immediate persistent data are persisted
  ///                 FALSE - immediate persistent data not persisted
  ///
  /// \return
  ///////////////////////////////////////////////////////////////////////////////////////////
  VOID SetImmediateDataPersistedStatus(BOOL f_bstatus);

  ////////////////////////////////////////////////////////////////////////////////////////////
  /// SetFilePersistedStatus
  /// Set/Reset the persistence status of files and folders
  ///
  /// \param [in] - f_bstatus
  ///               BOOL
  ///                 TRUE  - all files are persisted
  ///                 FALSE - all files and folders are not persisted
  ///
  /// \return
  ///////////////////////////////////////////////////////////////////////////////////////////
  VOID SetFilePersistedStatus(BOOL f_bstatus);

#ifdef NPP_PROFILEINFO_ENABLE

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// GetPersistenceProfilingData
  /// This function is used to get the persistence info
  ///
  /// \param [out] f_cpersistenceprofileinfo
  ///         std::string - Persistence info concated in a string
  ///
  /// \return EFrameworkunifiedStatus
  ///     EFrameworkunifiedStatus - success or failure
  ///
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus GetPersistenceProfilingData(std::string &f_cpersistenceprofileinfo); // NOLINT (runtime/references)

#endif

 private:
  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// ReadImmediateNotificationData
  /// Get the list of all immediate persistent notifications of f_epersistcategory
  /// from a persistent memory in a vector.
  ///
  /// \param [OUT] f_vpersistentnotificationlist
  ///        Persistent_Notification_List_Type - Retrieved list of all notifications and corresponding data
  ///
  /// \param [IN] f_epersistcategory
  ///        const EFrameworkunifiedPersistCategory - persistent category
  ///
  /// \return EFrameworkunifiedStatus
  ///         EFrameworkunifiedStatus - success or failure status
  ///
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus ReadImmediateNotificationData(Persistent_Notification_List_Type *&f_vpersistentnotificationlist, // NOLINT (runtime/references)
                                           const EFrameworkunifiedPersistCategory f_epersistcategory);

  std::string m_cUserNotificationTag;  ///< Tag associated with a file which is used
  ///< for storing user related notification persistent data.

  std::string m_cNotificationPersistFilepath;  ///< Persistent file path for storing persistent data

  std::string m_cNotificationUserMemFilepath;  ///< Memory location of a file for storing persistent data of a user

  Persist_Type m_mPersist_Type;  ///< Map holds the objects of file and folder persistency.

  CPersistentAccesser *m_poDataAccesser;  ///< Object for persistent data accesser

  HANDLE m_hNSImmediatePersistenceThread;  ///< Nor persistence thread handle

  BOOL m_bAllFilePersisted;           // all files have been persisted

  BOOL m_bImmediatedDataPersisted;    // all immediate peristence data have been persisted

  EFrameworkunifiedStatus Init();
};

////////////////////////////////////////////////////////////////////////////////////////////
/// NPServiceOnCpWorkerAckCmd
/// Handles when the CopyWorker sends an ack back for a message received .
///
/// \param [in] f_happ
///         HANDLE - Handle to notificationpersistentservice_application Framework.
///
/// \return status
///         EFrameworkunifiedStatus - success or error
////////////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus NPServiceOnCpWorkerAckCmd(HANDLE f_happ);

#endif  // NOTIFICATION_PERSISTENT_SERVICE_SERVER_INCLUDE_NS_NPP_PERSISTENCE_MANAGER_H_