2 * Service Storage Internal
4 * Copyright (c) 2014 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
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
10 * http://www.apache.org/licenses/LICENSE-2.0
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.
20 #ifndef __SERVICE_STORAGE_INTERNAL_H__
21 #define __SERVICE_STORAGE_INTERNAL_H__
24 #define API __attribute__ ((visibility("default")))
34 #include "sal_service_adaptor.h"
35 #include "sal_service_storage.h"
37 typedef struct _service_storage_cloud_file_s
39 service_plugin_h plugin;
40 service_storage_cloud_file_cb callback;
47 unsigned long long size;
51 } service_storage_cloud_file_s;
53 /*==================================================================================================
55 ==================================================================================================*/
57 int service_storage_cloud_start(service_storage_cloud_file_h file);
58 int service_storage_cloud_stop(service_storage_cloud_file_h file);
60 /*==================================================================================================
61 2.4 FUNCTION PROTOTYPES
62 ==================================================================================================*/
65 * Storage adaptor content type
67 typedef enum _service_storage_file_content_type_e
69 SERVICE_ADAPTOR_STORAGE_CONTENT_TYPE_DEFAULT = -1, // initalize value
71 SERVICE_ADAPTOR_STORAGE_CONTENT_TYPE_IMGAE = 160,
72 SERVICE_ADAPTOR_STORAGE_CONTENT_TYPE_VIDEO = 161,
73 SERVICE_ADAPTOR_STORAGE_CONTENT_TYPE_SOUND = 162,
74 SERVICE_ADAPTOR_STORAGE_CONTENT_TYPE_MUSIC = 163,
75 SERVICE_ADAPTOR_STORAGE_CONTENT_TYPE_OTHER = 164,
76 SERVICE_ADAPTOR_STORAGE_CONTENT_TYPE_DOCUMENT = 165,
77 SERVICE_ADAPTOR_STORAGE_CONTENT_TYPE_THUMBNAIL = 166,
79 SERVICE_ADAPTOR_STORAGE_CONTENT_TYPE_CHUNK_MASK = 320,
80 SERVICE_ADAPTOR_STORAGE_CONTENT_TYPE_IMGAE_CHUNK = 480,
81 SERVICE_ADAPTOR_STORAGE_CONTENT_TYPE_VIDEO_CHUNK = 481,
82 SERVICE_ADAPTOR_STORAGE_CONTENT_TYPE_SOUND_CHUNK = 482,
83 SERVICE_ADAPTOR_STORAGE_CONTENT_TYPE_MUSIC_CHUNK = 483,
84 SERVICE_ADAPTOR_STORAGE_CONTENT_TYPE_OTHER_CHUNK = 484,
85 SERVICE_ADAPTOR_STORAGE_CONTENT_TYPE_DOCUMENT_CHUNK = 485,
86 SERVICE_ADAPTOR_STORAGE_CONTENT_TYPE_THUMBNAIL_CHUNK = 486,
88 SERVICE_ADAPTOR_STORAGE_CONTENT_TYPE_FOLDER = 1024,
89 SERVICE_ADAPTOR_STORAGE_CONTENT_TYPE_METADATA = 2048,
90 } service_storage_content_type_e;
92 typedef struct _service_storage_media_meta_s
111 char *extra_media_meta;
112 } service_storage_media_meta_s;
114 typedef struct _service_storage_cloud_meta_s
117 unsigned long long usage_byte;
118 unsigned long long quota_byte;
119 char *extra_cloud_meta;
120 } service_storage_cloud_meta_s;
123 * @brief Describes file information description
125 struct _service_storage_file_s
127 char *plugin_name; /**< specifies plugin name generated file_info */
128 char *object_id; /**< specifies file object id be used in storage */
129 char *storage_path; /**< specifies file path in storage */
130 unsigned long long file_size; /**< specifies file size (recomend byte)*/
131 unsigned long long created_time; /**< specifies timestamp */
132 unsigned long long modified_time; /**< specifies timestamp */
133 int file_info_index; /**< specifies file info index (wide use; e.g : chunk upload, multi download)*/
134 service_storage_content_type_e content_type; /**< specifies file content type (reference service_adaptor_file_content_type_e) */
136 service_storage_media_meta_s *media_meta;
137 service_storage_cloud_meta_s *cloud_meta;
138 char *extra_file_info; /**< specifies content name in metadata */
142 typedef struct _service_storage_file_s service_storage_file_s;
145 * @brief The handle for File Description
147 typedef struct _service_storage_file_s *service_storage_file_h;
153 #endif /* __SERVICE_STORAGE_INTERNAL_H__ */