{
String reminderTonePath;
int unknownRejectStatus = -1;
- vconf_get_bool(VCONFKEY_CISSAPPL_MINUTE_MINDER_BOOL, &unknownRejectStatus);
- bool ReminderToneSetStatus = unknownRejectStatus;
+ vconf_get_bool(VCONFKEY_CISSAPPL_MINUTE_MINDER_BOOL, &unknownRejectStatus);
+ bool ReminderToneSetStatus = unknownRejectStatus;
+ result res = E_FAILURE;
if(ReminderToneSetStatus == true)
{
if(__pPlayer == null)
{
__pPlayer = new (std::nothrow) Player();
- __pPlayer->Construct(*this);
+ res = __pPlayer->Construct(*this);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer Construct failed with %d",res);
+ return;
+ }
}
reminderTonePath.Append(MINUTEREMINDERTONE_PATH);
if(reminderTonePath.IsEmpty() == false)
{
+ __pPlayer->Stop();
__pPlayer->Close();
- __pPlayer->OpenFile(reminderTonePath,false);
- __pPlayer->SetLooping(false);
- __pPlayer->SetVolume(80);
+ res = __pPlayer->OpenFile(reminderTonePath,false);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer OpenFile failed with %d",res);
+ return;
+ }
+ res = __pPlayer->SetLooping(false);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer SetLooping failed with %d",res);
+ return;
+ }
+ res = __pPlayer->SetVolume(80);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer SetVolume failed with %d",res);
+ return;
+ }
SetSoundMode(SOUND_MODE_MEDIA);
- __pPlayer->Play();
+ res = __pPlayer->Play();
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer Play failed with %d",res);
+ return;
+ }
SetSoundMode(SOUND_MODE_VOICE);
}
}
String disconnectTonePath=L"";
vconf_get_bool(VCONFKEY_CISSAPPL_CALL_END_TONE_BOOL, &unknownRejectStatus);
bool disconnectToneSetStatus = unknownRejectStatus;
+ result res = E_FAILURE;
if(disconnectToneSetStatus == true)
{
if(__pPlayer == null)
{
AppLogDebug("__pPlayer == null");
-
__pPlayer = new (std::nothrow) Player();
- __pPlayer->Construct(*this);
- AppLogDebug("__pPlayer Construct");
+ res = __pPlayer->Construct(*this);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer Construct failed with %d",res);
+ return;
+ }
+
}
if(disconnectTonePath.IsEmpty() == false)
{
+ __pPlayer->Stop();
+ __pPlayer->Close();
AppLogDebug("__pPlayer OpenFile %ls",disconnectTonePath.GetPointer());
- __pPlayer->OpenFile(disconnectTonePath,false);
- AppLogDebug("__pPlayer OpenFile");
- __pPlayer->SetLooping(false);
- AppLogDebug("__pPlayer SetLooping");
- __pPlayer->SetVolume(80);
- AppLogDebug("__pPlayer SetVolume");
+ res = __pPlayer->OpenFile(disconnectTonePath,false);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer OpenFile failed with %d",res);
+ return;
+ }
+ res = __pPlayer->SetLooping(false);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer SetLooping failed with %d",res);
+ return;
+ }
+ res = __pPlayer->SetVolume(80);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer SetLooping SetVolume with %d",res);
+ return;
+ }
SetSoundMode(SOUND_MODE_MEDIA);
AppLogDebug("__pPlayer SetVolume");
- __pPlayer->Play();
+ res = __pPlayer->Play();
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer Play with %d",res);
+ return;
+ }
}
}
AppLogDebug("Exit");
SoundManager::SetConnectTone()
{
- result r = E_FAILURE;
String connectTonePath;
int unknownRejectStatus = -1;
vconf_get_bool(VCONFKEY_CISSAPPL_CALL_CONNECT_TONE_BOOL, &unknownRejectStatus);
bool connectToneSetStatus = unknownRejectStatus;
+ result res = E_FAILURE;
connectTonePath.Append(CALLCONNECTTONE_PATH);
if(__pPlayer == null)
{
__pPlayer = new (std::nothrow) Player();
- r = __pPlayer->Construct(*this);
+ res = __pPlayer->Construct(*this);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer Construct failed with %d",res);
+ return;
+ }
}
if (connectTonePath.IsEmpty() == false)
{
- r = __pPlayer->OpenFile(connectTonePath,false);
- r = __pPlayer->SetLooping(false);
- r = __pPlayer->SetVolume(80);
- r = SetSoundMode(SOUND_MODE_MEDIA);
- r = __pPlayer->Play();
+ __pPlayer->Stop();
+ __pPlayer->Close();
+ res = __pPlayer->OpenFile(connectTonePath,false);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer OpenFile failed with %d",res);
+ return;
+ }
+ res = __pPlayer->SetLooping(false);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer SetLooping failed with %d",res);
+ return;
+ }
+ res = __pPlayer->SetVolume(80);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer SetVolume failed with %d",res);
+ return;
+ }
+ res = SetSoundMode(SOUND_MODE_MEDIA);
+ AppLogDebug("__pPlayer Playing connect tone");
+ res = __pPlayer->Play();
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer Play failed with %d",res);
+ return;
+ }
}
}
}
void
SoundManager::StartAlert(String& contactRingTone)
{
+ result res = E_FAILURE;
AppLogDebug("Enter");
if(__pSoundCallSession != null)
{
if(__pPlayer == null)
{
__pPlayer = new (std::nothrow) Player();
- __pPlayer->Construct(*this);
+ res = __pPlayer->Construct(*this);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer Construct failed with %d",res);
+ return;
+ }
}
if (waitingTonePath.IsEmpty() == false)
{
+ __pPlayer->Stop();
__pPlayer->Close();
- __pPlayer->OpenFile(waitingTonePath,false);
- __pPlayer->SetLooping(true);
- __pPlayer->SetVolume(80);
+ res = __pPlayer->OpenFile(waitingTonePath,false);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer OpenFile failed with %d",res);
+ return;
+ }
+ res = __pPlayer->SetLooping(true);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer SetLooping failed with %d",res);
+ return;
+ }
+ res = __pPlayer->SetVolume(80);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer SetVolume failed with %d",res);
+ return;
+ }
SetSoundMode(SOUND_MODE_MEDIA);
- __pPlayer->Play();
+ res = __pPlayer->Play();
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer Play failed with %d",res);
+ return;
+ }
}
}
return;
{
StartSession();
}
- result r = E_FAILURE;
if(__pVibrator == null)
{
__pVibrator = new (std::nothrow) Vibrator();
- r = __pVibrator->Construct();
+ res = __pVibrator->Construct();
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pVibrator Construct failed with %d",res);
+ return;
+ }
}
if(__pPlayer == null)
{
__pPlayer = new (std::nothrow) Player();
- r = __pPlayer->Construct(*this);
+ res = __pPlayer->Construct(*this);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer Construct failed with %d",res);
+ return;
+ }
}
int retVal = -1;
vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &retVal);
//Check if file is present
File file;
- result res = file.Construct(ringTonePath, "r");
+ res = file.Construct(ringTonePath, "r");
if(res != E_SUCCESS )
{
ringTonePath.Clear();
ringTonePath.Append(RINGTONE_PATH);
}
__pPlayer->Close();
- r = __pPlayer->OpenFile(ringTonePath,false);
- r = __pPlayer->SetLooping(true);
- r = __pPlayer->SetVolume(80);
- r = SetSoundMode(SOUND_MODE_RINGTONE);
- r = __pPlayer->Play();
+ res = __pPlayer->OpenFile(ringTonePath,false);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer Construct failed with %d",res);
+ return;
+ }
+ res = __pPlayer->SetLooping(true);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer Construct failed with %d",res);
+ return;
+ }
+ res = __pPlayer->SetVolume(80);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer Construct failed with %d",res);
+ return;
+ }
+ res = SetSoundMode(SOUND_MODE_RINGTONE);
+ res = __pPlayer->Play();
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer Construct failed with %d",res);
+ return;
+ }
}
if (__isVibrateStatusOn == true)
{
//todo: Get the level from settings
- r = __pVibrator->Start(3000,1000,1000);
+ res = __pVibrator->Start(3000,1000,1000);
}
AppLogDebug("Exit");
return;
void
SoundManager::StopAlert(void)
{
+ result res = E_FAILURE;
AppLogDebug("Enter");
if (__isSoundStatusOn == true)
{
//todo: stop player
AppLogDebug("Stopping ring tone");
- __pPlayer->Stop();
- __pPlayer->Close();
+ res = __pPlayer->Stop();
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer Stop failed with %d",res);
+ return;
+ }
+ res = __pPlayer->Close();
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer Close failed with %d",res);
+ return;
+ }
SetSoundMode(SOUND_MODE_VOICE);
__isSoundStatusOn = false;
StopSession();