1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmhais/refacladapt/src/shared/audiostreamadaptation.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,142 @@
1.4 +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#ifndef AUDIOSTREAMADAPTATION_H
1.20 +#define AUDIOSTREAMADAPTATION_H
1.21 +
1.22 +#include <e32base.h>
1.23 +#include <ecom/ecom.h>
1.24 +#include <badesca.h>
1.25 +#include <a3f/a3fbase.h>
1.26 +
1.27 +/**
1.28 +@publishedAll
1.29 +@released
1.30 +
1.31 +Implementation of the Audio Component Version
1.32 +
1.33 +*/
1.34 +
1.35 +class TAudioComponentInfo
1.36 + {
1.37 + TInt iVersion;
1.38 + };
1.39 +
1.40 +/**
1.41 +@publishedAll
1.42 +@released
1.43 +
1.44 +Implementation of the Stream Adaptation
1.45 +
1.46 +*/
1.47 +
1.48 +class MAudioStreamAdaptationObserver;
1.49 +class CFourCCConvertor;
1.50 +class MLogicalChain;
1.51 +class MAudioContext;
1.52 +
1.53 +const TUid KAudioComponentManagerUid = {0x10283462};
1.54 +
1.55 +// Messages flags
1.56 +const TInt KServerStopping = 0x01;
1.57 +const TInt KPreemptionRequest = 0x02;
1.58 +
1.59 +/**
1.60 +@publishedAll
1.61 +@released
1.62 +
1.63 +This is the interface to AudioStreamAdaptation.
1.64 +This is represent the stream loaded when the MMRC server
1.65 +selects the adaptation.
1.66 +
1.67 +This functionality includes audio playback and recording using different formats
1.68 +CAudioStreamAdaptation provides the access point for clients to Adaptation Layer.
1.69 +It is responsible for initializing connections to various subsystems
1.70 +in audio adaptation. These include setting up and managing connection
1.71 +to the low level audio adaptation API implementations. The connections are then made
1.72 +available .
1.73 +*/
1.74 +class CAudioStreamAdaptation : public CBase
1.75 + {
1.76 +
1.77 +public:
1.78 +
1.79 + /**
1.80 + Constructs, and returns a pointer to, a new CAudioComponentManager object.
1.81 +
1.82 + @return A pointer to the CAudioComponentManager instance.
1.83 + */
1.84 + static CAudioStreamAdaptation* NewL(TUid aType);
1.85 +
1.86 + /**
1.87 + Destructor.
1.88 +
1.89 + Deletes all objects and releases all resource owned by this instance.
1.90 + */
1.91 + virtual ~CAudioStreamAdaptation();
1.92 +
1.93 +
1.94 + /**
1.95 + Returns if a message was passed through the adaptation.
1.96 +
1.97 + @param MLogicalChain
1.98 + Logical Current Chain
1.99 + @param MLogicalChain
1.100 + Desired Chain after message
1.101 + @return An error code indicating if the function call was successful. KErrNone on success, otherwise
1.102 + another of the system-wide error codes.
1.103 + */
1.104 +
1.105 + virtual TInt Message(MLogicalChain& aCurrentChain, MLogicalChain& aDesiredChain, MAudioContext& aContext, TInt aFlags) = 0;
1.106 +
1.107 + /**
1.108 + Returns if a Audio Stream Observer was Registered.
1.109 +
1.110 + @param MAudioStreamAdaptationObserver
1.111 + Observer object witch will be registered
1.112 + @return An error code indicating if the function call was successful. KErrNone on success, otherwise
1.113 + another of the system-wide error codes.
1.114 + */
1.115 +
1.116 + virtual TInt RegisterAudioStreamObserver(MAudioStreamAdaptationObserver& aObserver) = 0 ;
1.117 +
1.118 + /**
1.119 + Returns if a Audio Stream Observer was UnRegistered.
1.120 +
1.121 + @param MAudioStreamAdaptationObserver
1.122 + Observer object witch will be unregistered
1.123 + */
1.124 +
1.125 + virtual void UnregisterAudioStreamObserver(MAudioStreamAdaptationObserver& aObserver) = 0;
1.126 +
1.127 + virtual void UnregisterAllAudioStreamObserver() = 0;
1.128 +
1.129 + virtual void SetFourCC(const CFourCCConvertor& aFourCCConvertor) = 0;
1.130 +
1.131 +
1.132 +private:
1.133 +
1.134 + /** iDtor_ID_Key Instance identifier key. When instance of an
1.135 + * implementation is created by ECOM framework, the
1.136 + * framework will assign UID for it. The UID is used in
1.137 + * destructor to notify framework that this instance is
1.138 + * being destroyed and resources can be released.
1.139 + */
1.140 + TUid iDtor_ID_Key;
1.141 + };
1.142 +
1.143 +#include "audiostreamadaptation.inl"
1.144 +
1.145 +#endif // C_AUDIOCOMPONENTMANAGER_H