Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Nov 2003

    RHostResolver and iStatus

    I'm not sure how to use iStatus when i'm requesting the remote device for its services. I am trying to base my work on the BTP2P example which uses RNotifier instead.

    Lets say I already have a remote device tru RhostResolver,,

    according to the BTP2P example (which uses RNotifier), it doesn't really pass iStatus into any function when it requests for service records, but works this way:

    The RunL first calls the function...

    FindServiceL(TRequestStatus& aObserverRequestStatus) ,
    //etc etc
    iStatusObserver = &aObserverRequestStatus;
    //etc etc

    ...in the ServiceSearcher object (not an active object).

    when it finally reaches AttributeRequestCompleteL() and there are no more records, it calls Finished().

    void CBTServiceSearcher::Finished(TInt aError /* default = KErrNone */)
    if (aError == KErrNone && !HasFoundService())
    aError = KErrNotFound;
    User::RequestComplete(iStatusObserver, aError);

    Here are my questions:

    1) What i don't understand is the 'aError' thing here. I can see that some calls to Finished() (it is called in a few places), some of them do not pass a TInt variable to it. Some do. Yet it works, and there are no 'this is not an overloaded function' errors. Is this a special function? And yet it still works.

    2) General question:

    If i have:


    Will abc123() be run while waiting for blablabla(iStatus) to complete?

  2. #2
    Registered User
    Join Date
    Oct 2003

    I don't know about your 1st question.

    Yes abc123() will run while blablabla is being processed (assuming blablabla is an asynchronous operation)

    When blablabla has finished, RunL will be called.

    BR, Hans

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts