summaryrefslogtreecommitdiff
path: root/main/src/data/ivug-data.h
blob: 2dd9965259062233293e8984e60019cb9d90ffa6 (plain)
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
/*
 * Copyright 2012  Samsung Electronics Co., Ltd
 *
 * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
 *
 * 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 __IVUG_DATA_H__
#define __IVUG_DATA_H__

#include "ivug-common.h"
#include "ivug-parameter.h"
#include "ivug-mediadata.h"


typedef enum {
	IVUG_SLIDER_LOADED_NONE = 0x00, /* default value */
	IVUG_SLIDER_LOADED_LEFT,
	IVUG_SLIDER_LOADED_RIGHT,
	IVUG_SLIDER_LOADED_STATUS_MAX,
} Load_State;


/* Opaque pointer for media list. */
typedef void *Media_List;
typedef Eina_List Media_Item;		// Same as Eina_List

#undef TRACE_CALLER

bool
ivug_data_set_window_size(Media_List *mList, int size);

Load_State
ivug_data_set_window_loading(Media_List *mList, int cur_index, int total_count);

void ivug_data_reset_window_load_count(Media_List *mList);

Media_List * ivug_data_init_media_list(const ivug_parameter *param);

Media_Item *
ivug_data_create_media_list_from_param(Media_List *mList, Eina_List **list, const char *filepath, int *start_index, int *total_count);

void
ivug_data_delete_media_list(Media_List *mList);

void
ivug_data_delete_all_window_list(Media_List *mList);

Media_Item *
ivug_data_get_first(Media_List *mList);

Media_Item *
ivug_data_get_prev(Media_Item *media_item);

Media_Item *
ivug_data_get_next(Media_Item *media_item);

#ifdef TRACE_CALLER
#define ivug_data_get_data(media_item) dbg_ivug_data_get_data(media_item , __func__, __LINE__)

Media_Data *
dbg_ivug_data_get_data(Media_Item *media_item, const char *func, unsigned int line);
#else
Media_Data *
ivug_data_get_data(Media_Item *media_item);
#endif

void ivug_data_append_media_item(Media_List *mList, Eina_List* list);

bool ivug_data_delete_media_item(Media_List *mList, Media_Item *media_item);

Media_Item * ivug_data_find_item(Eina_List *list, const char* fileuri, int /*OUT*/ *index);

#endif //__IVUG_DATA_H__