×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Sep 2008
    Posts
    2

    Exclamation Calling S60 C++ APIs in WRT

    Is it possible to call S60 C++ Apis in my Nokia WRT application?

  2. #2
    Nokia Developer Champion
    Join Date
    Jul 2008
    Location
    Pakistan
    Posts
    1,065

    Re: Calling S60 C++ APIs in WRT

    Yes! The only way i know is to create a Symbian C++ local server and then call this server with different http requests (as coded in the server) via WRT to execute Symbian C++ functions. You have two options in this case :
    1- Implement a Symbian C++ Plugin for API Bridge (Search Wiki , it has an article explaining building of a plugin for API Bridge)
    2- Implement your own local server in Symbian C++ from scratch .

    Best Regards,
    SajiSoft

  3. #3
    Registered User
    Join Date
    Oct 2007
    Posts
    178

    Re: Calling S60 C++ APIs in WRT

    How about "Calling Qt from WRT?".

    The idea:
    1. Qt Application: Implements HTTP Server
    2. WRT Widget: Implement XMLHttpRequest to call Qt Application

    Is that possible? Like making http request to 127.0.0.1:8080 from WRT and then catching that up in Qt HTTP server. I don't mind if it's a bit slow.

    At least something similar has been done between Python and WRT: http://wiki.forum.nokia.com/index.ph...m_a_WRT_widget.

    What would be a good TCP PORT to use?
    Last edited by ManuMies; 2010-11-06 at 09:08.

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Calling S60 C++ APIs in WRT

    that you be the same as already siggested: 2- Implement your own local server in Symbian C++ from scratch .

  5. #5
    Registered User
    Join Date
    May 2009
    Location
    Rome
    Posts
    268

    Re: Calling S60 C++ APIs in WRT

    just my opinion ....moving to Qt requires less effort than implements ad hoc http server or whatever

  6. #6
    Registered User
    Join Date
    Oct 2007
    Posts
    178

    Talking Re: Calling S60 C++ APIs in WRT

    Quote Originally Posted by symbianyucca View Post
    that you be the same as already siggested: 2- Implement your own local server in Symbian C++ from scratch .
    Ok. That's what I thought. That shouldn't be too hard since I have experience with local server/sockets.

    But can I really use XmlHTTPRequest to contact the server? No some security restrictions or other restrictions like that?

    If that's possible then it would make possible to do everything from WRT without API Bridge and ecom plugins. Only Qt and WRT. It just sounds too easy.

  7. #7
    Registered User
    Join Date
    Oct 2007
    Posts
    178

    Re: Calling S60 C++ APIs in WRT

    Okay, got it working 50%

    When I'm making this call from widget with XmlHTTPRequest.open("GET", "http://localhost:8080", true);, I see the TcpSocket connection coming up in Qt side and then when I try to write something to the socket, I receive readyState 4 in JS, which is very good sign, but unfortunately also status 0 which is then bad. What can be the issue?

    EDIT: It seems that the connection is blocked, so there is some restriction as I thought. Since it works beautifully with Qt Simulator + Firefox/IE, but not in N8.

    One positive thing is, that the widget stays waiting for reply from QTcpServer, but as soon as the socket is closed from server end, the XmlHTTPRequest says ready state 4 and status 0. I'm welcome to suggestions.
    Last edited by ManuMies; 2010-11-07 at 16:37.

  8. #8
    Registered User
    Join Date
    Oct 2007
    Posts
    178

    Re: Calling S60 C++ APIs in WRT

    Sorry about spam, but I'm so freaking happy.

    I managed get the XmlHTTPRequest working with local host QTcpServer!!

    My QTcpSocket reply was just missing proper header. Now I can do EVERYTHING from Widget, by just making the call to my own server.

    Is it safe enough, if I just pick some random PORT that works, or is there a way to get the server working like 127.0.0.1/MyServer path??

  9. #9
    Registered User
    Join Date
    May 2009
    Location
    Rome
    Posts
    268

    Re: Calling S60 C++ APIs in WRT

    Hi ManuMies
    So it was so easy for you? Cool! You are right to be freaking happy !
    Also good to know i was absolutely wrong
    Last edited by lucarocchi; 2010-11-09 at 17:39.

  10. #10
    Regular Contributor
    Join Date
    May 2009
    Location
    sydney
    Posts
    117

    Re: Calling S60 C++ APIs in WRT

    Really?
    this is interesing! Seems like turning your handset to be a local IIS. lol .
    good effect!
    Nokia is back!

Similar Threads

  1. NFC APIs on Symbian S60
    By timkc in forum Symbian Networking & Messaging (Closed)
    Replies: 8
    Last Post: 2009-11-10, 13:05
  2. Capabilities and APIs S60 3rd MR
    By neil.young in forum Symbian
    Replies: 7
    Last Post: 2009-10-13, 08:51
  3. Can I test telephhony APIs on S60 emulator
    By wit_anshul in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2009-07-15, 07:17
  4. S60 3rd Ed - Acess to sensible APIs
    By ajrocha in forum Mobile Java General
    Replies: 4
    Last Post: 2008-06-23, 16:47
  5. Replies: 2
    Last Post: 2007-08-07, 09:17

Posting Permissions

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