diff -r 1a6714c53019 -r cce62ebc198e radioengine/utils/api/cradioaudiorouter.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/radioengine/utils/api/cradioaudiorouter.h Tue Aug 31 15:15:02 2010 +0300 @@ -0,0 +1,85 @@ +/* +* Copyright (c) 2009 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: +* +*/ + +#ifndef C_RADIOAUDIOROUTER_H +#define C_RADIOAUDIOROUTER_H + +#include + +#include "radioenginedef.h" + +// Forward declarations +class CRadioRoutableAudio; +class MRadioAudioRoutingObserver; + +/** + * CRadioAudioRouter + * + */ +NONSHARABLE_CLASS( CRadioAudioRouter ) : public CBase + { +public: + + IMPORT_C static CRadioAudioRouter* NewL( MRadioAudioRoutingObserver& aAudioRoutingObserver ); + + IMPORT_C ~CRadioAudioRouter(); + + /** + * Sets audio route + * + * @param aAudioRoute new audio route + */ + IMPORT_C void SetAudioRouteL( RadioEngine::TRadioAudioRoute aAudioRoute ); + + /** + * Register routable audio which routing will be changed via this class. + * + * @param aRoutableAudio audio which routing will be added to routable + * audios. Ownership is not moved. + */ + IMPORT_C void RegisterRoutableAudio( CRadioRoutableAudio* aRoutableAudio ); + + /** + * Removes registration of routable audio. + * + * @param aRoutableAudio audio which routing registration will be + * removed. Ownership is not moved. + */ + IMPORT_C void UnRegisterRoutableAudio( CRadioRoutableAudio* aRoutableAudio ); + +private: + + CRadioAudioRouter( MRadioAudioRoutingObserver& aAudioRoutingObserver ); + + void ConstructL(); + +private: // data + + /** + * Reference to audio routing observer. Gets informed when audio routing + * is changed. + */ + MRadioAudioRoutingObserver& iAudioRoutingObserver; + + /** + * Contains routable audios. + */ + RArray iRoutableAudios; + + }; + +#endif // C_RADIOAUDIOROUTER_H