common_library: gettid is multiple declaration in cl_error
[staging/basesystem.git] / video_in_hal / nsframework / framework_unified / client / include / native_service / ns_np_service.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_NPPService
19 /// \brief    Header for message structures for notification_persistent_service.
20 ///
21 /// Declares the external APIs to Notification and Persistence Service.
22 ///
23 //////////////////////////////////////////////////////////////////////////////////////////////////
24
25 /**
26  * @file ns_np_service.h
27  */
28
29 /** @addtogroup BaseSystem
30  *  @{
31  */
32 /** @addtogroup native_service
33  *  @ingroup BaseSystem
34  *  @{
35  */
36 /** @addtogroup notification_persistent_service
37  *  @ingroup native_service
38  *  @{
39  */
40
41 #ifndef __NATIVESERVICES_NP_SERVICE_H__  // NOLINT  (build/header_guard)
42 #define __NATIVESERVICES_NP_SERVICE_H__
43
44 #include <native_service/frameworkunified_types.h>
45
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49
50 /**
51  * \~english  A structure to register notification msg
52  */
53 typedef struct _NC_register_notif_msg {
54   CHAR  notificationName[MAX_STRING_SIZE_NOTIFICATION];  //!< \~english notification event name string
55   UI_32 maxLength;                       //!< \~english Maximum possible length (bytes) of
56                                           // the message data
57   // UI_8  bIsPersistent;                     ///< Flag to indicate if data has to be persisted.
58   EFrameworkunifiedNotificationType persType;           //!< \~english Specifies persitence for this notification
59   UI_8  dummy[4];                          //!< \~english Packing to 32 bit boundary
60 } NC_register_notif_msg;
61
62 /**
63  * \~english  A structure to register multiple notification msg
64  */
65 typedef struct _NC_register_multiple_notif_msg {
66   UI_32 numNotifications;                 //!< \~english This has to be UI_32 to avoid holes.
67   NC_register_notif_msg notifierList[1];  //!< \~english variable number of structures
68 } NC_register_multiple_notif_msg;
69
70 /**
71  * \~english  A structure to register immediate notification msg
72  */
73 typedef struct _NC_register_immediate_notif_msg {
74   CHAR  notificationName[MAX_STRING_SIZE_NOTIFICATION];  //!< \~english Notification Event Name string
75   UI_32 maxLength;                       //!< \~english Maximum possible length (bytes) of
76                                           // the message data
77   EFrameworkunifiedNotificationType persType;           //!< \~english Specifies persitence for this notification
78   UI_32 delay;              //!< \~english Delay time for persistence
79   UI_8  dummy[4];                          //!< \~english Packing to 32 bit boundary
80 } NC_register_immediate_notif_msg;
81
82 /**
83  * \~english  A structure to register multiple immediate notification msg
84  */
85 typedef struct _NC_register_multiple_immediate_notif_msg {
86   UI_32 numNotifications;                 //!< \~english This has to be UI_32 to avoid holes.
87   NC_register_immediate_notif_msg notifierList[1];  //!< \~english variable number of structures
88 } NC_register_multiple_immediate_notif_msg;
89
90 /**
91  * \~english  A structure to unregister notification msg
92  */
93 typedef struct _NC_unregister_notif_msg {
94   CHAR notificationName[MAX_STRING_SIZE_NOTIFICATION];  //!< \~english Notification Event Name string
95 } NC_unregister_notif_msg, NC_subscribe_msg, NC_unsubscribe_frm_notif_msg, NC_get_pers_data_msg;
96
97 /**
98  * \~english  A structure to unregister multiple notification msg
99  */
100 typedef struct _NC_unregister_multiple_notif_msg {
101   UI_32 numNotifications;                       //!< \~english notification event name num
102   NC_unregister_notif_msg notificationList[1];  //!< \~english notification event name List
103 } NC_unregister_multiple_notif_msg;
104
105 /**
106  * \~english  A structure to save pers data
107  */
108 typedef struct _NC_savepersdata_ack {
109   EFrameworkunifiedStatus eStatus;  //!< \~english eFrameworkunifiedStatusOK is (valid - data stored, anything else is
110 } NC_savepersdata_ack;
111
112 /**
113  * \~english  A structure to subscribe multiple notification msg
114  */
115 typedef struct _NC_subscribe_multiple_notif_msg {
116   UI_32 numNotifications;                //!< \~english notification event name num
117   NC_subscribe_msg notificationList[1];  //!< \~english notification event name List
118 } NC_subscribe_multiple_notif_msg;
119
120 /**
121  * \~english  A structure to subscribe multiple notification msg
122  */
123 typedef struct _NC_unsubscribe_multiple_notif_msg {
124   UI_32 numNotifications;                            //!< \~english notification event name num
125   NC_unsubscribe_frm_notif_msg notificationList[1];  //!< \~english notification event name List
126 } NC_unsubscribe_multiple_notif_msg;
127
128 /**
129  * \~english  A structure to get pers data failed
130  */
131 typedef struct __NC_get_persdata_failed_ack {
132   CHAR notificationName[MAX_STRING_SIZE_NOTIFICATION];      //!< \~english notification name
133 } NC_get_persdata_failed_ack;
134
135 /**
136  * \~english  A structure to set personality
137  */
138 typedef struct _NC_User {
139   CHAR cUsername[MAX_PATH_LENGTH];       //!< \~english name of personality
140 } NC_User;
141
142 /**
143  * \~english  A structure to register persistent file with the notification_persistent_service
144  */
145 typedef struct _NC_RegisterPersistentFileMsg {
146   CHAR cFileTag[MAX_STRING_SIZE_TAG];  //!< \~english Tag associated with the
147                                        // file that would be persisted
148   BOOL bIsUserFile;                    //!< \~english is user file
149 } NC_RegisterPersistentFileMsg;
150
151 /**
152  * \~english  A structure to specify where to load the file associated with the Tag
153  */
154 typedef struct _NC_LoadPersistedFileMsg {
155   CHAR cFileTag[MAX_STRING_SIZE_TAG];  //!< \~english Tag associated with the file
156   CHAR cFilePath[MAX_PATH_LENGTH];     //!< \~english path to which the file needs to retrieved
157   CHAR cUsername[MAX_PATH_LENGTH];     //!< \~english Name of the user for user specific file.
158 } NC_LoadPersistedFileMsg;
159
160 /**
161  * \~english  A structure to release persistent file
162  */
163 typedef struct _NC_ReleasePersistentFileMsg {
164   EFrameworkunifiedReleaseType eFrameworkunifiedReleaseType;             //!< \~english should the file be persisted
165   CHAR cFilePath[MAX_PATH_LENGTH];             //!< \~english path from which the
166                                                // file needs to be picked up to persist
167   CHAR cFileTag[MAX_STRING_SIZE_NOTIFICATION];  //!< \~english Tag associated with the
168                                                 // file to be persisted
169   CHAR cUsername[MAX_PATH_LENGTH];             //!< \~english Name of the user for user specific file.
170 } NC_ReleasePersistentFileMsg;
171
172 /**
173  * \~english  A structure to register persistent folder with the notification_persistent_service
174  */
175 typedef struct _NC_RegisterPersistentFolderMsg {
176   CHAR cFolderTag[MAX_STRING_SIZE_TAG];  //!< \~english Tag associated with the
177                                          // folder that would be persisted
178   BOOL bIsUserFolder;                    //!< \~english Check if the folder is of user type
179 } NC_RegisterPersistentFolderMsg;
180
181 /**
182  * \~english  A structure to specify where to load the folder associated with the Tag
183  */
184 typedef struct _NC_LoadPersistedFolderMsg {
185   CHAR cFolderTag[MAX_STRING_SIZE_TAG];  //!< \~english Tag associated with the folder
186   CHAR cFolderPath[MAX_PATH_LENGTH];     //!< \~english path to which the folder needs to retrieved
187   CHAR cUsername[MAX_PATH_LENGTH];       //!< \~english Name of the user for user specific folder.
188 } NC_LoadPersistedFolderMsg;
189
190 /**
191  * \~english  A structure to Release Persistent Folder Msg
192  */
193 typedef struct _NC_ReleasePersistentFolderMsg {
194   EFrameworkunifiedReleaseType eFrameworkunifiedReleaseType;               //!< \~english should the file be persisted
195   CHAR cFolderPath[MAX_PATH_LENGTH];             //!< \~english path from which the folder
196                                                   // needs to be picked up to persist
197   CHAR cFolderTag[MAX_STRING_SIZE_NOTIFICATION];  //!< \~english Tag associated with
198                                                   // the folder to be persisted
199   CHAR cUsername[MAX_PATH_LENGTH];               //!< \~english Name of the user for user
200                                                  // specific folder.
201 } NC_ReleasePersistentFolderMsg;
202
203 /**
204  * \~english  A structure to Load Persisted Ack
205  */
206 typedef struct _NC_LoadPersistedAck {
207   EFrameworkunifiedStatus eStatus;         //!< \~english ack the success/failure in
208                               // retrieving the file/folder from persistence
209   CHAR cTag[MAX_PATH_LENGTH];  //!< \~english tag of the file/folder for which acknowledge is made
210 } NC_LoadPersistedAck, NC_ReleasePersistedAck;
211
212 /**
213  * \~english  A structure to Nor Persistent Data
214  */
215 typedef struct _NC_NorPersistentData {
216   CHAR notificationName[MAX_STRING_SIZE_NOTIFICATION];  //!< \~english Notification Event Name string
217   CHAR pPublisherName[MAX_NAME_SIZE_APP];               //!< \~english Publisher Event Name string
218   UI_32 dataSize;                                       //!< \~english data size
219   UI_32 uiDelay;                                        //!< \~english ui Delay
220   UI_32 uiMaxSize;                                      //!< \~english ui Max Size
221 } NC_NorPersistentData;
222
223 /**
224  * \~english  A structure to request for deleting data from persistent memory
225  */
226 typedef struct _NC_ClearPersistedDataReq {
227   EFrameworkunifiedClearPersistence ePersistenceData;  //!< \~english defines what
228                                           // data to be deleted from persistent memory
229 } NC_ClearPersistedDataReq;
230
231 /**
232  * \~english  A structure for receiving ack of data deleted from persistent memory
233  */
234 typedef struct _NC_ClearPersisteDatadAck {
235   EFrameworkunifiedStatus eStatus;  //!< \~english ack status of ClearPersistedData request
236 } NC_ClearPersisteDatadAck;
237
238 /**
239  * \~english  A structure to request stop message to notification_persistent_service.
240  */
241 typedef struct _NC_StopMsgData {
242   EFrameworkunifiedShutdownType eShutdownType;  //!< \~english shutdown type
243   UI_32 uiStopMsgData;  //!< \~english Reason for sending stop message to NPPService
244 } NC_StopMsgData;
245
246 /**
247  * \~english  A structure to set the persist type of file and folder
248  */
249 typedef struct _NC_SetPersistType {
250   EFrameworkunifiedPersistCategory ePersistType;  //!< \~english persist type
251   CHAR cTag[MAX_PATH_LENGTH];   //!< \~english tag name of the file or folder
252 } NC_SetFilePersistType, NC_SetFolderPersistType;
253
254 /**
255  * \~english  A data received with ack sent by notification_persistent_service when immediate notification data is
256  * written in persistent memory
257  */
258 typedef struct _NC_ImmediateWriteAck {
259   CHAR notificationName[MAX_STRING_SIZE_NOTIFICATION];  //!< \~english notification Name
260   EFrameworkunifiedStatus eStatus;                                  //!< \~english status of request
261 } NC_ImmediateWriteAck;
262
263 #ifdef __cplusplus
264 }
265 #endif
266
267 #endif /* __NATIVESERVICES_NP_SERVICE_H__ */  // NOLINT  (build/header_guard)
268 /** @}*/  // end of notification_persistent_service
269 /** @}*/  // end of native_service
270 /** @}*/  // end of BaseSystem
271 // EOF