CLiwCriteriaItem Class Reference

class CLiwCriteriaItem : public CBase

Criteria item data. This class encapsulates an LIW criteria item. Criteria items are building blocks for LIW interests, i.e. an interest is a list of criteria items. A criteria item can be defined dynamically (by using this class) or in a resource file.

ServiceHandler.lib
Since
Series 60 2.6

Inherits from

Public Member Functions
~CLiwCriteriaItem()
IMPORT_C const TDesC8 &ContentType()
IMPORT_C TUidDefaultProvider()
IMPORT_C voidGetMetaDataOptions(TLiwVariant &)
IMPORT_C TIntId()
IMPORT_C TIntMaxProviders()
IMPORT_C CLiwCriteriaItem *NewL()
IMPORT_C CLiwCriteriaItem *NewL(TInt, TInt, const TDesC8 &)
IMPORT_C CLiwCriteriaItem *NewL(TInt, const TDesC8 &, const TDesC8 &)
IMPORT_C CLiwCriteriaItem *NewLC()
IMPORT_C CLiwCriteriaItem *NewLC(TInt, TInt, const TDesC8 &)
IMPORT_C CLiwCriteriaItem *NewLC(TInt, const TDesC8 &, const TDesC8 &)
IMPORT_C TUintOptions()
IMPORT_C voidReadFromResoureL(TResourceReader &)
TBool RomOnly()
IMPORT_C const TUid &ServiceClass()
IMPORT_C TIntServiceCmd()
IMPORT_C const TDesC8 &ServiceCmdStr()
IMPORT_C voidSetContentTypeL(const TDesC8 &)
IMPORT_C voidSetDefaultProvider(TInt)
IMPORT_C voidSetId(TInt)
IMPORT_C voidSetMaxProviders(TInt)
IMPORT_C voidSetMetaDataOptions(const TLiwVariant &)
IMPORT_C voidSetOptions(TUint)
IMPORT_C voidSetServiceClass(const TUid &)
IMPORT_C voidSetServiceCmd(TInt)
IMPORT_C voidSetServiceCmdL(const TDesC8 &)
IMPORT_C TBooloperator==(const CLiwCriteriaItem &)
Private Member Functions
CLiwCriteriaItem()
voidConstructL()
voidConstructL(TInt, TInt, const TDesC8 &)
voidConstructL(TInt, const TDesC8 &, const TDesC8 &)
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
HBufC8 *iContentType
TInt iCriteriaId
TUid iDefaultProvider
TInt iMaxProviders
TLiwVariant iMetadataOptions
TLiwVariant iOptions
TLiwVariant iReserved
TUid iServiceClass
TInt iServiceCmd

Constructor & Destructor Documentation

CLiwCriteriaItem()

CLiwCriteriaItem()[private]

C++ default constructor.

~CLiwCriteriaItem()

IMPORT_C~CLiwCriteriaItem()[virtual]

Destructor.

Member Functions Documentation

ConstructL()

voidConstructL()[private]

By default Symbian 2nd phase constructor is private.

ConstructL(TInt, TInt, const TDesC8 &)

voidConstructL(TIntaCriteriaId,
TIntaServiceCmd,
const TDesC8 &aContentType
)[private]

By default Symbian 2nd phase constructor is private.

Parameters

TInt aCriteriaId
TInt aServiceCmd
const TDesC8 & aContentType

ConstructL(TInt, const TDesC8 &, const TDesC8 &)

voidConstructL(TIntaCriteriaId,
const TDesC8 &aServiceCmd,
const TDesC8 &aContentType
)[private]

Parameters

TInt aCriteriaId
const TDesC8 & aServiceCmd
const TDesC8 & aContentType

ContentType()

IMPORT_C const TDesC8 &ContentType()const

Gets the content type.

DefaultProvider()

IMPORT_C TUidDefaultProvider()const

Returns the default provider.

GetMetaDataOptions(TLiwVariant &)

IMPORT_C voidGetMetaDataOptions(TLiwVariant &aMetaDataOptions)const

Parameters

TLiwVariant & aMetaDataOptions

Id()

IMPORT_C TIntId()const

Gets the criteria ID, 0 if not defined.

MaxProviders()

IMPORT_C TIntMaxProviders()const

Maximum number of providers allowed for this criteria item.

NewL()

IMPORT_C CLiwCriteriaItem *NewL()[static]

Constructs a criteria item instance with null items.

NewL(TInt, TInt, const TDesC8 &)

IMPORT_C CLiwCriteriaItem *NewL(TIntaCriteriaId,
TIntaServiceCmd,
const TDesC8 &aContentType
)[static]

Constructs a criteria item instance.

Parameters

TInt aCriteriaIdThe criteria ID.
TInt aServiceCmdThe service command.
const TDesC8 & aContentTypeThe content type.

NewL(TInt, const TDesC8 &, const TDesC8 &)

