CSCPParamObject Class Reference

class CSCPParamObject : public CBase

The definition for the parameter object class

Inherits from

Constructor & Destructor Documentation

CSCPParamObject()

CSCPParamObject()[private]

C++ default constructor.

~CSCPParamObject()

IMPORT_C~CSCPParamObject()[virtual]

Destructor

Member Functions Documentation

ConstructL()

voidConstructL()[private]

Symbian second-phase constructor

Get(TInt, TDes &)

IMPORT_C TIntGet(TIntaParamID,
TDes &aValue
)

Get the value of an identified parameter stored in the object

Parameters

TInt aParamIDThe ID of the requested parameter.
TDes & aValueWill contain a pointer to a descriptor containing the value after a successful call. The client owns this pointer after the call.

Get(TInt, TInt &)

IMPORT_C TIntGet(TIntaParamID,
TInt &aValue
)

Get the value of an identified parameter stored in the object

Parameters

TInt aParamIDThe ID of the requested parameter.
TInt & aValueWill contain the requested value converted to an integer after a successful call. If the value cannot be converted, an error will be returned.

GetBuffer(HBufC8 *&)

IMPORT_C TIntGetBuffer(HBufC8 *&aBuffer)

Pack the stored parameters into a buffer.

Parameters

HBufC8 *& aBuffer

GetParamLength(TInt)

IMPORT_C TIntGetParamLength(TIntaParamID)

Get the value of an identified parameter stored in the object

Parameters

TInt aParamIDThe ID of the requested parameter.

NewL()

IMPORT_C CSCPParamObject *NewL()[static]

Static constructor.

NewLC()

IMPORT_C CSCPParamObject *NewLC()[static]

Static constructor, that leaves the pointer to the cleanup stack.

Parse(TDes8 &)

IMPORT_C TIntParse(TDes8 &aBuffer)

Parse the given buffer, and add its contents to the object.

Parameters

TDes8 & aBufferThe buffer that will be parsed.

ReadFromFileL(TDesC &, RFs *)

IMPORT_C voidReadFromFileL(TDesC &aFilename,
RFs *aRfs = NULL
)

Reset the content of this object and load new content from a file. Leaves with a generic status code on error.

Parameters

TDesC & aFilenameThe file name to read the content from. This filename must contain a buffer returned by GetBuffer.
RFs * aRfs = NULLAn optional pointer to a connected file server session. If this pointer is not supplied a new RFs will be connected.

Reset()

IMPORT_C TIntReset()

Reset the object and remove all parameters.

Set(TInt, TDes &)

IMPORT_C TIntSet(TIntaParamID,
TDes &aValue
)

Set the value of a parameter. Will replace an existing value, or add a new one.

Parameters

TInt aParamIDThe ID of the parameter.
TDes & aValueThe value to set.

Set(TInt, TInt)

IMPORT_C TIntSet(TIntaParamID,
TIntaValue
)

Set the value of a parameter. Will replace an existing value, or add a new one.

Parameters

TInt aParamIDThe ID of the parameter.
TInt aValueThe value to set, will be converted to a descriptor.

Unset(TInt)

IMPORT_C TIntUnset(TIntaParamID)

Remove the identified parameter from the storage.

Parameters

TInt aParamIDThe ID of the parameter to remove.

WriteToFileL(TDesC &, RFs *)

IMPORT_C voidWriteToFileL(TDesC &aFilename,
RFs *aRfs = NULL
)

Write the content to disk in the format returned by GetBuffer. Leaves with a generic status code on error.

Parameters

TDesC & aFilenameThe name of the file to be written. An existing file will be overwritten, or a new file will be created.
RFs * aRfs = NULLAn optional pointer to a connected file server session. If this pointer is not supplied a new RFs will be connected.

Member Data Documentation

RArray< TInt > iParamIDs

RArray< TInt >iParamIDs[private]

An array containing the IDs for the stored parameters

RPointerArray< HBufC > iParamValues

RPointerArray< HBufC >iParamValues[private]

An array containing the pointers to the parameter values