diff options
Diffstat (limited to 'include/conf.h')
-rw-r--r-- | include/conf.h | 201 |
1 files changed, 201 insertions, 0 deletions
diff --git a/include/conf.h b/include/conf.h new file mode 100644 index 0000000..aab11d1 --- /dev/null +++ b/include/conf.h @@ -0,0 +1,201 @@ +/* + * Copyright 2013 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +struct conf { + int width; + int height; + + int base_width; + int base_height; + double minimum_period; + + struct { + char *script; + char *abi; + char *pd_group; + double period; + int pixels; + } default_conf; + + struct { + char *name; + char *secured; + char *abi; + } launch_key; + + double default_packet_time; + + char *empty_content; + char *empty_title; + + char *default_content; + char *default_title; + + unsigned long minimum_space; + + char *replace_tag; + + double slave_ttl; + double slave_activate_time; + double slave_relaunch_time; + int slave_relaunch_count; + + int max_log_line; + int max_log_file; + + unsigned long sqlite_flush_max; + + struct { + char *conf; + char *image; + char *script; + char *root; + char *script_port; + char *slave_log; + char *reader; + char *always; + char *db; + char *input; + } path; + + int max_size_type; + + int slave_max_load; + + double ping_time; + + char *vconf_sys_cluster; + int max_pended_ctx_events; + + int use_sw_backend; + char *provider_method; + int debug_mode; + int overwrite_content; + int com_core_thread; + int use_xmonitor; + int premultiplied; + + double scale_width_factor; + double scale_height_factor; + + double pd_request_timeout; + + char *emergency_disk; + char *services; +}; + +extern struct conf g_conf; + +extern int conf_loader(void); +extern void conf_update_size(void); +extern void conf_reset(void); +extern void conf_init(void); + +#define BASE_W g_conf.base_width +#define BASE_H g_conf.base_height + +#define CR 13 +#define LF 10 + +#define EMERGENCY_DISK g_conf.emergency_disk +#define SCALE_WIDTH_FACTOR g_conf.scale_width_factor +#define SCALE_HEIGHT_FACTOR g_conf.scale_height_factor + +#define USE_SW_BACKEND g_conf.use_sw_backend +#define PROVIDER_METHOD g_conf.provider_method +#define DEBUG_MODE g_conf.debug_mode +#define OVERWRITE_CONTENT g_conf.overwrite_content +#define COM_CORE_THREAD g_conf.com_core_thread + +#define MINIMUM_PERIOD g_conf.minimum_period + +#define DEFAULT_SCRIPT g_conf.default_conf.script +#define DEFAULT_ABI g_conf.default_conf.abi +#define DEFAULT_GROUP g_conf.default_conf.pd_group +#define DEFAULT_PERIOD g_conf.default_conf.period +#define DEFAULT_PIXELS g_conf.default_conf.pixels +#define PRIORITY_NO_CHANGE -1.0f + +#define BUNDLE_SLAVE_NAME g_conf.launch_key.name +#define BUNDLE_SLAVE_SECURED g_conf.launch_key.secured +#define BUNDLE_SLAVE_ABI g_conf.launch_key.abi +#define PACKET_TIME g_conf.default_packet_time +#define CONTENT_NO_CHANGE g_conf.empty_content +#define TITLE_NO_CHANGE g_conf.empty_title +#define DEFAULT_TITLE g_conf.default_title +#define DEFAULT_CONTENT g_conf.default_content +#define MINIMUM_SPACE g_conf.minimum_space + +#define IMAGE_PATH g_conf.path.image +#define SCRIPT_PATH g_conf.path.script +#define SCRIPT_PORT_PATH g_conf.path.script_port +#define CONF_PATH g_conf.path.conf +#define ROOT_PATH g_conf.path.root +#define SLAVE_LOG_PATH g_conf.path.slave_log +#define READER_PATH g_conf.path.reader +#define ALWAYS_PATH g_conf.path.always +#define INPUT_PATH g_conf.path.input + +#define REPLACE_TAG_APPID g_conf.replace_tag +#define SLAVE_TTL g_conf.slave_ttl +#define SLAVE_ACTIVATE_TIME g_conf.slave_activate_time +#define SLAVE_RELAUNCH_TIME g_conf.slave_relaunch_time +#define SLAVE_RELAUNCH_COUNT g_conf.slave_relaunch_count + +#define MAX_LOG_LINE g_conf.max_log_line +#define MAX_LOG_FILE g_conf.max_log_file + +#define SQLITE_FLUSH_MAX g_conf.sqlite_flush_max +#define DBFILE g_conf.path.db + +#define PD_REQUEST_TIMEOUT g_conf.pd_request_timeout + +#define SLAVE_MAX_LOAD g_conf.slave_max_load +#define DEFAULT_PING_TIME g_conf.ping_time +#define PREMULTIPLIED_COLOR g_conf.premultiplied +#define SERVICES g_conf.services + +#define SERVICE_LIVEBOX "[livebox]" +#define SERVICE_NOTIFICATION "[notification]" +#define SERVICE_BADGE "[badge]" +#define SERVICE_SHORTCUT "[shortcut]" +#define SERVICE_UTILITY "[utility]" +#define SERVICE_FILE "[file]" + +#define PAUSED_FILE "/tmp/.live.paused" + +#define MAX_ABI 256 +#define MAX_PKGNAME 512 +#define DELAY_TIME 0.0000001f +#define DEFAULT_CLUSTER "user,created" +#define MINIMUM_REACTIVATION_TIME 10 + +#if !defined(VCONFKEY_MASTER_STARTED) +#define VCONFKEY_MASTER_STARTED "memory/data-provider-master/started" +#endif + +#if !defined(VCONFKEY_MASTER_RESTART_COUNT) +#define VCONFKEY_MASTER_RESTART_COUNT "memory/private/data-provider-master/restart_count" +#endif + +#define USE_XMONITOR g_conf.use_xmonitor + +#define HAPI __attribute__((visibility("hidden"))) +/*! + * EAPI is defined from eina.h + */ + +/* End of a file */ |