Update resize event send function
[apps/livebox/data-provider-master.git] / include / conf.h
1 /*
2  * Copyright 2012  Samsung Electronics Co., Ltd
3  *
4  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
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 struct conf {
18         int width;
19         int height;
20
21         int base_width;
22         int base_height;
23         double minimum_period;
24
25         struct {
26                 char *script;
27                 char *abi;
28                 char *pd_group;
29                 double period;
30         } default_conf;
31
32         struct {
33                 char *name;
34                 char *secured;
35                 char *abi;
36         } launch_key;
37
38         double default_packet_time;
39
40         char *empty_content;
41         char *empty_title;
42
43         char *default_content;
44         char *default_title;
45
46         unsigned long minimum_space;
47
48         char *replace_tag;
49
50         double slave_ttl;
51         double slave_activate_time;
52
53         int max_log_line;
54         int max_log_file;
55
56         unsigned long sqlite_flush_max;
57
58         struct {
59                 char *conf;
60                 char *image;
61                 char *script;
62                 char *root;
63                 char *script_port;
64                 char *slave_log;
65                 char *reader;
66                 char *always;
67                 char *db;
68         } path;
69
70         int max_size_type;
71
72         int slave_max_load;
73
74         double ping_time;
75
76         char *vconf_sys_cluster;
77         int max_pended_ctx_events;
78
79         int use_sw_backend;
80         char *provider_method;
81         int debug_mode;
82         int overwrite_content;
83         int com_core_thread;
84         int use_xmonitor;
85
86         double scale_width_factor;
87         double scale_height_factor;
88 };
89
90 extern struct conf g_conf;
91
92 extern int conf_loader(void);
93
94 #define BASE_W                  g_conf.base_width
95 #define BASE_H                  g_conf.base_height
96
97 #define CR 13
98 #define LF 10
99
100 #define SCALE_WIDTH_FACTOR      g_conf.scale_width_factor
101 #define SCALE_HEIGHT_FACTOR     g_conf.scale_height_factor
102
103 #define USE_SW_BACKEND          g_conf.use_sw_backend
104 #define PROVIDER_METHOD         g_conf.provider_method
105 #define DEBUG_MODE              g_conf.debug_mode
106 #define OVERWRITE_CONTENT       g_conf.overwrite_content
107 #define COM_CORE_THREAD         g_conf.com_core_thread
108
109 #define MINIMUM_PERIOD          g_conf.minimum_period
110
111 #define DEFAULT_SCRIPT          g_conf.default_conf.script
112 #define DEFAULT_ABI             g_conf.default_conf.abi
113 #define DEFAULT_GROUP           g_conf.default_conf.pd_group
114 #define NO_CHANGE               g_conf.default_conf.period
115 #define DEFAULT_PERIOD          g_conf.default_conf.period
116
117 #define BUNDLE_SLAVE_NAME       g_conf.launch_key.name
118 #define BUNDLE_SLAVE_SECURED    g_conf.launch_key.secured
119 #define BUNDLE_SLAVE_ABI        g_conf.launch_key.abi
120 #define PACKET_TIME             g_conf.default_packet_time
121 #define CONTENT_NO_CHANGE       g_conf.empty_content
122 #define TITLE_NO_CHANGE         g_conf.empty_title
123 #define DEFAULT_TITLE           g_conf.default_title
124 #define DEFAULT_CONTENT         g_conf.default_content
125 #define MINIMUM_SPACE           g_conf.minimum_space
126
127 #define IMAGE_PATH              g_conf.path.image
128 #define SCRIPT_PATH             g_conf.path.script
129 #define SCRIPT_PORT_PATH        g_conf.path.script_port
130 #define CONF_PATH               g_conf.path.conf
131 #define ROOT_PATH               g_conf.path.root
132 #define SLAVE_LOG_PATH          g_conf.path.slave_log
133 #define READER_PATH             g_conf.path.reader
134 #define ALWAYS_PATH             g_conf.path.always
135
136 #define REPLACE_TAG_APPID       g_conf.replace_tag
137 #define SLAVE_TTL               g_conf.slave_ttl
138 #define SLAVE_ACTIVATE_TIME     g_conf.slave_activate_time
139
140 #define MAX_LOG_LINE            g_conf.max_log_line
141 #define MAX_LOG_FILE            g_conf.max_log_file
142
143 #define SQLITE_FLUSH_MAX        g_conf.sqlite_flush_max
144 #define DBFILE                  g_conf.path.db
145
146 #define SLAVE_MAX_LOAD          g_conf.slave_max_load
147 #define DEFAULT_PING_TIME       g_conf.ping_time
148 #define PAUSED_FILE             "/tmp/.live.paused"
149
150 #define MAX_ABI         256
151 #define MAX_PKGNAME     512
152 #define DELAY_TIME      0.0000001f
153 #define DEFAULT_CLUSTER "user,created"
154 #define MINIMUM_REACTIVATION_TIME       10
155
156 #define USE_XMONITOR            g_conf.use_xmonitor
157
158 #define HAPI __attribute__((visibility("hidden")))
159
160 /* End of a file */