tizen 2.3.1 release
[apps/home/b2-clocksetting.git] / include / setting-common-sound.h
1 /*
2  *  Copyright (c) 2014 Samsung Electronics Co., Ltd.
3  *
4  *  Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 /*#include <player_product.h> */
32
33
34 #define SETTING_DEFAULT_RINGTONE_PATH   "/opt/share/settings/Ringtones"
35 #define SETTING_DEFAULT_ALERT_PATH              "/opt/share/settings/Alerts"
36 #define SETTING_DEFAULT_PREVIEW_PATH    "/opt/share/settings/Previews"
37
38 #define DELIM           "/"
39
40 #define SETTING_DEFAULT_MSG_TONE                SETTING_DEFAULT_ALERT_PATH""DELIM"Flicker.ogg"
41 #define SETTING_DEFAULT_RING_TONE               SETTING_DEFAULT_RINGTONE_PATH""DELIM"Timeless.ogg"
42 #define SETTING_DEFAULT_MEDIA_TONE              SETTING_DEFAULT_PREVIEW_PATH""DELIM"Media_preview_Over_the_horizon_B2.ogg"
43 #define SETTING_DEFAULT_SILENT_OFF_TONE         SETTING_DEFAULT_PREVIEW_PATH""DELIM"Silent_mode_off.ogg"
44 #define SETTING_DEFAULT_SYS_TONE                SETTING_DEFAULT_PREVIEW_PATH""DELIM"B_Touch.ogg"
45
46 #define SETTING_RINGTONE_VOLUME_BACKUP  "db/setting/sound/call/rmd_ringtone_volume"
47
48 /* test code */
49 #define PREVIEW_TEMP_PATH       "/opt/usr/media/Sounds/Over the horizon.mp3"
50
51 enum {
52         SOUND_MODE_SOUND,
53         SOUND_MODE_VIBRATE,
54         SOUND_MODE_MUTE
55 };
56
57 enum {
58         SOUND_STATE_STOP,
59         SOUND_STATE_PLAY
60 };
61
62 int get_sound_mode();
63 int is_created_player();
64 void set_looping(int);
65
66 void play_sound(char *file_path, float volume, sound_type_e sound_type);
67 int profile_play_sound(void *data, void *cb, char *ringtone_file, float vol, sound_type_e sound_type, int prelistening_enable);
68 int _close_player(void *data, sound_type_e type);
69 int _profile_stop_sound(void *data);
70
71 #endif /* SETTING_COMMON_SOUND_H_ */