summaryrefslogtreecommitdiff
path: root/lib/log/include/phone-log.h
blob: 690fe33063cbff1dd463793e117837616600bc41 (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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/*
* Copyright 2012 Samsung Electronics Co., Ltd
*
* Licensed under the Flora License, Version 1.1 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://floralicense.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 __PHONE_LOG_H__
#define __PHONE_LOG_H__

#include <unicode/udat.h>

#include "phone-common.h"

enum {
	LOG_VIEW_TYPE_NORMAL = 0,
	LOG_VIEW_TYPE_NORMAL_CHECK,
	LOG_VIEW_TYPE_UG_NUMBER_CHECK,
	LOG_VIEW_TYPE_UG_NUMBER_SELECT,
	LOG_VIEW_TYPE_UG_EMAIL_CHECK,
	LOG_VIEW_TYPE_UG_EMAIL_SELECT,
	LOG_VIEW_TYPE_UG_NUMBER_OR_EMAIL_CHECK,
	LOG_VIEW_TYPE_UG_NUMBER_OR_EMAIL_SELECT,
	LOG_VIEW_TYPE_UG_LAUNCH_CALL,
};

enum {
	VIEWBY_ALL_LOG = 0,
	VIEWBY_ALL_CALL,
	VIEWBY_MISSED_CALL,
	VIEWBY_DIALED_CALL,
	VIEWBY_RECEIVED_CALL,
	VIEWBY_REJECTED_CALL,
	VIEWBY_ALL_MESSAGE,
	VIEWBY_MAX,
};

enum{
	LOG_FORMAT_TIME_12 = 0,
	LOG_FORMAT_TIME_24,
	LOG_FORMAT_DATE,
	LOG_FORMAT_MAX,
};

typedef struct
{
	Evas_Object *win;
	Evas_Object *box;
	Evas_Object *navi;
	Evas_Object *layout;
	Evas_Object *cbar;
	Evas_Object *genlist;
	Evas_Object *popup;
	Evas_Object* radio_main;
	Evas_Object *content;
	Elm_Object_Item *navi_item;
	Evas_Object *ctrl_item;
	Eina_List *log_list;
	int view_type;
	int viewby_type;
	int log_list_count;
	int all_log_list_count;
	int pre_date_type;//for index
	int readed_n;
	int ug_request;
	Ecore_Idler *list_idler;
	Elm_Object_Item *git;
	Elm_Object_Item *item_last_sweep;
	Ecore_Timer *timer;
	void *ug;
	void *child_ug;
	UDateFormat *formatter[LOG_FORMAT_MAX];
	Ecore_Timer *update_timer;
	bool is_background;
	bool logdetail_update;

	/* edit mode */
	Evas_Object *select_all_layout;
	int cnt_checked;
	ph_progress_info *p_info;
}ph_log_data;

typedef struct
{
	int index;
	int state_index;
}viewby_list_item;


Evas_Object *phone_create_log_view(ph_view_info *view_info);
void phone_log_views_update(Evas_Object *navi);
void phone_log_missed_info_update(void *navi);
void phone_log_view_reset(Evas_Object *navi);
void phone_log_view_resume(Evas_Object *layout);
void phone_log_set_navi(Evas_Object *layout);
void phone_log_set_background(Evas_Object *obj, bool is_background);
void phone_log_check_mode_start(ph_log_data *log_d);
void phone_viewby_type_set(Evas_Object *layout, int log_type);
void phone_log_view_language_changed(Evas_Object *navi);

#endif //__PHONE_LOG_H__