2 * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
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
10 * @brief user experiance library public header file(configuration)
15 #ifndef ICO_UXF_CONF_H_
16 #define ICO_UXF_CONF_H_
19 #include "ico_uxf_conf_def.h"
20 #include "ico_uxf_sysdef.h"
21 #include "ico_uxf_def.h"
22 #include "ico_uxf_typedef.h"
23 #include "ico_apf_log.h"
29 typedef struct _ico_uxf_conf_misc {
30 char topdir[ICO_UXF_CONF_DIR_MAX+1];
31 char confdir[ICO_UXF_CONF_DIR_MAX+1];
37 char *masterhostaddress;
40 short default_categoryId;
41 short default_displayId;
42 short default_layerId;
43 short default_dispzoneId;
44 short default_soundId;
45 short default_soundzoneId;
46 short default_inputdevId;
47 short default_inputswId;
48 int appscontrollerport;
54 typedef struct _ico_uxf_conf_host {
62 typedef struct _ico_uxf_conf_category {
70 short res; /* (unused) */
71 } Ico_Uxf_conf_category;
73 typedef struct _ico_uxf_conf_kind {
80 typedef struct _ico_uxf_conf_appdisplay {
84 short res; /* (unused) */
85 } Ico_Uxf_conf_appdisplay;
87 typedef struct _ico_uxf_conf_appsound {
90 } Ico_Uxf_conf_appsound;
92 typedef struct _ico_uxf_conf_appinput {
95 } Ico_Uxf_conf_appinput;
97 typedef struct _ico_uxf_conf_application {
109 short displayzoneNum;
112 Ico_Uxf_conf_appdisplay display[ICO_UXF_APPDISPLAY_MAX];
113 Ico_Uxf_conf_appsound sound[ICO_UXF_APPSOUND_MAX];
114 Ico_Uxf_conf_appinput input[ICO_UXF_APPINPUT_MAX];
115 struct _ico_uxf_conf_application *nextidhash;
116 struct _ico_uxf_conf_application *nextnamehash;
117 } Ico_Uxf_conf_application;
119 typedef struct _ico_uxf_conf_display_layer {
122 } Ico_Uxf_conf_display_layer;
124 #define ZONE_MAX_OVERLAP (ICO_UXF_DISPLAY_ZONE_MAX-1)
125 typedef struct _ico_uxf_conf_display_zone {
133 short res; /* (unused) */
134 struct _ico_uxf_conf_display *display;
135 unsigned char overlapNum;
136 unsigned char overlap[ZONE_MAX_OVERLAP];
137 } Ico_Uxf_conf_display_zone;
139 typedef struct _ico_uxf_conf_display {
151 Ico_Uxf_conf_display_layer *layer;
152 Ico_Uxf_conf_display_zone *zone;
153 } Ico_Uxf_conf_display;
155 typedef struct _ico_uxf_conf_sound_zone {
159 short res; /* (unused) */
160 struct _ico_uxf_conf_sound *sound;
161 unsigned char overlapNum;
162 unsigned char overlap[ZONE_MAX_OVERLAP];
163 } Ico_Uxf_conf_sound_zone;
165 typedef struct _ico_uxf_conf_sound {
172 Ico_Uxf_conf_sound_zone *zone;
173 } Ico_Uxf_conf_sound;
175 typedef struct _ico_uxf_conf_inputsw {
176 struct _ico_uxf_conf_inputdev *inputdev;
179 } Ico_Uxf_conf_inputsw;
181 typedef struct _ico_uxf_conf_inputdev {
185 short res; /* (unused) */
186 Ico_Uxf_conf_inputsw *inputsw;
187 } Ico_Uxf_conf_inputdev;
189 typedef struct _ico_uxf_sys_config {
190 Ico_Uxf_conf_misc misc;
197 Ico_Uxf_conf_host *host;
198 Ico_Uxf_conf_category *category;
199 Ico_Uxf_conf_kind *kind;
200 Ico_Uxf_conf_display *display;
201 Ico_Uxf_conf_sound *sound;
202 Ico_Uxf_conf_inputdev *inputdev;
203 } Ico_Uxf_Sys_Config;
205 typedef struct _ico_uxf_app_config {
207 Ico_Uxf_conf_application *application;
208 Ico_Uxf_conf_application *hashidtable[ICO_UXF_MISC_HASHSIZE];
209 Ico_Uxf_conf_application *hashnametable[ICO_UXF_MISC_HASHSIZE];
210 } Ico_Uxf_App_Config;
212 const Ico_Uxf_Sys_Config* ico_uxf_getSysConfig(void);
213 const Ico_Uxf_Sys_Config* ico_uxf_ifGetSysConfig(void);
214 const Ico_Uxf_App_Config* ico_uxf_getAppConfig(void);
216 void ico_uxf_closeSysConfig(void);
217 void ico_uxf_closeAppConfig(void);
219 int ico_uxf_getSysKindByName(const char *skind);
220 int ico_uxf_getSysCategoryByName(const char *scategory);
221 int ico_uxf_getSysHostByName(const char *shost);
222 int ico_uxf_getSysHostTypeByName(const char *stype);
223 int ico_uxf_getSysDisplayByName(const char *sdisplay);
224 int ico_uxf_getSysDispTypeByName(const char *stype);
225 int ico_uxf_getSysLayerByName(const int display, const char *slayer);
226 int ico_uxf_getSysDispZoneByName(const int display, const char *sdispzone);
227 int ico_uxf_getSysSoundByName(const char *ssound);
228 int ico_uxf_getSysSoundZoneByName(const int sound, const char *ssoundzone);
229 int ico_uxf_getSysInputdevByName(const char *sinputdev);
230 int ico_uxf_getSysInputswByName(const int inputdev, const char *sinputsw);
231 int ico_uxf_getSysBoolByName(const char *sbool);
232 int ico_uxf_getAppDisplay(const Ico_Uxf_conf_application *app, const int idx,
233 int *x, int *y, int *width, int *height);
235 const Ico_Uxf_conf_host* ico_uxf_getSysHostById(const int hostId);
236 const Ico_Uxf_conf_application* ico_uxf_getAppByAppid(const char *appid);
237 const Ico_Uxf_conf_application* ico_uxf_getAppByName(const char *name);
238 const Ico_Uxf_conf_category* ico_uxf_getAppCategoryById(const int categoryId);
239 const Ico_Uxf_conf_display* ico_uxf_getSysDisplayById(const int displayId);
240 const char *ico_uxf_get_SysLocation( const int hostId );
242 /* define log macros */
244 #define uifw_debug ICO_UXF_DEBUG
245 #define uifw_trace ICO_UXF_DEBUG
246 #define uifw_critical ICO_UXF_CRITICAL
247 #define uifw_info ICO_UXF_INFO
248 #define uifw_warn ICO_UXF_WARN
249 #define uifw_error ICO_UXF_ERROR
250 #define uifw_logflush ico_uxf_log_flush
251 #endif /*uifw_trace*/
253 void ico_uxf_closeSysConfig(void);
255 #define ICO_UXF_EVENT_WAIT_DEFAULT (0)
256 #define ICO_UXF_EVENT_WAIT_WAYLAND (1)
257 #define ICO_UXF_EVENT_WAIT_WEBSOCKET (2)
258 #define ICO_UXF_EVENT_WAIT_JULIUS (3)
260 #define ICO_UXF_EFFECT_NONE (0)
261 #define ICO_UXF_EFFECT_GRAYOUT (1)
262 #define ICO_UXF_EFFECT_BLACKOUT (2)
263 #define ICO_UXF_EFFECT_INVISIBLE (3)
264 #define ICO_UXF_EFFECT_TERMINATE (4)
269 #endif /* ICO_UXF_CONF_H_ */