CMMFFile Class Reference

class CMMFFile : public CMMFClip

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.

Inherits from

Public Member Functions
~CMMFFile()
voidBufferEmptiedL(CMMFBuffer *)
voidBufferFilledL(CMMFBuffer *)
TInt64 BytesFree()
TBool CanCreateSinkBuffer()
TBool CanCreateSourceBuffer()
TBool CanUseTransferBuffer()
CMMFBuffer *CreateSinkBufferL(TMediaId, TBool &)
CMMFBuffer *CreateSourceBufferL(TMediaId, TBool &)
TInt Data(ContentAccess::CData *&)
TInt Delete()
voidEmptyBufferL(CMMFBuffer *, MDataSource *, TMediaId)
TInt EvaluateIntent(ContentAccess::TIntent)
TInt ExecuteIntent(ContentAccess::TIntent)
const TDesC &Extension()
const TDesC &FileDrive()
RFile &FileL()
const TDesC &FileName()
const TDesC &FilePath()
voidFillBufferL(CMMFBuffer *, MDataSink *, TMediaId)
const TFileNameFullName()
TBool IsProtectedL()
MDataSink *NewSinkL()
MDataSource *NewSourceL()
voidReadBufferL(TInt, CMMFBuffer *, TInt, MDataSink *)
voidReadBufferL(CMMFBuffer *, TInt, MDataSink *)
voidReadBufferL(CMMFBuffer *, TInt)
TInt SetAgentProperty(ContentAccess::TAgentProperty, TInt)
TInt SetSize(TInt)
voidSetTransferBuffer(TBool)
TFourCC SinkDataTypeCode(TMediaId)
voidSinkPrimeL()
voidSinkStopL()
TBool SinkStopped()
voidSinkThreadLogoff()
TInt SinkThreadLogon(MAsyncEventHandler &)
TInt Size()
TFourCC SourceDataTypeCode(TMediaId)
voidSourcePauseL()
voidSourcePrimeL()
voidSourceStopL()
voidSourceThreadLogoff()
TInt SourceThreadLogon(MAsyncEventHandler &)
const TDesC &UniqueId()
voidWriteBufferL(TInt, CMMFBuffer *, TInt, MDataSource *)
voidWriteBufferL(CMMFBuffer *, TInt, MDataSource *)
voidWriteBufferL(CMMFBuffer *, TInt)
Protected Member Functions
CMMFFile()
voidCancelRequests()
voidConstructL(const TDesC8 &, TMMFileMode)
voidConstructSinkL(const TDesC8 &)
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)
Protected Member Enumerations
enumTMMFileMode { ESourceMode, ESinkMode }
Private Attributes
CCAFParameters *iCAFParameters
MAsyncEventHandler *iEventHandler
MGenericFile *iFile
HBufC *iFileDrive
HBufC *iFileExt
TBool iFileHandle
HBufC *iFileName
HBufC *iFilePath
TInt iFileSize
RFs iFsSession
TFileName iFullFileName
RFile iHandle
CMMFFileAsyncEventHandler *iMmfFileEventHandler
TUint iPosition
RPointerArray< CReadWriteRequest >iRequests
TBool iReserved
TFourCC iSinkFourCC
TBool iSinkNotStopped
TFourCC iSourceFourCC
RPointerArray< CTransferBufferCopy >iTransferBufferCopies

Constructor & Destructor Documentation

CMMFFile()

CMMFFile()[protected]

~CMMFFile()

~CMMFFile()[virtual]

Member Functions Documentation

BufferEmptiedL(CMMFBuffer *)

voidBufferEmptiedL(CMMFBuffer *aBuffer)[virtual]

Parameters

CMMFBuffer * aBuffer

BufferFilledL(CMMFBuffer *)

voidBufferFilledL(CMMFBuffer *aBuffer)[virtual]

Parameters

CMMFBuffer * aBuffer

BytesFree()

TInt64 BytesFree()[virtual]

Returns the amount of space available for the clip.

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

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]

Parameters

const TDesC8 & aInitData
TMMFileMode aFileMode

ConstructSinkL(const TDesC8 &)

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

Parameters

const TDesC8 & aInitData

ConstructSourceL(const TDesC8 &)

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

Parameters

const TDesC8 & aInitData

CreateSinkBufferL(TMediaId, TBool &)

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

Parameters

TMediaId aMediaId
TBool & aReference

CreateSourceBufferL(TMediaId, TBool &)

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

Parameters

TMediaId aMediaId
TBool & aReference

Data(ContentAccess::CData *&)

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

Parameters

ContentAccess::CData *& aData

Delete()

TInt Delete()[virtual]

Deletes the clip.

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

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]

Parameters

CMMFBuffer * aBuffer
MDataSource * aSupplier
TMediaId aMediaId

EvaluateIntent(ContentAccess::TIntent)

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

Parameters

ContentAccess::TIntent aIntent

ExecuteIntent(ContentAccess::TIntent)

TInt ExecuteIntent(ContentAccess::TIntentaIntent)[virtual]

Parameters

ContentAccess::TIntent aIntent

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]

Parameters

CMMFBuffer * aBuffer
MDataSink * aConsumer
TMediaId aMediaId

