Adjust coding rules 94/63794/5 accepted/tizen/common/20160406.143440 accepted/tizen/ivi/20160406.012042 accepted/tizen/mobile/20160406.011933 accepted/tizen/tv/20160406.011957 accepted/tizen/wearable/20160406.012018 submit/tizen/20160405.001024
authorHwankyu Jhun <h.jhun@samsung.com>
Sun, 27 Mar 2016 22:44:51 +0000 (07:44 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Wed, 30 Mar 2016 23:00:37 +0000 (08:00 +0900)
Change-Id: I6322d2bc9f35cb3f29f84644c57b2d08ca73f79f
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
doc/appfw_app_manager_doc.h
include/app_context.h
include/app_info.h
include/app_manager.h
include/app_manager_extension.h
src/app_context.c
src/app_info.c
src/app_manager.c
src/app_manager_internal.h
tool/main.c

index 76df8ae..5182939 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2011 - 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.
index 821882d..c0e3ae7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2011 - 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.
@@ -46,10 +46,9 @@ typedef struct app_context_s *app_context_h;
  * @brief  Enumeration for Application Context Event.
  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
  */
-typedef enum
-{
-    APP_CONTEXT_EVENT_LAUNCHED, /**< The application is launched */
-    APP_CONTEXT_EVENT_TERMINATED, /**< The application is terminated */
+typedef enum {
+       APP_CONTEXT_EVENT_LAUNCHED, /**< The application is launched */
+       APP_CONTEXT_EVENT_TERMINATED, /**< The application is terminated */
 } app_context_event_e;
 
 
@@ -58,11 +57,11 @@ typedef enum
  * @since_tizen 3.0
  */
 typedef enum {
-    APP_STATE_UNDEFINED, /**< The undefined state */
-    APP_STATE_FOREGROUND, /**< The UI application is running in the foreground. */
-    APP_STATE_BACKGROUND, /**< The UI application is running in the background. */
-    APP_STATE_SERVICE, /**< The Service application is running. */
-    APP_STATE_TERMINATED, /**< The application is terminated. */
+       APP_STATE_UNDEFINED, /**< The undefined state */
+       APP_STATE_FOREGROUND, /**< The UI application is running in the foreground. */
+       APP_STATE_BACKGROUND, /**< The UI application is running in the background. */
+       APP_STATE_SERVICE, /**< The Service application is running. */
+       APP_STATE_TERMINATED, /**< The application is terminated. */
 } app_state_e;
 
 
@@ -222,3 +221,4 @@ int app_context_clone(app_context_h *clone, app_context_h app_context);
 #endif
 
 #endif /* __TIZEN_APPFW_APP_CONTEXT_H */
+
index 15b0e9b..db49765 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2011 - 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.
@@ -110,11 +110,10 @@ typedef bool (*app_info_metadata_cb) (const char *metadata_key, const char *meta
  * @brief Enumeration for Application Information Event.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef enum
-{
-    APP_INFO_EVENT_INSTALLED, /**< The application is newly installed */
-    APP_INFO_EVENT_UNINSTALLED, /**< The application is uninstalled */
-    APP_INFO_EVENT_UPDATED, /**< The application is updated */
+typedef enum {
+       APP_INFO_EVENT_INSTALLED, /**< The application is newly installed */
+       APP_INFO_EVENT_UNINSTALLED, /**< The application is uninstalled */
+       APP_INFO_EVENT_UPDATED, /**< The application is updated */
 } app_info_event_e;
 
 /**
@@ -418,7 +417,7 @@ int app_info_filter_count_appinfo(app_info_filter_h handle, int *count);
  * @retval  #APP_MANAGER_ERROR_INVALID_PARAMETER  Invalid parameter
  * @retval  #APP_MANAGER_ERROR_IO_ERROR           I/O error
  */
-int app_info_filter_foreach_appinfo(app_info_filter_h handle, app_info_filter_cb callback, void * user_data);
+int app_info_filter_foreach_appinfo(app_info_filter_h handle, app_info_filter_cb callback, void *user_data);
 
 /**
  * @brief  Creates the application's metadata information filter handle from DB.
@@ -488,3 +487,4 @@ int app_info_metadata_filter_foreach(app_info_metadata_filter_h handle, app_info
 #endif
 
 #endif /* __TIZEN_APPFW_APP_INFO_H */
+
index 13de32e..0e17b4c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2011 - 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.
@@ -357,3 +357,4 @@ int app_manager_get_external_shared_data_path(const char *app_id, char **path);
 #endif
 
 #endif /* __TIZEN_APPFW_APP_MANAGER_H */
+
index afb0a39..9f98b81 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2011 - 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.
@@ -56,3 +56,4 @@ int app_manager_terminate_app(app_context_h app_context);
 #endif
 
 #endif /* __TIZEN_APPFW_APP_MANAGER_EXTENSION_H */
+
index 7d6878e..f43241e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2011 - 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.
@@ -89,7 +89,7 @@ static app_state_e app_context_get_app_status(int status)
 
 static int app_context_foreach_app_context_cb(const aul_app_info *aul_app_context, void *cb_data)
 {
-       foreach_context_sforeach_context = cb_data;
+       foreach_context_s *foreach_context = cb_data;
        app_context_h app_context;
        app_state_e app_state;
        bool is_sub_app = false;
@@ -138,7 +138,7 @@ int app_context_foreach_app_context(app_manager_app_context_cb callback, void *u
 
 static int app_context_foreach_running_app_context_cb(const aul_app_info *aul_app_context, void *cb_data)
 {
-       foreach_context_sforeach_context = cb_data;
+       foreach_context_s *foreach_context = cb_data;
        app_context_h app_context;
        app_state_e app_state;
        bool is_sub_app = false;
@@ -445,7 +445,7 @@ static bool app_context_load_all_app_context_cb_locked(app_context_h app_context
        return true;
 }
 
-static void app_context_pid_table_entry_destroyed_cb(void * data)
+static void app_context_pid_table_entry_destroyed_cb(void *data)
 {
        app_context_h app_context = data;
 
@@ -580,3 +580,4 @@ void app_context_unset_event_cb(void)
 
        app_context_unlock_event_cb_context();
 }
+
index cd86ba3..eda32cf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2011 - 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.
@@ -635,7 +635,7 @@ API int app_info_filter_count_appinfo(app_info_filter_h handle, int *count)
        return APP_MANAGER_ERROR_NONE;
 }
 
-API int app_info_filter_foreach_appinfo(app_info_filter_h handle, app_info_filter_cb callback, void * user_data)
+API int app_info_filter_foreach_appinfo(app_info_filter_h handle, app_info_filter_cb callback, void *user_data)
 {
        int retval = 0;
 
@@ -730,3 +730,4 @@ API int app_info_metadata_filter_foreach(app_info_metadata_filter_h handle, app_
 
        return APP_MANAGER_ERROR_NONE;
 }
+
index 2aaa4e2..8b000a1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2011 - 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.
@@ -36,7 +36,7 @@
 
 #define SMACK_LABEL_LEN 255
 
-static const charapp_manager_error_to_string(app_manager_error_e error)
+static const char *app_manager_error_to_string(app_manager_error_e error)
 {
        switch (error) {
        case APP_MANAGER_ERROR_NONE:
@@ -62,7 +62,7 @@ static const char* app_manager_error_to_string(app_manager_error_e error)
        }
 }
 
-int app_manager_error(app_manager_error_e error, const charfunction, const char *description)
+int app_manager_error(app_manager_error_e error, const char *function, const char *description)
 {
        if (description)
                LOGE("[%s] %s(0x%08x) : %s", function, app_manager_error_to_string(error), error, description);
@@ -429,3 +429,4 @@ API int app_manager_get_external_shared_data_path(const char *app_id, char **pat
 
        return r;
 }
+
index d7185f6..2b8e90c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2011 - 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.
@@ -38,7 +38,7 @@ extern "C" {
 
 #define PRIVILEGE_PKGMGR_INFO "http://tizen.org/privilege/packagemanager.info"
 
-int app_manager_error(app_manager_error_e error, const charfunction, const char *description);
+int app_manager_error(app_manager_error_e error, const char *function, const char *description);
 
 int app_context_foreach_app_context(app_manager_app_context_cb callback, void *user_data);
 
@@ -64,3 +64,4 @@ int app_manager_check_privilege(char *privilege);
 #endif
 
 #endif /* __TIZEN_APPFW_APP_MANAGER_INTERNAL_H */
+
index 48cb673..9a8ef55 100644 (file)
@@ -1,19 +1,19 @@
 /*
-Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
-PROPRIETARY/CONFIDENTIAL
-This software is the confidential and proprietary information of
-SAMSUNG ELECTRONICS ("Confidential Information"). You agree and acknowledge that
-this software is owned by Samsung and you
-shall not disclose such Confidential Information and shall
-use it only in accordance with the terms of the license agreement
-you entered into with SAMSUNG ELECTRONICS.  SAMSUNG make no
-representations or warranties about the suitability
-of the software, either express or implied, including but not
-limited to the implied warranties of merchantability, fitness for
-a particular purpose, or non-infringement.
-SAMSUNG shall not be liable for any damages suffered by licensee arising out of or
-related to this software.
-*/
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ * PROPRIETARY/CONFIDENTIAL
+ * This software is the confidential and proprietary information of
+ * SAMSUNG ELECTRONICS ("Confidential Information"). You agree and acknowledge that
+ * this software is owned by Samsung and you
+ * shall not disclose such Confidential Information and shall
+ * use it only in accordance with the terms of the license agreement
+ * you entered into with SAMSUNG ELECTRONICS.  SAMSUNG make no
+ * representations or warranties about the suitability
+ * of the software, either express or implied, including but not
+ * limited to the implied warranties of merchantability, fitness for
+ * a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee arising out of or
+ * related to this software.
+ */
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -25,8 +25,6 @@ related to this software.
 
 #include <app_manager.h>
 
-
-
 static void _print_help(const char *cmd)
 {
        fprintf(stderr, "Usage:\n");
@@ -38,8 +36,6 @@ static void _print_help(const char *cmd)
        fprintf(stderr, "\n");
 }
 
-
-
 static int _get_appinfo(const char *app_id)
 {
        app_info_h app_info;
@@ -81,11 +77,11 @@ static int _get_appinfo(const char *app_id)
        return APP_MANAGER_ERROR_NONE;
 }
 
-int main(int argc, char** argv)
+int main(int argc, char **argv)
 {
        int ret = APP_MANAGER_ERROR_NONE;
 
-       if (2 == argc) {
+       if (argc == 2) {
                ret = _get_appinfo(argv[1]);
        } else {
                _print_help(argv[0]);
@@ -98,4 +94,3 @@ int main(int argc, char** argv)
        return EXIT_SUCCESS;
 }
 
-