Tizen Native API  3.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

In this APIs, there are needed two kind of path types. One is "Logical path" and the other is "Physical path".

First, "Logical path" type means path of "root file system".
It starts from root path(= '/') and you can use this path like linux.
For example, "/folder1/image1.jpg"

Second, "Physical path" type means specfic uri that be used for cloud server.
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]fileThe handle of file
[in]user_dataPassed 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, otherwise false 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
See also:
service_storage_file_clone()
service_storage_file_destroy()
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]resultResult code for service_storage_get_file_list() (see service_adaptor_error_e)
[in]listThe handle of file list
[in]user_dataPassed 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
See also:
service_adaptor_error_e
service_storage_file_list_h
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
See also:
service_storage_file_list_clone()
service_storage_file_list_destroy()
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]resultResult code for storage async operation (see service_adaptor_error_e)
[in]user_dataPassed 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
See also:
service_adaptor_error_e
service_storage_remove()
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
See also:
service_storage_create_download_task()
service_storage_create_upload_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.

Deprecated:
Deprecated since 3.0
Parameters:
[in]progressThe progressed amount of storage task
[in]totalThe total amount of storage task
[in]user_dataThe user data passed from service_storage_set_task_progress_cb()
Returns:
void
See also:
service_storage_unset_task_progress_cb()
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]stateThe state of storage task
[in]user_dataThe user data passed from service_storage_set_task_state_changed_cb()
Returns:
void
See also:
service_storage_unset_task_state_changed_cb()
Precondition:
service_storage_set_task_state_changed_cb() will invoke this callback.

Enumeration Type Documentation

Type of storage task.

Deprecated:
Deprecated since 3.0
Enumerator:
SERVICE_STORAGE_TASK_IN_PROGRESS 

The task is progressing

SERVICE_STORAGE_TASK_COMPLETED 

The task was completed

SERVICE_STORAGE_TASK_CANCELED 

The task was canceled

SERVICE_STORAGE_TASK_FAILED 

The task was failed


Function Documentation

Cancels storage task, asynchronously.

