Initialize Tizen 2.3
[apps/home/b2-clocksetting.git] / include / setting-common-sound.h
1 /*
2  * Copyright (c) 2000 - 2013 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 /*
18  * setting-common-sound.h
19  *
20  *  Created on: Oct 16, 2013
21  *      Author: min-hoyun
22  */
23
24 #ifndef SETTING_COMMON_SOUND_H_
25 #define SETTING_COMMON_SOUND_H_
26
27 #include <player.h>
28 #include <sound_manager.h>
29 #include <mm_sound_private.h>
30 #include <wav_player.h>
31
32
33 #define SETTING_DEFAULT_RINGTONE_PATH   "/opt/share/settings/Ringtones"
34 #define SETTING_DEFAULT_ALERT_PATH              "/opt/share/settings/Alerts"
35 #define SETTING_DEFAULT_PREVIEW_PATH    "/opt/share/settings/Previews"
36
37 #define DELIM           "/"
38
39 #define SETTING_DEFAULT_MSG_TONE                SETTING_DEFAULT_ALERT_PATH""DELIM"Flicker.ogg"
40 #define SETTING_DEFAULT_RING_TONE               SETTING_DEFAULT_RINGTONE_PATH""DELIM"Timeless.ogg"
41 #define SETTING_DEFAULT_MEDIA_TONE              SETTING_DEFAULT_PREVIEW_PATH""DELIM"Media_preview_Over_the_horizon_B2.ogg"
42 #define SETTING_DEFAULT_SILENT_OFF_TONE         SETTING_DEFAULT_PREVIEW_PATH""DELIM"Silent_mode_off.ogg"
43 #define SETTING_DEFAULT_SYS_TONE                SETTING_DEFAULT_PREVIEW_PATH""DELIM"B_Touch.ogg"
44
45 #define SETTING_RINGTONE_VOLUME_BACKUP  "db/setting/sound/call/rmd_ringtone_volume"
46
47 /* test code */
48 #define PREVIEW_TEMP_PATH       "/opt/usr/media/Sounds/Over the horizon.mp3"
49
50 enum {
51         SOUND_MODE_SOUND,
52         SOUND_MODE_VIBRATE,
53         SOUND_MODE_MUTE
54 };
55
56 enum {
57         SOUND_STATE_STOP,
58         SOUND_STATE_PLAY
59 };
60
61 int get_sound_mode();
62 int is_created_player();
63 void set_looping(int);
64
65 void play_sound(char * file_path, float volume, sound_type_e sound_type);
66 int profile_play_sound(void *data, void *cb, char *ringtone_file, float vol, sound_type_e sound_type, int prelistening_enable);
67 int _close_player(void *data, sound_type_e type);
68 int _profile_stop_sound(void *data);
69
70 #endif /* SETTING_COMMON_SOUND_H_ */