IMPORT_C CLiwCriteriaItem *NewL(TIntaCriteriaId,
const TDesC8 &aServiceCmd,
const TDesC8 &aContentType
)[static]

Constructs a criteria item instance.

Parameters

TInt aCriteriaIdThe criteria ID.
const TDesC8 & aServiceCmdThe service command.
const TDesC8 & aContentTypeContent type.

NewLC()

IMPORT_C CLiwCriteriaItem *NewLC()[static]

Constructs a criteria item instance with null items. Leaves the pointer to the cleanup stack.

NewLC(TInt, TInt, const TDesC8 &)

IMPORT_C CLiwCriteriaItem *NewLC(TIntaCriteriaId,
TIntaServiceCmd,
const TDesC8 &aContentType
)[static]

Constructs a criteria item instance. Leaves the pointer to the cleanup stack.

Parameters

TInt aCriteriaIdThe criteria ID.
TInt aServiceCmdThe service command.
const TDesC8 & aContentTypeThe content type.

NewLC(TInt, const TDesC8 &, const TDesC8 &)

IMPORT_C CLiwCriteriaItem *NewLC(TIntaCriteriaId,
const TDesC8 &aServiceCmd,
const TDesC8 &aContentType
)[static]

Constructs a criteria item instance.

Parameters

TInt aCriteriaIdThe criteria ID.
const TDesC8 & aServiceCmdThe service command.
const TDesC8 & aContentTypeContent type.

Options()

IMPORT_C TUintOptions()const

Gets the options.

ReadFromResoureL(TResourceReader &)

IMPORT_C voidReadFromResoureL(TResourceReader &aReader)

Reads a criteria item from a resource.

Parameters

TResourceReader & aReaderA resource reader pointing to a criteria item.

RomOnly()

TBool RomOnly()const [inline]

If set, only ROM based providers can be attached to this criteria.

ServiceClass()

IMPORT_C const TUid &ServiceClass()const

Gets the service class UID.

ServiceCmd()

IMPORT_C TIntServiceCmd()const

Gets the service command UID. KNullUid, if not defined.

ServiceCmdStr()

IMPORT_C const TDesC8 &ServiceCmdStr()const

Gets the service command name.

SetContentTypeL(const TDesC8 &)

IMPORT_C voidSetContentTypeL(const TDesC8 &aContentType)

Sets the content type. Makes a copy of the string data.

Parameters

const TDesC8 & aContentTypeContent MIME type, event type or any agreed one.

SetDefaultProvider(TInt)

IMPORT_C voidSetDefaultProvider(TIntaDefault)

Sets the default provider.

Parameters

TInt aDefaultThe UID of a default provider.

SetId(TInt)

IMPORT_C voidSetId(TIntaId)

Sets the criteria ID.

Parameters

TInt aIdThe criteria ID.

SetMaxProviders(TInt)

IMPORT_C voidSetMaxProviders(TIntaMaxProviders)

Sets the maximum number of providers.

Parameters

TInt aMaxProvidersThe maximum number of providers.

SetMetaDataOptions(const TLiwVariant &)

IMPORT_C voidSetMetaDataOptions(const TLiwVariant &aMetaDataOptions)

Parameters

const TLiwVariant & aMetaDataOptions

SetOptions(TUint)

IMPORT_C voidSetOptions(TUintaOptions)

Sets the options.

Parameters

TUint aOptionsOptions.

SetServiceClass(const TUid &)

IMPORT_C voidSetServiceClass(const TUid &aServiceUid)

Sets the service class.

Parameters

const TUid & aServiceUidThe service class, see TLiwServiceClass.

SetServiceCmd(TInt)

IMPORT_C voidSetServiceCmd(TIntaServiceCmd)

Sets the service command UID.

Parameters

TInt aServiceCmdThe LIW service command, see TLiwServiceCommands.

SetServiceCmdL(const TDesC8 &)

IMPORT_C voidSetServiceCmdL(const TDesC8 &aServiceCmd)

Sets the service command name.

Parameters

const TDesC8 & aServiceCmdThe LIW service command.

operator==(const CLiwCriteriaItem &)

IMPORT_C TBooloperator==(const CLiwCriteriaItem &aItem)

Equality operator. Two criteria items are considered equal only if all parameters match. The parameters are: criteria id, service command, content type, service class, default provider, max providers and options).

Parameters

const CLiwCriteriaItem & aItemCriteria item to compare.

Member Data Documentation

HBufC8 * iContentType

HBufC8 *iContentType[private]

TInt iCriteriaId

TInt iCriteriaId[private]

TUid iDefaultProvider

TUid iDefaultProvider[private]

TInt iMaxProviders

TInt iMaxProviders[private]

TLiwVariant iMetadataOptions

TLiwVariant iMetadataOptions[private]

TLiwVariant iOptions

TLiwVariant iOptions[private]

TLiwVariant iReserved

TLiwVariant iReserved[private]

TUid iServiceClass

TUid iServiceClass[private]

TInt iServiceCmd

TInt iServiceCmd[private]