CMceMediaSource Class Reference

class CMceMediaSource : public CBase

Base class for the MCE media sources.

Media sources represent the origin of data. CMceMediaSource puts it data through CMceMediaStream into CMceMediaSink .

CMceMediaSource has a type that defines how it can connected to other sinks and streams.

Enable and Disable operations to sinks are considered to be local, so they are not signalled to remote terminal.

DTMF tones can be send from media sources that are connected to steams of TMceMediaType KMceAudio. Also, stream must have negotiated codec of type Telephony-Event.

mceclient.lib

Inherits from

Public Member Functions
~CMceMediaSource ()
void CancelDtmfToneSequenceL ()
void DisableL ()
TBool DtmfActive ()
TBool DtmfAvailable ()
void EnableL ()
void Enabled ( TBool )
TInt EventReceivedL ( TMceEvent &)
void ExternalizeFlatL ( RWriteStream &)
void ExternalizeL ( MMceComSerializationContext &)
TMceSourceFactory Factory ()
TMceMediaId Id ()
void InitializeL ( CMceMediaStream &)
void InitializeL ( CMceManager *)
void InternalizeFlatL ( RReadStream &)
void InternalizeL ( MMceComSerializationContext &)
IMPORT_C TBool IsEnabled ()
TInt & ReferenceCount ()
void SendDtmfToneL (const TChar &, TTimeIntervalMicroSeconds32 )
void SendDtmfToneSequenceL (const TDesC &)
TUint64 SerializationId ()
void StartDtmfToneL (const TChar &)
void StopDtmfToneL ()
void StreamAddedL ( CMceMediaStream &)
IMPORT_C TMceSourceType Type ()
void UnInitialize ( CMceMediaStream &)
void UpdateL ( CMceMediaSource &)
void Updated ()
Protected Member Functions
CMceMediaSource ()
void ConstructL ( CMceComMediaSource *)
void DoDisableL ()
void DoEnableL ()
TInt HandleEvent ( TMceEvent &)
Private Member Functions
void DoITCSendL ( TUint8 , TBool , TUint32 , TUint32 )
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Protected Attributes
CMceComMediaSource * iFlatData
RPointerArray < CMceMediaStream > iParents
CMceMediaStream * iStream

Constructor & Destructor Documentation

CMceMediaSource()

CMceMediaSource ( ) [protected]

C++ default constructor.

~CMceMediaSource()

IMPORT_C ~CMceMediaSource ( )

Member Functions Documentation

CancelDtmfToneSequenceL()

void CancelDtmfToneSequenceL ( ) [virtual]
Cancels the sending of tone sequence.
Pre-condition
DtmfAvailable() == ETrue && DtmfActive() == ETrue.

ConstructL(CMceComMediaSource *)

void ConstructL ( CMceComMediaSource * aFlatData ) [protected]

second-phase constructor flat data container

Parameters

CMceComMediaSource * aFlatData

DisableL()

void DisableL ( ) [pure virtual]

Disables streaming explicitly.

DoDisableL()

void DoDisableL ( ) [protected]

Disables streaming explicitly.

DoEnableL()

void DoEnableL ( ) [protected]

Enables streaming explicitly.

DoITCSendL(TUint8, TBool, TUint32, TUint32)

void DoITCSendL ( TUint8 aITCFunction,
TBool aEnabled,
TUint32 aData1 = 0,
TUint32 aData2 = 0
) [private]

Handles ITC

Parameters

TUint8 aITCFunction
TBool aEnabled
TUint32 aData1 = 0
TUint32 aData2 = 0

DtmfActive()

TBool DtmfActive ( ) [virtual]

Checks if DTMF is currently being played.

DtmfAvailable()

TBool DtmfAvailable ( ) [virtual]

Checks if DTMF is available for using. DTMF is available if source is connected to steam of type TMceMediaType KMceAudio, and it has negotiated codec of type Telephony-Event.

EnableL()

void EnableL ( ) [pure virtual]

Enables streaming explicitly.

Enabled(TBool)

void Enabled ( TBool aValue )

Sets enabled flag

Parameters

TBool aValue enabled/disabled

EventReceivedL(TMceEvent &)

TInt EventReceivedL ( TMceEvent & aEvent ) [virtual]

Traversal event handler

Parameters

TMceEvent & aEvent the event

