2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 ////////////////////////////////////////////////////////////////////////////////////////////////////
18 /// \defgroup <<Group Tag>> <<Group Name>>
19 /// \ingroup tag_NS_NPPService
21 ////////////////////////////////////////////////////////////////////////////////////////////////////
23 ////////////////////////////////////////////////////////////////////////////////////////////////////
24 /// \ingroup tag_NS_NPPService
27 ////////////////////////////////////////////////////////////////////////////////////////////////////
29 #ifndef NOTIFICATION_PERSISTENT_SERVICE_SERVER_INCLUDE_NS_NPP_PERSIST_FOLDER_H_
30 #define NOTIFICATION_PERSISTENT_SERVICE_SERVER_INCLUDE_NS_NPP_PERSIST_FOLDER_H_
32 #include <native_service/frameworkunified_framework_if.h>
35 #include "ns_npp_persistence.h"
38 // class CPersistence;
40 class CFolderPersistence : public CPersistence {
42 TSourceRegistryList m_mPersistFolderRegistry; // map to hold the folder registry entries
45 ////////////////////////////////////////////////////////////////////////////////////////////////
46 /// CFolderPersistence
47 /// Constructor of CFolderPersistence class
53 ////////////////////////////////////////////////////////////////////////////////////////////////
56 ////////////////////////////////////////////////////////////////////////////////////////////////
57 /// ~CFolderPersistence
58 /// Destructor of CFolderPersistence class
64 ////////////////////////////////////////////////////////////////////////////////////////////////
65 ~CFolderPersistence();
67 ////////////////////////////////////////////////////////////////////////////////////////////////
69 /// Entry for the folder is stored in map for persistence.
70 /// If f_bPersist is TRUE folder will be persisted immediately else will be persisted on shutdown
72 /// \param [IN] f_cappname
73 /// string - Name of the application requesting for persistence
75 /// \param [IN] f_ctag
76 /// string - Folder will be persist against this tag.
78 /// \param [IN] f_cmempath
79 /// string - Folder which needs to persist.
81 /// \param [IN] enotificationpersistentservicereleasetype
82 /// EFrameworkunifiedReleaseType - eFrameworkunifiedNotOnRelease = 0 :not on release
83 /// eFrameworkunifiedPersistOnShutdown :persist on shutdown
84 /// eFrameworkunifiedPersistInstantly :persist instantly
86 /// \param [IN] f_cusername
87 /// std::string - If tag is registered as user, then f_cusername holds the name of user,
88 /// else an empty string
90 /// \return EFrameworkunifiedStatus
91 // EFrameworkunifiedStatus - success or failure status
93 ////////////////////////////////////////////////////////////////////////////////////////////////
94 EFrameworkunifiedStatus Release(std::string f_crequesterappname,
96 std::string f_cmempath,
97 EFrameworkunifiedReleaseType enotificationpersistentservicereleasetype,
98 std::string f_cusername);
100 ////////////////////////////////////////////////////////////////////////////////////////////////
102 /// Load folder from persistent memory to the specified location.
104 /// \param [IN] f_cappname
105 /// string - Name of the application requesting for persistence
107 /// \param [IN] f_ctag
108 /// string - Folder corresponding to this tag will be retrieved.
110 /// \param [IN] f_cretrievepath
111 /// string - Filepath for retrieved file.
113 /// \return EFrameworkunifiedStatus
114 // EFrameworkunifiedStatus - success or failure status
116 ////////////////////////////////////////////////////////////////////////////////////////////////
117 EFrameworkunifiedStatus Load(std::string f_cappname,
119 std::string f_cretrievepath,
120 std::string f_cusername);
122 #endif // NOTIFICATION_PERSISTENT_SERVICE_SERVER_INCLUDE_NS_NPP_PERSIST_FOLDER_H_