Merge "Fix N_SE-12249,N_SE-12201,N_SE-12192"
[apps/core/preloaded/settings.git] / setting-profile / include / setting-profile.h
old mode 100644 (file)
new mode 100755 (executable)
index 041cb95..f44317b
@@ -1,18 +1,23 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
-  *
-  * 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.
-  */
+ * setting
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
+ *
+ * Contact: MyoungJune Park <mj2004.park@samsung.com>
+ *
+ * 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 __SETTING_PROFILE_H__
 #define __SETTING_PROFILE_H__
 
 #include <math.h>
 
 #include <Elementary.h>
-#include <appcore-efl.h>
-
 #include <glib-object.h>
-#include <ui-gadget.h>
-#include <ui-gadget-module.h>
-#include <bundle.h>
 
-#include <mm_player.h>
-#include <mm_sound.h>
-
-#include <mm_error.h>
+#include <player.h>
+#include <sound_manager.h>
 
 #include <devman_haptic.h>
 #include <svi.h>
@@ -80,25 +78,27 @@ typedef enum {
 #define SETTING_DEFAULT_HAPTIC_VIB_INT         3
 #define SETTING_DEFAULT_ALERT_REPEAT_TYPE_INT  0
 
-#define SETTING_DEFAULT_RINGTONE_PATH  "/opt/share/settings/Ringtones/"
-#define SETTING_DEFAULT_ALERT_PATH             "/opt/share/settings/Alerts/"
+#define SETTING_DEFAULT_RINGTONE_PATH  "/opt/share/settings/Ringtones"
+#define SETTING_DEFAULT_ALERT_PATH             "/opt/share/settings/Alerts"
 #define SETTING_PROFILE_MMC_PATH               "/opt/storage/sdcard/"
 
-#define SETTING_DEFAULT_CALL_TONE              SETTING_DEFAULT_RINGTONE_PATH"General_Over the horizon.mp3"
-#define SETTING_DEFAULT_MSG_TONE               SETTING_DEFAULT_CALL_TONE
-#define SETTING_DEFAULT_EMAIL_TONE             SETTING_DEFAULT_CALL_TONE
-#define SETTING_DEFAULT_CALENDAR_TONE  SETTING_DEFAULT_CALL_TONE
+#define DELIM          "/"
+
+#define SETTING_DEFAULT_CALL_TONE              SETTING_DEFAULT_RINGTONE_PATH""DELIM"ringtone_sdk.mp3"
+#define SETTING_DEFAULT_MSG_TONE               SETTING_DEFAULT_ALERT_PATH""DELIM"General notification_sdk.wav"
+#define SETTING_DEFAULT_EMAIL_TONE             SETTING_DEFAULT_MSG_TONE
+#define SETTING_DEFAULT_MEDIA_TONE             SETTING_DEFAULT_CALL_TONE
 
 typedef struct _SettingProfileUG SettingProfileUG;
 
 /**
  * Setting Profile UG context
- * all UG function has void* as an agument. this is casted back to SettingProfileUG 
+ * all UG function has void* as an agument. this is casted back to SettingProfileUG
  * and the functions access app context.
  */
 struct _SettingProfileUG {
-       struct ui_gadget *ug;
-       struct ui_gadget *ug_loading;
+       ui_gadget_h ug;
+       ui_gadget_h ug_loading;
 
        /* add more variables here (move your appdata to here) */
        Evas *evas;
@@ -106,7 +106,10 @@ struct _SettingProfileUG {
        Evas_Object *win_get;
        Evas_Object *navi_bar;
        Evas_Object *ctrl_bar;
+       Evas_Object *view_layout;
        Evas_Object *ly_main;
+       Evas_Object *sub_view[SETTING_PROF_VIEW_MAX];
+       Elm_Object_Item *ctrl_item[SETTING_SOUND_CONTROLBAR_ITEM_LEN];
 
        Elm_Genlist_Item_Class itc_1text_1icon;
        Elm_Genlist_Item_Class itc_group_item;
@@ -127,10 +130,10 @@ struct _SettingProfileUG {
        Setting_GenGroupItem_Data *data_touch_vib;
        Setting_GenGroupItem_Data *data_media_volume;
 
-       MMHandleType *mp_ringtone;
-       MMHandleType *mp_noti;
-       MMHandleType *mp_sys;
-       MMHandleType *mp_media;
+       player_h *mp_ringtone;
+       player_h *mp_noti;
+       player_h *mp_sys;
+       player_h *mp_media;
 
        Ecore_Timer *volume_timer;
        setting_volume_types cur_vol_type;
@@ -139,25 +142,35 @@ struct _SettingProfileUG {
        int playing_volume;
        char *song_playing;
        char *ringtone_type;
+
+       /* Ringtone tab */
+       Setting_GenGroupItem_Data *data_call_alert_tone;
+       Setting_GenGroupItem_Data *data_call_alert_vib;
+       Setting_GenGroupItem_Data *data_msg_alert_tone;
+       Setting_GenGroupItem_Data *data_email_alert_tone;
+       Setting_GenGroupItem_Data *data_msg_alert_repeat;
+       Setting_GenGroupItem_Data *data_email_alert_repeat;
+       Setting_GenGroupItem_Data *data_lock_sound;
+       Setting_GenGroupItem_Data *data_touch_sounds;
+
 };
 
 extern setting_view setting_view_profile_sound_main;
 
-void setting_profile_play_sound_origin(MMHandleType **mp_handle, void *data,
+void setting_profile_play_sound_origin(player_h **mp_handle, void *data,
                                        void *cb, char *ringtone_file, float vol,
-                                       enum MMSoftwareVolumeTableType table_type);
-void setting_profile_change_player_volume(MMHandleType **mp_handle, void *data, float vol);
-
+                                       sound_type_e sound_type);
 int setting_profile_check_file_exist(void *data, const char *file_path);
 
-MMHandleType *setting_profile_play_sound(void *data, void *cb,
-                                               char *ringtone_file,
-                                               int vol,
-                                               enum MMSoftwareVolumeTableType table_type);
+player_h *setting_profile_play_sound(void *data, void *cb,
+                                       char *ringtone_file,
+                                       int vol,
+                                       sound_type_e sound_type);
 
-int setting_profile_stop_sound(void *data, MMHandleType *player);
+int setting_profile_stop_sound(void *data, player_h *player);
+void setting_profile_change_player_volume(player_h **mp_handle, float vol);
 int setting_profile_close_other_mm_players_but_type(void *data,
-                                                   volume_type_t type);
+                                                   sound_type_e type);
 int setting_profile_close_all_mm_players(void *data);
 void setting_profile_play_vibration(void *data, int value);