ExternalizeFlatL(RWriteStream &)

void ExternalizeFlatL ( RWriteStream & aWriteStream )

Externalizes flat data

Parameters

RWriteStream & aWriteStream write stream

ExternalizeL(MMceComSerializationContext &)

void ExternalizeL ( MMceComSerializationContext & aSerCtx ) [virtual]

Externalizes

Parameters

MMceComSerializationContext & aSerCtx context for serialization

Factory()

TMceSourceFactory Factory ( ) [static]

Factory

HandleEvent(TMceEvent &)

TInt HandleEvent ( TMceEvent & aEvent ) [protected]

Handles event

Parameters

TMceEvent & aEvent the event

Id()

TMceMediaId Id ( ) const

ID

InitializeL(CMceMediaStream &)

void InitializeL ( CMceMediaStream & aParent ) [virtual]

Initializes

Parameters

CMceMediaStream & aParent the parent

InitializeL(CMceManager *)

void InitializeL ( CMceManager * aManager ) [virtual]

Initializes

Parameters

CMceManager * aManager the manager. Ownership is NOT transferred

InternalizeFlatL(RReadStream &)

void InternalizeFlatL ( RReadStream & aReadStream )

Internalizes flat data

Parameters

RReadStream & aReadStream read stream

InternalizeL(MMceComSerializationContext &)

void InternalizeL ( MMceComSerializationContext & aSerCtx ) [virtual]

Internalizes

Parameters

MMceComSerializationContext & aSerCtx context for serialization

IsEnabled()

IMPORT_C TBool IsEnabled ( ) const

Returns the state of the source.

ReferenceCount()

TInt & ReferenceCount ( )

Sets and gets reference count describing to how many streams source is associated

SendDtmfToneL(const TChar &, TTimeIntervalMicroSeconds32)

void SendDtmfToneL ( const TChar & aTone,
TTimeIntervalMicroSeconds32 aDuration
) [virtual]
Sends a single tone.
Pre-condition
DtmfAvailable() == ETrue && DtmfActive() == EFalse.
Post-condition
DtmfActive() == ETrue.

Parameters

const TChar & aTone DTMF tone to be played.
TTimeIntervalMicroSeconds32 aDuration Duration of DTMF tone to be played.

SendDtmfToneSequenceL(const TDesC &)

void SendDtmfToneSequenceL ( const TDesC & aSequence ) [virtual]
Sends a sequence of tones.
Pre-condition
DtmfAvailable() == ETrue && DtmfActive() == EFalse.
Post-condition
DtmfActive() == ETrue.

Parameters

const TDesC & aSequence Sequence of DTMF tones to be played.

SerializationId()

TUint64 SerializationId ( ) const

Returns serialization id

StartDtmfToneL(const TChar &)

void StartDtmfToneL ( const TChar & aTone ) [virtual]
Starts playing of a tone. Tone is played until stopped by the client.
Pre-condition
DtmfAvailable() == ETrue && DtmfActive() == EFalse.
Post-condition
DtmfActive() == ETrue.

Parameters

const TChar & aTone DTMF tone to be played.

StopDtmfToneL()

void StopDtmfToneL ( ) [virtual]
Stops playing of a tone.
Pre-condition
DtmfAvailable() == ETrue && DtmfActive() == ETrue.

StreamAddedL(CMceMediaStream &)

void StreamAddedL ( CMceMediaStream & aParent ) [virtual]

Stream has been added to session

Parameters

CMceMediaStream & aParent the parent stream

Type()

IMPORT_C TMceSourceType Type ( ) const

Returns the type of the source.

UnInitialize(CMceMediaStream &)

void UnInitialize ( CMceMediaStream & aParent )

Stream is been deleted

Parameters

CMceMediaStream & aParent the parent stream

UpdateL(CMceMediaSource &)

void UpdateL ( CMceMediaSource & aUpdate )

Updates

Parameters

CMceMediaSource & aUpdate updated data

Updated()

void Updated ( ) [virtual]

Called after update

Member Data Documentation

CMceComMediaSource * iFlatData

CMceComMediaSource * iFlatData [protected]

flat data container

RPointerArray< CMceMediaStream > iParents

RPointerArray < CMceMediaStream > iParents [protected]

CMceMediaStream * iStream

CMceMediaStream * iStream [protected]

stream