CAiwCriteriaItem Class Reference

#include <mw/AiwCommon.h>

Link against: ServiceHandler.lib

class CAiwCriteriaItem : public CBase

Inherits from

  • CAiwCriteriaItem

    Detailed Description

    Criteria item data. This class encapsulates an AIW criteria item. Criteria items are building blocks for AIW 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.

    Since
    Series 60 2.6

    Constructor & Destructor Documentation

    ~CAiwCriteriaItem ( )

    IMPORT_C~CAiwCriteriaItem()[virtual]

    Destructor.

    Member Function Documentation

    ContentType ( )

    IMPORT_C const TDesC8 &ContentType()const

    Gets the content type.

    Returns: The content type.

    DefaultProvider ( )

    IMPORT_C TUidDefaultProvider()const

    Returns the default provider.

    Returns: The default provider UID.

    Id ( )

    IMPORT_C TIntId()const

    Gets the criteria ID, 0 if not defined.

    Returns: The criteria ID.

    MaxProviders ( )

    IMPORT_C TIntMaxProviders()const

    Maximum number of providers allowed for this criteria item.

    Returns: Maximum number of providers allowed for this criteria item.

    NewL ( )

    IMPORT_C CAiwCriteriaItem *NewL()[static]

    Constructs a criteria item instance with null items.

    Returns: A pointer to the new object.

    NewL ( TInt, TInt, const TDesC8 & )

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

    Constructs a criteria item instance.

    ParameterDescription
    aCriteriaIdThe criteria ID.
    aServiceCmdThe service command.
    aContentTypeThe content type.

    Returns: A pointer to the new object.

    NewLC ( )

    IMPORT_C CAiwCriteriaItem *NewLC()[static]

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

    Returns: A pointer to the new object.

    NewLC ( TInt, TInt, const TDesC8 & )

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

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

    ParameterDescription
    aCriteriaIdThe criteria ID.
    aServiceCmdThe service command.
    aContentTypeThe content type.

    Returns: A pointer to the new object.

    Options ( )

    IMPORT_C TUintOptions()const

    Gets the options.

    Returns: Options.

    ReadFromResoureL ( TResourceReader & )

    IMPORT_C voidReadFromResoureL(TResourceReader &aReader)

    Reads a criteria item from a resource.

    ParameterDescription
    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.

    Returns: ETrue if AIW_OPTIONS_ROM_ONLY bit is set, EFalse otherwise.

    ServiceClass ( )

    IMPORT_C const TUid &ServiceClass()const

    Gets the service class UID.

    Returns: The service class UID, see TAiwServiceClass.

    ServiceCmd ( )

    IMPORT_C TIntServiceCmd()const

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

    Returns: The service command UID, see TAiwServiceCommands.

    SetContentTypeL ( const TDesC8 & )

    IMPORT_C voidSetContentTypeL(const TDesC8 &aContentType)

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

    ParameterDescription
    aContentTypeContent MIME type, event type or any agreed one.

    SetDefaultProvider ( TInt )

    IMPORT_C voidSetDefaultProvider(TIntaDefault)

    Sets the default provider.

    ParameterDescription
    aDefaultThe UID of a default provider.

    SetId ( TInt )

    IMPORT_C voidSetId(TIntaId)

    Sets the criteria ID.

    ParameterDescription
    aIdThe criteria ID.

    SetMaxProviders ( TInt )

    IMPORT_C voidSetMaxProviders(TIntaMaxProviders)

    Sets the maximum number of providers.

    ParameterDescription
    aMaxProvidersThe maximum number of providers.

    SetOptions ( TUint )

    IMPORT_C voidSetOptions(TUintaOptions)

    Sets the options.

    ParameterDescription
    aOptionsOptions.

    SetServiceClass ( const TUid & )

    IMPORT_C voidSetServiceClass(const TUid &aServiceUid)

    Sets the service class.

    ParameterDescription
    aServiceUidThe service class, see TAiwServiceClass.

    SetServiceCmd ( TInt )

    IMPORT_C voidSetServiceCmd(TIntaServiceCmd)

    Sets the service command UID.

    ParameterDescription
    aServiceCmdThe AIW service command, see TAiwServiceCommands.

    operator== ( const CAiwCriteriaItem & )

    IMPORT_C TBooloperator==(const CAiwCriteriaItem &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).

    ParameterDescription
    aItemCriteria item to compare.

    Returns: ETrue if criteria items are equal, EFalse otherwise.