--- /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 Updates a status of a component.
+ * @since_tizen 5.5
+ *
+ * @param[in] instance_id The instance ID
+ * @param[in] status The status
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @remarks This function is only for App Framework internally.
+ */
+int aul_comp_status_update(const char *instance_id, int status);
+
+/**
+ * @brief Notifies that a component is starting.
+ * @since_tizen 5.5
+ *
+ * @param[in] instance_id The instance ID
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @remarks This function is only for App Framework internally.
+ */
+int aul_comp_notify_start(const char *instance_id);
+
+/**
+ * @brief Notifies that a component is exiting.
+ * @since_tizen 5.5
+ *
+ * @param[in] instance_id The instance ID
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @remarks This function is only for App Framework internally.
+ */
+int aul_comp_notify_exit(const char *instance_id);
+
+#ifdef __cplusplus
+}
+#endif
--- /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.
+ */
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <bundle.h>
+#include <bundle_internal.h>
+
+#include "aul_util.h"
+#include "aul_sock.h"
+#include "aul_api.h"
+#include "aul.h"
+
+API int aul_comp_status_update(const char *instance_id, int status)
+{
+ char buf[32];
+ bundle *b;
+ int r;
+
+ if (!instance_id || status > STATUS_TERMINATE) {
+ _E("Invalid parameter");
+ return AUL_R_EINVAL;
+ }
+
+ b = bundle_create();
+ if (!b) {
+ _E("Failed to create bundle");
+ return AUL_R_ERROR;
+ }
+
+ bundle_add(b, AUL_K_INSTANCE_ID, instance_id);
+ snprintf(buf, sizeof(buf), "%d", status);
+ bundle_add(b, AUL_K_STATUS, buf);
+
+ r = aul_sock_send_bundle(AUL_UTIL_PID, getuid(),
+ COMP_STATUS_UPDATE, b, AUL_SOCK_NOREPLY);
+ if (r < 0) {
+ _E("Failed to send the update request. error(%d)", r);
+ bundle_free(b);
+ return r;
+ }
+ bundle_free(b);
+
+ return AUL_R_OK;
+}
+
+API int aul_comp_notify_start(const char *instance_id)
+{
+ bundle *b;
+ int r;
+
+ if (!instance_id) {
+ _E("Invalid parameter");
+ return AUL_R_EINVAL;
+ }
+
+ b = bundle_create();
+ if (!b) {
+ _E("Failed to create bundle");
+ return AUL_R_ERROR;
+ }
+
+ bundle_add(b, AUL_K_INSTANCE_ID, instance_id);
+
+ r = aul_sock_send_bundle(AUL_UTIL_PID, getuid(),
+ COMP_NOTIFY_START, b, AUL_SOCK_NOREPLY);
+ if (r < 0) {
+ _E("Failed to send the update request. error(%d)", r);
+ bundle_free(b);
+ return r;
+ }
+ bundle_free(b);
+
+ return AUL_R_OK;
+}
+
+API int aul_comp_notify_exit(const char *instance_id)
+{
+ bundle *b;
+ int r;
+
+ if (!instance_id) {
+ _E("Invalid parameter");
+ return AUL_R_EINVAL;
+ }
+
+ b = bundle_create();
+ if (!b) {
+ _E("Failed to create bundle");
+ return AUL_R_ERROR;
+ }
+
+ bundle_add(b, AUL_K_INSTANCE_ID, instance_id);
+
+ r = aul_sock_send_bundle(AUL_UTIL_PID, getuid(),
+ COMP_NOTIFY_EXIT, b, AUL_SOCK_NOREPLY);
+ if (r < 0) {
+ _E("Failed to send the update request. error(%d)", r);
+ bundle_free(b);
+ return r;
+ }
+ bundle_free(b);
+
+ return AUL_R_OK;
+}