Remove unused directories and files in video_in_hal
[staging/basesystem.git] / service / native / framework_unified / client / include / native_service / ns_writer.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 IConfigWriter.
20 ///
21 ////////////////////////////////////////////////////////////////////////////////////////////////////
22
23 /**
24  * @file ns_writer.h
25  * @brief \~english This file contains declaration of class IConfigWriter.
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_WRITER_H__  // NOLINT  (build/header_guard)
40 #define __FRAMEWORKUNIFIED_NATIVESERVICES_NSCONFIGPARSER_INC_CONFIG_WRITER_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 /**
50  * @class IConfigWriter
51  * \~english @brief Config writer abstract class.
52  * \~english @par   Brief Introduction
53  *        IConfigWriter is an abstract class which is inherited by\n
54  *        different type configuration file writer class.
55  *
56  */
57 class IConfigWriter {
58  public:
59   /////////////////////////////////////////////////////////////////////////////////////
60   /// \ingroup IConfigWriter
61   /// \~english @par Brief
62   ///        Constructor of IConfigWriter class
63   /// \~english @param None
64   /// \~english @retval none
65   /// \~english @par Preconditons
66   ///           - None
67   /// \~english @par Change of internal status
68   ///           - None
69   /// \~english @par Conditions of processing failure
70   ///           - None
71   /// \~english @par Detail
72   ///           - To get a instance of this class.
73   /// \~english @par Classification
74   ///           - Public
75   /// \~english @par Type
76   ///           - Sync only
77   /// \~english @see ~IConfigWriter
78   ////////////////////////////////////////////////////////////////////////////////////
79   IConfigWriter();
80
81   /////////////////////////////////////////////////////////////////////////////////////
82   /// \ingroup ~IConfigWriter
83   /// \~english @par Brief
84   ///        Destructor of IConfigWriter class
85   /// \~english @param None
86   /// \~english @retval none
87   /// \~english @par Preconditons
88   ///           - Calls constructor to successfully create object.
89   /// \~english @par Change of internal status
90   ///           - None
91   /// \~english @par Conditions of processing failure
92   ///           - None
93   /// \~english @par Detail
94   ///           - Destruct the object of this class.
95   /// \~english @par Classification
96   ///           - Public
97   /// \~english @par Type
98   ///           - Sync only
99   /// \~english @see IConfigWriter
100   ////////////////////////////////////////////////////////////////////////////////////
101   virtual ~IConfigWriter();
102
103   /////////////////////////////////////////////////////////////////////////////////////
104   /// \ingroup IConfigWriter
105   /// \~english @par Brief
106   ///        This function is used to parse the file.
107   /// \~english @param [in] f_c_filepath
108   ///           std::string - path of file to parse
109   /// \~english @retval EFrameworkunifiedStatus - success or failure
110   /// \~english @par Preconditons
111   ///           - Calls constructor to successfully create object.
112   /// \~english @par Change of internal status
113   ///           - None
114   /// \~english @par Conditions of processing failure
115   ///           - None
116   /// \~english @par Detail
117   ///           This function is used to parse the file.
118   /// \~english @par Classification
119   ///           - Public
120   /// \~english @par Type
121   ///           - Sync only
122   /// \~english @see None
123   ////////////////////////////////////////////////////////////////////////////////////
124   virtual EFrameworkunifiedStatus ParseFile(const std::string &f_c_filepath) = 0;
125
126   /////////////////////////////////////////////////////////////////////////////////////
127   /// \ingroup IConfigWriter
128   /// \~english @par Brief
129   ///        This function is used to set the value for the key
130   /// \~english @param [in] f_c_key
131   ///           std::string - key to search
132   /// \~english @param [in] f_c_value
133   ///           std::string - value to set
134   /// \~english @retval EFrameworkunifiedStatus - error if key not found else eFrameworkunifiedStatusOK
135   /// \~english @par Preconditons
136   ///           - Calls constructor to successfully create object.
137   /// \~english @par Change of internal status
138   ///           - None
139   /// \~english @par Conditions of processing failure
140   ///           - None
141   /// \~english @par Detail
142   ///           This function is used to set the value for the key
143   /// \~english @par Classification
144   ///           - Public
145   /// \~english @par Type
146   ///           - Sync only
147   /// \~english @see None
148   ////////////////////////////////////////////////////////////////////////////////////
149   virtual EFrameworkunifiedStatus SetValue(const std::string &f_c_key, std::string f_c_value) = 0;
150
151   /////////////////////////////////////////////////////////////////////////////////////
152   /// \ingroup IConfigWriter
153   /// \~english @par Brief
154   ///        This function is used to save the changed value permanently to the config source
155   /// \~english @param None
156   /// \~english @retval none
157   /// \~english @par Preconditons
158   ///           - None
159   /// \~english @par Change of internal status
160   ///           - None
161   /// \~english @par Conditions of processing failure
162   ///           - None
163   /// \~english @par Detail
164   ///           This function is used to save the changed value permanently to the config source
165   /// \~english @par Classification
166   ///           - Public
167   /// \~english @par Type
168   ///           - Sync only
169   /// \~english @see None
170   ////////////////////////////////////////////////////////////////////////////////////
171   virtual EFrameworkunifiedStatus SaveData() = 0;
172
173   /////////////////////////////////////////////////////////////////////////////////////
174   /// \ingroup IConfigWriter
175   /// \~english @par Brief
176   ///        This function is used to set the config file path
177   /// \~english @param [in] f_cpath
178   ///           std::string - Path of file
179   /// \~english @retval EFrameworkunifiedStatus - success or failure
180   /// \~english @par Preconditons
181   ///           - None
182   /// \~english @par Change of internal status
183   ///           - None
184   /// \~english @par Conditions of processing failure
185   ///           - None
186   /// \~english @par Detail
187   ///           This function is used to set the config file path
188   /// \~english @par Classification
189   ///           - Public
190   /// \~english @par Type
191   ///           - Sync only
192   /// \~english @see None
193   ////////////////////////////////////////////////////////////////////////////////////
194   virtual EFrameworkunifiedStatus SetPath(const std::string &f_cpath) = 0;
195
196   /////////////////////////////////////////////////////////////////////////////////////
197   /// \ingroup IConfigWriter
198   /// \~english @par Brief
199   ///              This function is used to set the data pointer in config writer class with data pointer\n
200   ///              created in config reader class.\n
201   ///              This is needed to avoid recreation of same data structure object in both reader and writer\n
202   ///              when we create object of NSConfigParser.\n
203   /// \~english @param [in] f_pdata
204   ///           PVOID - Pointer to data structure
205   /// \~english @retval None
206   /// \~english @par Preconditons
207   ///           - None
208   /// \~english @par Change of internal status
209   ///           - None
210   /// \~english @par Conditions of processing failure
211   ///           - None
212   /// \~english @par Detail
213   ///              This function is used to set the data pointer in config writer class with data pointer\n
214   ///              created in config reader class.\n
215   ///              This is needed to avoid recreation of same data structure object in both reader and writer\n
216   ///              when we create object of NSConfigParser.\n
217   /// \~english @par Classification
218   ///           - Public
219   /// \~english @par Type
220   ///           - Sync only
221   /// \~english @see None
222   ////////////////////////////////////////////////////////////////////////////////////
223   virtual VOID SetDataPtr(PVOID f_pdata) = 0;
224 };
225
226 #endif /* __FRAMEWORKUNIFIED_NATIVESERVICES_NSCONFIGPARSER_INC_CONFIG_WRITER_H__ */  // NOLINT  (build/header_guard)
227 /** @}*/  // end of framework_unified
228 /** @}*/  // end of native_service
229 /** @}*/  // end of BaseSystem