Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


Handling of Multiple Clients

[Top]


Overview

The Contacts Model uses a Client Server architecture. Many clients can send requests to the server for operations on one or more contacts databases.

In the case where multiple clients are accessing the same database the server will attempt to process the requests sequentially.

Requests are usually carried out immediately:

There are however two scenarios where a request cannot be processed immediately:

In both of these cases the request is queued with the expectation that the condition preventing its completion will soon cease.

When a contact item is unlocked, or the state of the server changes, an attempt is made to execute the first request in the queue. If the request still cannot be processed it is once again added to the queue. This activity is repeated for all queued requests.

A request will only remain in the queue for a defined period known as the operation timeout. At the end of this period the client’s request will be completed by leaving with an error code appropriate for the request. These error codes conform to the values used in the previous version of the Contacts Model.

[Top]


Setting the Operation Timeout Value

The following API is used to set the operation timeout value:

void CContactDatabase::SetOperationTimeOutL(const TInt aMilSeconds) const

Parameter

aMilSeconds

The operation timeout in milliseconds. This timeout is only applied to requests sent by clients of this database after this time.

[Top]


Implementation Considerations

By default the operation timeout is 1 second. You may wish to change this value based on the way in which the application layer uses the Contacts Model.

The timeout is set per session – multiple clients using the same database can specify independent values for the operation timeout.