#include <unistd.h>
#include <stdbool.h>
-#include "aul.h"
+#include <aul.h>
+#include <aul_comp_types.h>
#ifdef __cplusplus
extern "C" {
* @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);
--- /dev/null
+/*
+ * 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
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";
}