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
112
113
|
/*
* Copyright (c) 2016 Samsung Electronics Co., Ltd.
*
* 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 __main_H__
#define __main_H__
#include <stdlib.h>
#include <app.h>
#include <Elementary.h>
#include <system_settings.h>
#include <efl_extension.h>
#include <device/haptic.h>
#include <dlog.h>
#include <glib.h>
#include <libintl.h>
#include <d2d_conv_manager.h>
#include <d2d_conv_internal.h>
#ifdef LOG_TAG
#undef LOG_TAG
#endif
#define LOG_TAG "D2D-CONV-SETTING"
#ifdef PACKAGE
#undef PACKAGE
#endif
#define PACKAGE "org.tizen.d2d-conv-setting"
#ifdef ICON_DIR
#undef ICON_DIR
#endif
#define ICON_DIR "/usr/apps/org.tizen.d2d-conv-setting/res/images"
typedef enum state {
POWER_OFF = 0,
POWER_ON,
DISCOVERY_START,
DISCOVERY_STOP,
CHANGE_LANGUAGE
} state_e;
typedef struct device_info {
int index;
char *list_type;
char *name;
char *type;
char *mac_address;
} device_info_s;
typedef struct appdata {
Evas_Object *win;
Evas_Object *conform;
Evas_Object *nf;
Eext_Circle_Surface *circle_surface;
} appdata_s;
appdata_s *ad;
#define STORAGE_SIZE 30
#define LIST_TYPE_PERMITTED "permitted_list"
#define LIST_TYPE_DENIED "denied_list"
#define LIST_TYPE_DISCOVERED "discovered_list"
#define DEVICE_TYPE_MOBILE "MOBILE"
#define DEVICE_TYPE_WEARABLE "WEARABLE"
#define DEVICE_TYPE_TV "TV"
#define TITLE_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_W_TITLE_TEXT")
#define ACCESS_CONTROL_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_W_ACCESS_CONTROL_TEXT")
#define NOTICE_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_W_NOTICE_TEXT")
#define POWER_ON_NOTICE_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_W_POWER_ON_NOTICE_TEXT")
#define POWER_OFF_NOTICE_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_W_POWER_OFF_NOTICE_TEXT")
#define TURN_ON_THE_POWER_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_W_TURN_ON_THE_POWER_TEXT")
#define ALLOWED_DEVICE_LIST_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_W_ALLOWED_DEVICE_LIST_TEXT")
#define DENIED_DEVICE_LIST_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_W_DENIED_DEVICE_LIST_TEXT")
#define AVAILABLE_DEVICE_LIST_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_W_AVAILABLE_DEVICE_LIST_TEXT")
#define ALLOW_SELECT_POPUP_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_W_ALLOW_SELECT_POPUP_TEXT")
#define DENY_SELECT_POPUP_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_W_DENY_SELECT_POPUP_TEXT")
#define REMOVE_SELECT_POPUP_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_W_REMOVE_SELECT_POPUP_TEXT")
#define ALLOW_BUTTON_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_W_ALLOW_BUTTON_TEXT")
#define DENY_BUTTON_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_W_DENY_BUTTON_TEXT")
#define REMOVE_BUTTON_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_W_REMOVE_BUTTON_TEXT")
/* setting ui */
extern void show_setting_menu();
extern void show_setting_item_sign();
extern void show_setting_item_device_list();
extern void show_setting_item_allowed_device_list();
extern void show_setting_item_denied_device_list();
extern void show_setting_item_discovery();
extern int get_convergence_power_state();
/* util */
extern void do_haptic(int count);
#endif /* __main_H__ */
|