common_library: gettid is multiple declaration in cl_error
[staging/basesystem.git] / video_in_hal / nsframework / notification_persistent_service / server / include / ns_npp_fs_directory.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 CFSDirectory.
26 ///
27 ///
28 ///
29 ////////////////////////////////////////////////////////////////////////////////////////////////////
30
31 #ifndef NOTIFICATION_PERSISTENT_SERVICE_SERVER_INCLUDE_NS_NPP_FS_DIRECTORY_H_
32 #define NOTIFICATION_PERSISTENT_SERVICE_SERVER_INCLUDE_NS_NPP_FS_DIRECTORY_H_
33 #include <native_service/frameworkunified_types.h>
34 #include <string>
35
36
37
38 // Class to provide file system directory operations like create,delete etc.
39 class CFSDirectory {
40  public:
41   ////////////////////////////////////////////////////////////////////////////////////////////////
42   /// CFSDirectory
43   /// Constructor of CFSDirectory class
44   ///
45   /// \param
46   ///
47   /// \return
48   ///
49   ////////////////////////////////////////////////////////////////////////////////////////////////
50   CFSDirectory();
51
52   ////////////////////////////////////////////////////////////////////////////////////////////////
53   /// ~CFSDirectory
54   /// Destructor of CFSDirectory class
55   ///
56   /// \param
57   ///
58   /// \return
59   ///
60   ////////////////////////////////////////////////////////////////////////////////////////////////
61   ~CFSDirectory();
62
63   ////////////////////////////////////////////////////////////////////////////////////////////
64   /// This method is used to check if the directory exists.
65   ///
66   /// \param [in] f_cdirpath
67   ///         std::string - Path of the directory to delete.
68   ///
69   /// \return status
70   ///         EFrameworkunifiedStatus - success or error
71   ////////////////////////////////////////////////////////////////////////////////////////////
72   static BOOL DoesDirecotryExist(const std::string &f_cdirpath);
73
74   ////////////////////////////////////////////////////////////////////////////////////////////
75   /// This method is used to create a directory.
76   ///
77   /// \param [in] f_cdirpath
78   ///         std::string - Path of the directory to delete.
79   ///
80   /// \return status
81   ///         EFrameworkunifiedStatus - success or error
82   ////////////////////////////////////////////////////////////////////////////////////////////
83   static EFrameworkunifiedStatus CreateDirectory(const std::string &f_cdirpath);
84
85   ////////////////////////////////////////////////////////////////////////////////////////////
86   /// This method is used to verify directory.
87   ///
88   /// \param [in] f_cpath
89   ///         std::string - Path of the directory to delete.
90   ///
91   /// \return status
92   ///         EFrameworkunifiedStatus - success or error
93   ////////////////////////////////////////////////////////////////////////////////////////////
94   static BOOL IsDirectory(const std::string &f_cpath);
95
96   ////////////////////////////////////////////////////////////////////////////////////////////
97   /// This method is used to delete directory with delay of f_uidelay(msec)
98   /// between consecutive deletes.
99   ///
100   /// \param [in] f_cpath
101   ///         std::string - Path of the directory to delete.
102   /// \param [in] f_uidelay
103   ///         UI_32 - delay in millisec before recursive call.
104   ///
105   /// \return status
106   ///         EFrameworkunifiedStatus - success or error
107   ////////////////////////////////////////////////////////////////////////////////////////////
108   static BOOL RemoveDirectory(std::string f_cpath, const UI_32 f_uidelay = 0);
109 };
110
111 #endif  // NOTIFICATION_PERSISTENT_SERVICE_SERVER_INCLUDE_NS_NPP_FS_DIRECTORY_H_