2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 ////////////////////////////////////////////////////////////////////////////////
18 /// \ingroup tag_HMI_CWORD77_Controller
23 ////////////////////////////////////////////////////////////////////////////////
26 * @file frameworkunified_service_if.h
27 * @brief \~english This is base class for service interface classes
30 /** @addtogroup BaseSystem
33 /** @addtogroup native_service
37 /** @addtogroup framework_unified
38 * @ingroup native_service
41 /** @addtogroup framework
42 * @ingroup native_service
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>
51 ///////////////////////////////////////////////////////////////////////////
52 /// class: CServiceSession
53 /// Description: This is base class for service interface classes
55 ////////////////////////////////////////////////////////////////////////////
56 class CFrameworkunifiedServiceInterface {
58 ////////////////////////////////////////////////////////////////////////////////////////////
59 /// \ingroup CFrameworkunifiedServiceInterface
60 /// \~english @par Brief
61 /// Constructor for CFrameworkunifiedServiceInterface
62 /// \~english @retval none
63 /// \~english @par Preconditions
65 /// \~english @par Change of internal status
67 /// \~english @par Conditions of processing failure
69 /// \~english @par Detail
70 /// create CFrameworkunifiedServiceInterface class instance
71 /// \~english @par Classification
73 /// \~english @par Type
75 /// \~english @see ~CFrameworkunifiedServiceInterface
76 ////////////////////////////////////////////////////////////////////////////////////////////
77 CFrameworkunifiedServiceInterface();
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
88 /// \~english @par Conditions of processing failure
90 /// \~english @par Detail
91 /// Release CFrameworkunifiedServiceInterface instance
92 /// \~english @par Classification
94 /// \~english @par Type
96 /// \~english @see CFrameworkunifiedServiceInterface
97 ////////////////////////////////////////////////////////////////////////////////////////////
98 ~CFrameworkunifiedServiceInterface();
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
113 /// \~english @par Conditions of processing failure
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
120 /// \~english @par Type
122 /// \~english @see FrameworkunifiedOpenService
123 ////////////////////////////////////////////////////////////////////////////////////////////
124 HANDLE OpenService(const HANDLE f_hApp, std::string f_sServiceName);
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
136 /// \~english @par Preconditons
138 /// \~english @par Change of internal status
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
148 /// \~english @par Type
150 /// \~english @see FrameworkunifiedCloseService
151 ////////////////////////////////////////////////////////////////////////////////////////////
152 EFrameworkunifiedStatus CloseService(const HANDLE f_hApp, const HANDLE f_hService);
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
164 /// \~english @par Preconditons
166 /// \~english @par Change of internal status
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
175 /// \~english @par Type
177 /// \~english @see FrameworkunifiedOpenSessionWithData
178 ////////////////////////////////////////////////////////////////////////////////////////////
179 EFrameworkunifiedStatus OpenSession(const HANDLE f_hApp, UI_32 f_uisessionType);
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
191 /// \~english @par Preconditons
193 /// \~english @par Change of internal status
195 /// \~english @par Conditions of processing failure
197 /// \~english @par Detail
198 /// Empty implement.\n
199 /// \~english @par Classification
201 /// \~english @par Type
203 /// \~english @see one
204 ////////////////////////////////////////////////////////////////////////////////////////////
205 virtual EFrameworkunifiedStatus OpenSessionAcknowledge(const HANDLE f_hApp, HANDLE &hSession); // NOLINT (readability/nolint)
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
217 /// \~english @par Preconditons
219 /// \~english @par Change of internal status
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
229 /// \~english @par Type
231 /// \~english @see FrameworkunifiedCloseSession
232 ////////////////////////////////////////////////////////////////////////////////////////////
233 EFrameworkunifiedStatus CloseSession(const HANDLE f_hService, const HANDLE f_hSession);
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
245 /// \~english @par Preconditons
247 /// \~english @par Change of internal status
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
256 /// \~english @par Type
258 /// \~english @see FrameworkunifiedGetMsgDataOfSize
259 ////////////////////////////////////////////////////////////////////////////////////////////
260 EFrameworkunifiedStatus CloseSessionAcknowledge(const HANDLE hClient);
262 #endif // __CSERVICESESSION_H__ NOLINT (build/header_guard)