Fix coverity issue 1149129
[apps/native/volume-app.git] / inc / control.h
1 /*
2  * Copyright (c) 2009-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 __VOLUME_CONTROL_H__
18 #define __VOLUME_CONTROL_H__
19
20 enum {
21         IDLELOCK_ERROR = -1,
22         IDLELOCK_OFF = 0,
23         IDLELOCK_ON = 1,
24         IDLELOCK_MAX,
25 };
26
27 /* _check_status() return value */
28 enum {
29         LOCK_AND_NOT_MEDIA = -0x1,
30         UNLOCK_STATUS,
31         LOCK_AND_MEDIA,
32 };
33
34 extern int volume_control_get_viewport_height();
35 extern int volume_control_get_viewport_width();
36 extern void volume_control_show_hide_worning();
37 extern Eina_Bool volume_control_viewport_is_warning_visible();
38 extern void volume_control_set_safety_limit(Eina_Bool limit);
39 extern Eina_Bool volume_control_get_safety_limit();
40 extern Eina_Bool volume_control_get_time_for_safety_limit();
41 extern void volume_control_set_time_for_safety_limit();
42
43 extern Eina_Bool volume_control_get_is_deleting(void);
44 extern Eina_Bool volume_control_get_is_launching(void);
45 extern int volume_control_get_current_angle(void);
46 extern sound_type_e volume_control_get_sound_type_at_show(void);
47
48 extern volume_error_e volume_control_cache_flush(void);
49
50 extern volume_error_e volume_control_app_launch_with_bundle(const char *op_type, const char *operation, const char *pkgname);
51 extern int volume_control_get_vconf_idlelock(void);
52
53 extern int volume_control_check_status(int *lock, sound_type_e *sound_type);
54
55 extern Eina_Bool volume_control_show_view(int status, sound_type_e sound_type, int sound, bool bt_opened, int earphone_connected);
56 extern int volume_control_hide_view(void);
57 extern volume_error_e volume_control_close_bt_display();
58
59 extern void volume_control_register_vconfkey(void);
60 extern void volume_control_unregister_vconfkey(void);
61
62 extern volume_error_e volume_control_pause(void);
63 extern volume_error_e volume_control_reset(bundle *b);
64 extern volume_error_e volume_control_initialize(void);
65 extern void volume_control_deinitialize(void);
66
67 #endif /* __VOLUME_CONTROL_H__ */