apply FSL(Flora Software License)
[apps/home/gallery.git] / libug / libug-gallery-efl / include / ge-db-handler.h
1 /*
2   * Copyright 2012  Samsung Electronics Co., Ltd
3   *
4   * Licensed under the Flora License, Version 1.0 (the "License");
5   * you may not use this file except in compliance with the License.
6   * You may obtain a copy of the License at
7   *
8   *     http://www.tizenopensource.org/license
9   *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16
17 #ifndef _GE_DB_HANDLER_H_
18 #define _GE_DB_HANDLER_H_
19
20 #include "gallery-efl.h"
21
22 #ifdef _cplusplus
23 extern "C" {
24 #endif
25
26
27 enum {
28         GE_DB_SUCCESS,
29         GE_DB_FAIL,
30         GE_PROTECTED_FILE
31 };
32
33
34 int ge_db_update_items_cnt(ge_ugdata* ugd, ge_cluster *album);
35 int ge_db_get_clusters_list(ge_ugdata* ugd);
36 int ge_db_clear_items_list(void);
37 int ge_db_get_items_list(ge_ugdata* ugd, ge_cluster *album, int start_pos, int end_pos);
38 int ge_db_update_items_list(ge_ugdata* ugd, ge_cluster *album);
39 int ge_db_get_count_all(void);
40 int ge_db_get_first_several_items(ge_ugdata* ugd, ge_cluster *album,
41                                   ge_item* items[], int *item_count,
42                                   minfo_media_sort_type sort_type);
43 int ge_db_destroy_mtype_item(void* item);
44 int ge_db_destroy_item(ge_item* gitem);
45 int ge_db_get_item_by_index(ge_item** gitem, int idx);
46 int  ge_db_init(ge_ugdata* ugd);
47 int ge_db_finalize(ge_ugdata* ugd);
48 bool ge_db_is_default_album(ge_ugdata* ugd, Mcluster* mcluster);
49 Mcluster* ge_db_new_mcluster(ge_ugdata* ugd, const char *cluster_id);
50 Mitem* ge_db_new_mitem(ge_ugdata* ugd, const char *item_id);
51 bool ge_db_is_root_path(ge_ugdata* ugd, const char *cluster_id, const char *path);
52 int ge_db_del_media_id(ge_ugdata* ugd, const char *media_id);
53 int ge_db_get_folder_fullpath(ge_ugdata* ugd, const char *id, char *path);
54 int ge_db_item_list_remove(ge_item* gitem);
55 int ge_db_selected_list_count(void);
56 Eina_List* ge_db_selected_list_get(void);
57 int ge_db_selected_list_append(ge_item* gitem);
58 int ge_db_selected_list_remove(ge_item* gitem);
59 int ge_db_selected_list_finalize(void);
60 int ge_db_get_selected_item_by_index(ge_item** gitem, int idx);
61
62 #ifdef _cplusplus
63 }
64 #endif
65 #endif /* _GE_DB_HANDLER_H_ */
66