×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Aug 2010
    Posts
    347

    Using Active objects in the context of callbacks

    Hi,

    We are considering a design for our application, where a NetworkManager object monitors availability of networks. In the case of WLAN networks, we are using the WLAN Management API SDK plugin extension, and its associated callback mechanism to get information about WLAN networks. The way the design has been envisaged, the NetworkManager would initiate or terminate new connections depending on network availability. Ideally, we would like to make the NetworkManager an active object, so that it could be activated by the scheduler for managing network connections at the right time. But the catch is that the processing to be done by the NetworkManager is dependent on a callback. This would come in the way of activating the network manager only on a need basis, similar to a threading paradigm.

    So my question is, is there any way by which the callback could be coupled with the semantics of an active object? Any thoughts would be appreciated.

    TIA
    Vin

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,750

    Re: Using Active objects in the context of callbacks

    Every asynchronous callback in Symbian happens in an active object. So you can freely add more active objects to such environment.
    I assume you need some timer, you could simply start/stop it from MWlanMgmtNotifications-methods.

  3. #3
    Regular Contributor
    Join Date
    Aug 2010
    Posts
    347

    Re: Using Active objects in the context of callbacks

    Thanks for the information. We are going ahead based on the understanding that it can be any callback and not just RunL() for the active object to be activated. If this impression is not correct, please point out.

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,750

    Re: Using Active objects in the context of callbacks

    Yes, you can freely have an object which is a CActive and implements some callback intrface(s) too
    Code:
    class CMyActiveWithInputStream : public CActive, public MMdaAudioInputStreamCallback

Similar Threads

  1. Use of multiple Active Object Callbacks
    By david4x in forum Symbian
    Replies: 14
    Last Post: 2010-08-04, 12:16
  2. Replies: 0
    Last Post: 2010-06-30, 12:32
  3. Replies: 2
    Last Post: 2009-04-02, 12:12
  4. Replies: 8
    Last Post: 2008-09-27, 11:09
  5. Replies: 0
    Last Post: 2007-03-06, 19:01

Posting Permissions

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