Add 3.0 APIs and sync APIs same as 2.4
[platform/core/convergence/service-adaptor.git] / client / sal_storage_provider.h
1 /*
2  * Storage Plugin Client
3  *
4  * Copyright (c) 2014 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  */
19
20 #ifndef __STORAGE_PLUGIN_CLIENT_H__
21 #define __STORAGE_PLUGIN_CLIENT_H__
22
23 #ifndef API
24 #define API __attribute__ ((visibility("default")))
25 #endif
26
27 #ifdef __cplusplus
28 extern "C"
29 {
30 #endif
31
32 #include <app.h>
33
34 #include "service_adaptor_errors.h"
35
36 #define CLOUD_LOCAL_PATH_KEY    "local_path"
37 #define CLOUD_CLOUD_PATH_KEY    "cloud_path"
38
39 /**
40  * @brief Describes infromation about Cloud Service
41  * @key name, ...
42  */
43 #define CLOUD_REMOVE_FILE_URI   "http://tizen.org/service-adaptor/storage/cloud/remove_file"
44 #define CLOUD_DOWNLOAD_FILE_URI "http://tizen.org/service-adaptor/storage/cloud/download_file"
45 #define CLOUD_UPLOAD_FILE_URI   "http://tizen.org/service-adaptor/storage/cloud/upload_file"
46 #define CLOUD_DOWNLOAD_FILE_THUMBNAIL_URI       "http://tizen.org/service-adaptor/storage/cloud/download_file_thumbnail"
47 #define CLOUD_GET_FILE_LIST_URI "http://tizen.org/service-adaptor/storage/cloud/get_file_list"
48
49 /**
50  * @brief Describes infromation about Storage Plugin Handle
51  */
52 typedef struct _storage_provider_s
53 {
54         // Cloud
55         service_adaptor_error_e (*cloud_remove_file)(const char *cloud_path);
56
57         // Posix
58 } storage_provider_s;
59 typedef struct _storage_provider_s *storage_provider_h;
60
61 int storage_provider_create(storage_provider_h *provider);
62 app_control_h storage_provider_message(storage_provider_h provider, const char *operation, void *user_data);
63 int storage_provider_add_extra_data(storage_provider_h provider, app_control_h reply);
64
65 #ifdef __cplusplus
66 }
67 #endif
68
69 #endif /* __STORAGE_PLUGIN_CLIENT_H__ */