4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
6 * Contact: MyoungJune Park <mj2004.park@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
21 #ifndef __SETTING_COMMON_GENERAL_FUNC_H__
22 #define __SETTING_COMMON_GENERAL_FUNC_H__
30 #include <appcore-efl.h>
38 #include <setting-common-data-type.h>
40 #include <ui-gadget-module.h>
43 #define _EDJ(o) elm_layout_edje_get(o)
51 #define _(s) setting_gettext(s)
52 #define S_(s) setting_gettext(s)
54 #define btn_type(obj) get_popup_btn_response_type(elm_object_text_get(obj))
56 extern char *setting_file_basename(char *path);
59 extern char *get_brightness_mode_str();
60 extern char *get_pa_backlight_time_str();
61 extern char *get_pa_powersaving_at_str();
62 extern char *get_pa_screen_timeout_str();
63 extern char *get_pa_display_language_str();
64 extern char *get_pa_Wi_Fi_on_off_str();
65 extern char *get_BT_on_off_str();
66 extern char *get_NFC_on_off_str();
68 extern char *get_pa_time_format_str();
69 extern char *get_pa_date_format_str();
70 extern char *get_pa_week_format_str();
71 extern char *get_pa_roaming_network_str();
72 extern double get_widgets_factor();
73 extern char *setting_gettext(const char *s);
74 extern bool is_digital_str(const char *cstr);
75 extern bool is_substr_ncase(const char *parentstr, const char *substr);
77 /* check if partern belongs to array..*/
78 extern bool is_string_belong_to_array(const char *partern, const char **array,
80 extern int safeStrCmp(const char *s1, const char *s2);
81 extern int safeStrNCmp(const char *s1, const char *s2, int len);
82 extern char *safeStrNCat(char *dst, const char *src, int maxlen);
83 extern char *safeCopyStr(char *dst, const char *src, int maxlen);
84 extern bool isEmptyStr(const char *str);
85 extern bool isSpaceStr(const char *str);
86 extern char *remove_first_substring(const char *parent, const char *pat);
87 extern int safeStrLen(const char *str);
88 extern bool get_substring_int(const char **ipStr, int *ipValue, char delim);
89 extern bool is_ip_string(const char *ipstr);
90 extern int setting_invoke_reset_function(char *ug_name, service_h service, void *ext);
91 extern int excuteCmd(char* exec_path, int option_num, ...);
92 extern void create_fontlink(const char *linkpath, const char *linkname,
93 const char *fontfilepath, const char *fontfilename);
95 extern char* get_icon_path(const char *package);
97 extern int is_slp_binary();
98 extern bool isEmulBin();
99 extern int get_popup_btn_response_type(const char *btn_str);
100 extern bool is_system_service(const char *pkg_name);
101 extern void clear_system_service_data();
103 extern char *get_default_font(int language);
104 extern void *font_conf_doc_parse(char *doc_name, char *font_name);
105 extern char *cur_font_get();
106 extern void font_config_set(char *font_name);
107 extern void font_size_set();
109 extern int setting_set_i18n(char* pkgname, char* localedir);
110 extern void app_launcher(char* pkg_name);
112 #endif /* __SETTING_COMMON_GENERAL_FUNC_H__ */