CMMFFile Class Reference

#include <mmf/server/mmffile.h>

Link against: AdvancedAudioController.lib

class CMMFFile : public CMMFClip

Inherits from

Protected Member Enumerations
enumTMMFileMode { ESourceMode, ESinkMode }
Public Member Functions
virtual ~CMMFFile()
virtual voidBufferEmptiedL(CMMFBuffer *)
virtual voidBufferFilledL(CMMFBuffer *)
virtual TInt64 BytesFree()
virtual TBool CanCreateSinkBuffer()
virtual TBool CanCreateSourceBuffer()
TBool CanUseTransferBuffer()
virtual CMMFBuffer *CreateSinkBufferL(TMediaId, TBool &)
virtual CMMFBuffer *CreateSourceBufferL(TMediaId, TBool &)
virtual TInt Data(ContentAccess::CData *&)
virtual TInt Delete()
virtual voidEmptyBufferL(CMMFBuffer *, MDataSource *, TMediaId)
virtual TInt EvaluateIntent(ContentAccess::TIntent)
virtual TInt ExecuteIntent(ContentAccess::TIntent)
virtual const TDesC &Extension()
virtual const TDesC &FileDrive()
virtual RFile &FileL()
virtual const TDesC &FileName()
virtual const TDesC &FilePath()
virtual voidFillBufferL(CMMFBuffer *, MDataSink *, TMediaId)
virtual const TFileNameFullName()
virtual TBool IsProtectedL()
MDataSink *NewSinkL()
MDataSource *NewSourceL()
virtual voidReadBufferL(TInt, CMMFBuffer *, TInt, MDataSink *)
virtual voidReadBufferL(CMMFBuffer *, TInt, MDataSink *)
virtual voidReadBufferL(CMMFBuffer *, TInt)
virtual TInt SetAgentProperty(ContentAccess::TAgentProperty, TInt)
virtual TInt SetSize(TInt)
voidSetTransferBuffer(TBool)
virtual TFourCC SinkDataTypeCode(TMediaId)
virtual voidSinkPrimeL()
virtual voidSinkStopL()
virtual TBool SinkStopped()
virtual voidSinkThreadLogoff()
virtual TInt SinkThreadLogon(MAsyncEventHandler &)
virtual TInt Size()
virtual TFourCC SourceDataTypeCode(TMediaId)
virtual voidSourcePauseL()
virtual voidSourcePrimeL()
virtual voidSourceStopL()
virtual voidSourceThreadLogoff()
virtual TInt SourceThreadLogon(MAsyncEventHandler &)
virtual const TDesC &UniqueId()
virtual voidWriteBufferL(TInt, CMMFBuffer *, TInt, MDataSource *)
virtual voidWriteBufferL(CMMFBuffer *, TInt, MDataSource *)
virtual voidWriteBufferL(CMMFBuffer *, TInt)
Protected Member Functions
CMMFFile()
voidCancelRequests()
voidConstructL(const TDesC8 &, TMMFileMode)
virtual voidConstructSinkL(const TDesC8 &)
virtual voidConstructSourceL(const TDesC8 &)
CTransferBufferCopy *ObtainCopyOfTransferBufferL(TInt)
voidStoreRequestL(CReadWriteRequest *)
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()
CMMFClip::CMMFClip(TUid,TUid)

Detailed Description

MultiMedia framework class. Represents a physical file.

This may be source file from which data is read or destination to which data is written.

Intended to be used by controller plugin developers for source and sink plugins.

Member Enumeration Documentation

Enum TMMFileMode

Indicates for which purpose the object instance is being created

EnumeratorValueDescription
ESourceMode

The object is created for being a source

ESinkMode

The object is created for being a sink

Constructor & Destructor Documentation

CMMFFile ( )

CMMFFile()[protected]

~CMMFFile ( )

~CMMFFile()[virtual]

Member Function Documentation

BufferEmptiedL ( CMMFBuffer * )

voidBufferEmptiedL(CMMFBuffer *aBuffer)[virtual]

BufferFilledL ( CMMFBuffer * )

voidBufferFilledL(CMMFBuffer *aBuffer)[virtual]

BytesFree ( )

TInt64 BytesFree()[virtual]

