#include <optionconfig.h>
Link against: cdssupport.lib

Class COptionConfig

Interface access: publishedPartner

class COptionConfig : public CStreamElementBase;

Description

Class that represents a configuration parameter. It is based on CStreamElementBase so it can be streamed between client and server.

Derivation

    • CBase - No description.
      • CStreamElementBase - Pure virtual base class for streamable classes. Used when a class must be passed...
        • COptionConfig - Class that represents a configuration parameter. It is based on CStreamElementBa...

Members

Defined in COptionConfig More...

Inherited from CStreamElementBase:

Construction and destruction


NewL(const TUint32 &,const TUint32 &,const TParameterSource &,const TOptionType &,const TDesC &,const TUint32 &,const TDesC &,const TInt32 &,const TDesC &)

Interface access: publishedPartnerInherited from: COptionConfig

IMPORT_C static COptionConfig* NewL(const TUint32 &aIndex, const TUint32 &aUID, const TParameterSource &aSource, const TOptionType &aType, const TDesC &aPrompt, const TUint32 &aNumOptions, const TDesC &aOptions, const TInt32 &aVal, const TDesC &aStrValue);

Description

Allocates and constructs a COptionConfig object.

Parameters

const TUint32 &aIndex

Internal index to the component that owns the object

const TUint32 &aUID

UID of the component that owns the object

const COptionConfig::TParameterSource &aSource

Type of component that owns the object

const COptionConfig::TOptionType &aType

Type of parameter

const TDesC &aPrompt

Prompt to present to user

const TUint32 &aNumOptions

Number of options that the parameter can be set to. Only applies if type is ETMultiEntryEnum.

const TDesC &aOptions

Comma separated list of options. Applies to ETMultiEntryEnum and ETBool.

const TInt32 &aVal

Integer value. Applies to ETInt, ETUInt, ETBool.

const TDesC &aStrValue

String value. Applies to ETString, ETFileName, ETMultiEntry, ETBool.

Return value

COptionConfig *


NewL(const TDesC8 &)

Interface access: publishedPartnerInherited from: COptionConfig

IMPORT_C static COptionConfig* NewL(const TDesC8 &aStreamData);

Description

Allocates and constructs a COptionConfig object from a descriptor. The descriptor contains an externalised version of a COptionConfig object. This method is typically used to obtain a COptionConfig object from a descriptor returned by the core dump server.

Parameters

const TDesC8 &aStreamData

Descriptor with externalised/streamed object

Return value

COptionConfig *

See also:


~COptionConfig()

Interface access: publishedPartnerInherited from: COptionConfig

IMPORT_C ~COptionConfig();

Description

Destructor. Deletes descriptors.


COptionConfig(const TOptionType &,const TParameterSource &,const TUint32 &,const TUint32 &,const TUint32 &,const TInt32 &)

Interface access: internal to technologyDefault as private.

private: COptionConfig(const TOptionType &aType, const TParameterSource &aSource, const TUint32 &aIndex, const TUint32 &aUID, const TUint32 &aNumOptions, const TInt32 &aValue);

Description

First phase contructor. Sets the size to 0, descriptors to NULL.

Parameters

const COptionConfig::TOptionType &aType

const COptionConfig::TParameterSource &aSource

const TUint32 &aIndex

const TUint32 &aUID

const TUint32 &aNumOptions

const TInt32 &aValue

See also:


COptionConfig()

Interface access: internal to technologyDefault as private.

private: COptionConfig();

Description


ConstructL(const TDesC &,const TDesC &,const TDesC &)

Interface access: internal to technologyDefault as private.

private: void ConstructL(const TDesC &aPrompt, const TDesC &aOptions, const TDesC &aStrValue);

Description

Second phase constructor initialises the descriptors

Parameters

const TDesC &aPrompt

const TDesC &aOptions

const TDesC &aStrValue

Member functions


Type()const

Interface access: publishedPartnerInherited from: COptionConfig

