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.
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).
Public Member Functions | |
---|---|
TBool | IsOptional () |
TBool | IsSecureConnection () |
const TDesC & | MessageBody () |
const TDesC & | MessageTitle () |
RCatalogsArray < MNcdQueryItem > | QueryItemsL () |
TResponse | Response () |
TSemantics | Semantics () |
void | SetResponseL ( TResponse ) |
Protected Member Functions | |
---|---|
~MNcdQuery () |
Inherited Enumerations | |
---|---|
MCatalogsBase:@46 |
TBool | IsSecureConnection | ( | ) | const [pure virtual] |
Checks whether the query response will be sent over a secure connection.
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.
const TDesC & | MessageTitle | ( | ) | const [pure virtual] |
Getter for query message title. Intented be shown with the message body if available.
RCatalogsArray < MNcdQueryItem > | QueryItemsL | ( | ) | [pure virtual] |
Returns the query items.
Leave |
System wide error code. |
TSemantics | Semantics | ( | ) | const [pure virtual] |
Semantics of the query.
This can be used to act differently for semantically different querys (disclaimer, information message etc).
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.
All non-optional query items need to be set before the query can be accepted (response set to EAccepted).
KErrNotReady |
Query cannot be accepted, there are non-optional query items whose value has not been set. |
TResponse aResponse | Either MNcdQuery::EAccepted or MNcdQuery::ERejected |
Query response states.
ENoResponse |
No response has been set. |
EAccepted |
Query has been accepted. |
ERejected |
Query has been rejected. |
Query semantics
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 |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.