sycn with master
[platform/framework/web/data-provider-slave.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                 char *module;
69         } path;
70
71         int max_size_type;
72
73         int slave_max_load;
74
75         double ping_time;
76
77         int use_sw_backend;
78         char *provider_method;
79         int debug_mode;
80         int overwrite_content;
81         int com_core_thread;
82         int use_xmonitor;
83 };
84
85 extern struct conf g_conf;
86
87 extern int conf_loader(void);
88
89 #define BASE_W                  g_conf.base_width
90 #define BASE_H                  g_conf.base_height
91
92 #define CR 13
93 #define LF 10
94
95 #define USE_XMONITOR            g_conf.use_xmonitor
96 #define USE_SW_BACKEND          g_conf.use_sw_backend
97 #define PROVIDER_METHOD         g_conf.provider_method
98 #define DEBUG_MODE              g_conf.debug_mode
99 #define OVERWRITE_CONTENT       g_conf.overwrite_content
100 #define COM_CORE_THREAD         g_conf.com_core_thread
101
102 #define MINIMUM_PERIOD          g_conf.minimum_period
103
104 #define DEFAULT_SCRIPT          g_conf.default_conf.script
105 #define DEFAULT_ABI             g_conf.default_conf.abi
106 #define DEFAULT_GROUP           g_conf.default_conf.pd_group
107 #define DEFAULT_PERIOD          g_conf.default_conf.period
108 #define PRIORITY_NO_CHANGE      -1.0f
109
110 #define BUNDLE_SLAVE_NAME       g_conf.launch_key.name
111 #define BUNDLE_SLAVE_SECURED    g_conf.launch_key.secured
112 #define BUNDLE_SLAVE_ABI        g_conf.launch_key.abi
113 #define PACKET_TIME             g_conf.default_packet_time
114 #define CONTENT_NO_CHANGE       g_conf.empty_content
115 #define TITLE_NO_CHANGE         g_conf.empty_title
116 #define DEFAULT_TITLE           g_conf.default_title
117 #define DEFAULT_CONTENT         g_conf.default_content
118 #define MINIMUM_SPACE           g_conf.minimum_space
119
120 #define IMAGE_PATH              g_conf.path.image
121 #define SCRIPT_PATH             g_conf.path.script
122 #define SCRIPT_PORT_PATH        g_conf.path.script_port
123 #define CONF_PATH               g_conf.path.conf
124 #define ROOT_PATH               g_conf.path.root
125 #define SLAVE_LOG_PATH          g_conf.path.slave_log
126 #define READER_PATH             g_conf.path.reader
127 #define ALWAYS_PATH             g_conf.path.always
128 #define MODULE_PATH             g_conf.path.module
129
130 #define REPLACE_TAG_APPID       g_conf.replace_tag
131 #define SLAVE_TTL               g_conf.slave_ttl
132 #define SLAVE_ACTIVATE_TIME     g_conf.slave_activate_time
133
134 #define MAX_LOG_LINE            g_conf.max_log_line
135 #define MAX_LOG_FILE            g_conf.max_log_file
136
137 #define SQLITE_FLUSH_MAX        g_conf.sqlite_flush_max
138 #define DBFILE                  g_conf.path.db
139
140 #define SLAVE_MAX_LOAD          g_conf.slave_max_load
141 #define DEFAULT_PING_TIME       g_conf.ping_time
142
143 #define MAX_ABI         256
144 #define MAX_PKGNAME     512
145 #define DELAY_TIME      0.0000001f
146 #define DEFAULT_CLUSTER "user,created"
147 #define MINIMUM_REACTIVATION_TIME       10
148
149 #define HAPI __attribute__((visibility("hidden")))
150
151 /* Set language */
152 #if !defined(LOCALEDIR)
153 #define LOCALEDIR "/usr/share/locale"
154 #endif
155
156 /* Set language */
157 #if !defined(PACKAGE)
158 #define PACKAGE "data-provider-slave"
159 #endif
160
161 #define DATA_MASTER "org.tizen.data-provider-master"
162
163 #define DEFAULT_LIFE_TIMER      20
164 #define DEFAULT_LOAD_TIMER      20
165 #define MINIMUM_UPDATE_INTERVAL 0.1f
166
167 /*!
168  * \note
169  * NO_ALARM is used for disabling the alarm code
170  * This will turn off the alarm for checking the return of livebox functions
171  */
172 #define NO_ALARM 1
173
174 /*!
175  * \note
176  * This is default action.
177  * This will enable the 'alarm' for checking the return time of livebox functions
178  */
179 #define USE_ALARM 0
180
181 //#define DLAPI __attribute__((visibility("default")))
182
183 /* End of a file */