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 ()
void BufferEmptiedL ( CMMFBuffer *)
void BufferFilledL ( CMMFBuffer *)
TInt64 BytesFree ()
TBool CanCreateSinkBuffer ()
TBool CanCreateSourceBuffer ()
TBool CanUseTransferBuffer ()
CMMFBuffer * CreateSinkBufferL ( TMediaId , TBool &)
CMMFBuffer * CreateSourceBufferL ( TMediaId , TBool &)
TInt Data ( ContentAccess::CData *&)
TInt Delete ()
void EmptyBufferL ( 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 ()
void FillBufferL ( CMMFBuffer *, MDataSink *, TMediaId )
const TFileName FullName ()
TBool IsProtectedL ()
MDataSink * NewSinkL ()
MDataSource * NewSourceL ()
void ReadBufferL ( TInt , CMMFBuffer *, TInt , MDataSink *)
void ReadBufferL ( CMMFBuffer *, TInt , MDataSink *)
void ReadBufferL ( CMMFBuffer *, TInt )
TInt SetAgentProperty ( ContentAccess::TAgentProperty , TInt )
TInt SetSize ( TInt )
void SetTransferBuffer ( TBool )
TFourCC SinkDataTypeCode ( TMediaId )
void SinkPrimeL ()
void SinkStopL ()
TBool SinkStopped ()
void SinkThreadLogoff ()
TInt SinkThreadLogon ( MAsyncEventHandler &)
TInt Size ()
TFourCC SourceDataTypeCode ( TMediaId )
void SourcePauseL ()
void SourcePrimeL ()
void SourceStopL ()
void SourceThreadLogoff ()
TInt SourceThreadLogon ( MAsyncEventHandler &)
const TDesC & UniqueId ()
void WriteBufferL ( TInt , CMMFBuffer *, TInt , MDataSource *)
void WriteBufferL ( CMMFBuffer *, TInt , MDataSource *)
void WriteBufferL ( CMMFBuffer *, TInt )
Protected Member Functions
CMMFFile ()
void CancelRequests ()
void ConstructL (const TDesC8 &, TMMFileMode )
void ConstructSinkL (const TDesC8 &)
void ConstructSourceL (const TDesC8 &)
CTransferBufferCopy * ObtainCopyOfTransferBufferL ( TInt )
void StoreRequestL (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
enum TMMFileMode { 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 *)

void BufferEmptiedL ( CMMFBuffer * aBuffer ) [virtual]

Parameters

CMMFBuffer * aBuffer

BufferFilledL(CMMFBuffer *)

void BufferFilledL ( 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.

CanCreateSinkBuffer()

TBool CanCreateSinkBuffer ( ) [virtual]

CanCreateSourceBuffer()

TBool CanCreateSourceBuffer ( ) [virtual]

CanUseTransferBuffer()

TBool CanUseTransferBuffer ( )

CancelRequests()

void CancelRequests ( ) [protected]

ConstructL(const TDesC8 &, TMMFileMode)

void ConstructL ( const TDesC8 & aInitData,
TMMFileMode aFileMode
) [protected]

Parameters

const TDesC8 & aInitData
TMMFileMode aFileMode

ConstructSinkL(const TDesC8 &)

void ConstructSinkL ( const TDesC8 & aInitData ) [protected, virtual]

Parameters

const TDesC8 & aInitData

ConstructSourceL(const TDesC8 &)

void ConstructSourceL ( const TDesC8 & aInitData ) [protected, virtual]

Parameters

const TDesC8 & aInitData

CreateSinkBufferL(TMediaId, TBool &)

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

Parameters

TMediaId aMediaId
TBool & aReference

CreateSourceBufferL(TMediaId, TBool &)

CMMFBuffer * CreateSourceBufferL ( TMediaId aMediaId,
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.

EmptyBufferL(CMMFBuffer *, MDataSource *, TMediaId)

void EmptyBufferL ( CMMFBuffer * aBuffer,
MDataSource * aSupplier,
TMediaId aMediaId
) [virtual]

Parameters

CMMFBuffer * aBuffer
MDataSource * aSupplier
TMediaId aMediaId

EvaluateIntent(ContentAccess::TIntent)

TInt EvaluateIntent ( ContentAccess::TIntent aIntent ) const [virtual]

Parameters

ContentAccess::TIntent aIntent

ExecuteIntent(ContentAccess::TIntent)

TInt ExecuteIntent ( ContentAccess::TIntent aIntent ) [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)

void FillBufferL ( CMMFBuffer * aBuffer,
MDataSink * aConsumer,
TMediaId aMediaId
) [virtual]

Parameters

CMMFBuffer * aBuffer
MDataSink * aConsumer
TMediaId aMediaId

FullName()

const TFileName FullName ( ) const [virtual]

IsProtectedL()

TBool IsProtectedL ( ) const [virtual]

NewSinkL()

MDataSink * NewSinkL ( ) [static]

NewSourceL()

MDataSource * NewSourceL ( ) [static]

ObtainCopyOfTransferBufferL(TInt)

CTransferBufferCopy * ObtainCopyOfTransferBufferL ( TInt aMaxLength ) [protected]

Parameters

TInt aMaxLength

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

void ReadBufferL ( TInt aLength,
CMMFBuffer * aBuffer,
TInt aPosition,
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 aLength The number of bytes to read.
CMMFBuffer * aBuffer The buffer to read the data into.
TInt aPosition The offset from which to start reading.
MDataSink * aConsumer The sink of tha data read from the clip. Will be informed of read if not NULL.

ReadBufferL(CMMFBuffer *, TInt, MDataSink *)

void ReadBufferL ( CMMFBuffer * aBuffer,
TInt aPosition,
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 * aBuffer The buffer to read the data into.
TInt aPosition The offset from which to start reading.
MDataSink * aConsumer The sink of tha data read from the clip. Will be informed of read if not NULL.

ReadBufferL(CMMFBuffer *, TInt)

void ReadBufferL ( CMMFBuffer * aBuffer,
TInt aPosition
) [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 * aBuffer The buffer to read the data into.
TInt aPosition The offset from which to start reading.

SetAgentProperty(ContentAccess::TAgentProperty, TInt)

TInt SetAgentProperty ( ContentAccess::TAgentProperty aProperty,
TInt aValue
) [virtual]

Parameters

ContentAccess::TAgentProperty aProperty
TInt aValue

SetSize(TInt)

TInt SetSize ( TInt aSize ) [virtual]

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

Parameters

TInt aSize The size of the clip.

SetTransferBuffer(TBool)

void SetTransferBuffer ( TBool aTBuffer )

Parameters

TBool aTBuffer

SinkDataTypeCode(TMediaId)

TFourCC SinkDataTypeCode ( TMediaId aMediaId ) [virtual]

Parameters

TMediaId aMediaId

SinkPrimeL()

void SinkPrimeL ( ) [virtual]

SinkStopL()

void SinkStopL ( ) [virtual]

SinkStopped()

TBool SinkStopped ( ) [virtual]

SinkThreadLogoff()

void SinkThreadLogoff ( ) [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.

SourceDataTypeCode(TMediaId)

TFourCC SourceDataTypeCode ( TMediaId aMediaId ) [virtual]

Parameters

TMediaId aMediaId

SourcePauseL()

void SourcePauseL ( ) [virtual]

SourcePrimeL()

void SourcePrimeL ( ) [virtual]

SourceStopL()

void SourceStopL ( ) [virtual]

SourceThreadLogoff()

void SourceThreadLogoff ( ) [virtual]

SourceThreadLogon(MAsyncEventHandler &)

TInt SourceThreadLogon ( MAsyncEventHandler & aEventHandler ) [virtual]

Parameters

MAsyncEventHandler & aEventHandler

StoreRequestL(CReadWriteRequest *)

void StoreRequestL ( CReadWriteRequest * aRequest ) [protected]

Parameters

CReadWriteRequest * aRequest

UniqueId()

const TDesC & UniqueId ( ) const [virtual]

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

void WriteBufferL ( TInt aLength,
CMMFBuffer * aBuffer,
TInt aPosition,
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 aLength The number of bytes to write.
CMMFBuffer * aBuffer The buffer to write the data into.
TInt aPosition The offset from which to start writing.
MDataSource * aSupplier The source of the data writen to the clip. Will be informed of write if not NULL.

WriteBufferL(CMMFBuffer *, TInt, MDataSource *)

void WriteBufferL ( CMMFBuffer * aBuffer,
TInt aPosition,
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 * aBuffer The buffer to write the data into.
TInt aPosition The offset from which to start writing.
MDataSource * aSupplier The source of the data writen to the clip. Will be informed of write if not NULL.

WriteBufferL(CMMFBuffer *, TInt)

void WriteBufferL ( CMMFBuffer * aBuffer,
TInt aPosition
) [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 * aBuffer The buffer to write the data into.
TInt aPosition The 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]