Remove unused directories and files in video_in_hal
[staging/basesystem.git] / service / native / framework_unified / client / include / native_service / ns_reader.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 /// \ingroup  tag_NS_ConfigParser
19 /// \brief    This file contains declaration of class IConfigReader.
20 ///
21 ////////////////////////////////////////////////////////////////////////////////////////////////////
22
23 /**
24  * @file ns_reader.h
25  * @brief \~english This file contains declaration of class IConfigReader.
26  */
27 /** @addtogroup BaseSystem
28  *  @{
29  */
30 /** @addtogroup native_service
31  *  @ingroup BaseSystem
32  *  @{
33  */
34 /** @addtogroup framework_unified
35  *  @ingroup native_service
36  *  @{
37  */
38
39 #ifndef __FRAMEWORKUNIFIED_NATIVESERVICES_NSCONFIGPARSER_INC_CONFIG_READER_H__  // NOLINT  (build/header_guard)
40 #define __FRAMEWORKUNIFIED_NATIVESERVICES_NSCONFIGPARSER_INC_CONFIG_READER_H__  // NOLINT(build/header_guard)
41
42 ////////////////////////////////////////////////////////////////////////////////////////////////////
43 // Include Files
44 ////////////////////////////////////////////////////////////////////////////////////////////////////
45 #include <native_service/frameworkunified_types.h>  // NOLINT(build/header_guard)
46 #include <string>
47
48 /*
49  * IConfigReader is an abstract class which is inherited by different type configuration file
50  * reader class.
51  */
52 /**
53  * @class IConfigReader
54  * \~english @brief IConfigReader
55  * \~english @par   Brief Introduction
56  *        Class to provide class of parse config file.
57  */
58 class IConfigReader {
59  public:
60   /////////////////////////////////////////////////////////////////////////////////////
61   /// \ingroup IConfigReader
62   /// \~english @par Summary
63   ///       Constructor of IConfigReader class.
64   /// \~english @param none
65   /// \~english @retval None
66   /// \~english @par Preconditions
67   ///       - None.
68   /// \~english @par Change of the internal state
69   ///       - Change of internal state according to the API does not occur.
70   /// \~english @par Causes of failures
71   ///       None
72   /// \~english @par Classification
73   ///       Public
74   /// \~english @par Type
75   ///          sync only
76   /// \~english @par Detail
77   ///       Constructor of IConfigReader class.
78   /// \~english @see  ~IConfigReader
79   ////////////////////////////////////////////////////////////////////////////////////
80   IConfigReader();
81
82   /////////////////////////////////////////////////////////////////////////////////////
83   /// \ingroup IConfigReader
84   /// \~english @par Summary
85   ///       Destructor of IConfigReader class.
86   /// \~english @param None
87   /// \~english @retval None
88   /// \~english @par Preconditions
89   ///       - None.
90   /// \~english @par Change of the internal state
91   ///       - Change of internal state according to the API does not occur.
92   /// \~english @par Causes of failures
93   ///       None
94   /// \~english @par Classification
95   ///       Public
96   /// \~english @par Type
97   ///          sync only
98   /// \~english @par Detail
99   ///       To delete a IConfigReader class.
100   /// \~english @see  IConfigReader
101   ////////////////////////////////////////////////////////////////////////////////////
102   virtual ~IConfigReader();
103
104   /////////////////////////////////////////////////////////////////////////////////////
105   /// \ingroup IConfigReader
106   /// \~english @par Summary
107   ///       This function is used to parse the file.
108   /// \~english @param [IN] f_c_filepath
109   ///        const std::string - path of file to parse.
110   /// \~english @retval EFrameworkunifiedStatus
111   /// \~english @par Preconditions
112   ///       - None.
113   /// \~english @par Change of the internal state
114   ///       - Change of internal state according to the API does not occur.
115   /// \~english @par Causes of failures
116   ///       None
117   /// \~english @par Classification
118   ///       Public
119   /// \~english @par Type
120   ///          sync only
121   /// \~english @par Detail
122   ///       This function is used to parse the file.\n
123   ///       This is abstract function.
124   /// \~english @see  IConfigReader
125   ////////////////////////////////////////////////////////////////////////////////////
126   virtual EFrameworkunifiedStatus ParseFile(const std::string &f_c_filepath) = 0;
127
128   /////////////////////////////////////////////////////////////////////////////////////
129   /// \ingroup IConfigReader
130   /// \~english @par Summary
131   ///       This function is used to get the value associated with the key.
132   /// \~english @param [IN] f_c_key
133   ///        const std::string - key to search.
134   /// \~english @retval l_cValue value for key
135   /// \~english @par Preconditions
136   ///       - None.
137   /// \~english @par Change of the internal state
138   ///       - Change of internal state according to the API does not occur.
139   /// \~english @par Causes of failures
140   ///       None
141   /// \~english @par Classification
142   ///       Public
143   /// \~english @par Type
144   ///          sync only
145   /// \~english @par Detail
146   ///       This function is used to get the value associated with the key.\n
147   ///       This is abstract function.
148   /// \~english @see  IConfigReader
149   ////////////////////////////////////////////////////////////////////////////////////
150   virtual std::string GetValue(const std::string &f_c_key) = 0;
151
152   /////////////////////////////////////////////////////////////////////////////////////
153   /// \ingroup IConfigReader
154   /// \~english @par Summary
155   ///       This function is used to get the value associated with the key.
156   /// \~english @param [IN] f_c_key
157   ///        const std::string - key to search.
158   /// \~english @param [OUT] f_c_value
159   ///        const std::string - value for key.
160   /// \~english @retval EFrameworkunifiedStatus error  error if key not found else eFrameworkunifiedStatusOK
161   /// \~english @par Preconditions
162   ///       - None.
163   /// \~english @par Change of the internal state
164   ///       - Change of internal state according to the API does not occur.
165   /// \~english @par Causes of failures
166   ///       None
167   /// \~english @par Classification
168   ///       Public
169   /// \~english @par Type
170   ///          sync only
171   /// \~english @par Detail
172   ///       This function is used to get the value associated with the key.\n
173   ///       This is abstract function.
174   /// \~english @see  IConfigReader
175   ////////////////////////////////////////////////////////////////////////////////////
176   virtual EFrameworkunifiedStatus GetValue(const std::string &f_c_key, std::string &f_c_value) = 0;  // NOLINT (readability/nolint)
177
178   /////////////////////////////////////////////////////////////////////////////////////
179   /// \ingroup IConfigReader
180   /// \~english @par Summary
181   ///       This function is used to get the data pointer.
182   /// \~english @param none.
183   /// \~english @retval PVOID - pointer of data structure
184   /// \~english @par Preconditions
185   ///       - None.
186   /// \~english @par Change of the internal state
187   ///       - Change of internal state according to the API does not occur.
188   /// \~english @par Causes of failures
189   ///       None
190   /// \~english @par Classification
191   ///       Public
192   /// \~english @par Type
193   ///          sync only
194   /// \~english @par Detail
195   ///       This function is used to get the data pointer. This pointer is then set in config writer.\n
196   ///       This is needed to avoid recreation of same data structure object in both reader and writer.\n
197   ///       when we create object of NSConfigParser.
198   ///       This is abstract function.
199   /// \~english @see  IConfigReader
200   ////////////////////////////////////////////////////////////////////////////////////
201   virtual PVOID GetDataPtr() = 0;
202 };
203
204 #endif /* __FRAMEWORKUNIFIED_NATIVESERVICES_NSCONFIGPARSER_INC_CONFIG_READER_H__ */  // NOLINT  (build/header_guard)
205 /** @}*/  // end of framework_unified
206 /** @}*/  // end of native_service
207 /** @}*/  // end of BaseSystem