tizen 2.3 release
[apps/home/b2-clocksetting.git] / include / setting-common-sound.h
1 /*
2  * Copyright (c) 2010 Samsung Electronics, Inc.
3  * All rights reserved.
4  *
5  * This software is a confidential and proprietary information
6  * of Samsung Electronics, Inc. ("Confidential Information").  You
7  * shall not disclose such Confidential Information and shall use
8  * it only in accordance with the terms of the license agreement
9  * you entered into with Samsung Electronics.
10  */
11 /*
12  * setting-common-sound.h
13  *
14  *  Created on: Oct 16, 2013
15  *      Author: min-hoyun
16  */
17
18 #ifndef SETTING_COMMON_SOUND_H_
19 #define SETTING_COMMON_SOUND_H_
20
21 #include <player.h>
22 #include <sound_manager.h>
23 #include <mm_sound_private.h>
24 #include <wav_player.h>
25 //#include <player_product.h>
26
27
28 #define SETTING_DEFAULT_RINGTONE_PATH   "/opt/share/settings/Ringtones"
29 #define SETTING_DEFAULT_ALERT_PATH              "/opt/share/settings/Alerts"
30 #define SETTING_DEFAULT_PREVIEW_PATH    "/opt/share/settings/Previews"
31
32 #define DELIM           "/"
33
34 #define SETTING_DEFAULT_MSG_TONE                SETTING_DEFAULT_ALERT_PATH""DELIM"Flicker.ogg"
35 #define SETTING_DEFAULT_RING_TONE               SETTING_DEFAULT_RINGTONE_PATH""DELIM"Timeless.ogg"
36 #define SETTING_DEFAULT_MEDIA_TONE              SETTING_DEFAULT_PREVIEW_PATH""DELIM"Media_preview_Over_the_horizon_B2.ogg"
37 #define SETTING_DEFAULT_SILENT_OFF_TONE         SETTING_DEFAULT_PREVIEW_PATH""DELIM"Silent_mode_off.ogg"
38 #define SETTING_DEFAULT_SYS_TONE                SETTING_DEFAULT_PREVIEW_PATH""DELIM"B_Touch.ogg"
39
40 #define SETTING_RINGTONE_VOLUME_BACKUP  "db/setting/sound/call/rmd_ringtone_volume"
41
42 /* test code */
43 #define PREVIEW_TEMP_PATH       "/opt/usr/media/Sounds/Over the horizon.mp3"
44
45 enum {
46         SOUND_MODE_SOUND,
47         SOUND_MODE_VIBRATE,
48         SOUND_MODE_MUTE
49 };
50
51 enum {
52         SOUND_STATE_STOP,
53         SOUND_STATE_PLAY
54 };
55
56 int get_sound_mode();
57 int is_created_player();
58 void set_looping(int);
59
60 void play_sound(char * file_path, float volume, sound_type_e sound_type);
61 int profile_play_sound(void *data, void *cb, char *ringtone_file, float vol, sound_type_e sound_type, int prelistening_enable);
62 int _close_player(void *data, sound_type_e type);
63 int _profile_stop_sound(void *data);
64
65 #endif /* SETTING_COMMON_SOUND_H_ */