Add a new enumeration for component status 09/212209/1
authorHwankyu Jhun <h.jhun@samsung.com>
Mon, 19 Aug 2019 01:25:59 +0000 (10:25 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Mon, 19 Aug 2019 01:53:43 +0000 (10:53 +0900)
Adds:
 - comp_status_e

Change-Id: I891f17988e6e54dc15eab8361fdb9271ac9321b4
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
CMakeLists.txt
include/aul_comp_context.h
include/aul_comp_status.h
include/aul_comp_types.h [new file with mode: 0644]
tool/compmgr_tool.c

index 05b1571..fcc7dee 100755 (executable)
@@ -88,6 +88,7 @@ SET(HEADERS_LIB_AUL
        aul_comp_context.h
        aul_comp_info_internal.h
        aul_watch_control.h
+       aul_comp_types.h
        )
 
 # Install headers, other files
index 4c76958..1528449 100644 (file)
@@ -19,7 +19,8 @@
 #include <unistd.h>
 #include <stdbool.h>
 
-#include "aul.h"
+#include <aul.h>
+#include <aul_comp_types.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -141,6 +142,8 @@ int aul_comp_context_get_pid(aul_comp_context_h handle, pid_t *pid);
  * @return      @c 0 on success,
  *              otherwise a negative error value
  *
+ * @see comp_status_e
+ *
  * @remarks This function is only for App Framework internally.
  */
 int aul_comp_context_get_status(aul_comp_context_h handle, int *status);
index 2b1ed7a..4c90c4e 100644 (file)
@@ -16,6 +16,9 @@
 
 #pragma once
 
+#include <aul.h>
+#include <aul_comp_types.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
diff --git a/include/aul_comp_types.h b/include/aul_comp_types.h
new file mode 100644 (file)
index 0000000..6255bff
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2019 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.
+ * 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.
+ */
+
+#pragma once
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Enumeration for component status.
+ * @since_tizen 5.5
+ */
+typedef enum {
+       COMP_STATUS_INITIALIZED,        /**< Initialized status */
+       COMP_STATUS_CREATED,            /**< Created status */
+       COMP_STATUS_STARTED,            /**< Started status */
+       COMP_STATUS_RESUMED,            /**< Resumed status */
+       COMP_STATUS_PAUSED,             /**< Paused status */
+       COMP_STATUS_DESTROYED,          /**< Destroyed status */
+} comp_status_e;
+
+#ifdef __cplusplus
+}
+#endif
index 03b2a74..84e497c 100644 (file)
@@ -300,18 +300,18 @@ static int __cmd_list_run(void *data)
 static const char *__get_status_string(int status)
 {
        switch (status) {
-       case STATUS_LAUNCHING:
-               return "STATUS_LAUNCHING";
-       case STATUS_CREATED:
-               return "STATUS_CREATED";
-       case STATUS_FOCUS:
-               return "STATUS_FOCUS";
-       case STATUS_VISIBLE:
-               return "STATUS_VISIBLE";
-       case STATUS_BG:
-               return "STATUS_BG";
-       case STATUS_DYING:
-               return "STATUS_DYING";
+       case COMP_STATUS_INITIALIZED:
+               return "COMP_STATUS_INITIALIZED";
+       case COMP_STATUS_CREATED:
+               return "COMP_STATUS_CREATED";
+       case COMP_STATUS_STARTED:
+               return "COMP_STATUS_STARTED";
+       case COMP_STATUS_RESUMED:
+               return "COMP_STATUS_RESUMED";
+       case COMP_STATUS_PAUSED:
+               return "COMP_STATUS_PAUSED";
+       case COMP_STATUS_DESTROYED:
+               return "COMP_STATUS_DESTROYED";
        default:
                return "Unknown Status";
        }