Reimplemented from CMMFClip::BytesFree()

Returns the amount of space available for the clip.

This is a virtual function that each derived class must implement.

Returns: The amount of space available.

CanCreateSinkBuffer ( )

TBool CanCreateSinkBuffer()[virtual]

CanCreateSourceBuffer ( )

TBool CanCreateSourceBuffer()[virtual]

CanUseTransferBuffer ( )

TBool CanUseTransferBuffer()

CancelRequests ( )

voidCancelRequests()[protected]

ConstructL ( const TDesC8 &, TMMFileMode )

voidConstructL(const TDesC8 &aInitData,
TMMFileModeaFileMode
)[protected]

ConstructSinkL ( const TDesC8 & )

voidConstructSinkL(const TDesC8 &aInitData)[protected, virtual]

ConstructSourceL ( const TDesC8 & )

voidConstructSourceL(const TDesC8 &aInitData)[protected, virtual]

CreateSinkBufferL ( TMediaId, TBool & )

CMMFBuffer *CreateSinkBufferL(TMediaIdaMediaId,
TBool &aReference
)[virtual]

CreateSourceBufferL ( TMediaId, TBool & )

CMMFBuffer *CreateSourceBufferL(TMediaIdaMediaId,
TBool &aReference
)[virtual]

Data ( ContentAccess::CData *& )

TInt Data(ContentAccess::CData *&aData)[virtual]

Delete ( )

TInt Delete()[virtual]

Reimplemented from CMMFClip::Delete()

Deletes the clip.

This should be overriden in the derived classes, the default version returns KErrNotSupported.

Returns: An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.

EmptyBufferL ( CMMFBuffer *, MDataSource *, TMediaId )

voidEmptyBufferL(CMMFBuffer *aBuffer,
MDataSource *aSupplier,
TMediaIdaMediaId
)[virtual]

EvaluateIntent ( ContentAccess::TIntent )

TInt EvaluateIntent(ContentAccess::TIntentaIntent)const [virtual]

ExecuteIntent ( ContentAccess::TIntent )

TInt ExecuteIntent(ContentAccess::TIntentaIntent)[virtual]

Extension ( )

const TDesC &Extension()const [virtual]

FileDrive ( )

const TDesC &FileDrive()const [virtual]

FileL ( )

RFile &FileL()[virtual]

FileName ( )

const TDesC &FileName()const [virtual]

FilePath ( )

const TDesC &FilePath()const [virtual]

FillBufferL ( CMMFBuffer *, MDataSink *, TMediaId )

voidFillBufferL(CMMFBuffer *aBuffer,
MDataSink *aConsumer,
TMediaIdaMediaId
)[virtual]

FullName ( )

const TFileNameFullName()const [virtual]

IsProtectedL ( )

TBool IsProtectedL()const [virtual]

NewSinkL ( )

MDataSink *NewSinkL()[static]

NewSourceL ( )

MDataSource *NewSourceL()[static]

ObtainCopyOfTransferBufferL ( TInt )

CTransferBufferCopy *ObtainCopyOfTransferBufferL(TIntaMaxLength)[protected]

ReadBufferL ( TInt, CMMFBuffer *, TInt, MDataSink * )

voidReadBufferL(TIntaLength,
CMMFBuffer *aBuffer,
TIntaPosition,
MDataSink *aConsumer
)[virtual]

Reads aLength number of bytes of data from the offset, aPosition into the buffer, aBuffer. Intended for asynchronous usage.

This is a virtual function that each derived class must implement.

ParameterDescription
aLengthThe number of bytes to read.
aBufferThe buffer to read the data into.
aPositionThe offset from which to start reading.
aConsumerThe sink of tha data read from the clip. Will be informed of read if not NULL.

ReadBufferL ( CMMFBuffer *, TInt, MDataSink * )

voidReadBufferL(CMMFBuffer *aBuffer,
TIntaPosition,
MDataSink *aConsumer
)[virtual]

Reads the maximum number of bytes of data from the offset, aPosition into the buffer, aBuffer. Intended for asynchronous usage.

This is a virtual function that each derived class must implement.

ParameterDescription
aBufferThe buffer to read the data into.
aPositionThe offset from which to start reading.
aConsumerThe sink of tha data read from the clip. Will be informed of read if not NULL.