IMPORT_C TOptionType Type() const;

Description

Obtain the type of parameter.

Return value

COptionConfig::TOptionType

See also:


Source()const

Interface access: publishedPartnerInherited from: COptionConfig

IMPORT_C TParameterSource Source() const;

Description

Obtain the source component type of the parameter.

Return value

COptionConfig::TParameterSource

See also:


Index()const

Interface access: publishedPartnerInherited from: COptionConfig

IMPORT_C TUint32 Index() const;

Description

Obtain the internal index to the component that owns the object.

Return value

TUint32


Uid()const

Interface access: publishedPartnerInherited from: COptionConfig

IMPORT_C TUint32 Uid() const;

Description

Obtain the UID of the component that owns the object.

Return value

TUint32


Prompt()const

Interface access: publishedPartnerInherited from: COptionConfig

IMPORT_C const TDesC& Prompt() const;

Description

Obtain the prompt to present to the user.

Return value

const TDesC &


NumOptions()const

Interface access: publishedPartnerInherited from: COptionConfig

IMPORT_C TUint32 NumOptions() const;

Description

Obtain the number of options that the parameter can be set to. Only applies if type is ETMultiEntryEnum.

Return value

TUint32


Options()const

Interface access: publishedPartnerInherited from: COptionConfig

IMPORT_C const TDesC& Options() const;

Description

Obtain the comma separated list of options. Applies to ETMultiEntryEnum and ETBool.

Return value

const TDesC &


Value()const

Interface access: publishedPartnerInherited from: COptionConfig

IMPORT_C TInt32 Value() const;

Description

Obtain the integer value of the parameter.

Return value

TInt32


ValueAsBool()const

Interface access: publishedPartnerInherited from: COptionConfig

IMPORT_C TBool ValueAsBool() const;

Description

Obtain the value of the parameter as a Boolean.

Return value

TBool


ValueAsDesc()const

Interface access: publishedPartnerInherited from: COptionConfig

IMPORT_C const TDesC& ValueAsDesc() const;

Description

Obtain the value of the parameter as a descriptor. Does not apply to ETInt or ETUInt.

Return value

const TDesC &


Value(const TInt32)

Interface access: publishedPartnerInherited from: COptionConfig

IMPORT_C void Value(const TInt32 aValue);

Description

Set the integer value of the parameter.

Parameters

const TInt32 aValue


ValueL(const TDesC &)

Interface access: publishedPartnerInherited from: COptionConfig

IMPORT_C void ValueL(const TDesC &aValue);

Description

Set the descriptor value of the parameter.

Parameters

const TDesC &aValue


MaxSize()

Interface access: publishedPartnerInherited from: COptionConfig

IMPORT_C static TInt MaxSize();

Description

Get the maximum size allowed for this object. This is needed as the object is passed across the Client Server interface.

Return value

TInt


Size()const

Interface access: publishedPartnerInherited from: COptionConfig

IMPORT_C virtual TInt Size() const;

Description

Gets the size of the object when externalized. The sizeofs used to calculate this must match the operators used in ExternalizeL and InternalizeL. Special attention must be paid to the name. If the object has not been externalized yet then this method returns the maximum that it could take. The name descriptor is compressed when externalized, so it is not its COptionConfig::Size()const. Furthermore the << operator adds two bytes to the stream when externalizing a descriptor.

Return value

TInt


InternalizeL(RReadStream &)

Interface access: publishedPartnerInherited from: COptionConfig

IMPORT_C virtual void InternalizeL(RReadStream &aStream);

Pre-Condition

Call ExternaliseL to obtain the stream containing an externalised version of this object.

Description

Initialise this object with the contents of RReadStream aStream. The descriptor contains an externalised version of an object. This method is typically used to obtain a COptionConfig object from the core dump server. Any modifications to this method should be synchronised with COptionConfig::ExternalizeL(RWriteStream &,CBufFlat *). Also note that the methods used from RReadStream (>> or ReadUint32L) can behave differently, especially for descriptors.