FullName()

const TFileNameFullName()const [virtual]

IsProtectedL()

TBool IsProtectedL()const [virtual]

NewSinkL()

MDataSink *NewSinkL()[static]

NewSourceL()

MDataSource *NewSourceL()[static]

ObtainCopyOfTransferBufferL(TInt)

CTransferBufferCopy *ObtainCopyOfTransferBufferL(TIntaMaxLength)[protected]

Parameters

TInt aMaxLength

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.

Parameters

TInt aLengthThe number of bytes to read.
CMMFBuffer * aBufferThe buffer to read the data into.
TInt aPositionThe offset from which to start reading.
MDataSink * 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.

Parameters

CMMFBuffer * aBufferThe buffer to read the data into.
TInt aPositionThe offset from which to start reading.
MDataSink * 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.

Parameters

CMMFBuffer * aBufferThe buffer to read the data into.
TInt aPositionThe offset from which to start reading.

SetAgentProperty(ContentAccess::TAgentProperty, TInt)

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

Parameters

ContentAccess::TAgentProperty aProperty
TInt aValue

SetSize(TInt)

TInt SetSize(TIntaSize)[virtual]

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

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

Parameters

TInt aSizeThe size of the clip.

SetTransferBuffer(TBool)

voidSetTransferBuffer(TBoolaTBuffer)

Parameters

TBool aTBuffer

SinkDataTypeCode(TMediaId)

TFourCC SinkDataTypeCode(TMediaIdaMediaId)[virtual]

Parameters

TMediaId aMediaId

SinkPrimeL()

voidSinkPrimeL()[virtual]

SinkStopL()

voidSinkStopL()[virtual]

SinkStopped()

TBool SinkStopped()[virtual]

SinkThreadLogoff()

voidSinkThreadLogoff()[virtual]

SinkThreadLogon(MAsyncEventHandler &)

TInt SinkThreadLogon(MAsyncEventHandler &aEventHandler)[virtual]

Parameters

MAsyncEventHandler & aEventHandler

Size()

TInt Size()[virtual]

Returns the size of the clip in bytes.

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

The size of the clip.

SourceDataTypeCode(TMediaId)

TFourCC SourceDataTypeCode(TMediaIdaMediaId)[virtual]

Parameters

TMediaId aMediaId

SourcePauseL()

voidSourcePauseL()[virtual]

SourcePrimeL()

voidSourcePrimeL()[virtual]

SourceStopL()

voidSourceStopL()[virtual]

SourceThreadLogoff()

voidSourceThreadLogoff()[virtual]

SourceThreadLogon(MAsyncEventHandler &)

TInt SourceThreadLogon(MAsyncEventHandler &aEventHandler)[virtual]

Parameters

MAsyncEventHandler & aEventHandler

StoreRequestL(CReadWriteRequest *)

voidStoreRequestL(CReadWriteRequest *aRequest)[protected]

Parameters

CReadWriteRequest * aRequest

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.

Parameters

TInt aLengthThe number of bytes to write.
CMMFBuffer * aBufferThe buffer to write the data into.
TInt aPositionThe offset from which to start writing.
MDataSource * 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.

Parameters

CMMFBuffer * aBufferThe buffer to write the data into.
TInt aPositionThe offset from which to start writing.
MDataSource * 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.

Parameters

CMMFBuffer * aBufferThe buffer to write the data into.
TInt aPositionThe offset from which to start writing.

Member Enumerations Documentation

Enum TMMFileMode

Indicates for which purpose the object instance is being created

Enumerators

ESourceMode

The object is created for being a source

ESinkMode

The object is created for being a sink

Member Data Documentation

CCAFParameters * iCAFParameters

CCAFParameters *iCAFParameters[private]

MAsyncEventHandler * iEventHandler

MAsyncEventHandler *iEventHandler[private]

MGenericFile * iFile

MGenericFile *iFile[private]

HBufC * iFileDrive

HBufC *iFileDrive[private]

HBufC * iFileExt

HBufC *iFileExt[private]

TBool iFileHandle

TBool iFileHandle[private]

HBufC * iFileName

HBufC *iFileName[private]

HBufC * iFilePath

HBufC *iFilePath[private]

TInt iFileSize

TInt iFileSize[private]

RFs iFsSession

RFs iFsSession[private]

TFileName iFullFileName

TFileName iFullFileName[private]

RFile iHandle

RFile iHandle[private]

CMMFFileAsyncEventHandler * iMmfFileEventHandler

CMMFFileAsyncEventHandler *iMmfFileEventHandler[private]

TUint iPosition

TUint iPosition[private]

RPointerArray< CReadWriteRequest > iRequests

RPointerArray< CReadWriteRequest >iRequests[private]

TBool iReserved

TBool iReserved[private]

TFourCC iSinkFourCC

TFourCC iSinkFourCC[private]

TBool iSinkNotStopped

TBool iSinkNotStopped[private]

TFourCC iSourceFourCC

TFourCC iSourceFourCC[private]

RPointerArray< CTransferBufferCopy > iTransferBufferCopies

RPointerArray< CTransferBufferCopy >iTransferBufferCopies[private]