summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHwankyu Jhun <h.jhun@samsung.com>2016-07-12 21:06:03 +0900
committerHwankyu Jhun <h.jhun@samsung.com>2016-07-12 21:32:06 +0900
commitb7a8f46bbff293f92e28965032746e8fb849a909 (patch)
tree269e7cd8a03fcda3c13784231d9c929d33b6040e
parenta4e9b4594f65e07023f35db38c8571a73450689a (diff)
downloadappcore-watch-accepted/tizen/tv/20160713.000533.tar.gz
appcore-watch-accepted/tizen/tv/20160713.000533.tar.bz2
appcore-watch-accepted/tizen/tv/20160713.000533.zip
Change-Id: Ie8a1650e3c5d238f44f2ddd9998a0a740744ecc2 Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
-rwxr-xr-xsrc/appcore-watch-i18n.c36
-rwxr-xr-xsrc/appcore-watch-signal.c18
-rwxr-xr-xsrc/appcore-watch.c23
-rwxr-xr-xsrc/watch_app_main.c7
4 files changed, 57 insertions, 27 deletions
diff --git a/src/appcore-watch-i18n.c b/src/appcore-watch-i18n.c
index dcd88c1..d4dee60 100755
--- a/src/appcore-watch-i18n.c
+++ b/src/appcore-watch-i18n.c
@@ -42,13 +42,13 @@ void _update_lang(void)
r = setlocale(LC_ALL, "");
if (r == NULL) {
- r = setlocale(LC_ALL, lang);
- if (r)
- _D("*****appcore setlocale=%s\n", r);
+ r = setlocale(LC_ALL, lang); /* LCOV_EXCL_LINE */
+ if (r) /* LCOV_EXCL_LINE */
+ _D("*****appcore setlocale=%s\n", r); /* LCOV_EXCL_LINE */
}
free(lang);
} else {
- _E("failed to get current language for set lang env");
+ _E("failed to get current language for set lang env"); /* LCOV_EXCL_LINE */
}
}
@@ -75,7 +75,7 @@ void _update_region(void)
_D("*****appcore setlocale=%s\n", r);
free(region);
} else {
- _E("failed to get current region format for set region env");
+ _E("failed to get current region format for set region env"); /* LCOV_EXCL_LINE */
}
}
@@ -86,8 +86,8 @@ static int __get_locale_resource_dir(char *locale_dir, int size)
res_path = aul_get_app_resource_path();
if (res_path == NULL) {
- _E("Failed to get resource path");
- return -1;
+ _E("Failed to get resource path"); /* LCOV_EXCL_LINE */
+ return -1; /* LCOV_EXCL_LINE */
}
snprintf(locale_dir, size, "%s" PATH_LOCALE, res_path);
@@ -104,8 +104,8 @@ static int __set_i18n(const char *domain)
char *lang;
if (domain == NULL) {
- errno = EINVAL;
- return -1;
+ errno = EINVAL; /* LCOV_EXCL_LINE */
+ return -1; /* LCOV_EXCL_LINE */
}
__get_locale_resource_dir(locale_dir, sizeof(locale_dir));
@@ -114,23 +114,23 @@ static int __set_i18n(const char *domain)
r = setlocale(LC_ALL, "");
/* if locale is not set properly, try again to set as language base */
if (r == NULL) {
- lang = vconf_get_str(VCONFKEY_LANGSET);
- r = setlocale(LC_ALL, lang);
- if (r)
- _D("*****appcore setlocale=%s\n", r);
- if (lang)
- free(lang);
+ lang = vconf_get_str(VCONFKEY_LANGSET); /* LCOV_EXCL_LINE */
+ r = setlocale(LC_ALL, lang); /* LCOV_EXCL_LINE */
+ if (r) /* LCOV_EXCL_LINE */
+ _D("*****appcore setlocale=%s\n", r); /* LCOV_EXCL_LINE */
+ if (lang) /* LCOV_EXCL_LINE */
+ free(lang); /* LCOV_EXCL_LINE */
}
if (r == NULL)
- _E("appcore: setlocale() error");
+ _E("appcore: setlocale() error"); /* LCOV_EXCL_LINE */
r = bindtextdomain(domain, locale_dir);
if (r == NULL)
- _E("appcore: bindtextdomain() error");
+ _E("appcore: bindtextdomain() error"); /* LCOV_EXCL_LINE */
r = textdomain(domain);
if (r == NULL)
- _E("appcore: textdomain() error");
+ _E("appcore: textdomain() error"); /* LCOV_EXCL_LINE */
return 0;
}
diff --git a/src/appcore-watch-signal.c b/src/appcore-watch-signal.c
index c3830ee..e7b05d6 100755
--- a/src/appcore-watch-signal.c
+++ b/src/appcore-watch-signal.c
@@ -43,6 +43,7 @@ static guint s_id;
static int (*_deviced_signal_alpm_handler)(int ambient, void *data);
static void *_deviced_signal_alpm_data;
+/* LCOV_EXCL_START */
static void __dbus_signal_filter(GDBusConnection *connection,
const gchar *sender_name, const gchar *object_name,
const gchar *interface_name, const gchar *signal_name,
@@ -63,6 +64,7 @@ static void __dbus_signal_filter(GDBusConnection *connection,
}
}
}
+/* LCOV_EXCL_STOP */
static int __dbus_init(void)
{
@@ -71,9 +73,9 @@ static int __dbus_init(void)
if (conn == NULL) {
conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err);
if (conn == NULL) {
- _E("g_bus_get_sync() is failed. %s", err->message);
- g_error_free(err);
- return -1;
+ _E("g_bus_get_sync() is failed. %s", err->message); /* LCOV_EXCL_LINE */
+ g_error_free(err); /* LCOV_EXCL_LINE */
+ return -1; /* LCOV_EXCL_LINE */
}
}
@@ -95,8 +97,8 @@ static int __dbus_signal_handler_init(const char *path, const char *interface)
NULL,
NULL);
if (s_id == 0) {
- _E("g_dbus_connection_signal_subscribe() is failed.");
- return -1;
+ _E("g_dbus_connection_signal_subscribe() is failed."); /* LCOV_EXCL_LINE */
+ return -1; /* LCOV_EXCL_LINE */
}
return 0;
@@ -110,8 +112,8 @@ int _watch_core_listen_alpm_handler(int (*func) (int, void *), void *data)
return -1;
if (__dbus_signal_handler_init(DEVICED_PATH, DEVICED_INTERFACE) < 0) {
- _E("error app signal init");
- return -1;
+ _E("error app signal init"); /* LCOV_EXCL_LINE */
+ return -1; /* LCOV_EXCL_LINE */
}
_deviced_signal_alpm_handler = func;
@@ -120,6 +122,7 @@ int _watch_core_listen_alpm_handler(int (*func) (int, void *), void *data)
return 0;
}
+/* LCOV_EXCL_START */
int _watch_core_send_alpm_update_done(void)
{
GError *err = NULL;
@@ -151,4 +154,5 @@ int _watch_core_send_alpm_update_done(void)
return 0;
}
+/* LCOV_EXCL_STOP */
diff --git a/src/appcore-watch.c b/src/appcore-watch.c
index 2b99174..576cc5c 100755
--- a/src/appcore-watch.c
+++ b/src/appcore-watch.c
@@ -376,6 +376,7 @@ static int __watch_appcontrol(void *data, bundle *k)
return 0;
}
+/* LCOV_EXCL_START */
static int __watch_terminate(void *data)
{
struct watch_core *wc = data;
@@ -387,7 +388,9 @@ static int __watch_terminate(void *data)
return 0;
}
+/* LCOV_EXCL_STOP */
+/* LCOV_EXCL_START */
static int __sys_do_default(struct watch_core *wc, enum sys_event event)
{
switch (event) {
@@ -400,6 +403,7 @@ static int __sys_do_default(struct watch_core *wc, enum sys_event event)
return 0;
}
+/* LCOV_EXCL_STOP */
static int __sys_do(struct watch_core *wc, void *event_info,
enum sys_event event)
@@ -605,6 +609,7 @@ static int __del_vconf(enum sys_event se)
return r;
}
+/* LCOV_EXCL_START */
static int __del_vconf_list(void)
{
int r;
@@ -622,6 +627,7 @@ static int __del_vconf_list(void)
return 0;
}
+/* LCOV_EXCL_STOP */
static int __aul_handler(aul_type type, bundle *b, void *data)
{
@@ -831,6 +837,7 @@ static Eina_Bool __watch_core_time_tick(void *data)
return ECORE_CALLBACK_CANCEL;
}
+/* LCOV_EXCL_START */
static int __watch_core_ambient_tick(alarm_id_t id, void *data)
{
struct watch_time_s timeinfo;
@@ -843,6 +850,7 @@ static int __watch_core_ambient_tick(alarm_id_t id, void *data)
return 0;
}
+/* LCOV_EXCL_STOP */
static int __widget_create(const char *id, const char *content, int w, int h,
void *data)
@@ -868,12 +876,15 @@ static int __widget_create(const char *id, const char *content, int w, int h,
return WIDGET_ERROR_NONE;
}
+/* LCOV_EXCL_START */
static int __widget_resize(const char *id, int w, int h, void *data)
{
return WIDGET_ERROR_NONE;
}
+/* LCOV_EXCL_STOP */
+/* LCOV_EXCL_START */
static int __widget_destroy(const char *id, widget_app_destroy_type_e reason,
void *data)
{
@@ -883,7 +894,9 @@ static int __widget_destroy(const char *id, widget_app_destroy_type_e reason,
return WIDGET_ERROR_NONE;
}
+/* LCOV_EXCL_STOP */
+/* LCOV_EXCL_START */
static int __widget_pause(const char *id, void *data)
{
_D("widget_pause");
@@ -892,7 +905,9 @@ static int __widget_pause(const char *id, void *data)
return WIDGET_ERROR_NONE;
}
+/* LCOV_EXCL_STOP */
+/* LCOV_EXCL_START */
static int __widget_resume(const char *id, void *data)
{
_D("widget_resume");
@@ -901,7 +916,9 @@ static int __widget_resume(const char *id, void *data)
return WIDGET_ERROR_NONE;
}
+/* LCOV_EXCL_STOP */
+/* LCOV_EXCL_START */
static int __signal_alpm_handler(int ambient, void *data)
{
struct watch_time_s timeinfo;
@@ -966,6 +983,7 @@ static int __signal_alpm_handler(int ambient, void *data)
return 0;
}
+/* LCOV_EXCL_STOP */
static Eina_Bool __show_cb(void *data, int type, void *event)
{
@@ -989,6 +1007,7 @@ static Eina_Bool __hide_cb(void *data, int type, void *event)
return ECORE_CALLBACK_RENEW;
}
+/* LCOV_EXCL_START */
static Eina_Bool __visibility_cb(void *data, int type, void *event)
{
Ecore_Wl_Event_Window_Visibility_Change *ev = event;
@@ -1002,13 +1021,16 @@ static Eina_Bool __visibility_cb(void *data, int type, void *event)
return ECORE_CALLBACK_RENEW;
}
+/* LCOV_EXCL_STOP */
+/* LCOV_EXCL_START */
static Eina_Bool __lower_cb(void *data, int type, void *event)
{
_D("lower");
return ECORE_CALLBACK_RENEW;
}
+/* LCOV_EXCL_STOP */
static void __add_climsg(void)
{
@@ -1142,7 +1164,6 @@ EXPORT_API int watch_core_terminate()
return 0;
}
-
EXPORT_API void watch_core_get_timeinfo(struct watch_time_s *timeinfo)
{
__get_timeinfo(timeinfo);
diff --git a/src/watch_app_main.c b/src/watch_app_main.c
index 1029fdd..9b1a2ec 100755
--- a/src/watch_app_main.c
+++ b/src/watch_app_main.c
@@ -248,6 +248,7 @@ static int _watch_core_control(app_control_h app_control, void *data)
return APP_ERROR_NONE;
}
+/* LCOV_EXCL_START */
static int _watch_core_pause(void *data)
{
struct watch_app_context *app_context = data;
@@ -266,6 +267,7 @@ static int _watch_core_pause(void *data)
return APP_ERROR_NONE;
}
+/* LCOV_EXCL_STOP */
static int _watch_core_resume(void *data)
{
@@ -326,6 +328,7 @@ static void _watch_core_time_tick(void *watchtime, void *data)
time_tick_cb((watch_time_h)watchtime, app_context->data);
}
+/* LCOV_EXCL_START */
static void _watch_core_ambient_tick(void *watchtime, void *data)
{
struct watch_app_context *app_context = data;
@@ -341,7 +344,9 @@ static void _watch_core_ambient_tick(void *watchtime, void *data)
if (ambient_tick_cb != NULL)
ambient_tick_cb((watch_time_h)watchtime, app_context->data);
}
+/* LCOV_EXCL_STOP */
+/* LCOV_EXCL_START */
static void _watch_core_ambient_changed(int ambient, void *data)
{
struct watch_app_context *app_context = data;
@@ -357,7 +362,7 @@ static void _watch_core_ambient_changed(int ambient, void *data)
if (ambient_changed_cb != NULL)
ambient_changed_cb((bool)ambient, app_context->data);
}
-
+/* LCOV_EXCL_STOP */
EXPORT_API int watch_app_main(int argc, char **argv,
watch_app_lifecycle_callback_s *callback, void *user_data)