1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
/*
* libmedia-service
*
* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
*
* Contact: Hyunjun Ko <zzoon.ko@samsung.com>, Haejeong Kim <backto.kim@samsung.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef _MEDIA_SVC_H_
#define _MEDIA_SVC_H_
#include "media-svc-types.h"
#include <media-util.h>
#include <time.h>
#include <stdbool.h>
#include <sqlite3.h>
#ifdef __cplusplus
extern "C" {
#endif
int media_svc_get_user_version(sqlite3 *handle, int *user_version);
int media_svc_create_table(uid_t uid);
int media_svc_check_item_exist_by_path(sqlite3 *handle, const char *storage_id, const char *path);
int media_svc_get_modified_time(sqlite3 *handle, const char *storage_id, const char *path, int *modified_time);
int media_svc_insert_folder(sqlite3 *handle, const char *storage_id, ms_user_storage_type_e storage_type, const char *path, uid_t uid);
int media_svc_insert_item_begin(int data_cnt, int with_noti, int from_pid);
int media_svc_insert_item_end(uid_t uid);
int media_svc_insert_item_bulk(sqlite3 *handle, const char *storage_id, ms_user_storage_type_e storage_type, const char *path, uid_t uid);
int media_svc_insert_item_immediately(sqlite3 *handle, const char *storage_id, ms_user_storage_type_e storage_type, const char *path, uid_t uid);
int media_svc_move_item(sqlite3 *handle,
const char *src_path,
const char *dest_path,
const char *media_id,
int media_type,
const char *mime_type,
uid_t uid);
int media_svc_set_item_validity_begin(int data_cnt);
int media_svc_set_item_validity_end(uid_t uid);
int media_svc_set_item_validity(const char *storage_id, const char *path, int validity, uid_t uid);
int media_svc_delete_item_by_path(sqlite3 *handle, bool is_direct, const char *storage_id, const char *path, uid_t uid);
int media_svc_refresh_item(sqlite3 *handle, const char *storage_id, ms_user_storage_type_e storage_type, const char *path, uid_t uid);
int media_svc_send_dir_update_noti(const char *dir_path, const char *folder_id, media_item_update_type_e update_type, int pid);
int media_svc_check_db_upgrade(sqlite3 *handle, int user_version, uid_t uid);
int media_svc_publish_noti(media_item_update_type_e update_type, const char *path, media_type_e media_type, const char *uuid, const char *mime_type);
int media_svc_get_pinyin(const char *src_str, char **pinyin_str);
int media_svc_check_pinyin_support(bool *support);
int media_svc_update_item_begin(int data_cnt);
int media_svc_update_item_end(uid_t uid);
int media_svc_update_item_meta(const char *file_path, const char *storage_id, int storage_type, uid_t uid);
int media_svc_generate_uuid(char **uuid);
int media_svc_check_storage(sqlite3 *handle, const char *storage_id, char **storage_path, int *validity, uid_t uid);
int media_svc_insert_storage(sqlite3 *handle, const char *storage_id, const char *storage_path, ms_user_storage_type_e storage_type, uid_t uid);
int media_svc_update_storage(sqlite3 *handle, const char *storage_id, const char *storage_path, uid_t uid);
int media_svc_set_storage_validity(sqlite3 *handle, const char *storage_id, int validity, uid_t uid);
int media_svc_get_storage_id(sqlite3 *handle, const char *path, char *storage_id, uid_t uid);
int media_svc_set_folder_validity(sqlite3 *handle, const char *storage_id, const char *start_path, int validity, bool is_recursive, uid_t uid);
int media_svc_insert_folder_begin(int data_cnt);
int media_svc_insert_folder_end(uid_t uid);
int media_svc_check_folder_exist_by_path(sqlite3 *handle, const char *storage_id, const char *folder_path);
int media_svc_append_query(const char *query, uid_t uid);
int media_svc_send_query(uid_t uid);
int media_svc_get_media_type(const char *path, int *mediatype);
int media_svc_create_thumbnail(const char *storage_id, const char *file_path, int media_type, uid_t uid, char **thumbnail_path);
#ifdef __cplusplus
}
#endif
#endif /*_MEDIA_SVC_H_*/
|