ReadBufferL ( CMMFBuffer *, TInt )

voidReadBufferL(CMMFBuffer *aBuffer,
TIntaPosition
)[virtual]

Reads the maximum number of bytes of data from the offset, aPosition into the buffer, aBuffer. Intended for synchronous usage.

This is a virtual function that each derived class must implement.

ParameterDescription
aBufferThe buffer to read the data into.
aPositionThe offset from which to start reading.

SetAgentProperty ( ContentAccess::TAgentProperty, TInt )

TInt SetAgentProperty(ContentAccess::TAgentPropertyaProperty,
TIntaValue
)[virtual]

SetSize ( TInt )

TInt SetSize(TIntaSize)[virtual]

Reimplemented from CMMFClip::SetSize(TInt)

Sets the size of the clip. This should be overriden in the derived classes, the default version returns KErrNotSupported.

ParameterDescription
aSizeThe size of the clip.

Returns: An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.

SetTransferBuffer ( TBool )

voidSetTransferBuffer(TBoolaTBuffer)

SinkDataTypeCode ( TMediaId )

TFourCC SinkDataTypeCode(TMediaIdaMediaId)[virtual]

SinkPrimeL ( )

voidSinkPrimeL()[virtual]

SinkStopL ( )

voidSinkStopL()[virtual]

SinkStopped ( )

TBool SinkStopped()[virtual]

SinkThreadLogoff ( )

voidSinkThreadLogoff()[virtual]

SinkThreadLogon ( MAsyncEventHandler & )

TInt SinkThreadLogon(MAsyncEventHandler &aEventHandler)[virtual]

Size ( )

TInt Size()[virtual]

Reimplemented from CMMFClip::Size()

Returns the size of the clip in bytes.

This is a virtual function that each derived class must implement.

Returns: The size of the clip.

SourceDataTypeCode ( TMediaId )

TFourCC SourceDataTypeCode(TMediaIdaMediaId)[virtual]

SourcePauseL ( )

voidSourcePauseL()[virtual]

SourcePrimeL ( )

voidSourcePrimeL()[virtual]

SourceStopL ( )

voidSourceStopL()[virtual]

SourceThreadLogoff ( )

voidSourceThreadLogoff()[virtual]

SourceThreadLogon ( MAsyncEventHandler & )

TInt SourceThreadLogon(MAsyncEventHandler &aEventHandler)[virtual]

StoreRequestL ( CReadWriteRequest * )

voidStoreRequestL(CReadWriteRequest *aRequest)[protected]

UniqueId ( )

const TDesC &UniqueId()const [virtual]

WriteBufferL ( TInt, CMMFBuffer *, TInt, MDataSource * )

voidWriteBufferL(TIntaLength,
CMMFBuffer *aBuffer,
TIntaPosition,
MDataSource *aSupplier
)[virtual]

Writes aLength number of bytes of data from the offset, aPosition from the buffer, aBuffer. Intended for asynchronous usage.

This is a virtual function that each derived class must implement.

ParameterDescription
aLengthThe number of bytes to write.
aBufferThe buffer to write the data into.
aPositionThe offset from which to start writing.
aSupplierThe source of the data writen to the clip. Will be informed of write if not NULL.

WriteBufferL ( CMMFBuffer *, TInt, MDataSource * )

voidWriteBufferL(CMMFBuffer *aBuffer,
TIntaPosition,
MDataSource *aSupplier
)[virtual]

Writes the maximum number of bytes of data from the offset, aPosition from the buffer, aBuffer. Intended for asynchronous usage.

This is a virtual function that each derived class must implement.

ParameterDescription
aBufferThe buffer to write the data into.
aPositionThe offset from which to start writing.
aSupplierThe source of the data writen to the clip. Will be informed of write if not NULL.

WriteBufferL ( CMMFBuffer *, TInt )

voidWriteBufferL(CMMFBuffer *aBuffer,
TIntaPosition
)[virtual]

Writes the maximum number of bytes of data from the offset, aPosition from the buffer, aBuffer. Intended for synchronous usage.

This is a virtual function that each derived class must implement.

ParameterDescription
aBufferThe buffer to write the data into.
aPositionThe offset from which to start writing.