diff options
author | Hwankyu Jhun <h.jhun@samsung.com> | 2016-03-28 08:59:58 +0900 |
---|---|---|
committer | Hwankyu Jhun <h.jhun@samsung.com> | 2016-03-31 09:57:39 +0900 |
commit | 5584ff7c0b489998ec4a0dec5ec51a16fc2d2dfa (patch) | |
tree | 7fbeaea6b2618c50ea21c3a3f7de6c2c9177f7aa | |
parent | 5ca36e515649f6f9a30ea104d5ccd7e96302dcaf (diff) | |
download | minicontrol-5584ff7c0b489998ec4a0dec5ec51a16fc2d2dfa.tar.gz minicontrol-5584ff7c0b489998ec4a0dec5ec51a16fc2d2dfa.tar.bz2 minicontrol-5584ff7c0b489998ec4a0dec5ec51a16fc2d2dfa.zip |
Adjust coding rulessubmit/tizen/20160408.020915accepted/tizen/wearable/20160408.052604accepted/tizen/tv/20160408.052551accepted/tizen/mobile/20160408.052634accepted/tizen/ivi/20160408.052614accepted/tizen/common/20160408.184939
Change-Id: I07d20c3ffc1f03c151fa1176fc664f11a6c80fdc
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
-rw-r--r-- | doc/minicontrol_doc.h | 2 | ||||
-rwxr-xr-x | include/minicontrol-error.h | 2 | ||||
-rwxr-xr-x | include/minicontrol-internal.h | 4 | ||||
-rwxr-xr-x | include/minicontrol-log.h | 50 | ||||
-rwxr-xr-x | include/minicontrol-monitor.h | 2 | ||||
-rw-r--r-- | include/minicontrol-provider-internal.h | 2 | ||||
-rwxr-xr-x | include/minicontrol-provider.h | 4 | ||||
-rwxr-xr-x | include/minicontrol-type.h | 2 | ||||
-rw-r--r-- | include/minicontrol-viewer-internal.h | 15 | ||||
-rwxr-xr-x | include/minicontrol-viewer.h | 2 | ||||
-rwxr-xr-x | include/minicontrol.h | 2 | ||||
-rwxr-xr-x | src/minicontrol-internal.c | 29 | ||||
-rwxr-xr-x | src/minicontrol-monitor.c | 9 | ||||
-rwxr-xr-x | src/minicontrol-provider.c | 7 | ||||
-rwxr-xr-x | src/minicontrol-viewer.c | 2 |
15 files changed, 71 insertions, 63 deletions
diff --git a/doc/minicontrol_doc.h b/doc/minicontrol_doc.h index 693235f..5718f82 100644 --- a/doc/minicontrol_doc.h +++ b/doc/minicontrol_doc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. diff --git a/include/minicontrol-error.h b/include/minicontrol-error.h index ffa7d4c..43a7022 100755 --- a/include/minicontrol-error.h +++ b/include/minicontrol-error.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. diff --git a/include/minicontrol-internal.h b/include/minicontrol-internal.h index da75883..a958958 100755 --- a/include/minicontrol-internal.h +++ b/include/minicontrol-internal.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -88,7 +88,7 @@ int _minictrl_provider_message_send(int event, const char *minicontrol_name, uns int _minictrl_viewer_req_message_send(void); minictrl_sig_handle *_minictrl_dbus_sig_handle_attach(const char *signal, - void (*callback) (void *data, DBusMessage *msg), + void (*callback)(void *data, DBusMessage *msg), void *data); void _minictrl_dbus_sig_handle_dettach(minictrl_sig_handle *handle); diff --git a/include/minicontrol-log.h b/include/minicontrol-log.h index b11cf88..1fabb1f 100755 --- a/include/minicontrol-log.h +++ b/include/minicontrol-log.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -29,45 +29,45 @@ #define LOG_TAG "MINICONTROL" #define DBG(fmt , args...) \ - do{ \ - SECURE_LOGD("[%s : %d] "fmt"\n",__func__,__LINE__,##args ); \ - } while(0) + do { \ + SECURE_LOGD("[%s : %d] "fmt"\n", __func__, __LINE__, ##args); \ + } while (0) #define INFO(fmt , args...) \ - do{ \ - SECURE_LOGI("[%s : %d] "fmt"\n",__func__,__LINE__,##args ); \ - } while(0) + do { \ + SECURE_LOGI("[%s : %d] "fmt"\n", __func__, __LINE__, ##args); \ + } while (0) #define WARN(fmt , args...) \ - do{ \ - SECURE_LOGW("[%s : %d] "fmt"\n",__func__,__LINE__,##args ); \ - } while(0) + do { \ + SECURE_LOGW("[%s : %d] "fmt"\n", __func__, __LINE__, ##args); \ + } while (0) #define ERR(fmt , args...) \ - do{ \ - SECURE_LOGE("[%s : %d] "fmt"\n",__func__,__LINE__,##args ); \ - } while(0) + do { \ + SECURE_LOGE("[%s : %d] "fmt"\n", __func__, __LINE__, ##args); \ + } while (0) #else /* MINICTRL_USE_DLOG */ #define DBG(fmt , args...) \ - do{ \ - printf("[D][%s : %d] "fmt"\n", __func__,__LINE__,##args ); \ - } while(0) + do { \ + printf("[D][%s : %d] "fmt"\n", __func__, __LINE__, ##args); \ + } while (0) #define INFO(fmt , args...) \ - do{ \ - printf("[I][%s : %d] "fmt"\n", __func__,__LINE__,##args ); \ - } while(0) + do { \ + printf("[I][%s : %d] "fmt"\n", __func__, __LINE__, ##args); \ + } while (0) #define WARN(fmt , args...) \ - do{ \ - printf("[W][%s : %d] "fmt"\n", __func__,__LINE__,##args ); \ - } while(0) + do { \ + printf("[W][%s : %d] "fmt"\n", __func__, __LINE__, ##args); \ + } while (0) #define ERR(fmt , args...) \ - do{ \ - printf("[E][%s : %d] "fmt"\n", __func__,__LINE__,##args ); \ - } while(0) + do { \ + printf("[E][%s : %d] "fmt"\n", __func__, __LINE__, ##args); \ + } while (0) #endif /* MINICTRL_USE_DLOG */ diff --git a/include/minicontrol-monitor.h b/include/minicontrol-monitor.h index 404dd9e..7283b47 100755 --- a/include/minicontrol-monitor.h +++ b/include/minicontrol-monitor.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. diff --git a/include/minicontrol-provider-internal.h b/include/minicontrol-provider-internal.h index 952db84..6330324 100644 --- a/include/minicontrol-provider-internal.h +++ b/include/minicontrol-provider-internal.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. diff --git a/include/minicontrol-provider.h b/include/minicontrol-provider.h index b02dc59..6f43f5e 100755 --- a/include/minicontrol-provider.h +++ b/include/minicontrol-provider.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -62,7 +62,7 @@ typedef void (*minicontrol_event_cb) (minicontrol_viewer_event_e event_type, bun * @see #minicontrol_target_viewer_e * @see #minicontrol_event_cb */ -Evas_Object* minicontrol_create_window(const char *name, minicontrol_target_viewer_e target_viewer, minicontrol_event_cb callback); +Evas_Object *minicontrol_create_window(const char *name, minicontrol_target_viewer_e target_viewer, minicontrol_event_cb callback); /** * @brief Sends a event to the viewer. diff --git a/include/minicontrol-type.h b/include/minicontrol-type.h index 8a9de09..154fb6d 100755 --- a/include/minicontrol-type.h +++ b/include/minicontrol-type.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. diff --git a/include/minicontrol-viewer-internal.h b/include/minicontrol-viewer-internal.h index 2d93f7e..b02698d 100644 --- a/include/minicontrol-viewer-internal.h +++ b/include/minicontrol-viewer-internal.h @@ -1,8 +1,17 @@ /* - * minicontrol-viewer-internal.h + * Copyright (c) 2015 - 2016 Samsung Electronics Co., Ltd All Rights Reserved * - * Created on: 2015. 4. 13. - * Author: kyuho.jo + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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. */ #ifndef _MINICONTROL_VIEWER_INTERNAL_H_ diff --git a/include/minicontrol-viewer.h b/include/minicontrol-viewer.h index 67e87a3..66b72ba 100755 --- a/include/minicontrol-viewer.h +++ b/include/minicontrol-viewer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. diff --git a/include/minicontrol.h b/include/minicontrol.h index c626c20..e38488a 100755 --- a/include/minicontrol.h +++ b/include/minicontrol.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. diff --git a/src/minicontrol-internal.c b/src/minicontrol-internal.c index 222a1bf..196df03 100755 --- a/src/minicontrol-internal.c +++ b/src/minicontrol-internal.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -27,9 +27,9 @@ #define MINICTRL_DBUS_PATH "/org/tizen/minicontrol" #define MINICTRL_DBUS_INTERFACE "org.tizen.minicontrol.signal" -#define PROC_DBUS_OBJECT "/Org/Tizen/ResourceD/Process" -#define PROC_DBUS_INTERFACE "org.tizen.resourced.process" -#define PROC_DBUS_METHOD "ProcExclude" +#define PROC_DBUS_OBJECT "/Org/Tizen/ResourceD/Process" +#define PROC_DBUS_INTERFACE "org.tizen.resourced.process" +#define PROC_DBUS_METHOD "ProcExclude" #define PROC_DBUS_EXCLUDE "exclude" #define PROC_DBUS_INCLUDE "include" @@ -89,8 +89,8 @@ release_n_return: int _minictrl_provider_proc_send(int type) { DBusError err; - DBusConnection* conn = NULL; - DBusMessage* msg = NULL; + DBusConnection *conn = NULL; + DBusMessage *msg = NULL; int ret = -1; int pid = getpid(); dbus_uint32_t serial = 0; @@ -111,9 +111,9 @@ int _minictrl_provider_proc_send(int type) ret = MINICONTROL_ERROR_IPC_FAILURE; goto release_n_return; } - msg = dbus_message_new_signal(PROC_DBUS_OBJECT, // object name of the signal - PROC_DBUS_INTERFACE, // interface name of the signal - PROC_DBUS_METHOD); // name of the signal + msg = dbus_message_new_signal(PROC_DBUS_OBJECT, /* object name of the signal */ + PROC_DBUS_INTERFACE, /* interface name of the signal */ + PROC_DBUS_METHOD); /* name of the signal */ if (!msg) { ERR("ERR Could not create DBus Message"); goto release_n_return; @@ -135,7 +135,6 @@ release_n_return: dbus_connection_unref(conn); return ret; - } int _minictrl_send_event(const char *signal_name, const char *minicontrol_name, int event, bundle *signal_arg) @@ -170,13 +169,13 @@ int _minictrl_send_event(const char *signal_name, const char *minicontrol_name, } if (signal_arg != NULL) { - if (bundle_encode(signal_arg, &serialized_arg, (int*)&serialized_arg_length) != BUNDLE_ERROR_NONE) { + if (bundle_encode(signal_arg, &serialized_arg, (int *)&serialized_arg_length) != BUNDLE_ERROR_NONE) { ERR("fail to serialize bundle argument"); ret = MINICONTROL_ERROR_OUT_OF_MEMORY; goto release_n_return; } } else { - serialized_arg = (bundle_raw*)strdup(""); + serialized_arg = (bundle_raw *)strdup(""); serialized_arg_length = 0; } @@ -236,9 +235,9 @@ int _minictrl_provider_message_send(int event, const char *minicontrol_name, uns snprintf(bundle_value_buffer, BUNDLE_BUFFER_LENGTH, "%s", minicontrol_name); bundle_add_str(event_arg_bundle, "minicontrol_name", bundle_value_buffer); - bundle_add_byte(event_arg_bundle, "width", (void*)&witdh, sizeof(int)); - bundle_add_byte(event_arg_bundle, "height", (void*)&height, sizeof(int)); - bundle_add_byte(event_arg_bundle, "priority", (void*)&priority, sizeof(int)); + bundle_add_byte(event_arg_bundle, "width", (void *)&witdh, sizeof(int)); + bundle_add_byte(event_arg_bundle, "height", (void *)&height, sizeof(int)); + bundle_add_byte(event_arg_bundle, "priority", (void *)&priority, sizeof(int)); _minictrl_send_event(MINICTRL_DBUS_SIG_TO_VIEWER, minicontrol_name, event, event_arg_bundle); diff --git a/src/minicontrol-monitor.c b/src/minicontrol-monitor.c index ae336ff..40041a5 100755 --- a/src/minicontrol-monitor.c +++ b/src/minicontrol-monitor.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -83,9 +83,9 @@ static void _sig_to_viewer_handler_cb(minicontrol_event_e event, const char *min } if (action == MINICONTROL_ACTION_START || action == MINICONTROL_ACTION_RESIZE || action == MINICONTROL_ACTION_REQUEST) { - bundle_get_byte(event_arg, "width", (void*)&width, &n_size); - bundle_get_byte(event_arg, "height", (void*)&height, &n_size); - bundle_get_byte(event_arg, "priority", (void*)&priority_from_signal, &n_size); + bundle_get_byte(event_arg, "width", (void *)&width, &n_size); + bundle_get_byte(event_arg, "height", (void *)&height, &n_size); + bundle_get_byte(event_arg, "priority", (void *)&priority_from_signal, &n_size); priority = _int_to_priority(priority_from_signal); } else { priority = MINICONTROL_PRIORITY_LOW; @@ -132,3 +132,4 @@ EXPORT_API minicontrol_error_e minicontrol_monitor_stop(void) return MINICONTROL_ERROR_NONE; } + diff --git a/src/minicontrol-provider.c b/src/minicontrol-provider.c index a6cd9fb..3790921 100755 --- a/src/minicontrol-provider.c +++ b/src/minicontrol-provider.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -179,7 +179,7 @@ static void _access_changed_cb(void *data, Evas_Object *obj, void *event_info) } -EXPORT_API Evas_Object* minicontrol_create_window(const char *name, minicontrol_target_viewer_e target_viewer, minicontrol_event_cb event_callback) +EXPORT_API Evas_Object *minicontrol_create_window(const char *name, minicontrol_target_viewer_e target_viewer, minicontrol_event_cb event_callback) { int err_from_elm; Evas_Object *win = NULL; @@ -279,9 +279,8 @@ EXPORT_API int minicontrol_send_event(Evas_Object *mincontrol, minicontrol_provi return MINICONTROL_ERROR_INVALID_PARAMETER; } - if (pd->state == MINICTRL_STATE_RUNNING) { + if (pd->state == MINICTRL_STATE_RUNNING) ret = _minictrl_send_event(MINICTRL_DBUS_SIG_TO_VIEWER, pd->name, event, event_arg); - } return ret; } diff --git a/src/minicontrol-viewer.c b/src/minicontrol-viewer.c index a5c8474..050eec0 100755 --- a/src/minicontrol-viewer.c +++ b/src/minicontrol-viewer.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. |