* @brief Creates a action client handle.
* @param[out] client The action handle.
* @retval #ACTION_ERROR_NONE Successful
+ * @retval #ACTION_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #ACTION_ERROR_CONNECTION_REFUSED Connection refused
* @retval #ACTION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @see action_client_destroy()
*/
int action_client_create(action_client_h *client);
* @param[in] action The action handle.
* @retval #ACTION_ERROR_NONE Successful
* @retval #ACTION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @see action_client_create()
*/
int action_client_destroy(action_client_h client);
/**
- * @brief Retrieves all actions.
+ * @brief Gets the action handle.
* @param[in] client The action client handle.
- * @param[in] cb The callback function to get each action.
- * @param[in] user_data The user data to be passed to the callback function.
+ * @param[in] name The name of action.
+ * @param[in] action The action handle.
* @retval #ACTION_ERROR_NONE Successful
+ * @retval #ACTION_ERROR_OUT_OF_MEMORY Out of memory
* @retval #ACTION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @see action_destroy()
*/
-int action_client_foreach_action(action_client_h client, action_foreach_action_cb cb, void *user_data);
+int action_client_get_action(action_client_h client, const char *name, action_h *action);
/**
- * @brief Gets the action handle
+ * @brief Retrieves all actions.
* @param[in] client The action client handle.
- * @param[in] name The name of action.
- * @param[in] action The action handle.
+ * @param[in] cb The callback function to get each action.
+ * @param[in] user_data The user data to be passed to the callback function.
* @retval #ACTION_ERROR_NONE Successful
* @retval #ACTION_ERROR_INVALID_PARAMETER Invalid parameter
*/
-int action_client_get_action(action_client_h client, const char *name, action_h *action);
+int action_client_foreach_action(action_client_h client, action_foreach_action_cb cb, void *user_data);
/**
* @brief Executes the action.
* @param[in] user_data The user data to be passed to the callback function.
* @param[out] execution_id The ID of the action execution. It should be released using free().
* @retval #ACTION_ERROR_NONE Successful
+ * @retval #ACTION_ERROR_IO_ERROR I/O error
* @retval #ACTION_ERROR_INVALID_PARAMETER Invalid parameter
*/
int action_client_execute(action_client_h client, const char *param, action_result_cb cb, void *user_data, int *execution_id);
*/
typedef enum _action_error {
ACTION_ERROR_NONE = TIZEN_ERROR_NONE, /**< Success */
- ACTION_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
- ACTION_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
ACTION_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */
+ ACTION_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
ACTION_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
- ACTION_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< Function not implemented */
- ACTION_ERROR_FROM_DB = TIZEN_ERROR_NOTIFICATION | 0x01, /**< Error from DB query */
- ACTION_ERROR_ALREADY_EXIST_ID = TIZEN_ERROR_NOTIFICATION | 0x02, /**< Already exist private ID */
- ACTION_ERROR_NOT_EXIST_ID = TIZEN_ERROR_NOTIFICATION | 0x03, /**< Not exist ID */
- ACTION_ERROR_SERVICE_NOT_READY = TIZEN_ERROR_NOTIFICATION | 0x04, /**< No response from action framework service */
+ ACTION_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
+ ACTION_ERROR_CONNECTION_REFUSED = TIZEN_ERROR_CONNECTION_REFUSED, /**< Connection refused */
} action_error_e;
#ifdef __cplusplus