/*
- * 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 <player.h>
+#include <sound_manager.h>
-#include <mm_error.h>
-
-#include <devman_haptic.h>
+#include <haptic.h>
#include <svi.h>
#include <setting-common-draw-widget.h>
#include <setting-common-view.h>
#include <pthread.h>
+#define MIGRATION_HAPTIC 1
+
#define HAPTIC_TEST_ITERATION 1
#define VOLUME_DEN (15.0) /* ie equals float(SETTING_SOUND_VOL_MAX) */
+#define SETTING_SOUND_TEXT_REPEAT_ONCE "IDS_ST_BODY_ONCE"
+#define SETTING_SOUND_TEXT_REPEAT_2MIN "IDS_ST_BODY_EVERY_2MIN"
+#define SETTING_SOUND_TEXT_REPEAT_5MIN "IDS_ST_BODY_EVERY_5MIN"
+#define SETTING_SOUND_TEXT_REPEAT_10MIN "IDS_ST_BODY_EVERY_10MINUTES"
+
+#define SETTING_SOUND_REPEAT_TYPE_LEN 4
+
typedef enum {
SETTING_PROF_VIEW_VOL = 0,
SETTING_PROF_VIEW_RTN,
#define SETTING_DEFAULT_NOTI_VIB_INT 5
#define SETTING_DEFAULT_HAPTIC_VIB_INT 3
#define SETTING_DEFAULT_ALERT_REPEAT_TYPE_INT 0
+#define SETTING_SOUND_VIB_TYPE_LEN 5
-#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_VIB_PATH "/usr/share/svi/haptic/default/"
+
+#define DELIM "/"
-#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 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
+
+#define IMG_CTRL_ICON_RINGTONE SETTING_ICON_PATH_CFG"A01-1_controlbar_icon_ringtones.png"
+#define IMG_CTRL_ICON_VOLUME SETTING_ICON_PATH_CFG"A01-1_controlbar_icon_volume.png"
+
+#define SETTING_VIB_FEEDBACK_RATE 20
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;
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;
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;
- int hnd_hpt;
+ haptic_device_h hnd_hpt;
int playing_volume;
char *song_playing;
char *ringtone_type;
+
+ Ecore_Event_Handler *event_handler;
+
+ /* 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);