Fixed some RPMlint errors - group name, duplicate files, etc.
[profile/ivi/ico-uxf-homescreen.git] / include / ico_syc_apc.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  * @brief   header file of Apprications Controller
11  *
12  * @date    Feb-28-2013
13  */
14
15 #ifndef _ICO_SYC_APC_H_
16 #define _ICO_SYC_APC_H_
17
18 #include "ico_apf_log.h"
19 #include "ico_uxf_sysdef.h"
20 #include "ico_uxf_conf.h"
21 #include "ico_uxf_def.h"
22 #include "ico_syc_def.h"
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 /* Maximum values                           */
29 #define ICO_SYC_APC_REGULATION_LISTENERS    4   /* number of regulation listeners   */
30
31 /* Vehicle information values               */
32 #define ICO_SYC_APC_REGULATION_SPEED_RUNNING    (4.0)
33 #define ICO_SYC_APC_REGULATION_SHIFT_NEUTRALS   (0)
34 #define ICO_SYC_APC_REGULATION_SHIFT_1ST        (1)
35 #define ICO_SYC_APC_REGULATION_SHIFT_2ND        (2)
36 #define ICO_SYC_APC_REGULATION_SHIFT_3RD        (3)
37 #define ICO_SYC_APC_REGULATION_SHIFT_DRIVE      (4)
38 #define ICO_SYC_APC_REGULATION_SHIFT_REVERSES   (128)
39 #define ICO_SYC_APC_REGULATION_SHIFT_PARKING    (255)
40 #define ICO_SYC_APC_REGULATION_BLINKER_NONE     (0)
41 #define ICO_SYC_APC_REGULATION_BLINKER_RIGHT    (1)
42 #define ICO_SYC_APC_REGULATION_BLINKER_LEFT     (2)
43
44 #define ICO_SYC_APC_REGULATION_REGULATION       (0)
45 #define ICO_SYC_APC_REGULATION_NOREGULATION     (1)
46 #define ICO_SYC_APC_REGULATION_NOCHANGE         (9)
47
48 typedef struct _ico_apc_reguration_control  {
49     unsigned char   display;                /* display(1=visible/0=invisible)   */
50     unsigned char   sound;                  /* sound(1=play/0=mute)             */
51     unsigned char   input;                  /* inputsw(1=use/0=unuse)           */
52     unsigned char   res;                    /* (unused)                         */
53 } ico_apc_reguration_control_t;
54                                             /* application context (pointer only)*/
55 typedef struct _ico_apc_context *ico_apc_context_h;
56
57                                             /* regulation event callback function*/
58 typedef void (*ico_apc_regulation_cb_t)(const int appcategory,
59                                         const ico_apc_reguration_control_t control,
60                                         void *user_data);
61                                             /* respurce control                 */
62 typedef void (*ico_apc_resource_control_t)(const Ico_Uxf_conf_application *conf,
63                                            const int control);
64
65 /* API prototype                            */
66 /* Apps Controller initialize/terminate     */
67                                             /* initialize Apps Controller       */
68 int ico_syc_apc_init(ico_apc_resource_control_t display,
69                      ico_apc_resource_control_t sound,
70                      ico_apc_resource_control_t input);
71                                             /* Terminate Apps Controller        */
72 void ico_syc_apc_term(void);
73                                             /* Check waiting application        */
74 int ico_syc_apc_is_waitshow(const char *appid);
75                                             /* Select active application        */
76 void ico_syc_apc_active(const char *appid);
77
78 /* Apps Controller regulation control           */
79                                             /* regulation controller initialize     */
80 int ico_syc_apc_regulation_init(void);
81                                             /* regulation controller terminate  */
82 int ico_syc_apc_regulation_term(void);
83                                             /* set regulation change listener       */
84 void ico_syc_apc_regulation_listener(ico_apc_regulation_cb_t func, void *user_data);
85                                             /* get application visible control  */
86 int ico_syc_apc_regulation_app_visible(const int category);
87                                             /* get application sound control    */
88 int ico_syc_apc_regulation_app_sound(const int category);
89                                             /* get application input control    */
90 int ico_syc_apc_regulation_app_input(const int category);
91
92 #ifdef __cplusplus
93 }
94 #endif
95 #endif /*_ICO_SYC_APC_H_*/
96