mmhais/refacladapt/src/shared/audiostreamadaptation.h
changeset 0 40261b775718
equal deleted inserted replaced
-1:000000000000 0:40261b775718
       
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef AUDIOSTREAMADAPTATION_H
       
    17 #define AUDIOSTREAMADAPTATION_H
       
    18 
       
    19 #include <e32base.h>
       
    20 #include <ecom/ecom.h>
       
    21 #include <badesca.h>
       
    22 #include <a3f/a3fbase.h>
       
    23 
       
    24 /**
       
    25 @publishedAll
       
    26 @released
       
    27 
       
    28 Implementation of the Audio Component Version
       
    29 
       
    30 */
       
    31 
       
    32 class TAudioComponentInfo
       
    33 	{
       
    34 	TInt iVersion;
       
    35 	};
       
    36 
       
    37 /**
       
    38 @publishedAll
       
    39 @released
       
    40 
       
    41 Implementation of the Stream Adaptation
       
    42 
       
    43 */
       
    44 
       
    45 class MAudioStreamAdaptationObserver;
       
    46 class CFourCCConvertor;
       
    47 class MLogicalChain;
       
    48 class MAudioContext;
       
    49 
       
    50 const TUid KAudioComponentManagerUid = {0x10283462};
       
    51 
       
    52 // Messages flags
       
    53 const TInt KServerStopping = 0x01;
       
    54 const TInt KPreemptionRequest = 0x02;
       
    55 
       
    56 /**
       
    57 @publishedAll
       
    58 @released
       
    59 
       
    60 This is the interface to AudioStreamAdaptation.
       
    61 This is represent the stream loaded when the MMRC server 
       
    62 selects the adaptation.
       
    63 
       
    64 This functionality includes audio playback and recording using different formats
       
    65 CAudioStreamAdaptation provides the access point for clients to Adaptation Layer.
       
    66 It is responsible for initializing connections to various subsystems
       
    67 in audio adaptation. These include setting up and managing connection 
       
    68 to the low level audio adaptation API implementations. The connections are then made
       
    69 available .
       
    70 */
       
    71 class CAudioStreamAdaptation : public CBase
       
    72 	{
       
    73 
       
    74 public:
       
    75 
       
    76 	/**
       
    77 	Constructs, and returns a pointer to, a new CAudioComponentManager object.
       
    78 
       
    79 	@return A pointer to the CAudioComponentManager instance.
       
    80 	*/
       
    81 	static CAudioStreamAdaptation* NewL(TUid aType);
       
    82 
       
    83 	/**
       
    84 	Destructor.
       
    85 
       
    86 	Deletes all objects and releases all resource owned by this instance.
       
    87 	*/
       
    88 	virtual ~CAudioStreamAdaptation();
       
    89 
       
    90 
       
    91 	/**
       
    92 	Returns if a message was passed through the adaptation.
       
    93 	
       
    94 	@param MLogicalChain
       
    95 		Logical Current Chain
       
    96 	@param MLogicalChain
       
    97 		Desired Chain after message
       
    98 	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
       
    99 		another of the system-wide error codes.
       
   100 	*/
       
   101 
       
   102 	virtual TInt Message(MLogicalChain& aCurrentChain, MLogicalChain& aDesiredChain, MAudioContext& aContext, TInt aFlags) = 0;
       
   103 
       
   104 	/**
       
   105 	Returns if a Audio Stream Observer was Registered.
       
   106 	
       
   107 	@param MAudioStreamAdaptationObserver
       
   108 		Observer object witch will be registered
       
   109 	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
       
   110 		another of the system-wide error codes.
       
   111 	*/
       
   112 
       
   113 	virtual TInt RegisterAudioStreamObserver(MAudioStreamAdaptationObserver& aObserver) = 0 ;
       
   114 
       
   115 	/**
       
   116 	Returns if a Audio Stream Observer was UnRegistered.
       
   117 	
       
   118 	@param MAudioStreamAdaptationObserver
       
   119 		Observer object witch will be unregistered
       
   120 	*/
       
   121 
       
   122 	virtual void UnregisterAudioStreamObserver(MAudioStreamAdaptationObserver& aObserver) = 0;
       
   123 
       
   124 	virtual void UnregisterAllAudioStreamObserver() = 0;
       
   125 	
       
   126 	virtual void SetFourCC(const CFourCCConvertor& aFourCCConvertor) = 0;
       
   127 	
       
   128 	
       
   129 private:
       
   130 
       
   131 	/**	iDtor_ID_Key Instance identifier key. When instance	of an
       
   132 	*	implementation is created by ECOM framework, the
       
   133 	*	framework will assign UID for it. The UID is used in
       
   134 	*	destructor to notify framework that	this instance is
       
   135 	*	being destroyed	and	resources can be released.
       
   136 	*/
       
   137 	TUid iDtor_ID_Key;
       
   138 	};
       
   139 
       
   140 #include "audiostreamadaptation.inl"
       
   141 
       
   142 #endif // C_AUDIOCOMPONENTMANAGER_H