}
}
-CU_BTN_INCOM_CALL("callui/accept", "w_call_incoming_icon_accept.png",
- "AO01131", "AO01132", "AO0113", "AO0113P")
-CU_BTN_INCOM_CALL("callui/reject", "w_call_incoming_icon_reject.png",
- "AO01151", "AO01152", "AO0115", "AO0115P")
-
CU_BTN_BOTTOM("callui/end_call", "w_incoming_icon_end_phone.png",
"AO0121", "AO0121P", "B013A", "B013")
CU_BTN_BOTTOM("callui/call_back", "w_incoming_icon_call.png",
CU_RES_IMAGE("accept_reject_action_bg", "call_button_bg_accept_reject_press.png")
CU_RES_IMAGE("accept", "w_call_incoming_icon_accept.png")
+CU_RES_IMAGE("accept_bt_headset", "w_call_incoming_icon_headset_call_accept.png")
CU_RES_IMAGE("reject", "w_call_incoming_icon_reject.png")
virtual bool getMuteState() const = 0;
virtual ucl::Result startDtmf(const unsigned char dtmfDigit) = 0;
virtual ucl::Result stopDtmf() = 0;
- virtual void addAudioStateHandler(AudioStateHandler handler) = 0;
- virtual void removeAudioStateHandler(AudioStateHandler handler) = 0;
- virtual void addMuteStateHandler(MuteStateHandler handler) = 0;
- virtual void removeMuteStateHandler(MuteStateHandler handler) = 0;
- virtual void addVolumeStateHandler(VolumeLevelHandler handler) = 0;
- virtual void removeVolumeStateHandler(VolumeLevelHandler handler) = 0;
+ virtual void addAudioStateHandler(
+ const AudioStateHandler &handler) = 0;
+ virtual void delAudioStateHandler(
+ const AudioStateHandler &handler) = 0;
+ virtual void addMuteStateHandler(
+ const MuteStateHandler &handler) = 0;
+ virtual void delMuteStateHandler(
+ const MuteStateHandler &handler) = 0;
+ virtual void addVolumeStateHandler(
+ const VolumeLevelHandler &handler) = 0;
+ virtual void delVolumeStateHandler(
+ const VolumeLevelHandler &handler) = 0;
virtual int getMaxVolume() const = 0;
virtual int getVolume() const = 0;
virtual ucl::Result setVolume(int value) = 0;
- virtual bool isBluetoothSupported() const = 0;
+ virtual bool isBTSupported() const = 0;
+ virtual bool isBTHeadsetConnected() const = 0;
+ virtual void addBTHeadsetConnectionChangeHandler(
+ const NotiHandler &handler) = 0;
+ virtual void delBTHeadsetConnectionChangeHandler(
+ const NotiHandler &handler) = 0;
};
}
Builder();
~Builder();
Builder &setIncomingCall(const IIncomingCallSRef &call);
+ Builder &setSoundManager(const ISoundManagerSRef &sm);
Builder &setAvailableCallsFlag(CallMask calls);
Builder &setParentWidget(const ucl::ElmWidgetSRef &parentWidget);
AcceptRejectPresenterSRef build(ucl::GuiPresenter &parent) const;
IIncomingCallSRef m_call;
CallMask m_callMask;
ucl::ElmWidgetSRef m_parentWidget;
+ ISoundManagerSRef m_sm;
};
public:
friend class ucl::ReffedObj<AcceptRejectPresenter>;
AcceptRejectPresenter(ucl::IRefCountObj &rc,
const IIncomingCallSRef &call,
- CallMask calls);
+ CallMask calls,
+ const ISoundManagerSRef &sm);
ucl::Result prepare(ucl::GuiPresenter &parent,
ucl::ElmWidget &parentWidget);
bool onAcceptPopupEvent(AcceptDialog &popup, AcceptDialogEvent event);
void onAcceptEvent();
void onRejectEvent();
+ void onBTHeadsetConnectionChanged();
// GuiPresenter
virtual void onActivate() final override;
IIncomingCallSRef m_call;
CallMask m_callMask;
+ ISoundManagerSRef m_sm;
};
}
Builder();
Builder &setAcceptEventHandler(const NotiHandler &handler);
Builder &setRejectEventHandler(const NotiHandler &handler);
+ Builder &setAcceptBtnType(AcceptButtonType type);
AcceptRejectWidgetSRef build(ucl::ElmWidget &parent) const;
private:
NotiHandler m_acceptHandler;
NotiHandler m_rejectHandler;
+ AcceptButtonType m_acceptBtnType;
};
public:
void reset();
void activateRotary();
void deactivateRotary();
+ void setAcceptBtnType(AcceptButtonType type);
private:
friend class ucl::ReffedObj<AcceptRejectWidget>;
AcceptRejectWidget(ucl::IRefCountObj &rc,
const ucl::LayoutSRef &layout,
const NotiHandler &acceptHandler,
- const NotiHandler &rejectHandler);
+ const NotiHandler &rejectHandler,
+ AcceptButtonType acceptBtnType);
void prepare();
std::vector<ucl::ElmWidgetSRef> m_accBezelCueImg;
std::vector<ucl::ElmWidgetSRef> m_rejBezelCueImg;
- ucl::ElmWidgetSRef m_accTracer;
- ucl::ElmWidgetSRef m_accGuide;
- ucl::ElmWidgetSRef m_accIcon;
+ ucl::LayoutSRef m_accTracer;
+ ucl::LayoutSRef m_accGuide;
+ ucl::LayoutSRef m_accIcon;
ucl::LayoutSRef m_accEventLy;
- ucl::ElmWidgetSRef m_rejTracer;
- ucl::ElmWidgetSRef m_rejGuide;
- ucl::ElmWidgetSRef m_rejIcon;
+ ucl::LayoutSRef m_rejTracer;
+ ucl::LayoutSRef m_rejGuide;
+ ucl::LayoutSRef m_rejIcon;
ucl::LayoutSRef m_rejEventLy;
bool m_isFreezed;
int m_accBCAnimIndex;
int m_rejBCAnimIndex;
+
+ AcceptButtonType m_acceptBtnType;
};
}
DECREASE
};
+ enum class AcceptButtonType {
+ SIMPLE,
+ BT_HEADSET
+ };
+
UCL_DECLARE_REF_ALIASES(Slider);
UCL_DECLARE_REF_ALIASES(VolumeControl);
UCL_DECLARE_REF_ALIASES(AcceptRejectWidget);
--- /dev/null
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.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.
+ */
+
+#include "BluetoothManager.h"
+
+#include <bluetooth.h>
+#include <bluetooth_internal.h>
+#include <bluetooth_extension.h>
+#include <sound_manager.h>
+
+#include "common.h"
+
+namespace callui { namespace { namespace impl {
+
+ using namespace ucl;
+
+ constexpr auto BT_VOLUME_MAX = 15;
+
+}}}
+
+namespace callui {
+
+ using namespace ucl;
+
+ BluetoothManagerSRef BluetoothManager::newInstance()
+ {
+ auto result = makeShared<BluetoothManager>();
+ FAIL_RETURN_VALUE(result->prepare(), {}, "result->prepare() failed!");
+ return result;
+ }
+
+ BluetoothManager::BluetoothManager():
+ m_btInitialized(false),
+ m_btAudioInitialized(false),
+ m_isHeadsetConnected(false)
+ {
+ }
+
+ BluetoothManager::~BluetoothManager()
+ {
+ unregisterAudioHandling();
+ unregisterHeadsetConnectionHandling();
+ deinitializeBluetooth();
+ }
+
+ Result BluetoothManager::prepare()
+ {
+ FAIL_RETURN(initializeBluetooth(),
+ "initializeBluetooth() failed!");
+
+ FAIL_RETURN(registerAudioHandling(),
+ "registerAudioHandling() failed");
+
+ FAIL_RETURN(registerHeadsetConnectionHandling(),
+ "registerHeadsetConnectionHandling() failed!");
+
+ m_isHeadsetConnected = getHeadsetConnectionState();
+
+ return RES_OK;
+ }
+
+ Result BluetoothManager::initializeBluetooth()
+ {
+ auto ret = bt_initialize();
+ if (ret != BT_ERROR_NONE) {
+ LOG_RETURN(RES_FAIL, "BT initialize failed! "
+ "ret[%d] msg[%s]", ret, get_error_message(ret));
+
+ }
+ m_btInitialized = true;
+ return RES_OK;
+ }
+
+ void BluetoothManager::deinitializeBluetooth()
+ {
+ bt_deinitialize();
+ }
+
+ int BluetoothManager::getVolume() const
+ {
+ auto vol = 0;
+ auto ret = bt_ag_get_speaker_gain(&vol);
+ if (ret != BT_ERROR_NONE) {
+ LOG_RETURN_VALUE(RES_FAIL, -1, "bt_ag_get_speaker_gain() failed! "
+ "ret[%d] msg[%s]", ret, get_error_message(ret));
+ }
+ DLOG("BT Volume level [%d]", vol);
+ return vol;
+ }
+
+ int BluetoothManager::getMaxVolume() const
+ {
+ return impl::BT_VOLUME_MAX;
+ }
+
+ Result BluetoothManager::setVolume(int volume)
+ {
+ auto ret = bt_ag_notify_speaker_gain(volume);
+ if (ret != BT_ERROR_NONE) {
+ LOG_RETURN(RES_FAIL, "bt_ag_notify_speaker_gain() failed! "
+ "ret[%d] msg[%s]", ret, get_error_message(ret));
+ }
+ return RES_OK;
+ }
+
+ void BluetoothManager::setVolumeStateHandler(
+ const BluetoothVolumeHandler &handler)
+ {
+ m_btVolumeHandler = handler;
+ }
+
+ Result BluetoothManager::registerAudioHandling()
+ {
+ auto ret = bt_audio_initialize();
+ if (ret != BT_ERROR_NONE) {
+ LOG_RETURN(RES_FAIL, "bt_audio_initialize() failed! ",
+ "ret[%d] msg[%s]", ret, get_error_message(ret));
+ }
+ m_btAudioInitialized = true;
+
+ ret = bt_ag_set_speaker_gain_changed_cb(
+ CALLBACK_B(BluetoothManager::onVolumeChanged), this);
+ if (ret != BT_ERROR_NONE) {
+ LOG_RETURN(RES_FAIL, "bt_ag_set_speaker_gain_changed_cb() failed! "
+ "ret[%d] msg[%s]", ret, get_error_message(ret));
+ }
+
+ return RES_OK;
+ }
+
+ void BluetoothManager::unregisterAudioHandling()
+ {
+ bt_ag_unset_speaker_gain_changed_cb();
+
+ if (m_btAudioInitialized) {
+ bt_audio_deinitialize();
+ m_btAudioInitialized = false;
+ }
+ }
+
+ Result BluetoothManager::registerHeadsetConnectionHandling()
+ {
+ auto ret = vconf_notify_key_changed(VCONFKEY_BT_DEVICE,
+ CALLBACK_B(BluetoothManager::onHeadsetConnectionChanged),
+ this);
+ if (ret != 0) {
+ LOG_RETURN(RES_FAIL, "vconf_notify_key_changed() failed!");
+ }
+ return RES_OK;
+ }
+
+ void BluetoothManager::unregisterHeadsetConnectionHandling()
+ {
+ vconf_ignore_key_changed(
+ VCONFKEY_BT_DEVICE,
+ CALLBACK_B(BluetoothManager::onHeadsetConnectionChanged));
+ }
+
+ void BluetoothManager::onVolumeChanged(int volume)
+ {
+ sound_type_e soundType = SOUND_TYPE_SYSTEM;
+ auto ret = sound_manager_get_current_sound_type(&soundType);
+ if (ret != SOUND_MANAGER_ERROR_NONE) {
+ LOG_RETURN_VOID(RES_FAIL, "sound_manager_get_current_sound_type() failed! "
+ "ret[%d] msg[%s]", ret, get_error_message(ret));
+ }
+
+ bool isSCOOpened = false;
+ ret = bt_ag_is_sco_opened(&isSCOOpened);
+ if (ret != BT_ERROR_NONE) {
+ LOG_RETURN_VOID(RES_FAIL, "sound_manager_get_current_sound_type() failed! "
+ "ret[%d] msg[%s]", ret, get_error_message(ret));
+ }
+
+ if (isSCOOpened && soundType == SOUND_TYPE_CALL) {
+ if (m_btVolumeHandler) {
+ m_btVolumeHandler(volume);
+ }
+ }
+ }
+
+ bool BluetoothManager::isHeadsetConnected() const
+ {
+ return m_isHeadsetConnected;
+ }
+
+ void BluetoothManager::setHeadsetConnectionChangeHandler(const NotiHandler &handler)
+ {
+ m_btConnectionHandler = handler;
+ }
+
+ bool BluetoothManager::getHeadsetConnectionState()
+ {
+ bt_adapter_state_e adapterState = BT_ADAPTER_DISABLED;
+ auto ret = bt_adapter_get_state(&adapterState);
+ if (ret != BT_ERROR_NONE) {
+ LOG_RETURN_VALUE(RES_FAIL, false, "bt_adapter_get_state() failed! "
+ "ret[%d] msg[%s]", ret, get_error_message(ret));
+ }
+
+ if (adapterState == BT_ADAPTER_DISABLED) {
+ LOG_RETURN_VALUE(RES_FAIL, false, "BT adapter is disabled");
+ }
+
+ auto dev = 0;
+ ret = vconf_get_int(VCONFKEY_BT_DEVICE, &dev);
+ if (ret != 0) {
+ LOG_RETURN_VALUE(RES_FAIL, false, "vconf_get_int() failed! "
+ "ret[%d] msg[%s]", ret, get_error_message(ret));
+ }
+
+ if (dev == VCONFKEY_BT_DEVICE_NONE) {
+ return false;
+ }
+
+ if ((dev & VCONFKEY_BT_DEVICE_HEADSET_CONNECTED) ||
+ (dev & VCONFKEY_BT_DEVICE_A2DP_HEADSET_CONNECTED)) {
+ return true;
+ }
+
+ return false;
+ }
+
+ void BluetoothManager::setHeadsetConnectionState(bool isConnected)
+ {
+ if (m_isHeadsetConnected != isConnected) {
+ m_isHeadsetConnected = isConnected;
+ if (m_btConnectionHandler) {
+ m_btConnectionHandler();
+ }
+ }
+ }
+
+ void BluetoothManager::onHeadsetConnectionChanged(keynode_t *node)
+ {
+ bool isConnected = getHeadsetConnectionState();
+ setHeadsetConnectionState(isConnected);
+ }
+
+}
--- /dev/null
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.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.
+ */
+
+#ifndef __CALLUI_MODEL_BLUETOOTH_MANAGER_H__
+#define __CALLUI_MODEL_BLUETOOTH_MANAGER_H__
+
+#include <vconf.h>
+
+#include "implTypes.h"
+
+namespace callui {
+
+ class BluetoothManager final {
+ public:
+ static BluetoothManagerSRef newInstance();
+
+ int getVolume() const;
+ int getMaxVolume() const;
+ ucl::Result setVolume(int volume);
+
+ void setVolumeStateHandler(const BluetoothVolumeHandler &handler);
+
+ bool isHeadsetConnected() const;
+ void setHeadsetConnectionChangeHandler(const NotiHandler &handler);
+
+ private:
+ friend class ucl::ReffedObj<BluetoothManager>;
+ BluetoothManager();
+ virtual ~BluetoothManager();
+
+ ucl::Result prepare();
+
+ ucl::Result initializeBluetooth();
+ void deinitializeBluetooth();
+
+ ucl::Result registerAudioHandling();
+ void unregisterAudioHandling();
+ void onVolumeChanged(int volume);
+
+ ucl::Result registerHeadsetConnectionHandling();
+ void unregisterHeadsetConnectionHandling();
+
+ bool getHeadsetConnectionState();
+ void setHeadsetConnectionState(bool isConnected);
+ void onHeadsetConnectionChanged(keynode_t *node);
+
+ private:
+ BluetoothVolumeHandler m_btVolumeHandler;
+ NotiHandler m_btConnectionHandler;
+ bool m_btInitialized;
+ bool m_btAudioInitialized;
+ bool m_isHeadsetConnected;
+ };
+}
+
+#endif // __CALLUI_MODEL_BLUETOOTH_MANAGER_H__
+++ /dev/null
-/*
- * Copyright 2017 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.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.
- */
-
-#include "BluetoothVolume.h"
-
-#include <bluetooth.h>
-#include <bluetooth_internal.h>
-#include <bluetooth_extension.h>
-#include <sound_manager.h>
-
-#include "common.h"
-
-namespace callui { namespace { namespace impl {
-
- using namespace ucl;
-
- constexpr auto BT_VOLUME_MAX = 15;
-
-}}}
-
-namespace callui {
-
- using namespace ucl;
-
- BluetoothVolumeSRef BluetoothVolume::newInstance()
- {
- auto result = makeShared<BluetoothVolume>();
- FAIL_RETURN_VALUE(result->prepare(), {}, "result->prepare() failed!");
- return result;
- }
-
- BluetoothVolume::BluetoothVolume():
- m_btInitialized(false),
- m_btAudioInitialized(false)
- {
- }
-
- BluetoothVolume::~BluetoothVolume()
- {
- unregisterAudioHandling();
-
- bt_deinitialize();
- }
-
- Result BluetoothVolume::prepare()
- {
- auto ret = bt_initialize();
- if (ret != BT_ERROR_NONE) {
- LOG_RETURN(RES_FAIL, "BT initialize failed. "
- "ret[%d] msg[%s]", ret, get_error_message(ret));
-
- }
- m_btInitialized = true;
-
- FAIL_RETURN(registerAudioHandling(),
- "registerAudioHandling() failed");
-
- return RES_OK;
- }
-
- int BluetoothVolume::getVolume() const
- {
- auto vol = 0;
- auto ret = bt_ag_get_speaker_gain(&vol);
- if (ret != BT_ERROR_NONE) {
- LOG_RETURN_VALUE(RES_FAIL, -1, "bt_ag_get_speaker_gain() failed. "
- "ret[%d] msg[%s]", ret, get_error_message(ret));
- }
- DLOG("BT Volume level [%d]", vol);
- return vol;
- }
-
- int BluetoothVolume::getMaxVolume() const
- {
- return impl::BT_VOLUME_MAX;
- }
-
- Result BluetoothVolume::setVolume(int volume)
- {
- auto ret = bt_ag_notify_speaker_gain(volume);
- if (ret != BT_ERROR_NONE) {
- LOG_RETURN(RES_FAIL, "bt_ag_notify_speaker_gain() failed! "
- "ret[%d] msg[%s]", ret, get_error_message(ret));
- }
- return RES_OK;
- }
-
- void BluetoothVolume::setVolumeStateHandler(
- const BluetoothVolumeHandler &handler)
- {
- m_handler = handler;
- }
-
- Result BluetoothVolume::registerAudioHandling()
- {
- auto ret = bt_audio_initialize();
- if (ret != BT_ERROR_NONE) {
- LOG_RETURN(RES_FAIL, "bt_audio_initialize() failed. ",
- "ret[%d] msg[%s]", ret, get_error_message(ret));
- }
- m_btAudioInitialized = true;
-
- ret = bt_ag_set_speaker_gain_changed_cb(
- CALLBACK_B(BluetoothVolume::onVolumeChanged), this);
- if (ret != BT_ERROR_NONE) {
- LOG_RETURN(RES_FAIL, "bt_ag_set_speaker_gain_changed_cb() failed. "
- "ret[%d] msg[%s]", ret, get_error_message(ret));
- }
-
- return RES_OK;
- }
-
- void BluetoothVolume::unregisterAudioHandling()
- {
- bt_ag_unset_speaker_gain_changed_cb();
-
- if (m_btAudioInitialized) {
- bt_audio_deinitialize();
- m_btAudioInitialized = false;
- }
- }
-
- void BluetoothVolume::onVolumeChanged(int volume)
- {
- sound_type_e soundType = SOUND_TYPE_SYSTEM;
- auto ret = sound_manager_get_current_sound_type(&soundType);
- if (ret != SOUND_MANAGER_ERROR_NONE) {
- LOG_RETURN_VOID(RES_FAIL, "sound_manager_get_current_sound_type() failed. "
- "ret[%d] msg[%s]", ret, get_error_message(ret));
- }
-
- bool isSCOOpened = false;
- ret = bt_ag_is_sco_opened(&isSCOOpened);
- if (ret != BT_ERROR_NONE) {
- LOG_RETURN_VOID(RES_FAIL, "sound_manager_get_current_sound_type() failed. "
- "ret[%d] msg[%s]", ret, get_error_message(ret));
- }
-
- if (isSCOOpened && soundType == SOUND_TYPE_CALL) {
- if (m_handler) {
- m_handler(volume);
- }
- }
- }
-}
+++ /dev/null
-/*
- * Copyright 2017 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.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.
- */
-
-#ifndef __CALLUI_MODEL_BLUETOOTH_VOLUME_H__
-#define __CALLUI_MODEL_BLUETOOTH_VOLUME_H__
-
-#include "implTypes.h"
-
-namespace callui {
-
- class BluetoothVolume final {
- public:
- static BluetoothVolumeSRef newInstance();
-
- int getVolume() const;
- int getMaxVolume() const;
- ucl::Result setVolume(int volume);
-
- void setVolumeStateHandler(const BluetoothVolumeHandler &handler);
-
- private:
- friend class ucl::ReffedObj<BluetoothVolume>;
- BluetoothVolume();
- ~BluetoothVolume();
-
- ucl::Result prepare();
-
- ucl::Result registerAudioHandling();
- void unregisterAudioHandling();
- void onVolumeChanged(int volume);
-
- private:
- BluetoothVolumeHandler m_handler;
- bool m_btInitialized;
- bool m_btAudioInitialized;
- };
-
-}
-
-#endif // __CALLUI_MODEL_BLUETOOTH_MANAGER_H__
#include "SoundManager.h"
-#include "BluetoothVolume.h"
+#include "BluetoothManager.h"
#include "CallClient.h"
+
#include "common.h"
namespace callui { namespace { namespace impl {
using namespace ucl;
- Result getBTVolumeDeviceCount(int &deviceCount)
+ Result getBTHeadsetConnectedState(bool &state)
{
Result res = RES_FAIL;
- int count = 0;
+ state = false;
sound_device_list_h deviceList = nullptr;
- auto ret = sound_manager_get_device_list(SOUND_DEVICE_ALL_MASK, &deviceList);
+ auto ret = sound_manager_get_device_list(
+ SOUND_DEVICE_ALL_MASK, &deviceList);
if (ret != SOUND_MANAGER_ERROR_NONE) {
- LOG_RETURN(RES_FAIL, "sound_manager_get_device_list() failed. [%d][%s]",
- ret, get_error_message(ret));
+ LOG_RETURN(RES_FAIL, "sound_manager_get_device_list() failed. "
+ "[%d][%s]", ret, get_error_message(ret));
}
-
sound_device_type_e searchType = SOUND_DEVICE_BLUETOOTH_VOICE;
sound_device_h device;
sound_device_type_e type;
while (true) {
device = nullptr;
ret = sound_manager_get_next_device(deviceList, &device);
+
if (ret == SOUND_MANAGER_ERROR_NO_DATA) {
res = RES_OK;
ILOG("No more device to check");
break;
} else if (ret != SOUND_MANAGER_ERROR_NONE) {
- UCL_FAIL_BREAK(res, "sound_manager_get_next_device() failed. [%d][%s]",
- ret, get_error_message(ret));
+ UCL_FAIL_BREAK(res, "sound_manager_get_next_device() failed. "
+ "[%d][%s]", ret, get_error_message(ret));
}
+
if (!device) {
UCL_FAIL_BREAK(res, "device is NULL");
}
sound_manager_get_device_type(device, &type);
if (searchType == type) {
DLOG("Bluetooth voice device found");
- count++;
+ state = true;
}
// For debug only
sound_manager_get_device_id(device, &id);
sound_manager_get_device_name(device, &name);
sound_manager_get_device_io_direction(device, &direction);
- DLOG("====================");
+ DLOG("--------------------------");
DLOG("Device ID [%d]", id);
DLOG("Device name [%s]", name);
DLOG("Device IO direction [%d]", direction);
DLOG("Device type [%d]", type);
}
sound_manager_free_device_list(deviceList);
- deviceCount = count;
return res;
}
return result;
}
- void SoundManager::audioStateChangedCb(cm_audio_state_type_e state)
+ void SoundManager::onAudioStateChanged(cm_audio_state_type_e state)
{
DLOG();
m_audioStateEvent.dispatch(convertCMAudioState(state));
}
- void SoundManager::muteStateChangedCb(cm_mute_status_e status)
+ void SoundManager::onMuteStateChanged(cm_mute_status_e status)
{
DLOG();
Result SoundManager::prepare()
{
- m_btVolume = BluetoothVolume::newInstance();
- if (!m_btVolume) {
- ELOG("BluetoothVolume::newInstance() failed!");
+ m_btManager = BluetoothManager::newInstance();
+ if (!m_btManager) {
+ ELOG("BluetoothManager::newInstance() failed!");
}
Result res = convertCMResult(cm_set_audio_state_changed_cb(*m_client,
- CALLBACK_B(SoundManager::audioStateChangedCb), this));
+ CALLBACK_B(SoundManager::onAudioStateChanged), this));
FAIL_RETURN(res, "cm_set_audio_state_changed_cb() failed!");
res = convertCMResult(cm_set_mute_status_cb(*m_client,
- CALLBACK_B(SoundManager::muteStateChangedCb), this));
+ CALLBACK_B(SoundManager::onMuteStateChanged), this));
FAIL_RETURN(res, "cm_set_mute_status_cb() failed!");
- res = registerVolumeCallbacks();
+ res = registerCallbacks();
FAIL_RETURN(res, "registerVolumeCallbacks() failed!");
return res;
}
- Result SoundManager::registerVolumeCallbacks()
+ Result SoundManager::registerCallbacks()
{
int ret = sound_manager_add_volume_changed_cb(
- CALLBACK_B(SoundManager::onDeviceVolumeChanged),
+ CALLBACK_B(SoundManager::onGearVolumeChanged),
this,
&m_deviceVolumeCbID);
if (ret != SOUND_MANAGER_ERROR_NONE) {
"sound_manager_add_volume_changed_cb() failed");
}
- if (isBluetoothSupported()) {
- m_btVolume->setVolumeStateHandler(
- WEAK_DELEGATE(SoundManager::onBluetoothVolumeChanged,
- asWeak(*this)));
+ if (isBTSupported()) {
+ m_btManager->setVolumeStateHandler(
+ WEAK_DELEGATE(SoundManager::onBTHeadsetVolumeChanged,
+ asWeak(*this)));
+
+ m_btManager->setHeadsetConnectionChangeHandler(
+ WEAK_DELEGATE(SoundManager::onHeadsetConnectionChanged,
+ asWeak(*this)));
}
return RES_OK;
}
+ void SoundManager::onHeadsetConnectionChanged()
+ {
+ m_btVoiceDeviceConnEvent.dispatch();
+ }
+
Result SoundManager::setSpeakerState(bool isEnable)
{
if (isEnable) {
Result SoundManager::setBluetoothState(bool isEnable)
{
- if (!isBluetoothSupported()) {
+ if (!isBTSupported()) {
LOG_RETURN(RES_NOT_SUPPORTED, "Bluetooth not supported");
}
- int count = 0;
- FAIL_RETURN(impl::getBTVolumeDeviceCount(count), "getBTVolumeDeviceCount() failed");
+ bool state = false;
+ Result res = impl::getBTHeadsetConnectedState(state);
+ DLOG("Sound manager BT Headset connection status [%d], res [%s]",
+ state, getResultData(res).name);
- if (count == 0) {
- LOG_RETURN(RES_NOT_CONNECTED, "Bluetooth headset device not connected");
+ if (!isBTHeadsetConnected()) {
+ LOG_RETURN(RES_NOT_CONNECTED,
+ "Bluetooth headset device not connected");
}
if (isEnable) {
return convertCMResult(cm_stop_dtmf(*m_client));
}
- void SoundManager::addAudioStateHandler(AudioStateHandler handler)
+ void SoundManager::addAudioStateHandler(const AudioStateHandler &handler)
{
m_audioStateEvent += handler;
}
- void SoundManager::removeAudioStateHandler(AudioStateHandler handler)
+ void SoundManager::delAudioStateHandler(const AudioStateHandler &handler)
{
m_audioStateEvent -= handler;
}
- void SoundManager::addMuteStateHandler(MuteStateHandler handler)
+ void SoundManager::addMuteStateHandler(const MuteStateHandler &handler)
{
m_muteStateEvent += handler;
}
- void SoundManager::removeMuteStateHandler(MuteStateHandler handler)
+ void SoundManager::delMuteStateHandler(const MuteStateHandler &handler)
{
m_muteStateEvent -= handler;
}
- void SoundManager::addVolumeStateHandler(
- VolumeLevelHandler handler)
+ void SoundManager::addVolumeStateHandler(const VolumeLevelHandler &handler)
{
m_volumeLevelEvent += handler;
}
- void SoundManager::removeVolumeStateHandler(
- VolumeLevelHandler handler)
+ void SoundManager::delVolumeStateHandler(const VolumeLevelHandler &handler)
{
m_volumeLevelEvent -= handler;
}
{
int maxVol = 0;
if (getAudioState() == AudioStateType::BT) {
- if (isBluetoothSupported()) {
- maxVol = m_btVolume->getMaxVolume();
+ if (isBTSupported()) {
+ maxVol = m_btManager->getMaxVolume();
} else {
ELOG("BT is not supported");
}
{
int vol = 0;
if (getAudioState() == AudioStateType::BT) {
- if (isBluetoothSupported()) {
- vol = m_btVolume->getVolume();
+ if (isBTSupported()) {
+ vol = m_btManager->getVolume();
} else {
ELOG("BT is not supported");
}
Result SoundManager::setVolume(int value)
{
if (getAudioState() == AudioStateType::BT) {
- if (isBluetoothSupported()) {
- return m_btVolume->setVolume(value);
+ if (isBTSupported()) {
+ return m_btManager->setVolume(value);
} else {
LOG_RETURN(RES_FAIL, "BT is not supported");
}
return RES_OK;
}
- bool SoundManager::isBluetoothSupported() const
+ bool SoundManager::isBTSupported() const
+ {
+ return (m_btManager != nullptr);
+ }
+
+ bool SoundManager::isBTHeadsetConnected() const
+ {
+ return (isBTSupported() ? m_btManager->isHeadsetConnected() : false);
+ }
+
+ void SoundManager::addBTHeadsetConnectionChangeHandler(
+ const NotiHandler &handler)
+ {
+ m_btVoiceDeviceConnEvent += handler;
+ }
+
+ void SoundManager::delBTHeadsetConnectionChangeHandler(
+ const NotiHandler &handler)
{
- return (m_btVolume != nullptr);
+ m_btVoiceDeviceConnEvent -= handler;
}
- void SoundManager::onDeviceVolumeChanged(sound_type_e type, unsigned int volume)
+ void SoundManager::onGearVolumeChanged(sound_type_e type, unsigned int volume)
{
DLOG("Volume [%d]", volume);
if (type != SOUND_TYPE_CALL) {
}
}
- void SoundManager::onBluetoothVolumeChanged(int volume)
+ void SoundManager::onBTHeadsetVolumeChanged(int volume)
{
DLOG("Volume [%d]", volume);
virtual ucl::Result setSpeakerState(bool isEnable) override final;
virtual ucl::Result setBluetoothState(bool isEnable) override final;
virtual AudioStateType getAudioState() const override final;
+
virtual ucl::Result setMuteState(bool isEnable) override final;
virtual bool getMuteState() const override final;
- virtual ucl::Result startDtmf(const unsigned char dtmfDigit) override final;
+
+ virtual ucl::Result startDtmf(
+ const unsigned char dtmfDigit) override final;
virtual ucl::Result stopDtmf() override final;
- virtual void addAudioStateHandler(AudioStateHandler handler) override final;
- virtual void removeAudioStateHandler(AudioStateHandler handler) override final;
- virtual void addMuteStateHandler(MuteStateHandler handler) override final;
- virtual void removeMuteStateHandler(MuteStateHandler handler) override final;
- virtual void addVolumeStateHandler(VolumeLevelHandler handler) override final;
- virtual void removeVolumeStateHandler(VolumeLevelHandler handler) override final;
+
+ virtual void addAudioStateHandler(
+ const AudioStateHandler &handler) override final;
+ virtual void delAudioStateHandler(
+ const AudioStateHandler &handler) override final;
+
+ virtual void addMuteStateHandler(
+ const MuteStateHandler &handler) override final;
+ virtual void delMuteStateHandler(
+ const MuteStateHandler &handler) override final;
+
+ virtual void addVolumeStateHandler(
+ const VolumeLevelHandler &handler) override final;
+ virtual void delVolumeStateHandler(
+ const VolumeLevelHandler &handler) override final;
+
virtual int getMaxVolume() const override final;
virtual int getVolume() const override final;
virtual ucl::Result setVolume(int value) override final;
- virtual bool isBluetoothSupported() const override final;
+
+ virtual bool isBTSupported() const override final;
+
+ virtual bool isBTHeadsetConnected() const override final;
+ virtual void addBTHeadsetConnectionChangeHandler(
+ const NotiHandler &handler) override final;
+ virtual void delBTHeadsetConnectionChangeHandler(
+ const NotiHandler &handler) override final;
private:
friend class ucl::ReffedObj<SoundManager>;
SoundManager(ucl::IRefCountObj &rc, const CallClientSRef &client);
ucl::Result prepare();
- ucl::Result registerVolumeCallbacks();
+ ucl::Result registerCallbacks();
- void audioStateChangedCb(cm_audio_state_type_e state);
- void muteStateChangedCb(cm_mute_status_e status);
+ void onAudioStateChanged(cm_audio_state_type_e state);
+ void onMuteStateChanged(cm_mute_status_e status);
+ void onHeadsetConnectionChanged();
- void onBluetoothVolumeChanged(int volume);
- void onDeviceVolumeChanged(sound_type_e type, unsigned int volume);
+ void onBTHeadsetVolumeChanged(int volume);
+ void onGearVolumeChanged(sound_type_e type, unsigned int volume);
private:
CallClientSRef m_client;
- BluetoothVolumeSRef m_btVolume;
+ BluetoothManagerSRef m_btManager;
AudioStateEvent m_audioStateEvent;
MuteStateEvent m_muteStateEvent;
VolumeLevelEvent m_volumeLevelEvent;
+ ucl::Event<NotiHandler> m_btVoiceDeviceConnEvent;
int m_deviceVolumeCbID;
};
UCL_DECLARE_REF_ALIASES(ContactInfoProvider);
- UCL_DECLARE_REF_ALIASES(BluetoothVolume);
+ UCL_DECLARE_REF_ALIASES(BluetoothManager);
using AudioStateEvent = ucl::Event<AudioStateHandler>;
using MuteStateEvent = ucl::Event<MuteStateHandler>;
#include "presenters/AcceptRejectPresenter.h"
#include "model/IIncomingCall.h"
+#include "model/ISoundManager.h"
+
#include "presenters/AcceptDialog.h"
#include "presenters/MotionSensorPresenter.h"
#include "view/AcceptRejectWidget.h"
-#include "../view/common.h"
#include "common.h"
namespace callui {
using namespace ucl;
- // IncomingCallPresenter::Builder
+ // AcceptRejectPresenter::Builder
AcceptRejectPresenter::Builder::Builder():
m_callMask(CALL_FLAG_NONE)
}
AcceptRejectPresenter::Builder &
- AcceptRejectPresenter::Builder::setIncomingCall(const IIncomingCallSRef &call)
+ AcceptRejectPresenter::Builder::setIncomingCall(
+ const IIncomingCallSRef &call)
{
m_call = call;
return *this;
return *this;
}
+ AcceptRejectPresenter::Builder &
+ AcceptRejectPresenter::Builder::setSoundManager(
+ const ISoundManagerSRef &sm)
+ {
+ m_sm = sm;
+ return *this;
+ }
+
AcceptRejectPresenter::Builder &
AcceptRejectPresenter::Builder::setParentWidget(
const ElmWidgetSRef &parentWidget)
AcceptRejectPresenterSRef
AcceptRejectPresenter::Builder::build(GuiPresenter &parent) const
{
- if (!m_parentWidget) {
- LOG_RETURN_VALUE(RES_FAIL, {}, "m_parentWidget is NULL");
+ if (!m_parentWidget || !m_call || !m_sm) {
+ LOG_RETURN_VALUE(RES_FAIL, {}, "Main params are not set");
}
- auto result = makeShared<AcceptRejectPresenter>(m_call, m_callMask);
+ auto result = makeShared<AcceptRejectPresenter>(m_call,
+ m_callMask,
+ m_sm);
FAIL_RETURN_VALUE(result->prepare(parent, *m_parentWidget),
{}, "result->prepare() failed!");
return result;
}
- // IncomingCallPresenter
+ // AcceptRejectPresenter
AcceptRejectPresenter::AcceptRejectPresenter(IRefCountObj &rc,
const IIncomingCallSRef &call,
- CallMask calls):
+ CallMask calls,
+ const ISoundManagerSRef &sm):
GuiPresenter(rc),
m_call(call),
- m_callMask(calls)
+ m_callMask(calls),
+ m_sm(sm)
{
}
if (m_widget) {
m_widget->deactivateRotary();
}
+
+ m_sm->delBTHeadsetConnectionChangeHandler(
+ WEAK_DELEGATE(AcceptRejectPresenter::
+ onBTHeadsetConnectionChanged,
+ asWeak(*this)));
}
Result AcceptRejectPresenter::prepare(GuiPresenter &parent,
FAIL_RETURN(GuiPresenter::prepare(parent),
"Presenter::prepare() failed!");
+ m_sm->addBTHeadsetConnectionChangeHandler(
+ WEAK_DELEGATE(AcceptRejectPresenter::
+ onBTHeadsetConnectionChanged,
+ asWeak(*this)));
+
FAIL_RETURN(createWidget(parentWidget),
"createWidget() failed!");
setRejectEventHandler(WEAK_DELEGATE(
AcceptRejectPresenter::onRejectEvent,
asWeak(*this))).
+ setAcceptBtnType(m_sm->isBTHeadsetConnected() ?
+ AcceptButtonType::BT_HEADSET :
+ AcceptButtonType::SIMPLE).
build(parent);
if (!m_widget) {
LOG_RETURN(RES_FAIL, "Layout::build() failed!");
m_call->reject();
}
- bool AcceptRejectPresenter::onAcceptPopupEvent(AcceptDialog &popup, AcceptDialogEvent event)
+ bool AcceptRejectPresenter::onAcceptPopupEvent(AcceptDialog &popup,
+ AcceptDialogEvent event)
{
m_widget->reset();
case AcceptDialogEvent::HOLD_AND_ACCEPT:
FAIL_RETURN_VALUE(
m_call->answer(CallAnswerType::HOLD_ACTIVE_AND_ACCEPT),
- true, "incom->answer() failed!");
+ true,
+ "incom->answer() failed!");
return false;
case AcceptDialogEvent::END_AND_ACCEPT:
FAIL_RETURN_VALUE(
m_call->answer(CallAnswerType::RELEASE_ACTIVE_AND_ACCEPT),
- true, "incom->answer() failed!");
+ true,
+ "incom->answer() failed!");
return false;
default:
return true;
m_widget->deactivateRotary();
}
+ void AcceptRejectPresenter::onBTHeadsetConnectionChanged()
+ {
+ m_widget->setAcceptBtnType(m_sm->isBTHeadsetConnected() ?
+ AcceptButtonType::BT_HEADSET :
+ AcceptButtonType::SIMPLE);
+ }
+
+
}
(m_audioState == AudioStateType::BT) ?
m_bluetoothBtn->emit(impl::SIGNAL_TURN_ON) :
m_bluetoothBtn->emit(impl::SIGNAL_TURN_OFF);
- if (!m_sm->isBluetoothSupported()) {
+ if (!m_sm->isBTSupported()) {
disable(*m_bluetoothBtn);
}
delRotaryEventHandler(
CALLBACK_A(AccessoryPresenter::onRotaryEvent), this);
- m_sm->removeAudioStateHandler(DELEGATE(
+ m_sm->delAudioStateHandler(DELEGATE(
AccessoryPresenter::onAudioStateChanged, this));
- m_sm->removeVolumeStateHandler(DELEGATE(
+ m_sm->delVolumeStateHandler(DELEGATE(
AccessoryPresenter::onVolumeLevelChanged, this));
- m_sm->removeMuteStateHandler(DELEGATE(
+ m_sm->delMuteStateHandler(DELEGATE(
AccessoryPresenter::onMuteStateChanged, this));
}
|| (info->getConferenceMemberCount() > 1)) {
// Font size and color
if (info->isEmergency()) {
- m_widget->emit(impl::SIGN_EMERGENCY_BIG_TXT, impl::SRC_TXT_1LINE);
+ m_widget->emit(impl::SIGN_EMERGENCY_BIG_TXT,
+ impl::SRC_TXT_1LINE);
} else {
m_widget->emit(impl::SIGN_BIG_TXT, impl::SRC_TXT_1LINE);
}
delRotaryEventHandler(
CALLBACK_A(KeypadPage::onRotaryEvent), this);
- m_sm->removeAudioStateHandler(DELEGATE(
+ m_sm->delAudioStateHandler(DELEGATE(
KeypadPage::onAudioStateChanged, this));
- m_sm->removeVolumeStateHandler(DELEGATE(
+ m_sm->delVolumeStateHandler(DELEGATE(
KeypadPage::onVolumeLevelChanged, this));
}
}
m_acceptRejectPrs = AcceptRejectPresenter::Builder().
setIncomingCall(m_cm->getIncomingCall()).
setAvailableCallsFlag(m_cm->getAvailableCalls()).
+ setSoundManager(m_call->getSoundManager()).
setParentWidget(m_widget).
build(*this);
#include "view/AcceptRejectWidget.h"
-#include <efl_extension.h>
-#include <functional>
-#include <math.h>
-
-#include <ucl/appfw/helpers.h>
-
#include "common.h"
#define CU_COL_TRANSPARENT 0, 0, 0, 0
constexpr LayoutTheme LAYOUT_IMG_ACTION_BG
{"layout", "callui_image", "accept_reject_action_bg"};
+
constexpr LayoutTheme LAYOUT_IMG_ACCEPT
{"layout", "callui_image", "accept"};
+
+ constexpr LayoutTheme LAYOUT_IMG_ACCEPT_BT_HEADSET
+ {"layout", "callui_image", "accept_bt_headset"};
+
constexpr LayoutTheme LAYOUT_IMG_REJECT
{"layout", "callui_image", "reject"};
constexpr EdjePart PART_SWL_REJECT_ICON
{"swl.reject.icon"};
- ElmWidgetSRef createImage(ElmWidget &parent, const LayoutTheme &theme)
+ LayoutSRef createImage(ElmWidget &parent, const LayoutTheme &theme)
{
auto layout = Layout::Builder().
setTheme(theme).
using namespace ucl;
- AcceptRejectWidget::Builder::Builder()
+ AcceptRejectWidget::Builder::Builder() :
+ m_acceptBtnType(AcceptButtonType::SIMPLE)
{
}
return *this;
}
+ AcceptRejectWidget::Builder &
+ AcceptRejectWidget::Builder::setAcceptBtnType(AcceptButtonType type)
+ {
+ m_acceptBtnType = type;
+ return *this;
+ }
+
AcceptRejectWidgetSRef
AcceptRejectWidget::Builder::build(ElmWidget &parent) const
{
}
auto result = makeShared<AcceptRejectWidget>(layout,
- m_acceptHandler, m_rejectHandler);
+ m_acceptHandler, m_rejectHandler, m_acceptBtnType);
result->bindToEo();
AcceptRejectWidget::AcceptRejectWidget(IRefCountObj &rc,
const LayoutSRef &layout,
const NotiHandler &acceptHandler,
- const NotiHandler &rejectHandler):
+ const NotiHandler &rejectHandler,
+ AcceptButtonType acceptBtnType):
ElmWidget(&rc, *layout, true),
m_layout(layout.get()),
m_accHandler(acceptHandler),
m_accBCAnimCount(0),
m_rejBCAnimCount(0),
m_accBCAnimIndex(impl::BC_ITEM_COUNT - 1),
- m_rejBCAnimIndex(impl::BC_ITEM_COUNT - 1)
+ m_rejBCAnimIndex(impl::BC_ITEM_COUNT - 1),
+ m_acceptBtnType(acceptBtnType)
{
prepare();
}
m_rejEventLy->delEventHandler(WidgetEvent::MOUSE_MOVE,
WEAK_DELEGATE(AcceptRejectWidget::onMouseMove, asWeak(*this)));
- DEL_TRANSIT_FULL(m_lastAccBezelTr1);
- DEL_TRANSIT_FULL(m_lastAccBezelTr2);
- DEL_TRANSIT_FULL(m_lastRejBezelTr1);
- DEL_TRANSIT_FULL(m_lastRejBezelTr2);
+ DEL_TRANSIT(m_lastAccBezelTr1);
+ DEL_TRANSIT(m_lastAccBezelTr2);
+ DEL_TRANSIT(m_lastRejBezelTr1);
+ DEL_TRANSIT(m_lastRejBezelTr2);
- DEL_TRANSIT_FULL(m_accTracerTr);
- DEL_TRANSIT_FULL(m_accGuideTr);
- DEL_TRANSIT_FULL(m_accIconTr);
+ DEL_TRANSIT(m_accTracerTr);
+ DEL_TRANSIT(m_accGuideTr);
+ DEL_TRANSIT(m_accIconTr);
- DEL_TRANSIT_FULL(m_rejTracerTr);
- DEL_TRANSIT_FULL(m_rejGuideTr);
- DEL_TRANSIT_FULL(m_rejIconTr);
+ DEL_TRANSIT(m_rejTracerTr);
+ DEL_TRANSIT(m_rejGuideTr);
+ DEL_TRANSIT(m_rejIconTr);
eext_rotary_object_event_callback_del(*m_layout, CALLBACK_A(
AcceptRejectWidget::onRotaryEvent));
m_layout->setContent(*m_accGuide,
impl::PART_SWL_ACCEPT_FINGER_GUIDE_BG);
- m_accIcon = impl::createImage(*m_layout, impl::LAYOUT_IMG_ACCEPT);
+ switch (m_acceptBtnType) {
+ case AcceptButtonType::BT_HEADSET:
+ m_accIcon = impl::createImage(*m_layout,
+ impl::LAYOUT_IMG_ACCEPT_BT_HEADSET);
+ break;
+ default:
+ m_accIcon = impl::createImage(*m_layout,
+ impl::LAYOUT_IMG_ACCEPT);
+ break;
+ }
if (!m_accIcon) {
LOG_RETURN(RES_FAIL, "createImage() failed");
}
eext_rotary_object_event_activated_set(*m_layout, EINA_FALSE);
}
+ void AcceptRejectWidget::setAcceptBtnType(AcceptButtonType type)
+ {
+ if (m_acceptBtnType == type) {
+ DLOG("Accept icon type is already set");
+ }
+
+ if (!m_accIcon) {
+ return;
+ }
+
+ switch (m_acceptBtnType) {
+ case AcceptButtonType::BT_HEADSET:
+ m_accIcon->setTheme(impl::LAYOUT_IMG_ACCEPT_BT_HEADSET);
+ break;
+ default:
+ m_accIcon->setTheme(impl::LAYOUT_IMG_ACCEPT);
+ break;
+ }
+ }
+
void AcceptRejectWidget::reset()
{
m_isFreezed = false;
#include "../common.h"
#define DEL_TRANSIT(ptr) \
- do { \
- if (ptr) { \
- elm_transit_del(ptr); \
- ptr = nullptr; \
- } \
- } while (0)
-
-#define DEL_TRANSIT_FULL(ptr) \
do { \
if (ptr) { \
elm_transit_del_cb_set(ptr, nullptr, nullptr); \