UPDATE_SCREEN_VIEWER_STATUS = 96,
WIDGET_RUNNING_INFO = 97,
JOB_STATUS_UPDATE = 98,
+ WIDGET_CHANGE_STATUS = 99,
APP_CMD_MAX
};
*/
int aul_widget_info_get_app_path(aul_widget_info_h info, char **app_path);
+/**
+ * @par Description:
+ * Change app status.
+ * @param[in] widget_id The widget app id
+ * @param[in] status The widget app status
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ */
+int aul_widget_instance_change_status(const char *widget_id, const char *status);
+
#ifdef __cplusplus
}
#endif
return AUL_R_OK;
}
+
+API int aul_widget_instance_change_status(const char *widget_id,
+ const char *status)
+{
+ int ret;
+ bundle *kb;
+
+ kb = bundle_create();
+ if (kb == NULL) {
+ _E("out of memory");
+ return AUL_R_ERROR;
+ }
+
+ bundle_add_str(kb, AUL_K_STATUS, status);
+ bundle_add_str(kb, AUL_K_WIDGET_ID, widget_id);
+ ret = aul_sock_send_bundle(AUL_UTIL_PID, getuid(),
+ WIDGET_CHANGE_STATUS, kb, AUL_SOCK_ASYNC);
+
+ bundle_free(kb);
+ if (ret < 0) {
+ _E("send error %d, %s", ret, status);
+ return aul_error_convert(ret);
+ }
+
+ return AUL_R_OK;
+}