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()

void ConstructL ( ) [private]

Symbian second-phase constructor

Get(TInt, TDes &)

IMPORT_C TInt Get ( TInt aParamID,
TDes & aValue
)

Get the value of an identified parameter stored in the object

Parameters

TInt aParamID The ID of the requested parameter.
TDes & aValue Will 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 TInt Get ( TInt aParamID,
TInt & aValue
)

Get the value of an identified parameter stored in the object

Parameters

TInt aParamID The ID of the requested parameter.
TInt & aValue Will 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 TInt GetBuffer ( HBufC8 *& aBuffer )

Pack the stored parameters into a buffer.

Parameters

HBufC8 *& aBuffer

GetParamLength(TInt)

IMPORT_C TInt GetParamLength ( TInt aParamID )

Get the value of an identified parameter stored in the object

Parameters

TInt aParamID The 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 TInt Parse ( TDes8 & aBuffer )

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

Parameters

TDes8 & aBuffer The buffer that will be parsed.

ReadFromFileL(TDesC &, RFs *)

IMPORT_C void ReadFromFileL ( 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 & aFilename The file name to read the content from. This filename must contain a buffer returned by GetBuffer.
RFs * aRfs = NULL An optional pointer to a connected file server session. If this pointer is not supplied a new RFs will be connected.

Reset()

IMPORT_C TInt Reset ( )

Reset the object and remove all parameters.

Set(TInt, TDes &)

IMPORT_C TInt Set ( TInt aParamID,
TDes & aValue
)

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

Parameters

TInt aParamID The ID of the parameter.
TDes & aValue The value to set.

Set(TInt, TInt)

IMPORT_C TInt Set ( TInt aParamID,
TInt aValue
)

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

Parameters

TInt aParamID The ID of the parameter.
TInt aValue The value to set, will be converted to a descriptor.

Unset(TInt)

IMPORT_C TInt Unset ( TInt aParamID )

Remove the identified parameter from the storage.

Parameters

TInt aParamID The ID of the parameter to remove.

WriteToFileL(TDesC &, RFs *)

IMPORT_C void WriteToFileL ( 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 & aFilename The name of the file to be written. An existing file will be overwritten, or a new file will be created.
RFs * aRfs = NULL An 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