×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Nov 2004
    Location
    India
    Posts
    74

    Angry Working with two asynchronous requests...

    Hi,
    I am working on Symbian S60 2nd Edition SDK for C++ (Symbian 7.0s) and Codewarrior IDE.
    I am facing some issues while trying to use two asynchronous requests in an application.
    I had an AppUI class which contains handles (pointers) to two engines:
    1. Call Watch Engine: Which Monitor the phone line and disconnect if there is any call.
    2. SMS Engine: Used to send SMS.
    Both call-watch and SMS class make use of active objects.
    The APPUI calls Start() function of CCallWatchEngineclass:
    void CCallWatchEngine::Start(){
    Cancle();
    iLine.NotifyStatusChange(iStatus, iCallStstus);
    SetActive()
    }
    and I am handling the line status in the RunL() Method of the CallWatchEngine class:
    void CCallWatchEngine::RunL(){
    //disconnect the call if it is dialing or ringing state
    }
    Now, once I disconnect the call, I try to send a SMS but calling SendSMSL() function of APPUI which intern calls SaveAndSendSMSL() of CMtmEngineClass.
    CMtmEngine::SaveAndSendSMSL(){
    //Prepare the SMS
    //Call Asynchronous function to send the SMS
    //SetActive();
    }
    Now everything works fine for the first time.
    I dial a call, it is disconnected and SMS is sent. But while trying second time, nothing happens. That means the CCallWatchEngine is not able to get the Line notification. However, if I restart the application, it works again only for the first time.
    I also tried to call Start() function of CCallWatchEngine after the SMS is sent (i.e. from RunL() of CMtmEngine).
    Please let me know if I am doing something wrong. If yes, what will be the best way to do this.
    Thanks & Br,
    Jas

  2. #2
    Registered User
    Join Date
    Feb 2007
    Location
    India
    Posts
    1,128

    Re: Working with two asynchronous requests...

    Quote Originally Posted by go4jas
    Hi,
    I am working on Symbian S60 2nd Edition SDK for C++ (Symbian 7.0s) and Codewarrior IDE.
    I am facing some issues while trying to use two asynchronous requests in an application.
    I had an AppUI class which contains handles (pointers) to two engines:
    1. Call Watch Engine: Which Monitor the phone line and disconnect if there is any call.
    2. SMS Engine: Used to send SMS.
    Both call-watch and SMS class make use of active objects.
    The APPUI calls Start() function of CCallWatchEngineclass:
    void CCallWatchEngine::Start(){
    Cancle();
    iLine.NotifyStatusChange(iStatus, iCallStstus);
    SetActive()
    }
    and I am handling the line status in the RunL() Method of the CallWatchEngine class:
    void CCallWatchEngine::RunL(){
    //disconnect the call if it is dialing or ringing state
    }
    Now, once I disconnect the call, I try to send a SMS but calling SendSMSL() function of APPUI which intern calls SaveAndSendSMSL() of CMtmEngineClass.
    CMtmEngine::SaveAndSendSMSL(){
    //Prepare the SMS
    //Call Asynchronous function to send the SMS
    //SetActive();
    }
    Now everything works fine for the first time.
    I dial a call, it is disconnected and SMS is sent. But while trying second time, nothing happens. That means the CCallWatchEngine is not able to get the Line notification. However, if I restart the application, it works again only for the first time.
    I also tried to call Start() function of CCallWatchEngine after the SMS is sent (i.e. from RunL() of CMtmEngine).
    Please let me know if I am doing something wrong. If yes, what will be the best way to do this.
    Thanks & Br,
    Jas

    Hi jas,

    I've seen your problem, Your are facing this problem just because of telephoney, I think that this problem occurs due to...phone have only two line...that why It's give you only two time notification in your application whenever line status change. Now you get notification, After rejecting call...close all the resources as line close, tsy module unload .....and now again you try load tsy module, create telephoney resource instance once again as you create for first time..then after start monitor call status...

    hope it'll help you

  3. #3
    Regular Contributor
    Join Date
    Nov 2004
    Location
    India
    Posts
    74

    Re: Working with two asynchronous requests...

    Hi kis,

    I think the problem is with using two AO. As the application works fine if I am not sending the SMS request, i.e. I get notification everytime the user try to dial and every time I am able to hangp the call. But once I try to send an SMS, the call notification stops.

    Thanks & Br,
    Jas

  4. #4
    Regular Contributor
    Join Date
    Nov 2004
    Location
    India
    Posts
    74

    Re: Working with two asynchronous requests...

    it works...
    Had to do Deque() and Add(this) to AS

    Rgds,
    Jas

Similar Threads

  1. How to handle multiple asynchronous requests ?
    By sri_nainala in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2005-02-23, 04:08
  2. Multiple asynchronous requests, active objects
    By fabiogr in forum Symbian C++
    Replies: 2
    Last Post: 2004-09-16, 10:13
  3. Replies: 6
    Last Post: 2003-10-24, 06:21
  4. how to solve asynchronous requests in a loop function ?
    By helloeveryone in forum Bluetooth Technology
    Replies: 0
    Last Post: 2003-10-22, 09:48
  5. Active Objects and Multiple Asynchronous Requests
    By flashcfm in forum Symbian C++
    Replies: 3
    Last Post: 2003-07-09, 16:28

Posting Permissions

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