MNcdQuery Class Reference

class MNcdQuery : public MCatalogsBase

Describes a query.

The Catalogs Engine may send queries to the client as part of specific operations, or as general callbacks.

Querys consist of a message and query items. A query can have just a message or just a range of query items or both.

The query message can be for example a disclaimer or a plain iformation message. The query message is intented to be shown separate from the query items.

If the query demands some input from the user it will contain query items. A query item defines one element of a whole query e.g. credit card number in a purchase information query.

Query objects can be used to query a wide variety of things from the client: disclaimers, user acceptance for web-connection usage, credit card information etc.

Example:

message: "Please enter creditcard information to complete the purchase" queryitem: "Creditcard owner:" queryitem: "Creditcard expiration date:" queryitem: "Creditcard number:"

Querys can be sent from a server at any time so the client needs to be prepared to handle them.

Most operations use querys when user interaction is needed.

Note:

Query objects don't do any validity checks for input data.

: Querys are simple objects that have no connection to Catalogs Engine of their own. The object that sent the query may need to be notified of the completion of the query (e.g. MNcdOperation::QueryCompleted).

MNcdQueryItem MNcdOperation MNcdProviderObserver

Inherits from

Constructor & Destructor Documentation

~MNcdQuery()

~MNcdQuery ( ) [protected, inline, virtual]

Member Functions Documentation

IsOptional()

TBool IsOptional ( ) const [pure virtual]

Checks whether this query is optional.

IsSecureConnection()

TBool IsSecureConnection ( ) const [pure virtual]

Checks whether the query response will be sent over a secure connection.

MessageBody()

const TDesC & MessageBody ( ) const [pure virtual]

Getter for query message body. If available, should always be shown to the user e.g. as a separate dialog.

MessageTitle()

const TDesC & MessageTitle ( ) const [pure virtual]

Getter for query message title. Intented be shown with the message body if available.

QueryItemsL()

RCatalogsArray < MNcdQueryItem > QueryItemsL ( ) [pure virtual]

Returns the query items.

Exceptions
Leave

System wide error code.

Response()

TResponse Response ( ) [pure virtual]

Gets the query response.

Semantics()

TSemantics Semantics ( ) const [pure virtual]

Semantics of the query.

This can be used to act differently for semantically different querys (disclaimer, information message etc).

SetResponseL(TResponse)

void SetResponseL ( TResponse aResponse ) [pure virtual]

Sets the query response.

Query response accepts or rejects the query as a whole (including all query items). Query response must be set before the query is completed.

Note:

All non-optional query items need to be set before the query can be accepted (response set to EAccepted).

Exceptions
KErrNotReady

Query cannot be accepted, there are non-optional query items whose value has not been set.

Parameters

TResponse aResponse Either MNcdQuery::EAccepted or MNcdQuery::ERejected

Member Enumerations Documentation

Enum TResponse

Query response states.

Enumerators

ENoResponse

No response has been set.

EAccepted

Query has been accepted.

ERejected

Query has been rejected.

Enum TSemantics

Query semantics

Enumerators

ESemanticsNone

No specific semantics specified

ESemanticsUnknown

Unknown/unsupported semantics specified

ESemanticsInfoMessage

Information (just show)

ESemanticsErrorMessage

Error (just show)

ESemanticsDisclaimer

Disclaimer (show, request user acceptance)

ESemanticsOperatorQuery

Operator selection

ESemanticsLanguageQuery

Language selection

ESemanticsRegistrationQuery

User registration

ESemanticsAuthenticationQuery

User authentication

ESemanticsReviewQuery

Review query (e.g. a review score for an item)

ESemanticsPaymentMethodSelectionQuery

Payment method selection

ESemanticsConfirmationQuery

Confirmation query (yes/no)

ESemanticsAdvertisementMessage

Advertisement (just show)

ESemanticsPaymentQuery

Payment input fields