×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    46

    Query regarding IPC mechanism between QT app and symbian console application

    Hi

    I want to create QT process from symbian console application and I can do using Rprocess API to start QT process and from then I need to interact between QT app and symbian console app. So which one could be better approach look like Publish and Subscribe method might cause some overhead.

    Is there a symbian interface APIs to interact to QT app from symbian console application?

    Is there a link where I can find more info on IPC mechanism between QT and Symbian console app ?

    Thanks in advance,

  2. #2
    Registered User
    Join Date
    Dec 2009
    Posts
    39

    Re: Query regarding IPC mechanism between QT app and symbian console application

    Hi thokkal,

    There is no Symbian API defined specifically for communicating with Qt applications. Your options are either

    a) To use a Qt IPC mechanism, which is no problem as long as you link against the appropriate Qt libraries from your Symbian app. However, none of the existing Qt IPC mechanisms are very attractive (see http://qt.nokia.com/doc/4.6/ipc.html). I personally find the QSharedMemory API to be the most useful.

    The settings manager API in the Qt Mobile Extensions (http://wiki.forum.nokia.com/index.ph...gs_Manager_API) may also be useful, but please note that the extensions are still a Technology Preview, i.e. subject to changes.

    b) To use a Symbian IPC mechanism. Which mechanism to use would depend on what you want to do, but from my experience publish & subscribe is the easiest to implement.

    Hope that helps

    //Lennart

  3. #3
    Regular Contributor
    Join Date
    Oct 2008
    Location
    Oslo, Norway
    Posts
    329

    Re: Query regarding IPC mechanism between QT app and symbian console application

    Hi,

    A pure Qt way of doing IPC would be to use QSharedMemory along with QSystemSemaphore. This may cause you some problems though in the native Symbian application side, because of the way QSharedMemory identifies the shared memory segment. From Qt doc: "Warning: QSharedMemory changes the key in a Qt-specific way. It is therefore currently not possible to use the shared memory of non-Qt applications with QSharedMemory."

    In practice, you'll have to select from the following mechanisms Symbian provides for IPC: Client/Server interface, Publish & Subscribe, RPipe, or message queues (RMsgQueue).

    http://developer.symbian.org/wiki/in...2B%2B_Together
    http://developer.symbian.org/wiki/in...for_Symbian_OS

    What is the most suitable for your purpose depends on what kind of IPC you need - for the occasional notification/setting changes P&S is OK - and there's already a Qt wrapper available. For more frequent or real-time data transfer thru IPC, I'd go for message queues instead. You'd need to use wrapper code on Qt side for active object handling (check QMsgQueue::NotifyDataAvailable).

  4. #4
    Registered User
    Join Date
    Mar 2008
    Posts
    23

    Re: Query regarding IPC mechanism between QT app and symbian console application

    Im using QSystemSemaphore to signal between the gui & console. Any data you need to exchange, could be stored in qsetting or a file and then poke/signal the console app to read it.

  5. #5
    Registered User
    Join Date
    Oct 2011
    Posts
    21

    Re: Query regarding IPC mechanism between QT app and symbian console application

    Quote Originally Posted by ravi_sarma View Post
    Im using QSystemSemaphore to signal between the gui & console. Any data you need to exchange, could be stored in qsetting or a file and then poke/signal the console app to read it.
    do u mean IPC between qt gui and symbian console ? or between QTs and SYMBIANs process ?

  6. #6
    Registered User
    Join Date
    Oct 2011
    Posts
    21

    Re: Query regarding IPC mechanism between QT app and symbian console application

    any example code about IPC between QT and Symbian ?

  7. #7
    Registered User
    Join Date
    Dec 2009
    Posts
    39

    Re: Query regarding IPC mechanism between QT app and symbian console application

    Hi Unail,

    hope you don't mind that I post your question here, so that others can benefit from the answers too.

    I tried include qt libs in symbian code, say link qt libs and headers in mmp file ,according to your your reply the in the thread above, but it always failed with errors.

    can your show me how to make it ?

    thanks in advance :-)
    What libs are you trying to include and what are the error message you are getting? Could you perhaps post your mmp file here, in order that we can help you out?

  8. #8
    Registered User
    Join Date
    Oct 2011
    Posts
    21

    Re: Query regarding IPC mechanism between QT app and symbian console application

    it is my responsibility to explain what my question is, so I do not mind at all :-)

    libraries are bases like qtcore and qtgui, following is the mmp file

    /*
    ============================================================================
    Name : NewHelloWorld.mmp
    Author : WilburWoo
    Copyright : Your copyright notice
    Description : This is the project specification file for NewHelloWorld.
    ============================================================================
    */
    APP_LAYER_SYSTEMINCLUDE

    SYSTEMINCLUDE /epoc32/include/mw/QtCore
    SYSTEMINCLUDE /epoc32/include/mw/QtGui

    SYSTEMINCLUDE /epoc32/include/mw

    TARGET NewHelloWorld_0xe1f37dfa.exe
    TARGETTYPE exe
    UID 0x100039CE 0xe1f37dfa

    SOURCEPATH ..\src
    SOURCE NewHelloWorld.cpp
    SOURCE NewHelloWorldApplication.cpp
    SOURCE NewHelloWorldAppView.cpp
    SOURCE NewHelloWorldAppUi.cpp
    SOURCE NewHelloWorldDocument.cpp

    SOURCEPATH ..\data

    START RESOURCE NewHelloWorld.rss
    HEADER
    TARGET NewHelloWorld_0xe1f37dfa
    TARGETPATH resource\apps
    END //RESOURCE

    START RESOURCE NewHelloWorld_reg.rss
    TARGET NewHelloWorld_0xe1f37dfa_reg
    TARGETPATH \private\10003a3f\apps
    END //RESOURCE

    USERINCLUDE ..\inc
    USERINCLUDE ..\help

    LIBRARY qtgui
    LIBRARY qtcore

    LIBRARY euser.lib
    LIBRARY apparc.lib
    LIBRARY cone.lib
    LIBRARY eikcore.lib
    LIBRARY avkon.lib
    LIBRARY commonengine.lib
    LIBRARY efsrv.lib
    LIBRARY estor.lib
    LIBRARY aknnotify.lib
    LIBRARY hlplch.lib

    LANG SC

    VENDORID 0
    SECUREID 0xe1f37dfa
    CAPABILITY ReadUserData

    DEBUGGABLE_UDEBONLY
    // End of File
    Last edited by unail; 2011-10-13 at 11:12.

  9. #9
    Registered User
    Join Date
    Oct 2011
    Posts
    21

    Re: Query regarding IPC mechanism between QT app and symbian console application

    I tried it in a simple HelloWorld symbian code, include headers like
    #include <QWidget>

  10. #10
    Registered User
    Join Date
    Oct 2011
    Posts
    21

    Re: Query regarding IPC mechanism between QT app and symbian console application

    errors are related to headfiles or defines in included qt header files. I guess its caused by missing base libs and headers to be included in symbian code

  11. #11
    Registered User
    Join Date
    Dec 2009
    Posts
    39

    Re: Query regarding IPC mechanism between QT app and symbian console application

    what SDK are you using?

Similar Threads

  1. Want to run a j2me application from symbian
    By joy.mca in forum Symbian
    Replies: 15
    Last Post: 2009-09-12, 12:32
  2. Replies: 2
    Last Post: 2009-02-16, 08:23
  3. symbian signed testing problem.
    By anglina in forum Symbian
    Replies: 0
    Last Post: 2007-02-01, 10:15
  4. Replies: 3
    Last Post: 2006-11-02, 21:58

Posting Permissions

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