CLiwGenericParamList Class Reference

class CLiwGenericParamList : public CBase

Generic parameter list. A list containing TLiwGenericParam objects. Used for passing parameters between consumers and providers.

ServiceHandler.lib
Since
Series 60 2.6

Inherits from

  • CLiwGenericParamList
Public Member Functions
~CLiwGenericParamList()
IMPORT_C voidAppendL(const TLiwGenericParam &)
IMPORT_C voidAppendL(const CLiwGenericParamList &)
IMPORT_C voidAtL(TInt, TLiwGenericParam &)
IMPORT_C TIntCount()
IMPORT_C TIntCount(LIW::TGenericParamId, LIW::TVariantTypeId)
IMPORT_C voidExternalizeL(RWriteStream &)
IMPORT_C const TLiwGenericParam *FindFirst(TInt &, LIW::TGenericParamId, LIW::TVariantTypeId)
IMPORT_C const TLiwGenericParam *FindFirst(TInt &, const TDesC8 &, LIW::TVariantTypeId)
IMPORT_C const TLiwGenericParam *FindNext(TInt &, LIW::TGenericParamId, LIW::TVariantTypeId)
IMPORT_C const TLiwGenericParam *FindNext(TInt &, const TDesC8 &, LIW::TVariantTypeId)
IMPORT_C voidInternalizeL(RReadStream &)
IMPORT_C CLiwGenericParamList *NewL()
IMPORT_C CLiwGenericParamList *NewL(RReadStream &)
IMPORT_C CLiwGenericParamList *NewLC()
IMPORT_C CLiwGenericParamList *NewLC(RReadStream &)
IMPORT_C HBufC8 *PackForServerL(TIpcArgs &)
IMPORT_C TBoolRemove(TInt)
IMPORT_C voidRemove(const TDesC8 &)
IMPORT_C voidReset()
IMPORT_C TIntSize()
IMPORT_C voidUnpackFromClientL(const RMessage2 &)
IMPORT_C const TLiwGenericParam &operator[](TInt)
Private Member Functions
CLiwGenericParamList()
voidAppendL(RReadStream &)
voidConstructL()
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()
Private Attributes
RArray< TLiwGenericParam >iParameters

Constructor & Destructor Documentation

CLiwGenericParamList()

CLiwGenericParamList()[private, inline]

~CLiwGenericParamList()

~CLiwGenericParamList()[virtual]

Destructor.

Member Functions Documentation

AppendL(const TLiwGenericParam &)

IMPORT_C voidAppendL(const TLiwGenericParam &aParam)

Appends a parameter to this list.

Parameters

const TLiwGenericParam & aParamThe parameter to append to this list. This object takes an own copy of the data in aParam.

AppendL(const CLiwGenericParamList &)

IMPORT_C voidAppendL(const CLiwGenericParamList &aList)

Copies the given list and appends it to end of this list.

Since
Series 60 2.8

Parameters

const CLiwGenericParamList & aListA list to be copied and appended.

AppendL(RReadStream &)

voidAppendL(RReadStream &aReadStream)[private]

Appends parameters to this list from aStream.

Parameters

RReadStream & aReadStream

AtL(TInt, TLiwGenericParam &)

IMPORT_C voidAtL(TIntaIndex,
TLiwGenericParam &aParam
)const

Gets an entry from the collection based on an integeral index. Note ! This method allocates memory. To ensure proper cleanup you shall call PushL method beforehand.

!!!!!!!!!!!!!!!!!!!!!!!!!! IMPORTANT NOTE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

This is a copy of TLiwGenericParam present in the list at the particular index. To ensure proper cleanup TLiwGenericParam::PushL method should be called beforehand.

 CLiwGenericParamList* param = CLiwGenericParamList::NewLC();
 //... param is filled with some semantic Id and TLiwVariant value ...

 TLiwGenericParam outParam;
 outParam.PushL();			
 //This pushes the parameter object "outParam" into the CleanupStack using TCleanupItem and ParamCleanup.

 param->AtL(0,outParam);	
 //This fills the "outParam" with the parameter value present in the 0th position of parameter list, but
 //if there is any Leave in AtL, then ParamCleanup method is called for proper cleanup

 CleanupStack::Pop(&outParam);	
 outParam.Reset();
 CleanupStack::PopAndDestroy(param);

CLiwDefaultList::AtL TLiwGenericParam::PushL

Parameters

TInt aIndexan index to get an entry from the collection
TLiwGenericParam & aParam

ConstructL()

voidConstructL()[private]

Count()

IMPORT_C TIntCount()const

Returns the number of parameters in the list.

Count(LIW::TGenericParamId, LIW::TVariantTypeId)

IMPORT_C TIntCount(LIW::TGenericParamIdaSemanticId,
LIW::TVariantTypeIdaDataType = LIW::EVariantTypeAny
)const

Returns the number of the parameters in the list by semantic id and datatype.

Parameters

LIW::TGenericParamId aSemanticIdThe semantic ID of the parameter.
LIW::TVariantTypeId aDataType = LIW::EVariantTypeAnyThe type id of data. Default is any type.

ExternalizeL(RWriteStream &)

IMPORT_C voidExternalizeL(RWriteStream &aStream)const

Externalizes this parameter list to a stream.

NewL(RReadStream& aStream) NewLC(RReadStream& aStream)

