Tizen Native API
4.0
|
Provide functions for access and managing storage service.
Require Header
#include <service_adaptor_client.h>
Overview
It privides common APIs for using various service infra
It starts from root path(= '/') and you can use this path like linux.
For example, "/folder1/image1.jpg"
Some clouds use same with "Logical path", but some clouds use specfic key or url.
For example, "/" is "ZmNhMWY2MTZlY2M1NDg4OGJmZDY4O", "/folder1" is "2JI32UNJDWQEQWQWEADSSAD"
Under the Storage (Deprecated) APIs, the path parameters are used these types.
Functions | |
int | service_storage_get_file_list (service_plugin_h plugin, const char *dir_path, service_storage_file_list_cb callback, void *user_data) TIZEN_DEPRECATED_API |
Gets file list from storage, asynchronously. | |
int | service_storage_remove (service_plugin_h plugin, const char *remove_path, service_storage_result_cb callback, void *user_data) TIZEN_DEPRECATED_API |
Removes file or directory in storage. | |
int | service_storage_create_upload_task (service_plugin_h plugin, const char *file_path, const char *upload_path, service_storage_task_h *task) TIZEN_DEPRECATED_API |
Creates storage task for upload file to storage. | |
int | service_storage_create_download_task (service_plugin_h plugin, const char *storage_path, const char *download_path, service_storage_task_h *task) TIZEN_DEPRECATED_API |
Creates storage task for download file from storage. | |
int | service_storage_create_download_thumbnail_task (service_plugin_h plugin, const char *storage_path, const char *download_path, int thumbnail_size, service_storage_task_h *task) TIZEN_DEPRECATED_API |
Creates storage task for download thumbnail from storage. | |
int | service_storage_destroy_task (service_storage_task_h task) TIZEN_DEPRECATED_API |
Destroys storage task. | |
int | service_storage_start_task (service_storage_task_h task) TIZEN_DEPRECATED_API |
Starts storage task, asynchronously. | |
int | service_storage_cancel_task (service_storage_task_h task) TIZEN_DEPRECATED_API |
Cancels storage task, asynchronously. | |
int | service_storage_set_task_progress_cb (service_storage_task_h task, service_storage_task_progress_cb callback, void *user_data) TIZEN_DEPRECATED_API |
Sets a callback function to be invoked when progress of the task running. | |
int | service_storage_unset_task_progress_cb (service_storage_task_h task) TIZEN_DEPRECATED_API |
Unsets the progress callback function. | |
int | service_storage_set_task_state_changed_cb (service_storage_task_h task, service_storage_task_state_cb callback, void *user_data) TIZEN_DEPRECATED_API |
Sets a callback function to be invoked when change of the task running state. | |
int | service_storage_unset_task_state_changed_cb (service_storage_task_h task) TIZEN_DEPRECATED_API |
Unsets the state changed callback function. | |
int | service_storage_file_list_clone (service_storage_file_list_h src_list, service_storage_file_list_h *dst_list) TIZEN_DEPRECATED_API |
Clones the file list handle. | |
int | service_storage_file_list_destroy (service_storage_file_list_h list) TIZEN_DEPRECATED_API |
Destroys the file list handle. | |
int | service_storage_file_list_get_length (service_storage_file_list_h list, int *length) TIZEN_DEPRECATED_API |
Gets length of the file list handle. | |
int | service_storage_file_list_foreach_file (service_storage_file_list_h list, service_storage_file_cb callback, void *user_data) TIZEN_DEPRECATED_API |
Foreach All of the file from file list. | |
int | service_storage_file_clone (service_storage_file_h src_file, service_storage_file_h *dst_file) TIZEN_DEPRECATED_API |
Clones the file handle. | |
int | service_storage_file_destroy (service_storage_file_h file) TIZEN_DEPRECATED_API |
Destroys the file handle. | |
int | service_storage_file_is_dir (service_storage_file_h file, bool *is_dir) TIZEN_DEPRECATED_API |
Gets whether directory or file for file handle. | |
int | service_storage_file_get_size (service_storage_file_h file, unsigned long long *size) TIZEN_DEPRECATED_API |
Gets size of handle. | |
int | service_storage_file_get_logical_path (service_storage_file_h file, char **path) TIZEN_DEPRECATED_API |
Gets logical path from file handle. | |
int | service_storage_file_get_physical_path (service_storage_file_h file, char **path) TIZEN_DEPRECATED_API |
Gets physical path from file handle. | |
Typedefs | |
typedef struct _service_storage_task_s * | service_storage_task_h |
The handle of async task for storage service. | |
typedef struct _service_storage_file_s * | service_storage_file_h |
The handle of file or directory in storage. | |
typedef struct _service_storage_file_list_s * | service_storage_file_list_h |
The list handle of file or directory in storage. | |
typedef void(* | service_storage_task_state_cb )(service_storage_task_state_e state, void *user_data) |
Callback for changing state of storage task. | |
typedef void(* | service_storage_task_progress_cb )(unsigned long long progress, unsigned long long total, void *user_data) |
Callback for progress of storage task. | |
typedef void(* | service_storage_result_cb )(int result, void *user_data) |
Callback for getting async storage operation result. | |
typedef void(* | service_storage_file_list_cb )(int result, service_storage_file_list_h list, void *user_data) |
Callback for getting file list API. | |
typedef bool(* | service_storage_file_cb )(service_storage_file_h file, void *user_data) |
Callback for service_storage_file_list_foreach_file API. |
Typedef Documentation
typedef bool(* service_storage_file_cb)(service_storage_file_h file, void *user_data) |
Callback for service_storage_file_list_foreach_file API.
- Deprecated:
- Deprecated since 3.0
- Parameters:
-
[in] file The handle of file [in] user_data Passed data from service_storage_file_list_foreach_file()
- See also:
- service_storage_file_h
- Returns:
true
to continue with the next iteration of the loop, otherwisefalse
to break out of the loop
- Precondition:
- service_storage_file_list_foreach_file() will invoke this callback.
typedef struct _service_storage_file_s* service_storage_file_h |
The handle of file or directory in storage.
- Deprecated:
- Deprecated since 3.0
typedef void(* service_storage_file_list_cb)(int result, service_storage_file_list_h list, void *user_data) |
Callback for getting file list API.
- Deprecated:
- Deprecated since 3.0
- Parameters:
-
[in] result Result code for service_storage_get_file_list() (see service_adaptor_error_e) [in] list The handle of file list [in] user_data Passed data from service_storage_get_file_list()
- Remarks:
- If the result value is SERVICE_ADAPTOR_ERROR_PLUGIN_FAILED, error code and error message can be obtained using service_adaptor_get_last_result() and service_adaptor_get_last_error_message() method. Error codes and messages are described in Service Plugin.
- The result values SERVICE_ADAPTOR_ERROR_NONE Successful
- The result values SERVICE_ADAPTOR_ERROR_NO_DATA There is no files
- The result values SERVICE_ADAPTOR_ERROR_TIMED_OUT Timed out
- The result values SERVICE_ADAPTOR_ERROR_PLUGIN_FAILED Failed in Plugin internal
- The result values SERVICE_ADAPTOR_ERROR_UNKNOWN Unknown error
- Returns:
- void
- Precondition:
- service_storage_get_file_list() will invoke this callback.
typedef struct _service_storage_file_list_s* service_storage_file_list_h |
The list handle of file or directory in storage.
- Deprecated:
- Deprecated since 3.0
typedef void(* service_storage_result_cb)(int result, void *user_data) |
Callback for getting async storage operation result.
- Deprecated:
- Deprecated since 3.0
- Parameters:
-
[in] result Result code for storage async operation (see service_adaptor_error_e) [in] user_data Passed data from request function
- Remarks:
- If the result value is SERVICE_ADAPTOR_ERROR_PLUGIN_FAILED, error code and error message can be obtained using service_adaptor_get_last_result() and service_adaptor_get_last_error_message() method. Error codes and messages are described in Service Plugin.
- The result values SERVICE_ADAPTOR_ERROR_NONE Successful
- The result values SERVICE_ADAPTOR_ERROR_NO_DATA There is no files
- The result values SERVICE_ADAPTOR_ERROR_TIMED_OUT Timed out
- The result values SERVICE_ADAPTOR_ERROR_PLUGIN_FAILED Failed in Plugin internal
- The result values SERVICE_ADAPTOR_ERROR_UNKNOWN Unknown error
- Returns:
- void
- Precondition:
- service_storage_remove() will invoke this callback.
typedef struct _service_storage_task_s* service_storage_task_h |
The handle of async task for storage service.
- Deprecated:
- Deprecated since 3.0
typedef void(* service_storage_task_progress_cb)(unsigned long long progress, unsigned long long total, void *user_data) |
Callback for progress of storage task.
- Deprecated:
- Deprecated since 3.0
- Parameters:
-
[in] progress The progressed amount of storage task [in] total The total amount of storage task [in] user_data The user data passed from service_storage_set_task_progress_cb()
- Returns:
- void
- Precondition:
- service_storage_set_task_progress_cb() will invoke this callback.
typedef void(* service_storage_task_state_cb)(service_storage_task_state_e state, void *user_data) |
Callback for changing state of storage task.
- Deprecated:
- Deprecated since 3.0
- Parameters:
-
[in] state The state of storage task [in] user_data The user data passed from service_storage_set_task_state_changed_cb()
- Returns:
- void
- Precondition:
- service_storage_set_task_state_changed_cb() will invoke this callback.
Enumeration Type Documentation
Type of storage task.
- Deprecated:
- Deprecated since 3.0
Function Documentation
int service_storage_cancel_task | ( | service_storage_task_h | task | ) |
Cancels storage task, asynchronously.
- Deprecated:
- Deprecated since 3.0
- Since :
- 2.4
- Parameters:
-
[in] task The handle of storage task
- Remarks:
- task must be released memory using service_storage_destroy_task() when the task no longer run
- If the function returns SERVICE_ADAPTOR_ERROR_PLUGIN_FAILED, error code and error message can be obtained using service_adaptor_get_last_result() and service_adaptor_get_last_error_message() method. Error codes and messages are described in Service Plugin.
- See also:
- service_storage_start_task()
- service_adaptor_get_last_result()
- service_adaptor_get_last_error_message()
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
SERVICE_ADAPTOR_ERROR_NONE Successful SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER Invalid parameter SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE IPC failed with Service Adaptor Daemon SERVICE_ADAPTOR_ERROR_PLUGIN_FAILED Failed in Plugin internal SERVICE_ADAPTOR_ERROR_UNKNOWN Unknown error
int service_storage_create_download_task | ( | service_plugin_h | plugin, |
const char * | storage_path, | ||
const char * | download_path, | ||
service_storage_task_h * | task | ||
) |
Creates storage task for download file from storage.
- Deprecated:
- Deprecated since 3.0
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/internet
- Parameters:
-
[in] plugin The handle for use Plugin APIs [in] storage_path The source file path in storage (Physical path) [in] download_path The download path in local (Logical path) [out] task The handle of download task
- Remarks:
- task must be released memory using service_storage_destroy_task() when the task no longer run
- If the function returns SERVICE_ADAPTOR_ERROR_PLUGIN_FAILED, error code and error message can be obtained using service_adaptor_get_last_result() and service_adaptor_get_last_error_message() method. Error codes and messages are described in Service Plugin.
- Reference details for "Logical path" and "Physical path" at Overview page
- http://tizen.org/privilege/mediastorage is needed if download_path is relevant to media storage.
- http://tizen.org/privilege/externalstorage is needed if download_path is relevant to external storage.
- See also:
- service_plugin_start()
- service_storage_destroy_task()
- service_adaptor_get_last_result()
- service_adaptor_get_last_error_message()
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
SERVICE_ADAPTOR_ERROR_NONE Successful SERVICE_ADAPTOR_ERROR_PERMISSION_DENIED Permission denied SERVICE_ADAPTOR_ERROR_INVALID_STATE The handle's state is invalid SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER Invalid parameter SERVICE_ADAPTOR_ERROR_NO_DATA There is no files SERVICE_ADAPTOR_ERROR_TIMED_OUT Timed out SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE IPC failed with Service Adaptor Daemon SERVICE_ADAPTOR_ERROR_NOT_SUPPORTED Not supported API in this plugin SERVICE_ADAPTOR_ERROR_PLUGIN_FAILED Failed in Plugin internal SERVICE_ADAPTOR_ERROR_UNKNOWN Unknown error
- Precondition:
- API prerequires service_plugin_start()
int service_storage_create_download_thumbnail_task | ( | service_plugin_h | plugin, |
const char * | storage_path, | ||
const char * | download_path, | ||
int | thumbnail_size, | ||
service_storage_task_h * | task | ||
) |
Creates storage task for download thumbnail from storage.
- Deprecated:
- Deprecated since 3.0
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/internet
- Parameters:
-
[in] plugin The handle for use Plugin APIs [in] storage_path The source file path in storage (Physical path) [in] download_path The download path in local (Logical path) [in] thumbnail_size The size level of thumbnail, the level is defined service plugin SPEC [out] task The handle of download task
- Remarks:
- If thumbnail_size is 0, gets default size thumbnail, the default size must be defined plugin SPEC
- If thumbnail_size is -1, gets minimum size thumbnail be supported plugin
- If thumbnail_size is -2, gets maximum size thumbnail be supported plugin
- task must be released memory using service_storage_destroy_task() when the task no longer run
- If the function returns SERVICE_ADAPTOR_ERROR_PLUGIN_FAILED, error code and error message can be obtained using service_adaptor_get_last_result() and service_adaptor_get_last_error_message() method. Error codes and messages are described in Service Plugin.
- Reference details for "Logical path" and "Physical path" at Overview page
- http://tizen.org/privilege/mediastorage is needed if download_path is relevant to media storage.
- http://tizen.org/privilege/externalstorage is needed if download_path is relevant to external storage.
- See also:
- service_plugin_start()
- service_adaptor_get_last_result()
- service_adaptor_get_last_error_message()
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
SERVICE_ADAPTOR_ERROR_NONE Successful SERVICE_ADAPTOR_ERROR_PERMISSION_DENIED Permission denied SERVICE_ADAPTOR_ERROR_INVALID_STATE The handle's state is invalid SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER Invalid parameter SERVICE_ADAPTOR_ERROR_NO_DATA There is no thumbnail data SERVICE_ADAPTOR_ERROR_TIMED_OUT Timed out SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE IPC failed with Service Adaptor Daemon SERVICE_ADAPTOR_ERROR_NOT_SUPPORTED Not supported API in this plugin SERVICE_ADAPTOR_ERROR_PLUGIN_FAILED Failed in Plugin internal SERVICE_ADAPTOR_ERROR_UNKNOWN Unknown error
- Precondition:
- API prerequires service_plugin_start()
int service_storage_create_upload_task | ( | service_plugin_h | plugin, |
const char * | file_path, | ||
const char * | upload_path, | ||
service_storage_task_h * | task | ||
) |
Creates storage task for upload file to storage.
- Deprecated:
- Deprecated since 3.0
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/internet
- Parameters:
-
[in] plugin The handle for use Plugin APIs [in] file_path The upload file path in local (Logical path) [in] upload_path The upload target path in storage (Physical path) [out] task The handle of download task
- Remarks:
- task must be released memory using service_storage_destroy_task() when the task no longer run
- If the function returns SERVICE_ADAPTOR_ERROR_PLUGIN_FAILED, error code and error message can be obtained using service_adaptor_get_last_result() and service_adaptor_get_last_error_message() method. Error codes and messages are described in Service Plugin.
- Reference details for "Logical path" and "Physical path" at Overview page
- http://tizen.org/privilege/mediastorage is needed if file_path is relevant to media storage.
- http://tizen.org/privilege/externalstorage is needed if file_path is relevant to external storage.
- See also:
- service_plugin_start()
- service_storage_destroy_task()
- service_adaptor_get_last_result()
- service_adaptor_get_last_error_message()
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
SERVICE_ADAPTOR_ERROR_NONE Successful SERVICE_ADAPTOR_ERROR_PERMISSION_DENIED Permission denied SERVICE_ADAPTOR_ERROR_INVALID_STATE The handle's state is invalid SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER Invalid parameter SERVICE_ADAPTOR_ERROR_NO_DATA There is no files SERVICE_ADAPTOR_ERROR_TIMED_OUT Timed out SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE IPC failed with Service Adaptor Daemon SERVICE_ADAPTOR_ERROR_NOT_SUPPORTED Not supported API in this plugin SERVICE_ADAPTOR_ERROR_PLUGIN_FAILED Failed in Plugin internal SERVICE_ADAPTOR_ERROR_UNKNOWN Unknown error
- Precondition:
- API prerequires service_plugin_start()
int service_storage_destroy_task | ( | service_storage_task_h | task | ) |
Destroys storage task.
- Deprecated:
- Deprecated since 3.0
- Since :
- 2.4
- Parameters:
-
[in] task The handle of storage task
- Remarks:
- If the function returns SERVICE_ADAPTOR_ERROR_PLUGIN_FAILED, error code and error message can be obtained using service_adaptor_get_last_result() and service_adaptor_get_last_error_message() method. Error codes and messages are described in Service Plugin.
- See also:
- service_storage_create_download_task()
- service_storage_create_upload_task()
- service_adaptor_get_last_result()
- service_adaptor_get_last_error_message()
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
SERVICE_ADAPTOR_ERROR_NONE Successful SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER Invalid parameter SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE IPC failed with Service Adaptor Daemon SERVICE_ADAPTOR_ERROR_PLUGIN_FAILED Failed in Plugin internal SERVICE_ADAPTOR_ERROR_UNKNOWN Unknown error
int service_storage_file_clone | ( | service_storage_file_h | src_file, |
service_storage_file_h * | dst_file | ||
) |
Clones the file handle.
- Deprecated:
- Deprecated since 3.0
- Since :
- 2.4
- Parameters:
-
[in] src_file The source handle [out] dst_file The destination handle
- Remarks:
- file must be released memory using service_storage_file_destroy() when you no longer needs this handle
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
SERVICE_ADAPTOR_ERROR_NONE Successful SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER Invalid parameter
int service_storage_file_destroy | ( | service_storage_file_h | file | ) |
Destroys the file handle.
- Deprecated:
- Deprecated since 3.0
This function must be used for cloned file handle.
- Since :
- 2.4
- Parameters:
-
[in] file The handle of file or directory in storage
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
SERVICE_ADAPTOR_ERROR_NONE Successful SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER Invalid parameter
int service_storage_file_get_logical_path | ( | service_storage_file_h | file, |
char ** | path | ||
) |
Gets logical path from file handle.
- Deprecated:
- Deprecated since 3.0
- Since :
- 2.4
- Parameters:
-
[in] file The handle of file or directory in storage [out] path The logical path of file
- Remarks:
- path must be released using free()
- Reference details for "Logical path" and "Physical path" at Overview page
- See also:
- service_storage_file_h
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
SERVICE_ADAPTOR_ERROR_NONE Successful SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER Invalid parameter SERVICE_ADAPTOR_ERROR_NO_DATA There is no data
int service_storage_file_get_physical_path | ( | service_storage_file_h | file, |
char ** | path | ||
) |
Gets physical path from file handle.
- Deprecated:
- Deprecated since 3.0
- Since :
- 2.4
- Parameters:
-
[in] file The handle of file or directory in storage [out] path The physical path of file
- Remarks:
- path must be released using free()
- Reference details for "Logical path" and "Physical path" at Overview page
- See also:
- service_storage_file_h
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
SERVICE_ADAPTOR_ERROR_NONE Successful SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER Invalid parameter SERVICE_ADAPTOR_ERROR_NO_DATA There is no data
int service_storage_file_get_size | ( | service_storage_file_h | file, |
unsigned long long * | size | ||
) |
Gets size of handle.
- Deprecated:
- Deprecated since 3.0
- Since :
- 2.4
- Parameters:
-
[in] file The handle of file or directory in storage [out] size The size of file (byte)
- See also:
- service_storage_file_h
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
SERVICE_ADAPTOR_ERROR_NONE Successful SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER Invalid parameter
int service_storage_file_is_dir | ( | service_storage_file_h | file, |
bool * | is_dir | ||
) |
Gets whether directory or file for file handle.
- Deprecated:
- Deprecated since 3.0
- Since :
- 2.4
- Parameters:
-
[in] file The handle of file or directory in storage [out] is_dir true on directory, false on file
- See also:
- service_storage_file_h
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
SERVICE_ADAPTOR_ERROR_NONE Successful SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER Invalid parameter
int service_storage_file_list_clone | ( | service_storage_file_list_h | src_list, |
service_storage_file_list_h * | dst_list | ||
) |
Clones the file list handle.
- Deprecated:
- Deprecated since 3.0
- Since :
- 2.4
- Parameters:
-
[in] src_list The source handle [out] dst_list The destination handle
- Remarks:
- file must be released memory using service_storage_file_list_destroy() when you no longer needs this handle
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
SERVICE_ADAPTOR_ERROR_NONE Successful SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER Invalid parameter
Destroys the file list handle.
- Deprecated:
- Deprecated since 3.0
- Since :
- 2.4
- Parameters:
-
[in] list The file list handle
- Remarks:
- It must be used for cloned file list handle
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
SERVICE_ADAPTOR_ERROR_NONE Successful SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER Invalid parameter
int service_storage_file_list_foreach_file | ( | service_storage_file_list_h | list, |
service_storage_file_cb | callback, | ||
void * | user_data | ||
) |
Foreach All of the file from file list.
- Deprecated:
- Deprecated since 3.0
- Since :
- 2.4
- Parameters:
-
[in] list The file list handle [in] callback The callback for foreach file [in] user_data Passed data to callback
- See also:
- service_storage_file_cb
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
SERVICE_ADAPTOR_ERROR_NONE Successful SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER Invalid parameter SERVICE_ADAPTOR_ERROR_NO_DATA There is no files
int service_storage_file_list_get_length | ( | service_storage_file_list_h | list, |
int * | length | ||
) |
Gets length of the file list handle.
- Deprecated:
- Deprecated since 3.0
- Since :
- 2.4
- Parameters:
-
[in] list The file list handle [out] length The length of the file list handle
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
SERVICE_ADAPTOR_ERROR_NONE Successful SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER Invalid parameter
int service_storage_get_file_list | ( | service_plugin_h | plugin, |
const char * | dir_path, | ||
service_storage_file_list_cb | callback, | ||
void * | user_data | ||
) |
Gets file list from storage, asynchronously.
- Deprecated:
- Deprecated since 3.0
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/internet
- Parameters:
-
[in] plugin The handle for use Plugin APIs [in] dir_path The dir path (Physical path) [in] callback The callback for getting file list [in] user_data The user data to be passed to the callback function
- Remarks:
- For the dir_path, "/" means root path.
- Reference details for "Logical path" and "Physical path" at Overview page
- See also:
- service_plugin_start()
- service_storage_file_list_cb()
- service_adaptor_get_last_result()
- service_adaptor_get_last_error_message()
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
SERVICE_ADAPTOR_ERROR_NONE Successful SERVICE_ADAPTOR_ERROR_PERMISSION_DENIED Permission denied SERVICE_ADAPTOR_ERROR_INVALID_STATE The handle's state is invalid SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER Invalid parameter SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE IPC failed with Service Adaptor Daemon SERVICE_ADAPTOR_ERROR_NOT_SUPPORTED Not supported API in this plugin SERVICE_ADAPTOR_ERROR_UNKNOWN Unknown error
- Precondition:
- API prerequires service_plugin_start()
- Postcondition:
- service_storage_file_list_cb() will be invoked
int service_storage_remove | ( | service_plugin_h | plugin, |
const char * | remove_path, | ||
service_storage_result_cb | callback, | ||
void * | user_data | ||
) |
Removes file or directory in storage.
- Deprecated:
- Deprecated since 3.0
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/internet
- Parameters:
-
[in] plugin The handle for use Plugin APIs [in] remove_path The target file or directory for remove (Physical path) [in] callback The callback for getting result this operation [in] user_data The user data to be passed to the callback function
- Remarks:
- If the function returns SERVICE_ADAPTOR_ERROR_PLUGIN_FAILED, error code and error message can be obtained using service_adaptor_get_last_result() and service_adaptor_get_last_error_message() method. Error codes and messages are described in Service Plugin.
- Reference details for "Logical path" and "Physical path" at Overview page
- See also:
- service_plugin_start()
- service_storage_result_cb()
- service_adaptor_get_last_result()
- service_adaptor_get_last_error_message()
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
SERVICE_ADAPTOR_ERROR_NONE Successful SERVICE_ADAPTOR_ERROR_PERMISSION_DENIED Permission denied SERVICE_ADAPTOR_ERROR_INVALID_STATE The handle's state is invalid SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER Invalid parameter SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE IPC failed with Service Adaptor Daemon SERVICE_ADAPTOR_ERROR_NOT_SUPPORTED Not supported API in this plugin SERVICE_ADAPTOR_ERROR_UNKNOWN Unknown error
- Precondition:
- API prerequires service_plugin_start()
- Postcondition:
- service_storage_result_cb() will be invoked
int service_storage_set_task_progress_cb | ( | service_storage_task_h | task, |
service_storage_task_progress_cb | callback, | ||
void * | user_data | ||
) |
Sets a callback function to be invoked when progress of the task running.
- Deprecated:
- Deprecated since 3.0
- Since :
- 2.4
- Parameters:
-
[in] task The handle of storage task [in] callback The callback function to register [in] user_data The user data to be passed to the callback function
- Remarks:
- This function must be called before starting task (see service_storage_start_task())
- If the function returns SERVICE_ADAPTOR_ERROR_PLUGIN_FAILED, error code and error message can be obtained using service_adaptor_get_last_result() and service_adaptor_get_last_error_message() method. Error codes and messages are described in Service Plugin.
- See also:
- service_storage_start_task()
- service_adaptor_get_last_result()
- service_adaptor_get_last_error_message()
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
SERVICE_ADAPTOR_ERROR_NONE Successful SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER Invalid parameter SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE IPC failed with Service Adaptor Daemon SERVICE_ADAPTOR_ERROR_PLUGIN_FAILED Failed in Plugin internal SERVICE_ADAPTOR_ERROR_UNKNOWN Unknown error
- Postcondition:
- service_storage_task_progress_cb() will be invoked
int service_storage_set_task_state_changed_cb | ( | service_storage_task_h | task, |
service_storage_task_state_cb | callback, | ||
void * | user_data | ||
) |
Sets a callback function to be invoked when change of the task running state.
- Deprecated:
- Deprecated since 3.0
- Since :
- 2.4
- Parameters:
-
[in] task The handle of storage task [in] callback The callback function to register [in] user_data The user data to be passed to the callback function
- Remarks:
- This function must be called before starting task (see service_storage_start_task())
- If the function returns SERVICE_ADAPTOR_ERROR_PLUGIN_FAILED, error code and error message can be obtained using service_adaptor_get_last_result() and service_adaptor_get_last_error_message() method. Error codes and messages are described in Service Plugin.
- See also:
- service_storage_start_task()
- service_adaptor_get_last_result()
- service_adaptor_get_last_error_message()
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
SERVICE_ADAPTOR_ERROR_NONE Successful SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER Invalid parameter SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE IPC failed with Service Adaptor Daemon SERVICE_ADAPTOR_ERROR_PLUGIN_FAILED Failed in Plugin internal SERVICE_ADAPTOR_ERROR_UNKNOWN Unknown error
- Postcondition:
- service_storage_task_state_cb() will be invoked
int service_storage_start_task | ( | service_storage_task_h | task | ) |
Starts storage task, asynchronously.
- Deprecated:
- Deprecated since 3.0
- Since :
- 2.4
- Parameters:
-
[in] task The handle of storage task
- Remarks:
- If the function returns SERVICE_ADAPTOR_ERROR_PLUGIN_FAILED, error code and error message can be obtained using service_adaptor_get_last_result() and service_adaptor_get_last_error_message() method. Error codes and messages are described in Service Plugin.
- See also:
- service_storage_create_upload_task()
- service_storage_create_download_task()
- service_storage_create_download_thumbnail_task()
- service_adaptor_get_last_result()
- service_adaptor_get_last_error_message()
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
SERVICE_ADAPTOR_ERROR_NONE Successful SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER Invalid parameter SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE IPC failed with Service Adaptor Daemon SERVICE_ADAPTOR_ERROR_PLUGIN_FAILED Failed in Plugin internal SERVICE_ADAPTOR_ERROR_UNKNOWN Unknown error
Unsets the progress callback function.
- Deprecated:
- Deprecated since 3.0
- Since :
- 2.4
- Parameters:
-
[in] task The handle of storage task
- Remarks:
- This function must be called before starting task (see service_storage_start_task())
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
SERVICE_ADAPTOR_ERROR_NONE Successful SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER Invalid parameter
Unsets the state changed callback function.
- Deprecated:
- Deprecated since 3.0
- Since :
- 2.4
- Parameters:
-
[in] task The handle of storage task
- Remarks:
- This function must be called before starting task (see service_storage_start_task())
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
SERVICE_ADAPTOR_ERROR_NONE Successful SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER Invalid parameter