mediadata: add function to create list with media modified time
[profile/tv/apps/native/air_mediahub.git] / include / data / mediadata.h
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
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 _AIR_MEDIAHUB_MEDIADATA_H__
18 #define _AIR_MEDIAHUB_MEDIADATA_H__
19
20 #include <stdbool.h>
21
22 struct mediadata;
23
24 enum source_type {
25         E_SOURCE_INTERNAL = 0,
26         E_SOURCE_EXTERNAL,
27         E_SOURCE_ALL,
28         E_SOURCE_MAX
29 };
30
31 enum sort_type {
32         E_SORT_DATE = 0,
33         E_SORT_NAME,
34         E_SORT_MAX
35 };
36
37 enum list_type {
38         E_LIST_NAME = 0,
39         E_LIST_DATE,
40         E_LIST_MAX
41 };
42
43 struct group_info {
44         char *name;
45         Eina_List *list;
46 };
47
48 struct mediadata *mediadata_create(const char *media_type,
49                         int source_type, int sort_type);
50 void mediadata_destroy(struct mediadata *md);
51
52 Eina_List *mediadata_get_list(struct mediadata *md, int list_type);
53 void mediadata_free_list(Eina_List *list);
54
55 #endif /* _AIR_MEDIAHUB_MEDIADATA_H__ */