common_library: gettid is multiple declaration in cl_error
[staging/basesystem.git] / video_in_hal / nsframework / notification_persistent_service / server / include / ns_npp_persist_folder.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
26 ///
27 ////////////////////////////////////////////////////////////////////////////////////////////////////
28
29 #ifndef NOTIFICATION_PERSISTENT_SERVICE_SERVER_INCLUDE_NS_NPP_PERSIST_FOLDER_H_
30 #define NOTIFICATION_PERSISTENT_SERVICE_SERVER_INCLUDE_NS_NPP_PERSIST_FOLDER_H_
31
32 #include <native_service/frameworkunified_framework_if.h>
33 #include <string>
34
35 #include "ns_npp_persistence.h"
36
37
38 // class CPersistence;
39
40 class CFolderPersistence : public CPersistence {
41  private:
42   TSourceRegistryList m_mPersistFolderRegistry;  // map to hold the folder registry entries
43
44  public:
45   ////////////////////////////////////////////////////////////////////////////////////////////////
46   /// CFolderPersistence
47   /// Constructor of CFolderPersistence class
48   ///
49   /// \param
50   ///
51   /// \return
52   ///
53   ////////////////////////////////////////////////////////////////////////////////////////////////
54   CFolderPersistence();
55
56   ////////////////////////////////////////////////////////////////////////////////////////////////
57   /// ~CFolderPersistence
58   /// Destructor of CFolderPersistence class
59   ///
60   /// \param
61   ///
62   /// \return
63   ///
64   ////////////////////////////////////////////////////////////////////////////////////////////////
65   ~CFolderPersistence();
66
67   ////////////////////////////////////////////////////////////////////////////////////////////////
68   /// Release
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
71   ///
72   /// \param [IN] f_cappname
73   ///      string - Name of the application requesting for persistence
74   ///
75   /// \param [IN] f_ctag
76   ///      string - Folder will be persist against this tag.
77   ///
78   /// \param [IN] f_cmempath
79   ///      string - Folder which needs to persist.
80   ///
81   /// \param [IN] enotificationpersistentservicereleasetype
82   ///      EFrameworkunifiedReleaseType - eFrameworkunifiedNotOnRelease = 0  :not on release
83   ///                        eFrameworkunifiedPersistOnShutdown :persist on shutdown
84   ///                        eFrameworkunifiedPersistInstantly  :persist instantly
85   ///
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
89   ///
90   /// \return EFrameworkunifiedStatus
91   //      EFrameworkunifiedStatus - success or failure status
92   ///
93   ////////////////////////////////////////////////////////////////////////////////////////////////
94   EFrameworkunifiedStatus Release(std::string f_crequesterappname,
95                      std::string f_ctag,
96                      std::string f_cmempath,
97                      EFrameworkunifiedReleaseType enotificationpersistentservicereleasetype,
98                      std::string f_cusername);
99
100   ////////////////////////////////////////////////////////////////////////////////////////////////
101   /// Load
102   ///  Load folder from persistent memory to the specified location.
103   ///
104   /// \param [IN] f_cappname
105   ///      string - Name of the application requesting for persistence
106   ///
107   /// \param [IN] f_ctag
108   ///      string - Folder corresponding to this tag will be retrieved.
109   ///
110   /// \param [IN] f_cretrievepath
111   ///      string - Filepath for retrieved file.
112   ///
113   /// \return EFrameworkunifiedStatus
114   //      EFrameworkunifiedStatus - success or failure status
115   ///
116   ////////////////////////////////////////////////////////////////////////////////////////////////
117   EFrameworkunifiedStatus Load(std::string f_cappname,
118                   std::string f_ctag,
119                   std::string f_cretrievepath,
120                   std::string f_cusername);
121 };
122 #endif  // NOTIFICATION_PERSISTENT_SERVICE_SERVER_INCLUDE_NS_NPP_PERSIST_FOLDER_H_