diff -r 4ce423f34688 -r e267340986c9 mmserv/voipaudioservices/VoIPIntfc/src/VoIPRingTonePlayerImpl.cpp --- a/mmserv/voipaudioservices/VoIPIntfc/src/VoIPRingTonePlayerImpl.cpp Fri Sep 17 08:33:15 2010 +0300 +++ b/mmserv/voipaudioservices/VoIPIntfc/src/VoIPRingTonePlayerImpl.cpp Mon Oct 04 00:51:56 2010 +0300 @@ -1,29 +1,24 @@ /* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: VOIP Audio Service -* -*/ - + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: VOIP Audio Service + * + */ #include #include "VoIPAudioSession.h" #include "VoIPRingTonePlayerImpl.h" -// CONSTANTS -//_LIT8(KMimetypeMP3, "audio/mpeg"); - - // --------------------------------------------------------------------------- // CRingTonePlayerImpl::NewL // --------------------------------------------------------------------------- @@ -119,7 +114,7 @@ // --------------------------------------------------------------------------- // void CRingTonePlayerImpl::OpenL(MRingToneObserver& aObserver, - RFile& aFileHandle) + RFile& aFileHandle) { iObserver = &aObserver; StartMsgQueueL(); @@ -133,9 +128,8 @@ // Plays ring tone from a descriptor string based on its MIME type // --------------------------------------------------------------------------- // -void CRingTonePlayerImpl::OpenL(MRingToneObserver& aObserver, - TPtr8 aDesTone, - TPtr8 /*aMimeType*/) +void CRingTonePlayerImpl::OpenL(MRingToneObserver& aObserver, TPtr8 aDesTone, + TPtr8 /*aMimeType*/) { iObserver = &aObserver; StartMsgQueueL(); @@ -148,22 +142,9 @@ } else { -// size += aMimeType.Size(); - HBufC8* tone = HBufC8::NewLC(size); TPtr8 ptr = tone->Des(); -/* - if (aMimeType.Compare(KMimetypeMP3) == 0) - { - // MP3 requires mime header - ptr.Copy(aMimeType); - ptr.Append(aDesTone); - } - else - {*/ - ptr.Copy(aDesTone); -// } - + ptr.Copy(aDesTone); TInt err = iVoIPAudioSession.OpenRingTonePlayer(*tone); CleanupStack::PopAndDestroy(tone); User::LeaveIfError(err); //return error via trap mechanism @@ -229,7 +210,7 @@ if (iMsgComQueue.Handle() <= 0) { TInt err = iMsgComQueue.CreateGlobal(KRingToneComQueue, - KVoIPMsgComQSlots); + KVoIPMsgComQSlots); User::LeaveIfError(err); } @@ -255,7 +236,6 @@ iMsgQComHandler->Start(); } - // ======== CALLBACK FUNCTIONS ======== @@ -270,5 +250,4 @@ iObserver->Event(*this, aEventType, aError); } - // End of file