common_library: gettid is multiple declaration in cl_error
[staging/basesystem.git] / video_in_hal / nsframework / framework_unified / client / include / native_service / ns_util_directory.h
1 /**
2  * @file ns_util_directory.h
3  * @brief \~english This file contains declaration of ns_util_directory.
4  *
5  */
6 /*
7  * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21
22 //////////////////////////////////////////////////////////////////////////////////////////////////
23 /// \brief    This file contains utility functions to handle file and folder operations.
24 ///
25 ///
26 ///
27 //////////////////////////////////////////////////////////////////////////////////////////////////
28
29
30
31 #ifndef  NS_NS_UTILITYCENTER_INC_NS_UTIL_DIRECTORY_H_  // NOLINT  (build/header_guard)
32 #define  NS_NS_UTILITYCENTER_INC_NS_UTIL_DIRECTORY_H_
33
34 #include <native_service/frameworkunified_types.h>
35 #include <vector>
36 #include <string>
37
38 /** @addtogroup BaseSystem
39  *  @{
40  */
41 /** @addtogroup native_service
42  *  @ingroup BaseSystem
43  *  @{
44  */
45 /** @addtogroup framework_unified
46  *  @ingroup native_service
47  *  @{
48  */
49 /** @addtogroup utility
50  *  @ingroup framework_unified
51  *  @{
52  */
53
54 /**
55  * \~english an abbreviation for std::vector<std::string>
56  */
57 typedef std::vector< std::string > TFileList;
58
59 /**
60  * \~english a abbreviation for std::vector<std::string>::iterator
61  */
62 typedef TFileList::iterator TFileListIterator;
63
64 #ifdef __cplusplus
65 extern "C" {
66 #endif
67
68 ////////////////////////////////////////////////////////////////////////////////////////////////
69 /// \ingroup NS_UtilityCenter
70 /// \~english @par Brief
71 ///       Get the name of files existing in a specific directory
72 /// \~english @param [in] f_pc_path
73 ///       PCSTR - the directory path
74 /// \~english @param [out] f_pv_tfile_list
75 ///       TFileList  - store the name of the files in the specific directory
76 /// \~english @retval eFrameworkunifiedStatusOK : Success
77 /// \~english @retval eFrameworkunifiedStatusInvldParam : Invalid Param
78 /// \~english @retval eFrameworkunifiedStatusNullPointer : NULL Pointer
79 /// \~english @retval eFrameworkunifiedStatusFail : Abnormal Error
80 ///
81 /// \~english @par Prerequisite
82 ///       - None
83 /// \~english @par Change of internal state
84 ///       - None
85 /// \~english @par Conditions of processing failure
86 ///       - The pointer f_pv_tfile_list or f_pc_path is NULL. [eFrameworkunifiedStatusInvldParam]
87 ///       - Failed to open the directory f_pc_path. [eFrameworkunifiedStatusFail]
88 ///       - Failed to new a buffer for inner using. [eFrameworkunifiedStatusNullPointer]
89 /// \~english @par Classification
90 ///       Public
91 /// \~english @par Type
92 ///       Sync Only
93 /// \~english @par Detail
94 ///       The function gets all the name of the file locating at the directory f_pc_path and stores \n
95 ///       them in f_pv_tfile_list.
96 /// \~english @see
97 ////////////////////////////////////////////////////////////////////////////////////////////////
98 EFrameworkunifiedStatus GetFileList(TFileList * f_pv_tfile_list, PCSTR f_pc_path);
99
100 ////////////////////////////////////////////////////////////////////////////////////////////////
101 /// \ingroup NS_UtilityCenter
102 /// \~english @par Brief
103 ///       Check whether the directory is existing or not.
104 /// \~english @param [in] f_c_dir_path
105 ///       std::string - the directory to be checked
106 /// \~english @retval TRUE: the directory is existing.
107 ///                   FALSE: the directory is not existing.
108 /// \~english @par Prerequisite
109 ///       - None
110 /// \~english @par Change of internal state
111 ///       - None
112 /// \~english @par Conditions of processing failure
113 ///       - None
114 /// \~english @par Classification
115 ///       Public
116 /// \~english @par Type
117 ///       Sync Only
118 /// \~english @par Detail
119 ///       The function checks whether the directory is existing or not.
120 /// \~english @see
121 ////////////////////////////////////////////////////////////////////////////////////////////////
122 BOOL DoesDirecotryExist(std::string f_c_dir_path);
123
124 ////////////////////////////////////////////////////////////////////////////////////////////////
125 /// \ingroup NS_UtilityCenter
126 /// \~english @par Brief
127 ///       Create the directory f_c_dir_path.
128 /// \~english @param [in] f_c_dir_path
129 ///       std::string - the directory to be created
130 /// \~english @retval eFrameworkunifiedStatusOK : Success
131 /// \~english @retval eFrameworkunifiedStatusFail : Abnormal Error
132 ///
133 /// \~english @par Prerequisite
134 ///       - None
135 /// \~english @par Change of internal state
136 ///       - None
137 /// \~english @par Conditions of processing failure
138 ///       - The input param f_c_dir_path is empty. [eFrameworkunifiedStatusFail]
139 ///       - Faild to create(mkdir) the direcory. [eFrameworkunifiedStatusFail]
140 /// \~english @par Classification
141 ///       Public
142 /// \~english @par Type
143 ///       Sync Only
144 /// \~english @par Detail
145 ///       The function creates the directory f_c_dir_path.
146 /// \~english @see
147 ////////////////////////////////////////////////////////////////////////////////////////////////
148 EFrameworkunifiedStatus CreateDirectory(std::string f_c_dir_path);
149
150
151 #ifdef __cplusplus
152 }
153 #endif
154
155 #endif  // NS_NS_UTILITYCENTER_INC_NS_UTIL_DIRECTORY_H_  NOLINT  (build/header_guard)
156
157 /** @}*/  // end of utility
158 /** @}*/  // end of framework_unified
159 /** @}*/  // end of native_service
160 /** @}*/  // end of BaseSystem