Deprecated:
Deprecated since 3.0
Since :
2.4
Parameters:
[in]taskThe 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_NONESuccessful
SERVICE_ADAPTOR_ERROR_INVALID_PARAMETERInvalid parameter
SERVICE_ADAPTOR_ERROR_IPC_UNSTABLEIPC failed with Service Adaptor Daemon
SERVICE_ADAPTOR_ERROR_PLUGIN_FAILEDFailed in Plugin internal
SERVICE_ADAPTOR_ERROR_UNKNOWNUnknown 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]pluginThe handle for use Plugin APIs
[in]storage_pathThe source file path in storage (Physical path)
[in]download_pathThe download path in local (Logical path)
[out]taskThe 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_NONESuccessful
SERVICE_ADAPTOR_ERROR_PERMISSION_DENIEDPermission denied
SERVICE_ADAPTOR_ERROR_INVALID_STATEThe handle's state is invalid
SERVICE_ADAPTOR_ERROR_INVALID_PARAMETERInvalid parameter
SERVICE_ADAPTOR_ERROR_NO_DATAThere is no files
SERVICE_ADAPTOR_ERROR_TIMED_OUTTimed out
SERVICE_ADAPTOR_ERROR_IPC_UNSTABLEIPC failed with Service Adaptor Daemon
SERVICE_ADAPTOR_ERROR_NOT_SUPPORTEDNot supported API in this plugin
SERVICE_ADAPTOR_ERROR_PLUGIN_FAILEDFailed in Plugin internal
SERVICE_ADAPTOR_ERROR_UNKNOWNUnknown 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]pluginThe handle for use Plugin APIs
[in]storage_pathThe source file path in storage (Physical path)
[in]download_pathThe download path in local (Logical path)
[in]thumbnail_sizeThe size level of thumbnail, the level is defined service plugin SPEC
[out]taskThe 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_NONESuccessful
SERVICE_ADAPTOR_ERROR_PERMISSION_DENIEDPermission denied
SERVICE_ADAPTOR_ERROR_INVALID_STATEThe handle's state is invalid
SERVICE_ADAPTOR_ERROR_INVALID_PARAMETERInvalid parameter
SERVICE_ADAPTOR_ERROR_NO_DATAThere is no thumbnail data
SERVICE_ADAPTOR_ERROR_TIMED_OUTTimed out
SERVICE_ADAPTOR_ERROR_IPC_UNSTABLEIPC failed with Service Adaptor Daemon
SERVICE_ADAPTOR_ERROR_NOT_SUPPORTEDNot supported API in this plugin
SERVICE_ADAPTOR_ERROR_PLUGIN_FAILEDFailed in Plugin internal
SERVICE_ADAPTOR_ERROR_UNKNOWNUnknown 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]pluginThe handle for use Plugin APIs
[in]file_pathThe upload file path in local (Logical path)
[in]upload_pathThe upload target path in storage (Physical path)
[out]taskThe 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_NONESuccessful
SERVICE_ADAPTOR_ERROR_PERMISSION_DENIEDPermission denied
SERVICE_ADAPTOR_ERROR_INVALID_STATEThe handle's state is invalid
SERVICE_ADAPTOR_ERROR_INVALID_PARAMETERInvalid parameter
SERVICE_ADAPTOR_ERROR_NO_DATAThere is no files
SERVICE_ADAPTOR_ERROR_TIMED_OUTTimed out
SERVICE_ADAPTOR_ERROR_IPC_UNSTABLEIPC failed with Service Adaptor Daemon
SERVICE_ADAPTOR_ERROR_NOT_SUPPORTEDNot supported API in this plugin
SERVICE_ADAPTOR_ERROR_PLUGIN_FAILEDFailed in Plugin internal
SERVICE_ADAPTOR_ERROR_UNKNOWNUnknown error
Precondition:
API prerequires service_plugin_start()

Destroys storage task.

Deprecated:
Deprecated since 3.0
Since :
2.4
Parameters:
[in]taskThe 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_NONESuccessful
SERVICE_ADAPTOR_ERROR_INVALID_PARAMETERInvalid parameter
SERVICE_ADAPTOR_ERROR_IPC_UNSTABLEIPC failed with Service Adaptor Daemon
SERVICE_ADAPTOR_ERROR_PLUGIN_FAILEDFailed in Plugin internal
SERVICE_ADAPTOR_ERROR_UNKNOWNUnknown error

Clones the file handle.

Deprecated:
Deprecated since 3.0
Since :
2.4
Parameters:
[in]src_fileThe source handle
[out]dst_fileThe destination handle
Remarks:
file must be released memory using service_storage_file_destroy() when you no longer needs this handle
See also:
service_storage_file_h
service_storage_file_destroy()
Returns:
0 on success, otherwise a negative error value
Return values:
SERVICE_ADAPTOR_ERROR_NONESuccessful
SERVICE_ADAPTOR_ERROR_INVALID_PARAMETERInvalid parameter

Destroys the file handle.

Deprecated:
Deprecated since 3.0

This function must be used for cloned file handle.

Since :
2.4
Parameters:
[in]fileThe handle of file or directory in storage
See also:
service_storage_file_h
service_storage_file_clone()
Returns:
0 on success, otherwise a negative error value
Return values:
SERVICE_ADAPTOR_ERROR_NONESuccessful
SERVICE_ADAPTOR_ERROR_INVALID_PARAMETERInvalid parameter

Gets logical path from file handle.

Deprecated:
Deprecated since 3.0
Since :
2.4
Parameters:
[in]fileThe handle of file or directory in storage
[out]pathThe 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_NONESuccessful
SERVICE_ADAPTOR_ERROR_INVALID_PARAMETERInvalid parameter
SERVICE_ADAPTOR_ERROR_NO_DATAThere is no data

