summaryrefslogtreecommitdiffstats
path: root/systemservice/interface_unified/library/include/system_service/interfaceunified_system_application.h
blob: fe5224ed0c8bfbea67ed54c5f22404852ae0324c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
/*
 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * @file interfaceunified_system_application.h
 * @brief This file supports the System Manager AGL framework client
 *        interface.
 */

#ifndef INTERFACEUNIFIED_SYSTEM_APPLICATION_H_  // NOLINT (build/header_guard)
#define INTERFACEUNIFIED_SYSTEM_APPLICATION_H_

/** @addtogroup BaseSystem
 *  @{
 */
/** @addtogroup system_service
 *  @ingroup BaseSystem
 *  @{
 */
/** @addtogroup interface_unified
 *  @ingroup system_service
 *  @{
 */
#include <native_service/frameworkunified_types.h>
  /////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup InterfaceunifiedSystemConnectToPowerSerivce
  /// \~english @par Summary
  ///      Subscribe and attach call backs to notifications, to PowerSerivce!
  /// \~english @param [in] hApp
  ///       HANDLE - App handle
  /// \~english @retval eFrameworkunifiedStatusOK Success
  /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
  /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
  /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
  /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
  /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
  /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
  /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
  /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
  /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
  /// \~english @par Preconditions
  /// \~english @par Change of the internal state
  ///       - Change of internal state according to the API does not occur.
  /// \~english @par Conditions of processing failure
  ///       - Pointer (pNtfyHandler) is NULL to the structure of the Notification Handler specified in the argument.
  ///         [eFrameworkunifiedStatusInvldParam]
  ///       - Notification Handler number specified in the argument (uiHandlerCount) 0. [eFrameworkunifiedStatusInvldParam]
  ///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
  ///       - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
  ///       - Notification Handler number specified in the argument (uiHandlerCount) has exceeded
  ///         the maximum number of Notification.[eFrameworkunifiedStatusFail]
  ///       - The acquisition of the buffer for storing a plurality of information of
  ///         Notification Handler specified by the argument has failed. [eFrameworkunifiedStatusInvldParam]
  ///       - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
  ///         [eFrameworkunifiedStatusFail]
  ///       - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
  ///       - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
  ///         [eFrameworkunifiedStatusInvldParam]
  ///       - Message queue name of HANDLE specified in the argument (hApp)
  ///         is not appropriate(The name is NULL, more than 20byte) [eFrameworkunifiedStatusInvldHandle]
  ///       - Message queue type of HANDLE specified in the argument (hApp) is not a transmission.
  ///         [eFrameworkunifiedStatusInvldHndlType]
  ///       - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
  ///       - It is invalid transmission file descriptor of the session message to the NPP Service.
  ///         [eFrameworkunifiedStatusErrNoEBADF]
  ///       - Interruption by the system call (signal) has occurred during the transmission of the session message
  ///         for the NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
  ///       - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
  ///       - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
  ///       - It failed to shared memory access for transmission of the session message for the NPP Service.
  ///         [eFrameworkunifiedStatusErrOther]
  /// \~english @par Classification
  ///          Public
  /// \~english @par Type
  ///          None
  /// \~english @par Detail
  ///          Subscribe and attach call backs to notifications, to PowerSerivce! \n
  ///          if callback has not subscribe,resubscribe! \n
  ///          if callback has been subscribed,initialize!
  /// \~english @see FrameworkunifiedGetAppName FrameworkunifiedSubscribeNotificationsWithCallback
  ////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus InterfaceunifiedSystemConnectToPowerSerivce(HANDLE hApp);
  /////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup InterfaceunifiedSystemConnectToPowerSerivce
  /// \~english @par Summary
  ///      Called from framework for every app to start connection to HeartBeat
  /// \~english @param [in] hApp
  ///       HANDLE - App handle, Handle to message queue of HeartBeat Service.
  /// \~english @retval eFrameworkunifiedStatusOK Success
  /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
  /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
  /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
  /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
  /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
  /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
  /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
  /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
  /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
  /// \~english @par Preconditions
  /// \~english @par Change of the internal state
  ///       - Change of internal state according to the API does not occur.
  /// \~english @par Conditions of processing failure
  ///       - Pointer (pNtfyHandler) is NULL to the structure of the Notification Handler specified
  ///         in the argument. [eFrameworkunifiedStatusInvldParam]
  ///       - Notification Handler number specified in the argument (uiHandlerCount) 0. [eFrameworkunifiedStatusInvldParam]
  ///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
  ///       - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
  ///       - Notification Handler number specified in the argument (uiHandlerCount) has exceeded
  ///         the maximum number of Notification. [eFrameworkunifiedStatusFail]
  ///       - The acquisition of the buffer for storing a plurality of information of
  ///         Notification Handler specified by the argument has failed. [eFrameworkunifiedStatusInvldParam]
  ///       - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
  ///         [eFrameworkunifiedStatusFail]
  ///       - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
  ///       - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
  ///         [eFrameworkunifiedStatusInvldParam]
  ///       - Message queue name of HANDLE specified in the argument (hApp)
  ///         is not appropriate(The name is NULL, more than 20byte) [eFrameworkunifiedStatusInvldHandle]
  ///       - Message queue type of HANDLE specified in the argument (hApp) is not a transmission.
  //          [eFrameworkunifiedStatusInvldHndlType]
  ///       - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
  ///       - It is invalid transmission file descriptor of the session message to the NPP Service.
  ///         [eFrameworkunifiedStatusErrNoEBADF]
  ///       - Interruption by the system call (signal) has occurred during the transmission of
  ///         the session message for the NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
  ///       - Incorrect size of the transmit buffer of the session message to the NPP Service.
  ///         [eFrameworkunifiedStatusInvldBufSize]
  ///       - Any errors occur during the transmission of a session message to the NPP Service.
  ///         [eFrameworkunifiedStatusFail]
  ///       - It failed to shared memory access for transmission of the session message
  ///         for the NPP Service. [eFrameworkunifiedStatusErrOther]
  /// \~english @par Classification
  ///          Public
  /// \~english @par Type
  ///          None
  /// \~english @par Detail
  ///          Called from framework for every app to start connection to HeartBeat \n
  ///          if app has not connection,reconnection! \n
  ///          if app has been connectioned,initialize it!
  /// \~english @see FrameworkunifiedGetAppName FrameworkunifiedAttachCallbacksToDispatcher
  ////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus InterfaceunifiedSystemConnectToHeartBeatService(HANDLE hApp);
  /////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup InterfaceunifiedSystemConnectToPowerSerivce
  /// \~english @par Summary
  ///      Subscribe and attach callbacks to System Manager Service!
  /// \~english @param [in] hApp
  ///       HANDLE - App handle.
  /// \~english @retval eFrameworkunifiedStatusOK Success
  /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
  /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
  /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
  /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
  /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
  /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
  /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
  /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
  /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
  /// \~english @par Preconditions
  /// \~english @par Change of the internal state
  ///       - Change of internal state according to the API does not occur.
  /// \~english @par Conditions of processing failure
  ///       - Pointer (pNtfyHandler) is NULL to the structure of
  ///         the Notification Handler specified in the argument. [eFrameworkunifiedStatusInvldParam]
  ///       - Notification Handler number specified in the argument (uiHandlerCount) 0. [eFrameworkunifiedStatusInvldParam]
  ///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
  ///       - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
  ///       - Notification Handler number specified in the argument (uiHandlerCount)
  ///         has exceeded the maximum number of Notification. [eFrameworkunifiedStatusFail]
  ///       - The acquisition of the buffer for storing a plurality of information of
  ///         Notification Handler specified by the argument has failed. [eFrameworkunifiedStatusInvldParam]
  ///       - Can not be acquired memory in the acquisition of the buffer of
  ///         the message for transmission (malloc). [eFrameworkunifiedStatusFail]
  ///       - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
  ///       - HANDLE specified in the argument message queue HANDLE in (hApp)
  ///         is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldParam]
  ///       - Message queue name of HANDLE specified in the argument (hApp)
  ///         is not appropriate(The name is NULL, more than 20byte) [eFrameworkunifiedStatusInvldHandle]
  ///       - Message queue type of HANDLE specified in the argument (hApp)
  ///         is not a transmission. [eFrameworkunifiedStatusInvldHndlType]
  ///       - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
  ///       - It is invalid transmission file descriptor of the session message to the NPP Service.
  ///         [eFrameworkunifiedStatusErrNoEBADF]
  ///       - Interruption by the system call (signal) has occurred during the transmission of
  ///         the session message for the NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
  ///       - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
  ///       - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
  ///       - It failed to shared memory access for transmission of the session message for
  ///         the NPP Service. [eFrameworkunifiedStatusErrOther]
  /// \~english @par Classification
  ///          Public
  /// \~english @par Type
  ///          None
  /// \~english @par Detail
  ///          Subscribe and attach callbacks to System Manager Service! \n
  ///          if app has not Subscribed,resubscribe!
  /// \~english @see FrameworkunifiedGetAppName SystemManagerOpenSender
  ////////////////////////////////////////////////////////////////////////////////////
EFrameworkunifiedStatus InterfaceunifiedSystemConnectToSystemManagerService(HANDLE hApp);

/** @}*/
/** @}*/
/** @}*/


#endif /* INTERFACEUNIFIED_SYSTEM_APPLICATION_H_ */  // NOLINT (build/header_guard)