3bc54376f77ba96a894d479b7715ed0ce933f1eb
[profile/ivi/ico-uxf-homescreen.git] / include / ico_syc_msg_cmd_def.h
1 /*
2  * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
3  *
4  * This program is licensed under the terms and conditions of the
5  * Apache License, version 2.0.  The full text of the Apache License is at
6  * http://www.apache.org/licenses/LICENSE-2.0
7  *
8  */
9
10 /*========================================================================*/
11 /**
12  *  @file   ico_syc_msg_cmd_def.h
13  *
14  *  @brief
15  */
16 /*========================================================================*/
17 #ifndef __ICO_SYC_MSG_CMD_DEF_H__
18 #define __ICO_SYC_MSG_CMD_DEF_H__
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24 /*============================================================================*/
25 /* definition                                                                 */
26 /*============================================================================*/
27 /*
28  * uri and protocol
29  */
30 #define ICO_SYC_URI             (char *)"ws://127.0.0.1:18081"
31 #define ICO_SYC_PROTOCOL        (char *)"ico_syc_protocol"
32
33 /*
34  * message primary key name
35  */
36 #define MSG_PRMKEY_APPID        (char *)"appid"
37 #define MSG_PRMKEY_CMD          (char *)"command"
38 #define MSG_PRMKEY_PID          (char *)"pid"
39
40 /* for privilege API */
41 #define MSG_PRMKEY_ARG          (char *)"arg"
42 /* window controller and input controller */
43 #define MSG_PRMKEY_WINNAME      (char *)"winname"
44 #define MSG_PRMKEY_SURFACE      (char *)"surface"
45 #define MSG_PRMKEY_LAYER        (char *)"layer"
46 #define MSG_PRMKEY_NODE         (char *)"node"
47 #define MSG_PRMKEY_ZONE         (char *)"zone"
48 #define MSG_PRMKEY_ANIM_NAME    (char *)"anim_name"
49 #define MSG_PRMKEY_ANIM_TIME    (char *)"anim_time"
50 #define MSG_PRMKEY_ATTR         (char *)"attr"
51 #define MSG_PRMKEY_DEV          (char *)"device"
52 #define MSG_PRMKEY_INPUT        (char *)"input_num"
53 #define MSG_PRMKEY_ALLOC        (char *)"alloc_type"
54 #define MSG_PRMKEY_KEY          (char *)"keycode"
55 #define MSG_PRMKEY_DEVICE       (char *)"deviceno"
56 #define MSG_PRMKEY_EV_TYPE      (char *)"ev_type"
57 #define MSG_PRMKEY_EV_TIME      (char *)"ev_time"
58 #define MSG_PRMKEY_EV_CODE      (char *)"ev_code"
59 #define MSG_PRMKEY_EV_VAL       (char *)"ev_value"
60 #define MSG_PRMKEY_POS_X        (char *)"pos_x"
61 #define MSG_PRMKEY_POS_Y        (char *)"pos_y"
62 #define MSG_PRMKEY_WIDTH        (char *)"width"
63 #define MSG_PRMKEY_HEIGHT       (char *)"height"
64 #define MSG_PRMKEY_RAISE        (char *)"raise"
65 #define MSG_PRMKEY_VISIBLE      (char *)"visible"
66 #define MSG_PRMKEY_ACTIVE       (char *)"active"
67 #define MSG_PRMKEY_NAME         (char *)"name"
68 #define MSG_PRMKEY_STRIDE       (char *)"stride"
69 #define MSG_PRMKEY_FORMAT       (char *)"format"
70 #define MSG_PRMKEY_RATE         (char *)"framerate"
71 /* user controller */
72 #define MSG_PRMKEY_USER         (char *)"user"
73 #define MSG_PRMKEY_PASSWD       (char *)"password"
74 #define MSG_PRMKEY_USER_NUM     (char *)"user_num"
75 #define MSG_PRMKEY_USER_LIST    (char *)"user_list"
76 #define MSG_PRMKEY_USER_LOGIN   (char *)"user_login"
77
78 /* for general API */
79 #define MSG_PRMKEY_RES          (char *)"res"
80 #define MSG_PRMKEY_REGION       (char *)"region"
81 /* app resource controller */
82 #define MSG_PRMKEY_RES_WINDOW   (char *)"window"
83 #define MSG_PRMKEY_RES_SOUND    (char *)"sound"
84 #define MSG_PRMKEY_RES_INPUT    (char *)"input"
85 #define MSG_PRMKEY_RES_ZONE     (char *)"zone"
86 #define MSG_PRMKEY_RES_NAME     (char *)"name"
87 #define MSG_PRMKEY_RES_SURFACE  (char *)"surface"
88 #define MSG_PRMKEY_RES_ID       (char *)"id"
89 #define MSG_PRMKEY_RES_ADJUST   (char *)"adjust"
90 #define MSG_PRMKEY_RES_EV       (char *)"event"
91 #define MSG_PRMKEY_RES_TYPE     (char *)"type"
92 #define MSG_PRMKEY_RES_POS_X    (char *)"pos_x"
93 #define MSG_PRMKEY_RES_POS_Y    (char *)"pos_y"
94 #define MSG_PRMKEY_RES_WIDTH    (char *)"width"
95 #define MSG_PRMKEY_RES_HEIGHT   (char *)"height"
96 #define MSG_PRMKEY_RES_HOT_X    (char *)"hotspot_x"
97 #define MSG_PRMKEY_RES_HOT_Y    (char *)"hotspot_y"
98 #define MSG_PRMKEY_RES_CUR_X    (char *)"cursor_x"
99 #define MSG_PRMKEY_RES_CUR_Y    (char *)"cursor_x"
100 #define MSG_PRMKEY_RES_CUR_WIDTH  (char *)"cursor_width"
101 #define MSG_PRMKEY_RES_CUR_HEIGHT (char *)"cursor_height"
102 #define MSG_PRMKEY_RES_ATTR     (char *)"attr"
103 /* user controller */
104 #define MSG_PRMKEY_LASTINFO     (char *)"lastinfo"
105
106 /* notify changed system state */
107 #define MSG_PRMKEY_STATEID      (char *)"stateid"
108 #define MSG_PRMKEY_STATE        (char *)"state"
109
110 /* commnad type mask */
111 #define MSG_CMD_TYPE_WINCTRL            0x00010000
112 #define MSG_CMD_TYPE_INPUTCTRL          0x00020000
113 #define MSG_CMD_TYPE_USERMGR            0x00030000
114 #define MSG_CMD_TYPE_RESOURCEMGR        0x00040000
115 #define MSG_CMD_TYPE_INPUTDEVSETTING    0x00050000
116 #define MSG_CMD_TYPE_MASK               0xFFFF0000
117
118 /*
119  * message command name
120  */
121 /* common */
122 #define MSG_CMD_SEND_APPID          0x00000001
123 /* window controller */
124 #define MSG_CMD_CREATE              0x00010001
125 #define MSG_CMD_DESTROY             0x00010002
126 #define MSG_CMD_SHOW                0x00010003
127 #define MSG_CMD_HIDE                0x00010004
128 #define MSG_CMD_MOVE                0x00010005
129 #define MSG_CMD_CHANGE_ACTIVE       0x00010006
130 #define MSG_CMD_CHANGE_LAYER        0x00010007
131 #define MSG_CMD_CHANGE_ATTR         0x00010008
132 #define MSG_CMD_NAME                0x00010009
133 #define MSG_CMD_MAP_THUMB           0x00010011
134 #define MSG_CMD_UNMAP_THUMB         0x00010012
135 #define MSG_CMD_MAP_BUFFER          0x00010013
136 #define MSG_CMD_SHOW_LAYER          0x00010020
137 #define MSG_CMD_HIDE_LAYER          0x00010021
138 #define MSG_CMD_CHANGE_LAYER_ATTR   0x00010022
139 /* input controller */
140 #define MSG_CMD_ADD_INPUT           0x00020001
141 #define MSG_CMD_DEL_INPUT           0x00020002
142 #define MSG_CMD_SEND_INPUT          0x00020003
143 /* user controller */
144 #define MSG_CMD_CHANGE_USER         0x00030001
145 #define MSG_CMD_GET_USERLIST        0x00030002
146 #define MSG_CMD_GET_LASTINFO        0x00030003
147 #define MSG_CMD_SET_LASTINFO        0x00030004
148 /* app resource controller */
149 #define MSG_CMD_ACQUIRE_RES         0x00040001
150 #define MSG_CMD_RELEASE_RES         0x00040002
151 #define MSG_CMD_DEPRIVE_RES         0x00040003
152 #define MSG_CMD_WAITING_RES         0x00040004
153 #define MSG_CMD_REVERT_RES          0x00040005
154 /* input device setting */
155 #define MSG_CMD_SET_REGION          0x00050001
156 #define MSG_CMD_UNSET_REGION        0x00050002
157
158 /* app resource controller */
159 #define MSG_CMD_CREATE_RES          0x00040011
160 #define MSG_CMD_DESTORY_RES         0x00040012
161
162 /* notify state changed to homescreen */
163 #define MSG_CMD_NOTIFY_CHANGED_STATE    0x00060001
164
165 /* application operation */
166 #define MSG_CMD_APP_START           1000
167 #define MSG_CMD_APP_STOP            1001
168
169 /* window change  */
170 #define MSG_CMD_WIN_CHANGE          2000
171
172 #ifdef __cplusplus
173 }
174 #endif
175 #endif  /* __ICO_SYC_MSG_CMD_DEF_H__ */
176 /* vim:set expandtab ts=4 sw=4: */