INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/aul_widget.h DESTINATION include/aul)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/aul_job_scheduler.h DESTINATION include/aul)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/aul_rpc_port.h DESTINATION include/aul)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/aul_complication.h DESTINATION include/aul)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/aul.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/feature/preexec_list.txt DESTINATION ${SHARE_INSTALL_PREFIX}/aul )
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/miregex DESTINATION ${SHARE_INSTALL_PREFIX}/aul )
--- /dev/null
+/*
+ * Copyright (c) 2018 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.
+ */
+
+#ifndef __AUL_COMPLICATION_H__
+#define __AUL_COMPLICATION_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int aul_complication_update_request(const char *appid, const char *provider_appid, uid_t uid);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __AUL_COMPLICATION_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2018 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 <sys/types.h>
+#include <unistd.h>
+#include <bundle_internal.h>
+
+#include "aul_api.h"
+#include "aul_util.h"
+#include "aul_sock.h"
+#include "aul_complication.h"
+#include "aul.h"
+
+#define MAX_UID_STR_BUFSZ 20
+
+API int aul_complication_update_request(const char *appid, const char *provider_appid, uid_t uid)
+{
+ bundle *b;
+ int r;
+ char buf[MAX_UID_STR_BUFSZ];
+
+ if (!appid || !provider_appid) {
+ _E("Invalid parameter");
+ return AUL_R_EINVAL;
+ }
+
+ b = bundle_create();
+ if (!b) {
+ _E("Out of memory");
+ return AUL_R_ERROR;
+ }
+
+ r = bundle_add(b, AUL_K_CALLER_APPID, appid);
+ if (r != BUNDLE_ERROR_NONE) {
+ _E("Failed to add appid(%s)", appid);
+ bundle_free(b);
+ return AUL_R_ERROR;
+ }
+
+ r = bundle_add(b, AUL_K_APPID, provider_appid);
+ if (r != BUNDLE_ERROR_NONE) {
+ _E("Failed to add provider_appid(%s)", provider_appid);
+ bundle_free(b);
+ return AUL_R_ERROR;
+ }
+
+ snprintf(buf, sizeof(buf), "%d", uid);
+ r = bundle_add(b, AUL_K_TARGET_UID, buf);
+ if (r != BUNDLE_ERROR_NONE) {
+ _E("Failed to add uid(%d)", uid);
+ bundle_free(b);
+ return AUL_R_ERROR;
+ }
+
+ r = aul_sock_send_bundle(AUL_UTIL_PID, getuid(),
+ COMPLICATION_UPDATE_REQUEST, b, AUL_SOCK_QUEUE);
+ if (r < 0) {
+ _E("Failed to send request(%d:%s)",
+ COMPLICATION_UPDATE_REQUEST, appid);
+ bundle_free(b);
+ return r;
+ }
+ bundle_free(b);
+
+ return AUL_R_OK;
+}