Init basesystem source codes.
[staging/basesystem.git] / video_in_hal / nsframework / framework_unified / client / include / native_service / frameworkunified_service_protocol.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 //////////////////////////////////////////////////////////////////////////////////////////////////
19 /// \ingroup tag_NativeServices
20 /// \brief
21 ///
22 //////////////////////////////////////////////////////////////////////////////////////////////////
23 //@{
24 /**
25  * @file frameworkunified_service_protocol.h
26  * @brief \~english Include enums, structs and frameworkunified_types.h
27  *
28  */
29 /** @addtogroup BaseSystem
30  *  @{
31  */
32 /** @addtogroup native_service
33  *  @ingroup BaseSystem
34  *  @{
35  */
36 /** @addtogroup framework_unified
37  *  @ingroup native_service
38  *  @{
39  */
40 /** @addtogroup framework
41  *  @ingroup framework_unified
42  *  @{
43  */
44 #ifndef FRAMEWORKUNIFIED_SERVICE_PROTOCOL_H_  // NOLINT  (build/header_guard)
45 #define FRAMEWORKUNIFIED_SERVICE_PROTOCOL_H_
46
47 #include <native_service/frameworkunified_types.h>
48
49 #define NS_INVALID_SESSION 0xFFFF
50
51 typedef enum _EBaseProtocol {
52   PROTOCOL_OPEN_SESSION_REQ      = 0x00,  ///< Open session request (client > service)
53   PROTOCOL_OPEN_SESSION_ACK      = 0x01,  ///< Open session ack (service > client)
54   PROTOCOL_OPEN_SESSION_REQ_SYNC = 0x02,  ///< Open session request sync (client > service)
55   PROTOCOL_CLOSE_SESSION_REQ      = 0x03,  ///< Close session request (client > service)
56   PROTOCOL_CLOSE_SESSION_ACK      = 0x04,  ///< Close session ack (service > client)
57   PROTOCOL_CLOSE_SESSION_REQ_SYNC = 0x05,  ///< Close session request sync (client > service)
58
59   PROTOCOL_REGISTER_EVENTS     = 0x06,  ///< Register for events (client > service)
60   PROTOCOL_REGISTER_EVENTS_ACK = 0x07,  ///< Register for events ack (service > client)
61   PROTOCOL_UNREGISTER_EVENTS   = 0x08,  ///< Un-Register for events (client > service)
62
63   PROTOCOL_THREAD_INITIALIZATION = 0x09,  ///< Initialize thread after creation
64   PROTOCOL_THREAD_WAKEUP = 0x0A,  ///< Wakeup Thread after sleep
65   PROTOCOL_THREAD_SHUTDOWN = 0x0B,  ///< Stop the thread
66   PROTOCOL_THREAD_DESTROY = 0x0C,  ///< Destroy the thread
67   PROTOCOL_RSV_0D = 0x0D,  ///< Reserved
68   PROTOCOL_RSV_0E = 0x0E,  ///< Reserved
69   PROTOCOL_DIS_MSGPROFILER = 0x0F,  ///< Reserved
70
71   PROTOCOL_FRAMEWORKUNIFIED_BASE_CMD = 0x10,        ///< Protocols between range PROTOCOL_FRAMEWORKUNIFIED_BASE_CMD to PROTOCOL_FRAMEWORKUNIFIED_MAX_CMD
72   PROTOCOL_FRAMEWORKUNIFIED_MAX_CMD = 0xFFFFFFF0,  ///< are available for FRAMEWORKUNIFIED applications to use.
73
74   PROTOCOL_RSV_xF1 = 0xFFFFFFF1,  ///< Reserved
75   PROTOCOL_RSV_xF2 = 0xFFFFFFF2,  ///< Reserved
76   PROTOCOL_RSV_xF3 = 0xFFFFFFF3,  ///< Reserved
77   PROTOCOL_RSV_xF4 = 0xFFFFFFF4,  ///< Reserved
78   PROTOCOL_RSV_xF5 = 0xFFFFFFF5,  ///< Reserved
79   PROTOCOL_RSV_xF6 = 0xFFFFFFF6,  ///< Reserved
80   PROTOCOL_RSV_xF7 = 0xFFFFFFF7,  ///< Reserved
81   PROTOCOL_RSV_xF8 = 0xFFFFFFF8,  ///< Reserved
82   PROTOCOL_RSV_xF9 = 0xFFFFFFF9,  ///< Reserved
83   PROTOCOL_RSV_xFA = 0xFFFFFFFA,  ///< Reserved
84   PROTOCOL_RSV_xFB = 0xFFFFFFFB,  ///< Reserved
85   PROTOCOL_RSV_xFC = 0xFFFFFFFC,  ///< Reserved
86
87   PROTOCOL_TIMER_DUMMY_CMD = 0xFFFFFFFD,  ///< NS internally use this command in timer
88
89   PROTOCOL_FRAMEWORKUNIFIED_NOTIFICATION = 0xFFFFFFFE,
90   PROTOCOL_FRAMEWORKUNIFIED_ANY_COMMAND  = 0xFFFFFFFF
91 } EBaseProtocol;
92
93 typedef struct _OpenSessionAck {
94   EFrameworkunifiedStatus eStatus;
95   UI_32 sessionId;
96   CHAR  cSessionName[MAX_QUEUE_NAME_SIZE];
97   UI_32 sessionType;
98 } OpenSessionAck;
99
100
101 typedef struct _CloseSessionReq {
102   UI_32 sessionId;
103   CHAR  cSessionName[MAX_QUEUE_NAME_SIZE];
104 } CloseSessionReq;
105
106 typedef struct _CloseSessionAck {
107   UI_32 sessionId;
108   EFrameworkunifiedStatus eStatus;
109 } CloseSessionAck;
110
111 #endif /* FRAMEWORKUNIFIED_SERVICE_PROTOCOL_H_ */  // NOLINT  (build/header_guard)
112 /** @}*/
113 /** @}*/
114 /** @}*/
115 /** @}*/
116 //@}