From: Hwankyu Jhun Date: Mon, 19 Aug 2019 01:25:59 +0000 (+0900) Subject: Add a new enumeration for component status X-Git-Tag: accepted/tizen/unified/20190821.111118~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F09%2F212209%2F1;p=platform%2Fcore%2Fappfw%2Faul-1.git Add a new enumeration for component status Adds: - comp_status_e Change-Id: I891f17988e6e54dc15eab8361fdb9271ac9321b4 Signed-off-by: Hwankyu Jhun --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 05b1571..fcc7dee 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/include/aul_comp_context.h b/include/aul_comp_context.h index 4c76958..1528449 100644 --- a/include/aul_comp_context.h +++ b/include/aul_comp_context.h @@ -19,7 +19,8 @@ #include #include -#include "aul.h" +#include +#include #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); diff --git a/include/aul_comp_status.h b/include/aul_comp_status.h index 2b1ed7a..4c90c4e 100644 --- a/include/aul_comp_status.h +++ b/include/aul_comp_status.h @@ -16,6 +16,9 @@ #pragma once +#include +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/aul_comp_types.h b/include/aul_comp_types.h new file mode 100644 index 0000000..6255bff --- /dev/null +++ b/include/aul_comp_types.h @@ -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 diff --git a/tool/compmgr_tool.c b/tool/compmgr_tool.c index 03b2a74..84e497c 100644 --- a/tool/compmgr_tool.c +++ b/tool/compmgr_tool.c @@ -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"; }