Gets physical path from file handle.

Deprecated:
Deprecated since 3.0
Since :
2.4
Parameters:
[in]fileThe handle of file or directory in storage
[out]pathThe 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_NONESuccessful
SERVICE_ADAPTOR_ERROR_INVALID_PARAMETERInvalid parameter
SERVICE_ADAPTOR_ERROR_NO_DATAThere 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]fileThe handle of file or directory in storage
[out]sizeThe size of file (byte)
See also:
service_storage_file_h
Returns:
0 on success, otherwise a negative error value
Return values:
SERVICE_ADAPTOR_ERROR_NONESuccessful
SERVICE_ADAPTOR_ERROR_INVALID_PARAMETERInvalid 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]fileThe handle of file or directory in storage
[out]is_dirtrue 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_NONESuccessful
SERVICE_ADAPTOR_ERROR_INVALID_PARAMETERInvalid parameter

Clones the file list handle.

Deprecated:
Deprecated since 3.0
Since :
2.4
Parameters:
[in]src_listThe source handle
[out]dst_listThe destination handle
Remarks:
file must be released memory using service_storage_file_list_destroy() when you no longer needs this handle
See also:
service_storage_file_list_h
service_storage_file_list_destroy()
Returns:
0 on success, otherwise a negative error value
Return values:
SERVICE_ADAPTOR_ERROR_NONESuccessful
SERVICE_ADAPTOR_ERROR_INVALID_PARAMETERInvalid parameter

Destroys the file list handle.

Deprecated:
Deprecated since 3.0
Since :
2.4
Parameters:
[in]listThe file list handle
Remarks:
It must be used for cloned file list handle
See also:
service_storage_file_list_h
service_storage_file_list_clone()
Returns:
0 on success, otherwise a negative error value
Return values:
SERVICE_ADAPTOR_ERROR_NONESuccessful
SERVICE_ADAPTOR_ERROR_INVALID_PARAMETERInvalid parameter

Foreach All of the file from file list.

Deprecated:
Deprecated since 3.0
Since :
2.4
Parameters:
[in]listThe file list handle
[in]callbackThe callback for foreach file
[in]user_dataPassed data to callback
See also:
service_storage_file_cb
Returns:
0 on success, otherwise a negative error value
Return values:
SERVICE_ADAPTOR_ERROR_NONESuccessful
SERVICE_ADAPTOR_ERROR_INVALID_PARAMETERInvalid parameter
SERVICE_ADAPTOR_ERROR_NO_DATAThere is no files

Gets length of the file list handle.

Deprecated:
Deprecated since 3.0
Since :
2.4
Parameters:
[in]listThe file list handle
[out]lengthThe length of the file list handle
Returns:
0 on success, otherwise a negative error value
Return values:
SERVICE_ADAPTOR_ERROR_NONESuccessful
SERVICE_ADAPTOR_ERROR_INVALID_PARAMETERInvalid 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]pluginThe handle for use Plugin APIs
[in]dir_pathThe dir path (Physical path)
[in]callbackThe callback for getting file list
[in]user_dataThe 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_NONESuccessful
SERVICE_ADAPTOR_ERROR_PERMISSION_DENIEDPermission denied
SERVICE_ADAPTOR_ERROR_INVALID_STATEThe handle's state is invalid
SERVICE_ADAPTOR_ERROR_INVALID_PARAMETERInvalid parameter
SERVICE_ADAPTOR_ERROR_IPC_UNSTABLEIPC failed with Service Adaptor Daemon
SERVICE_ADAPTOR_ERROR_NOT_SUPPORTEDNot supported API in this plugin
SERVICE_ADAPTOR_ERROR_UNKNOWNUnknown 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]pluginThe handle for use Plugin APIs
[in]remove_pathThe target file or directory for remove (Physical path)
[in]callbackThe callback for getting result this operation
[in]user_dataThe 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_NONESuccessful
SERVICE_ADAPTOR_ERROR_PERMISSION_DENIEDPermission denied
SERVICE_ADAPTOR_ERROR_INVALID_STATEThe handle's state is invalid
SERVICE_ADAPTOR_ERROR_INVALID_PARAMETERInvalid parameter
SERVICE_ADAPTOR_ERROR_IPC_UNSTABLEIPC failed with Service Adaptor Daemon
SERVICE_ADAPTOR_ERROR_NOT_SUPPORTEDNot supported API in this plugin
SERVICE_ADAPTOR_ERROR_UNKNOWNUnknown error
Precondition:
API prerequires service_plugin_start()
Postcondition:
service_storage_result_cb() will be invoked

