summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHyungdeuk Kim <hd3.kim@samsung.com>2013-04-19 11:24:50 +0900
committerHyungdeuk Kim <hd3.kim@samsung.com>2013-04-19 11:24:50 +0900
commit44325d83063d8a47efdbc6e279d3c3ef16732970 (patch)
treea3942f4c4c0cc15e4ede59370e91416eabc6380e /include
parent46b82c6d162cea4d5560c82ae117b6a49b217bf8 (diff)
downloadui-gadget-1-44325d83063d8a47efdbc6e279d3c3ef16732970.tar.gz
ui-gadget-1-44325d83063d8a47efdbc6e279d3c3ef16732970.tar.bz2
ui-gadget-1-44325d83063d8a47efdbc6e279d3c3ef16732970.zip
add ug_send_result_full api for appcontrol ug
Diffstat (limited to 'include')
-rwxr-xr-xinclude/ui-gadget-module.h48
-rwxr-xr-xinclude/ui-gadget.h4
2 files changed, 50 insertions, 2 deletions
diff --git a/include/ui-gadget-module.h b/include/ui-gadget-module.h
index 452827b..d91d4bf 100755
--- a/include/ui-gadget-module.h
+++ b/include/ui-gadget-module.h
@@ -158,7 +158,53 @@ int ug_destroy_me(ui_gadget_h ug);
* ...
* \endcode
*/
-int ug_send_result(ui_gadget_h ug, service_h result);
+int ug_send_result(ui_gadget_h ug, service_h send);
+
+
+/**
+ * \par Description:
+ * This function sends result to caller of the given UI gadget instance.
+ *
+ * \par Purpose:
+ * This function is used for sending result to caller of the given UI gadget instance. The result have to be composed with service handle.
+ *
+ * \par Typical use case:
+ * UI gadget developer who want to send result to caller of the given UI gadget instance could use the function.
+ *
+ * \par Method of function operation:
+ * Result callback which is registered by caller with ug_create() is invoked.
+ *
+ * \par Context of function:
+ * This function supposed to be called in the created UI gadget.
+ *
+ * @param[in] ug the UI gadget
+ * @param[in] the service handle in which the results of the callee (see \ref service_PG "Tizen managed api reference guide")
+ * @param[in] The result code of the launch request. (This is valid in case that ug is launched by appcontrol)
+ * @return 0 on success, -1 on error
+ *
+ * \pre None
+ * \post None
+ * \see None
+ * \remarks After send your message, you have to release it using service_destroy()
+ *
+ * \par Sample code:
+ * \code
+ * #include <ui-gadget-module.h>
+ * ...
+ * // make a result with service
+ * service_h result;
+ * service_create(&result);
+ * service_add_extra_data(result, "Content", "Hello");
+ *
+ * // send the result
+ * ug_send_result_full(ug, result, SERVICE_RESULT_SUCCEEDED);
+ *
+ * // release the result
+ * service_destroy(result);
+ * ...
+ * \endcode
+ */
+int ug_send_result_full(ui_gadget_h ug, service_h send, service_result_e result);
#ifdef __cplusplus
}
diff --git a/include/ui-gadget.h b/include/ui-gadget.h
index a570f5a..dfa13b4 100755
--- a/include/ui-gadget.h
+++ b/include/ui-gadget.h
@@ -136,6 +136,8 @@ enum ug_option {
#define GET_OPT_INDICATOR_VAL(opt) opt % UG_OPT_OVERLAP_ENABLE
#define GET_OPT_OVERLAP_VAL(opt) opt & UG_OPT_OVERLAP_ENABLE
+#define UG_SERVICE_DATA_RESULT "__UG_SEND_REUSLT__"
+
/**
* UI gadget callback type
* @see ug_create()
@@ -761,7 +763,7 @@ int ug_disable_effect(ui_gadget_h ug);
* N/A
*
* @param[in] ug The UI gadget
- * @return 1 - installed, 0 - installed, -1 - error
+ * @return 1 - installed, 0 - not installed, -1 - error
*
* \pre None
* \post None