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