Sets a callback function to be invoked when progress of the task running.

Deprecated:
Deprecated since 3.0
Since :
2.4
Parameters:
[in]taskThe handle of storage task
[in]callbackThe callback function to register
[in]user_dataThe 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_NONESuccessful
SERVICE_ADAPTOR_ERROR_INVALID_PARAMETERInvalid parameter
SERVICE_ADAPTOR_ERROR_IPC_UNSTABLEIPC failed with Service Adaptor Daemon
SERVICE_ADAPTOR_ERROR_PLUGIN_FAILEDFailed in Plugin internal
SERVICE_ADAPTOR_ERROR_UNKNOWNUnknown error
Postcondition:
service_storage_task_progress_cb() will be invoked

Sets a callback function to be invoked when change of the task running state.

Deprecated:
Deprecated since 3.0
Since :
2.4
Parameters:
[in]taskThe handle of storage task
[in]callbackThe callback function to register
[in]user_dataThe 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_NONESuccessful
SERVICE_ADAPTOR_ERROR_INVALID_PARAMETERInvalid parameter
SERVICE_ADAPTOR_ERROR_IPC_UNSTABLEIPC failed with Service Adaptor Daemon
SERVICE_ADAPTOR_ERROR_PLUGIN_FAILEDFailed in Plugin internal
SERVICE_ADAPTOR_ERROR_UNKNOWNUnknown error
Postcondition:
service_storage_task_state_cb() will be invoked

Starts storage task, asynchronously.

Deprecated:
Deprecated since 3.0
Since :
2.4
Parameters:
[in]taskThe 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_NONESuccessful
SERVICE_ADAPTOR_ERROR_INVALID_PARAMETERInvalid parameter
SERVICE_ADAPTOR_ERROR_IPC_UNSTABLEIPC failed with Service Adaptor Daemon
SERVICE_ADAPTOR_ERROR_PLUGIN_FAILEDFailed in Plugin internal
SERVICE_ADAPTOR_ERROR_UNKNOWNUnknown error

Unsets the progress callback function.

Deprecated:
Deprecated since 3.0
Since :
2.4
Parameters:
[in]taskThe handle of storage task
Remarks:
This function must be called before starting task (see service_storage_start_task())
See also:
service_storage_start_task()
service_storage_set_task_progress_cb()
Returns:
0 on success, otherwise a negative error value
Return values:
SERVICE_ADAPTOR_ERROR_NONESuccessful
SERVICE_ADAPTOR_ERROR_INVALID_PARAMETERInvalid parameter

Unsets the state changed callback function.

Deprecated:
Deprecated since 3.0
Since :
2.4
Parameters:
[in]taskThe handle of storage task
Remarks:
This function must be called before starting task (see service_storage_start_task())
See also:
service_storage_start_task()
service_storage_set_task_progress_cb()
Returns:
0 on success, otherwise a negative error value
Return values:
SERVICE_ADAPTOR_ERROR_NONESuccessful
SERVICE_ADAPTOR_ERROR_INVALID_PARAMETERInvalid parameter