Parameters

RReadStream &aStream

Stream with streamed object

See also:


ExternalizeL(RWriteStream &,CBufFlat *)

Interface access: publishedPartnerInherited from: COptionConfig

IMPORT_C virtual void ExternalizeL(RWriteStream &aStream, CBufFlat *buf);

Description

Make a streamed representation of this object to a RWriteStream.

This method is typically by the core dump server when contructing a list of COptionConfig for a client. Any modifications to this method should be synchronised with COptionConfig::InternalizeL(RReadStream &). Also note that the methods used from RWriteStream (>> or WriteUint32L) can behave differently, especially for descriptors.

Post-Condition

The stream contains an externalised version of this object.

Parameters

RWriteStream &aStream

Stream to stream object onto

CBufFlat *buf

Buffer onto the same stream, used to obtain correct size of externalised object

See also:


ConstructStringL(const TDesC &,HBufC **)

Interface access: internal to technologyDefault as private.

private: void ConstructStringL(const TDesC &aSource, HBufC **aDest);

Description

Parameters

const TDesC &aSource

HBufC **aDest


Instance()const

Interface access: publishedPartnerInherited from: COptionConfig

IMPORT_C TUint32 Instance() const;

Description

Obtain the internal index to the component that owns the object.

Return value

TUint32


Instance(const TInt32)

Interface access: publishedPartnerInherited from: COptionConfig

IMPORT_C void Instance(const TInt32 aInstance);

Description

Set the internal index to the component that owns the object.

Parameters

const TInt32 aInstance


Tag()const

Interface access: publishedPartnerInherited from: COptionConfig

inline TAny* Tag() const;

Description

Return value

TAny *


SetTag(TAny *)

Interface access: publishedPartnerInherited from: COptionConfig

inline void SetTag(TAny *aTag);

Description

Parameters

TAny *aTag

Member enumerations


Enum TOptionType

Interface access: publishedPartnerInherited from: COptionConfig

TOptionType

Description

Type of parameter

ETInt

Signed integer

ETUInt

Unsigned integer

ETString

String

ETFileName

Filename

ETSingleEntryEnum

Unused

ETMultiEntryEnum

Set string values allowed.

ETBool

True/False


Enum TParameterSource

Interface access: publishedPartnerInherited from: COptionConfig

TParameterSource

Description

Owning component type

ECoreDumpServer

Core Dump Server is owner of the parameter

EFormatterPlugin

Formatter plugin is owner of the parameter

EWriterPlugin

Writer plugin is owner of the parameter

ESCMConfig

Member data


iType

Interface access: internal to technologyDefault as private.

private: TOptionType iType;

Description


iSource

Interface access: internal to technologyDefault as private.

private: TParameterSource iSource;

Description


iIndex

Interface access: internal to technologyDefault as private.

private: TUint32 iIndex;

Description


iUID

Interface access: internal to technologyDefault as private.

private: TUint32 iUID;

Description


iPrompt

Interface access: internal to technologyDefault as private.

private: HBufC * iPrompt;

Description


iNumOptions

Interface access: internal to technologyDefault as private.

private: TUint32 iNumOptions;

Description


iOptions

Interface access: internal to technologyDefault as private.

private: HBufC * iOptions;

Description


iValue

Interface access: internal to technologyDefault as private.

private: TInt32 iValue;

Description


iStrValue

Interface access: internal to technologyDefault as private.

private: HBufC * iStrValue;

Description


iSize

Interface access: internal to technologyDefault as private.

private: TUint iSize;

Description

Externalized size


iInstance

Interface access: internal to technologyDefault as private.

private: TUint32 iInstance;

Description


iTag

Interface access: internal to technologyDefault as private.

private: TAny * iTag;

Description


iSpare2

Interface access: internal to technologyDefault as private.

private: TUint32 iSpare2;

Description