summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/widget_instance.c6
-rw-r--r--src/widget_service.c23
2 files changed, 23 insertions, 6 deletions
diff --git a/src/widget_instance.c b/src/widget_instance.c
index 6d4b09e..43ba763 100644
--- a/src/widget_instance.c
+++ b/src/widget_instance.c
@@ -323,12 +323,6 @@ static int __send_aul_cmd(widget_instance_h instance, const char *command, bundl
return -1;
}
- if (instance->status != WIDGET_INSTANCE_RUNNING) {
- _E("instance not yet running: %s to %s (%d)",
- instance->id, command, instance->status);
- return -1;
- }
-
if (b == NULL) {
b = bundle_create();
if (!b) {
diff --git a/src/widget_service.c b/src/widget_service.c
index ca00c2f..b63dac5 100644
--- a/src/widget_service.c
+++ b/src/widget_service.c
@@ -1809,3 +1809,26 @@ EAPI int widget_service_get_widget_max_count(const char *widget_id)
return ret;
}
+EAPI int widget_service_get_instance_count(const char *widget_id, const char *cluster, const char *category)
+{
+ int ret;
+
+ if (!_is_widget_feature_enabled()) {
+ _E("Not supported");
+ return WIDGET_ERROR_NOT_SUPPORTED;
+ }
+
+ if (widget_id == NULL) {
+ _E("Invalid parameter");
+ return WIDGET_ERROR_INVALID_PARAMETER;
+ }
+
+ if (check_privilege("http://tizen.org/privilege/widget.viewer") < 0)
+ return WIDGET_ERROR_PERMISSION_DENIED;
+
+ ret = aul_widget_instance_count(widget_id);
+ if (ret == AUL_R_EILLACC)
+ return WIDGET_ERROR_PERMISSION_DENIED;
+
+ return ret;
+}