Init basesystem source codes.
[staging/basesystem.git] / video_in_hal / nsframework / framework_unified / client / include / native_service / frameworkunified_service_if.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_HMI_CWORD77_Controller
19 /// \brief
20 ///
21 ///
22 ///
23 ////////////////////////////////////////////////////////////////////////////////
24 //@{
25 /**
26  * @file frameworkunified_service_if.h
27  * @brief \~english This is base class for service interface classes
28  *
29  */
30 /** @addtogroup BaseSystem
31  *  @{
32  */
33 /** @addtogroup native_service
34  *  @ingroup BaseSystem
35  *  @{
36  */
37 /** @addtogroup framework_unified
38  *  @ingroup native_service
39  *  @{
40  */
41 /** @addtogroup framework
42  *  @ingroup native_service
43  *  @{
44  */
45 #ifndef __CSERVICESESSION_H__  // NOLINT  (build/header_guard)
46 #define __CSERVICESESSION_H__
47 #include <native_service/frameworkunified_service_protocol.h>
48 #include <native_service/frameworkunified_framework_if.h>
49 #include <string>
50
51 ///////////////////////////////////////////////////////////////////////////
52 /// class: CServiceSession
53 /// Description: This is base class for service interface classes
54 ///
55 ////////////////////////////////////////////////////////////////////////////
56 class CFrameworkunifiedServiceInterface {
57  public:
58   ////////////////////////////////////////////////////////////////////////////////////////////
59   /// \ingroup CFrameworkunifiedServiceInterface
60   /// \~english @par Brief
61   ///        Constructor for CFrameworkunifiedServiceInterface
62   /// \~english @retval none
63   /// \~english @par Preconditions
64   ///           no preconditions
65   /// \~english @par Change of internal status
66   ///           none
67   /// \~english @par Conditions of processing failure
68   ///           none
69   /// \~english @par Detail
70   ///           create CFrameworkunifiedServiceInterface class instance
71   /// \~english @par Classification
72   ///           public
73   /// \~english @par Type
74   ///           none
75   /// \~english @see ~CFrameworkunifiedServiceInterface
76   ////////////////////////////////////////////////////////////////////////////////////////////
77   CFrameworkunifiedServiceInterface();
78
79   ////////////////////////////////////////////////////////////////////////////////////////////
80   /// \ingroup CFrameworkunifiedServiceInterface
81   /// \~english @par Brief
82   ///        Destructor for CFrameworkunifiedServiceInterface
83   /// \~english @retval none
84   /// \~english @par Preconditons
85   ///                CFrameworkunifiedServiceInterface is decleared in constructor
86   /// \~english @par Change of internal status
87   ///                none
88   /// \~english @par Conditions of processing failure
89   ///                none
90   /// \~english @par Detail
91   ///                Release CFrameworkunifiedServiceInterface instance
92   /// \~english @par Classification
93   ///           public
94   /// \~english @par Type
95   ///                none
96   /// \~english @see CFrameworkunifiedServiceInterface
97   ////////////////////////////////////////////////////////////////////////////////////////////
98   ~CFrameworkunifiedServiceInterface();
99
100   ////////////////////////////////////////////////////////////////////////////////////////////
101   /// \ingroup CFrameworkunifiedServiceInterface
102   /// \~english @par Brief
103   ///          API to open Service.
104   /// \~english @param [in] f_hApp
105   ///           HANDLE* - Handle of framework
106   /// \~english @param [in] f_sServiceName
107   ///           std::string - Service Name
108   /// \~english @retval HANDLE
109   /// \~english @par Preconditions
110   ///        -  no preconditions
111   /// \~english @par Change of internal status
112   ///        -  none
113   /// \~english @par Conditions of processing failure
114   ///        - none
115   /// \~english @par Detail
116   ///           Open service by specified name and retrun handle of service. \n
117   ///           If FrameworkunifiedOpenService failed, handle is NULL.\n
118   /// \~english @par Classification
119   ///          public
120   /// \~english @par Type
121   ///          sync only
122   /// \~english @see FrameworkunifiedOpenService
123   ////////////////////////////////////////////////////////////////////////////////////////////
124   HANDLE OpenService(const HANDLE f_hApp, std::string f_sServiceName);
125
126   ////////////////////////////////////////////////////////////////////////////////////////////
127   /// \ingroup CFrameworkunifiedServiceInterface
128   /// \~english @par Brief
129   ///          API to close service.
130   /// \~english @param [in] f_hApp
131   ///           HANDLE* - Handle of framework
132   /// \~english @param [in] f_hService
133   ///           HANDLE - Handle of the service
134   /// \~english @retval EFrameworkunifiedStatus
135   ///           Success or Error
136   /// \~english @par Preconditons
137   ///        -  none
138   /// \~english @par Change of internal status
139   ///        -  none
140   /// \~english @par Conditions of processing failure
141   ///           - If parameter f_hApp is NULL. [eFrameworkunifiedStatusInvldParam]
142   ///           - If parameter f_hService is NULL. [eFrameworkunifiedStatusInvldParam]
143   ///           - If FrameworkunifiedCloseService failed.       [eFrameworkunifiedStatusInvldHandle]
144   /// \~english @par Detail
145   ///           close service by handle \n
146   /// \~english @par Classification
147   ///          public
148   /// \~english @par Type
149   ///          sync only
150   /// \~english @see FrameworkunifiedCloseService
151   ////////////////////////////////////////////////////////////////////////////////////////////
152   EFrameworkunifiedStatus CloseService(const HANDLE f_hApp, const HANDLE f_hService);
153
154   ////////////////////////////////////////////////////////////////////////////////////////////
155   /// \ingroup CFrameworkunifiedServiceInterface
156   /// \~english @par Brief
157   ///          API to open session
158   /// \~english @param [in] f_hApp
159   ///           HANDLE* -framework handle
160   /// \~english @param [in] f_uisessionType
161   ///           UI_32 - sessiontype
162   /// \~english @retval EFrameworkunifiedStatus
163   ///           Success or Error
164   /// \~english @par Preconditons
165   ///        -  none
166   /// \~english @par Change of internal status
167   ///        -  none
168   /// \~english @par Conditions of processing failure
169   ///           - If parameter f_hApp is NULL. [eFrameworkunifiedStatusInvldParam]
170   ///           - If FrameworkunifiedOpenSessionWithData failed.   [eFrameworkunifiedStatusInvldHandle]
171   /// \~english @par Detail
172   ///           open session by specified session type \n
173   /// \~english @par Classification
174   ///          public
175   /// \~english @par Type
176   ///          sync only
177   /// \~english @see FrameworkunifiedOpenSessionWithData
178   ////////////////////////////////////////////////////////////////////////////////////////////
179   EFrameworkunifiedStatus OpenSession(const HANDLE f_hApp, UI_32 f_uisessionType);
180
181   ////////////////////////////////////////////////////////////////////////////////////////////
182   /// \ingroup CFrameworkunifiedServiceInterface
183   /// \~english @par Brief
184   ///          API to open session Acknowledge
185   /// \~english @param [in] f_hApp
186   ///           HANDLE* - Handle of framework
187   /// \~english @param [in] hSession
188   ///          HANDLE - Session Handle
189   /// \~english @retval EFrameworkunifiedStatus
190   ///           Success or Error
191   /// \~english @par Preconditons
192   ///        -  none
193   /// \~english @par Change of internal status
194   ///        -  none
195   /// \~english @par Conditions of processing failure
196   ///           none
197   /// \~english @par Detail
198   ///           Empty implement.\n
199   /// \~english @par Classification
200   ///          public
201   /// \~english @par Type
202   ///          sync only
203   /// \~english @see one
204   ////////////////////////////////////////////////////////////////////////////////////////////
205   virtual EFrameworkunifiedStatus OpenSessionAcknowledge(const HANDLE f_hApp, HANDLE &hSession);  // NOLINT  (readability/nolint)
206
207   ////////////////////////////////////////////////////////////////////////////////////////////
208   /// \ingroup CFrameworkunifiedServiceInterface
209   /// \~english @par Brief
210   ///          API to close session.
211   /// \~english @param [in] f_hService
212   ///           HANDLE* - Handle of service
213   /// \~english @param [in] hSession
214   ///          HANDLE - Session Handle
215   /// \~english @retval EFrameworkunifiedStatus
216   ///           Success or Error
217   /// \~english @par Preconditons
218   ///        -  none
219   /// \~english @par Change of internal status
220   ///        -  none
221   /// \~english @par Conditions of processing failure
222   ///           - If parameter f_hService is NULL. [eFrameworkunifiedStatusInvldParam]
223   ///           - If parameter f_hSession is NULL. [eFrameworkunifiedStatusInvldParam]
224   ///           - If FrameworkunifiedCloseSession failed.   [eFrameworkunifiedStatusInvldHandle]
225   /// \~english @par Detail
226   ///           close session of specified service. \n
227   /// \~english @par Classification
228   ///          public
229   /// \~english @par Type
230   ///          sync only
231   /// \~english @see FrameworkunifiedCloseSession
232   ////////////////////////////////////////////////////////////////////////////////////////////
233   EFrameworkunifiedStatus CloseSession(const HANDLE f_hService, const HANDLE f_hSession);
234
235   ////////////////////////////////////////////////////////////////////////////////////////////
236   /// \ingroup CFrameworkunifiedServiceInterface
237   /// \~english @par Brief
238   ///          API to close session.
239   /// \~english @param [in] f_hService
240   ///           HANDLE* - Handle of service
241   /// \~english @param [in] hSession
242   ///          HANDLE - Session Handle
243   /// \~english @retval EFrameworkunifiedStatus
244   ///           Success or Error
245   /// \~english @par Preconditons
246   ///        -  none
247   /// \~english @par Change of internal status
248   ///        -  none
249   /// \~english @par Conditions of processing failure
250   ///           - If parameter hClient is NULL. [eFrameworkunifiedStatusNullPointer]
251   ///           - If FrameworkunifiedGetMsgDataOfSize failed.   [eFrameworkunifiedStatusNullPointer]
252   /// \~english @par Detail
253   ///           Check close session acknowledge.\n
254   /// \~english @par Classification
255   ///          public
256   /// \~english @par Type
257   ///          sync only
258   /// \~english @see FrameworkunifiedGetMsgDataOfSize
259   ////////////////////////////////////////////////////////////////////////////////////////////
260   EFrameworkunifiedStatus CloseSessionAcknowledge(const HANDLE hClient);
261 };
262 #endif  // __CSERVICESESSION_H__  NOLINT  (build/header_guard)
263 /** @}*/
264 /** @}*/
265 /** @}*/
266 /** @}*/
267 //@}