epoc32/include/mda/client/utility.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 utility.h
     1 // Copyright (c) 1997-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Mda\Client\Utility.h
       
    15 // maintained for backwards compatibility
       
    16 // 
       
    17 //
       
    18 
       
    19 
       
    20 #ifndef __MDA_CLIENT_UTILITY_H__
       
    21 #define __MDA_CLIENT_UTILITY_H__
       
    22 
       
    23 // Standard EPOC32 includes
       
    24 #include <e32base.h>
       
    25 #include <mda/common/base.h>
       
    26 
       
    27 /**
       
    28 @publishedAll
       
    29 @removed
       
    30 */
       
    31 enum {
       
    32 	KDummyMdaServerNotImplemented
       
    33 	};
       
    34 
       
    35 // Maintained for backwards compatibility
       
    36 // Some code such as CONE uses constucts such as CMdaServer* iServer = CMdaServer::NewL();
       
    37 
       
    38 /**
       
    39 @publishedAll
       
    40 @deprecated
       
    41 
       
    42 This class has been deprecated in 7.0s.
       
    43 */
       
    44 class MMdaObjectEventListener
       
    45 	{
       
    46 public:
       
    47 
       
    48 	/**
       
    49     Handles an event that occurred in the media server. Called by the CMdaServer object that the listener has been added to.
       
    50 
       
    51 	@param  aEvent
       
    52 	        A single event that occurred in the media server.
       
    53 	
       
    54 	@see CMdaServer::AddListenerL()
       
    55 	*/
       
    56 	virtual void MoelEvent(const TMdaEvent& aEvent) =0;
       
    57 
       
    58 	/**
       
    59     This function, rather than MoelEvent() is called if the event's ID is EMdaEventMissed. Events are stored when they are 
       
    60 	received and a missed event occurs when there are no spare slots.
       
    61 	*/
       
    62 	virtual void MoelEventMissed() =0;
       
    63 	friend class CMdaServer;
       
    64 	};
       
    65 
       
    66 /**
       
    67 @publishedAll
       
    68 @deprecated
       
    69 
       
    70 This class has been deprecated in 7.0s.
       
    71 */
       
    72 class CMdaServer : public CBase
       
    73 	{
       
    74 public:
       
    75 	IMPORT_C static CMdaServer* NewL();
       
    76 	IMPORT_C ~CMdaServer();
       
    77 	IMPORT_C void AddListenerL(MMdaObjectEventListener& aListener);
       
    78 	IMPORT_C void RemoveListener(MMdaObjectEventListener& aListener);
       
    79 	};
       
    80 
       
    81 /**
       
    82 @publishedAll
       
    83 @released
       
    84 
       
    85 An interface class for handling the change of state of an audio data sample object.
       
    86 
       
    87 The class is a mixin and is intended to be inherited by the client class which is observing the audio recording or the 
       
    88 audio conversion operation. The class defines a single function which must be implemented by the inheriting client class.
       
    89 
       
    90 This class is maintained for binary compatibility with versions prior to 7.0s.
       
    91 
       
    92 Defined in MMdaObjectStateChangeObserver:
       
    93 MoscoStateChangeEvent()
       
    94 */
       
    95 class MMdaObjectStateChangeObserver
       
    96 	{
       
    97 public:
       
    98 	/**
       
    99 	This method is used to receive the updated state of an audio data sample object.  This method must be implemented 
       
   100 	by the inheriting client class.
       
   101 
       
   102 	@param aObject
       
   103 		   The audio data sample object whose state has changed.
       
   104 
       
   105 	@param aPreviousState
       
   106 		   This is the previous state of the audio data sample object before it went into the current state.  
       
   107 		   It is expected to be one of the enum values defined in CMdaAudioClipUtility::TState, which defines 
       
   108 		   the possible states of an audio data sample.
       
   109 
       
   110 	@param aCurrentState
       
   111 		   This is the current state of the audio data sample object.  It is expected to be one of the enum values defined 
       
   112 		   in CMdaAudioClipUtility::TState, which defines the possible states of an audio data sample.
       
   113 			
       
   114 	@param aErrorCode
       
   115 		   A system wide error code, KErrNone for sucessful completion.  KErrInUse, KErrDied or KErrAccessDenied 
       
   116 		   may be returned to indicate that the sound device is in use  by another higher priority client.
       
   117 	 */
       
   118 	virtual void MoscoStateChangeEvent(CBase* aObject, TInt aPreviousState, TInt aCurrentState, TInt aErrorCode)=0;
       
   119 	};
       
   120 
       
   121 #endif