Parameters

RWriteStream & aStreamThe stream.

FindFirst(TInt &, LIW::TGenericParamId, LIW::TVariantTypeId)

IMPORT_C const TLiwGenericParam *FindFirst(TInt &aIndex,
LIW::TGenericParamIdaSemanticId,
LIW::TVariantTypeIdaDataType = LIW::EVariantTypeAny
)const

Returns the first item matching the given semantic ID.

Parameters

TInt & aIndexPosition in which to start searching. On return it contains the position of the found parameter. It is set to KErrNotFound, if no matching items were found.
LIW::TGenericParamId aSemanticIdThe semantic ID of the parameter.
LIW::TVariantTypeId aDataType = LIW::EVariantTypeAnyThe type id of data. Default is any type.

FindFirst(TInt &, const TDesC8 &, LIW::TVariantTypeId)

IMPORT_C const TLiwGenericParam *FindFirst(TInt &aIndex,
const TDesC8 &aName,
LIW::TVariantTypeIdaDataType = LIW::EVariantTypeAny
)const

Returns item matching the given name.

Parameters

TInt & aIndexPosition in which to start searching, on return contains position of the found parameter. Is set to KErrNotFound, if no matching items were found.
const TDesC8 & aNameParameter name.
LIW::TVariantTypeId aDataType = LIW::EVariantTypeAnyThe type id of data. Default is any type.

FindNext(TInt &, LIW::TGenericParamId, LIW::TVariantTypeId)

IMPORT_C const TLiwGenericParam *FindNext(TInt &aIndex,
LIW::TGenericParamIdaSemanticId,
LIW::TVariantTypeIdaDataType = LIW::EVariantTypeAny
)const

Returns the next item matching the given semantic ID.

Parameters

TInt & aIndexPosition after which to start searching. On return it contains the position of the found parameter. It is set to KErrNotFound, if no matching items were found.
LIW::TGenericParamId aSemanticIdThe semantic ID of the parameter.
LIW::TVariantTypeId aDataType = LIW::EVariantTypeAnyThe type id of data. Default is any type.

FindNext(TInt &, const TDesC8 &, LIW::TVariantTypeId)

IMPORT_C const TLiwGenericParam *FindNext(TInt &aIndex,
const TDesC8 &aName,
LIW::TVariantTypeIdaDataType = LIW::EVariantTypeAny
)const

Returns item matching the given name.

Parameters

TInt & aIndexPosition in which to start searching, on return contains position of the found parameter. Is set to KErrNotFound, if no matching items were found.
const TDesC8 & aNameParameter name.
LIW::TVariantTypeId aDataType = LIW::EVariantTypeAnyThe type id of data. Default is any type.

InternalizeL(RReadStream &)

IMPORT_C voidInternalizeL(RReadStream &aStream)

Internalizes the parameter list from a stream.

Since
Series60 2.8

Parameters

RReadStream & aStreamThe stream.

NewL()

IMPORT_C CLiwGenericParamList *NewL()[static]

Creates an instance of this class.

NewL(RReadStream &)

IMPORT_C CLiwGenericParamList *NewL(RReadStream &aReadStream)[static]

Creates an instance of this class.

Parameters

RReadStream & aReadStreamA stream to initialize this parameter list from.

NewLC()

IMPORT_C CLiwGenericParamList *NewLC()[static]

Creates an instance of this class. Leaves the created instance on the cleanup stack.

NewLC(RReadStream &)

IMPORT_C CLiwGenericParamList *NewLC(RReadStream &aReadStream)[static]

Creates an instance of this class. Leaves the created instance on the cleanup stack.

Parameters

RReadStream & aReadStreamA stream to initialize this parameter list from.

PackForServerL(TIpcArgs &)

IMPORT_C HBufC8 *PackForServerL(TIpcArgs &aArgs)

Packs the parameter list to TIpcArgs structure for passing the generic param list to server over process boundary. Only one RFile handle parameter can be passed over process boundary.

Since
Series60 3.0

Parameters

TIpcArgs & aArgsInter process call arguments.

Remove(TInt)

IMPORT_C TBoolRemove(TIntaSemanticId)

Removes the first found item with given semantic id from the list.

Parameters

TInt aSemanticIdSemantic id for the item to be removed.

Remove(const TDesC8 &)

IMPORT_C voidRemove(const TDesC8 &aName)

Removes the first found item with given string based semantic id from the list.

Parameters

const TDesC8 & aName

Reset()

IMPORT_C voidReset()

Deletes all parameters in the list and resets the list.

Size()

IMPORT_C TIntSize()const

Returns the externalized size of the parameter list in bytes.

UnpackFromClientL(const RMessage2 &)

IMPORT_C voidUnpackFromClientL(const RMessage2 &aArgs)

Unpacks the list from client message structure.

Since
Series60 3.0

Parameters

const RMessage2 & aArgsThe list to be unpacked.

operator[](TInt)

IMPORT_C const TLiwGenericParam &operator[](TIntaIndex)const

Returns a parameter from this list.

Pre-condition
aIndex>=0 && aIndex<Count()

Parameters

TInt aIndexIndex of the parameter.

Member Data Documentation

RArray< TLiwGenericParam > iParameters

RArray< TLiwGenericParam >iParameters[private]