Change-Id: Id27fa2ac1631558e20c82fd861eb9c50484bff91
Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
*/
int aul_widget_instance_update(const char *widget_id, const char *instance_id, bundle *b);
+/*
+ * This API is only for Appfw internally.
+ */
+int aul_widget_instance_count(const char *widget_id);
+
/**
* @par Description:
* This API gets the last caller process id of specified application process id.
WIDGET_DEL,
WIDGET_LIST,
WIDGET_UPDATE,
+ WIDGET_COUNT,
APP_REGISTER_PID,
bundle_free(kb);
return ret;
-}
\ No newline at end of file
+}
+
+API int aul_widget_instance_count(const char *widget_id)
+{
+ int ret;
+ bundle *kb;
+
+ if (widget_id == NULL)
+ return AUL_R_EINVAL;
+
+ kb = bundle_create();
+ if (kb == NULL) {
+ _E("out of memory");
+ return AUL_R_ERROR;
+ }
+
+ bundle_add_str(kb, AUL_K_WIDGET_ID, widget_id);
+ ret = app_send_cmd(AUL_UTIL_PID, WIDGET_COUNT, kb);
+ bundle_free(kb);
+
+ return ret;
+}
+