Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



How to issue requests

Once the active object has been constructed, a request can be issued. In the following code fragment, the active object provides the function IssueRequest() to invoke the encapsulated service function.

void CExampleActiveObject::IssueRequest()
    {
        // Request the service
    iServiceProvider-> RequestTheService(iStatus);
        // Indicate request has been issued
    SetActive();
    }


Completing a request

At some point, the service provider's processing completes and it calls RThread::RequestComplete() passing the request status object and the service provider's return code, a value other than KRequestPending. This results in the active object's iStatus member being set to the return code value and a signal that the request is complete.