×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Super Contributor
    Join Date
    Jul 2008
    Location
    Chennai,India
    Posts
    889

    View switching on DLL callback

    Hi ppl...

    I have developed a DLL which performs some updations on a CFbsBitmap object like Transformation, rotation etc..
    My DLL takes this Bitmap as Input from the Application...

    Whenever any transformation/updation of image occurs i need to refresh the Application screen ( I juz bitblt the image given to the DLL)..
    And also i need to change Views on certain updations in the Application side..

    The DLL wud be giving a callback whenever there is updation/error/results to the AppUI( The AppUI inherits the DLL Observer)...

    Now my problem is whenever there is a callback from the DLL, i get the respective function called in AppUI...
    Consider i need to switch a view on certain callbacks..How can i do this...If i implement the view switching in the callback function it is the DLL thread...Am i right and i dont need the view switching to be done in the DLL thread since it may affect the DLL callback mechanism..

    I need ur suggestions on how to achieve this functionality...
    Hope you Understand..

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037

    Re: View switching on DLL callback

    Hi,

    normally the DLL code is running in the same thread as the main application - if you do not implement on your own DLL function execution in the separate thread. So switching the view in the observer callback methods is O.K.

    BR
    STeN

  3. #3
    Super Contributor
    Join Date
    Jul 2008
    Location
    Chennai,India
    Posts
    889

    Re: View switching on DLL callback

    Thanx stenlik for your reply..

    But the thing is from the application i request some functions to the DLL, comeback and do my job.The DLL maintains a queue for proceesing commands received...So the App just pushes into the command queue and comes out..

    When the command is processed completely..the DLL will create a thread and make a callback to the Appln..
    Each call back is fom a separate thread created by the DLL..

    So in my callback function even if i use CEikonEnv::Static() i always get the value as ox0000 since it is a DLL thread...
    What to do in these cases...

    Currently in my callback function i wouldd set a variable which would be analysed periodically by the CPeriodicTimer of the AppUI and do the switching..

    But i don't think this is efficient...

  4. #4
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: View switching on DLL callback

    I hve detailed how to use the cross thread processing in this thread
    http://discussion.forum.nokia.com/fo...d.php?t=153679
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

  5. #5
    Super Contributor
    Join Date
    Jul 2008
    Location
    Chennai,India
    Posts
    889

    Re: View switching on DLL callback

    Thanx Paul that was an eye-opener for me..
    I think i need to change my DLL structure to suit that TRequestStatus approach...

  6. #6
    Super Contributor
    Join Date
    Jul 2008
    Location
    Chennai,India
    Posts
    889

    Re: View switching on DLL callback

    Now i have made my DLL as an Async Service provider and support Active objects usage in the Appln side..
    I have a few questions regarding Appln UI - Active object usage..

    1. I create an active object in the UI class encapsulating that Async service provider..
    In view 1, i make a request to the Async service provider thro the UI's active object.
    The RunL() will be invoked when the request completes.. Now based on that i need to switch views( view 2)..
    I remember that the RunL() implementation shudn't take too long to complete..
    What to do now??

    2. If i start a thread inside the RunL() there is another thing like the GUI shud always be in a single thread..
    Am i right???

    3. Any example of UI implementation which relies on Active object's usage cud be useful and also suggestions supporting Async service provider - UI usage..

Similar Threads

  1. GoogleIt
    By deepika.mangla in forum Symbian
    Replies: 5
    Last Post: 2011-05-28, 11:04
  2. Switching list view to Grid view for list box UIQ
    By brajabasi in forum Symbian User Interface
    Replies: 1
    Last Post: 2008-04-14, 07:30
  3. Subsequently switching view and displaying note (S60 3rd)
    By uttumuttu in forum Symbian User Interface
    Replies: 1
    Last Post: 2006-07-21, 14:56
  4. View Switching Problem
    By flipflop82 in forum Symbian
    Replies: 1
    Last Post: 2005-03-10, 15:04
  5. view switching problems
    By mankirath in forum Symbian
    Replies: 0
    Last Post: 2004-09-28, 07:33

Posting Permissions

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