CAiwCriteriaItem Class Reference

API published in: S60 3rd Ed FP 2

Link against: servicehandler.lib


#include <aiwcommon.h>

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.


Public Member Functions

virtual IMPORT_C  ~CAiwCriteriaItem ()
  Destructor.
IMPORT_C void  SetId (TInt aId)
  Sets the criteria ID.
IMPORT_C void  SetServiceClass (const TUid &aServiceUid)
  Sets the service class.
IMPORT_C void  SetServiceCmd (TInt aServiceCmd)
  Sets the service command UID.
IMPORT_C void  SetContentTypeL (const TDesC8 &aContentType)
  Sets the content type.
IMPORT_C TInt  Id () const
  Gets the criteria ID, 0 if not defined.
IMPORT_C const TUid &  ServiceClass () const
  Gets the service class UID.
IMPORT_C TInt  ServiceCmd () const
  Gets the service command UID.
IMPORT_C const TDesC8 &  ContentType () const
  Gets the content type.
IMPORT_C void  SetOptions (TUint aOptions)
  Sets the options.
IMPORT_C TUint  Options () const
  Gets the options.
IMPORT_C TInt  MaxProviders () const
  Maximum number of providers allowed for this criteria item.
IMPORT_C void  ReadFromResoureL (TResourceReader &aReader)
  Reads a criteria item from a resource.
IMPORT_C TUid  DefaultProvider () const
  Returns the default provider.
IMPORT_C void  SetDefaultProvider (TInt aDefault)
  Sets the default provider.
IMPORT_C TBool  operator== (const CAiwCriteriaItem &aItem)
  Equality operator.
IMPORT_C void  SetMaxProviders (TInt aMaxProviders)
  Sets the maximum number of providers.
TBool  RomOnly () const
  If set, only ROM based providers can be attached to this criteria.

Static Public Member Functions

static IMPORT_C CAiwCriteriaItem NewL ()
  Constructs a criteria item instance with null items.
static IMPORT_C CAiwCriteriaItem NewLC ()
  Constructs a criteria item instance with null items.
static IMPORT_C CAiwCriteriaItem NewL (TInt aCriteriaId, TInt aServiceCmd, const TDesC8 &aContentType)
  Constructs a criteria item instance.
static IMPORT_C CAiwCriteriaItem NewLC (TInt aCriteriaId, TInt aServiceCmd, const TDesC8 &aContentType)
  Constructs a criteria item instance.

Constructor & Destructor Documentation

virtual IMPORT_C CAiwCriteriaItem::~CAiwCriteriaItem  )  [virtual]
 

Destructor.


Member Function Documentation

IMPORT_C const TDesC8& CAiwCriteriaItem::ContentType  )  const
 

Gets the content type.

Returns:
The content type.
IMPORT_C TUid CAiwCriteriaItem::DefaultProvider  )  const
 

Returns the default provider.

Returns:
The default provider UID.
IMPORT_C TInt CAiwCriteriaItem::Id  )  const
 

Gets the criteria ID, 0 if not defined.

Returns:
The criteria ID.
IMPORT_C TInt CAiwCriteriaItem::MaxProviders  )  const
 

Maximum number of providers allowed for this criteria item.

Returns:
Maximum number of providers allowed for this criteria item.
static IMPORT_C CAiwCriteriaItem* CAiwCriteriaItem::NewL TInt  aCriteriaId,
TInt  aServiceCmd,
const TDesC8 &  aContentType
[static]
 

Constructs a criteria item instance.

Parameters:
aCriteriaId  The criteria ID.
aServiceCmd  The service command.
aContentType  The content type.
Returns:
A pointer to the new object.
static IMPORT_C CAiwCriteriaItem* CAiwCriteriaItem::NewL  )  [static]
 

Constructs a criteria item instance with null items.

Returns:
A pointer to the new object.
static IMPORT_C CAiwCriteriaItem* CAiwCriteriaItem::NewLC TInt  aCriteriaId,
TInt  aServiceCmd,
const TDesC8 &  aContentType
[static]
 

Constructs a criteria item instance.

Leaves the pointer to the cleanup stack.

Parameters:
aCriteriaId  The criteria ID.
aServiceCmd  The service command.
aContentType  The content type.
Returns:
A pointer to the new object.
static IMPORT_C CAiwCriteriaItem* 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.
IMPORT_C TBool CAiwCriteriaItem::operator== 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).

Parameters:
aItem  Criteria item to compare.
Returns:
ETrue if criteria items are equal, EFalse otherwise.
IMPORT_C TUint CAiwCriteriaItem::Options  )  const
 

Gets the options.

Returns:
Options.
IMPORT_C void CAiwCriteriaItem::ReadFromResoureL TResourceReader &  aReader  ) 
 

Reads a criteria item from a resource.

Parameters:
aReader  A resource reader pointing to a criteria item.
TBool CAiwCriteriaItem::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.
IMPORT_C const TUid& CAiwCriteriaItem::ServiceClass  )  const
 

Gets the service class UID.

Returns:
The service class UID, see TAiwServiceClass.
IMPORT_C TInt CAiwCriteriaItem::ServiceCmd  )  const
 

Gets the service command UID.

KNullUid, if not defined.

Returns:
The service command UID, see TAiwServiceCommands.
IMPORT_C void CAiwCriteriaItem::SetContentTypeL const TDesC8 &  aContentType  ) 
 

Sets the content type.

Makes a copy of the string data.

Parameters:
aContentType  Content MIME type, event type or any agreed one.
IMPORT_C void CAiwCriteriaItem::SetDefaultProvider TInt  aDefault  ) 
 

Sets the default provider.

Parameters:
aDefault  The UID of a default provider.
IMPORT_C void CAiwCriteriaItem::SetId TInt  aId  ) 
 

Sets the criteria ID.

Parameters:
aId  The criteria ID.
IMPORT_C void CAiwCriteriaItem::SetMaxProviders TInt  aMaxProviders  ) 
 

Sets the maximum number of providers.

Parameters:
aMaxProviders  The maximum number of providers.
IMPORT_C void CAiwCriteriaItem::SetOptions TUint  aOptions  ) 
 

Sets the options.

Parameters:
aOptions  Options.
IMPORT_C void CAiwCriteriaItem::SetServiceClass const TUid &  aServiceUid  ) 
 

Sets the service class.

Parameters:
aServiceUid  The service class, see TAiwServiceClass.
IMPORT_C void CAiwCriteriaItem::SetServiceCmd TInt  aServiceCmd  ) 
 

Sets the service command UID.

Parameters:
aServiceCmd  The AIW service command, see TAiwServiceCommands.

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top