Is it possible to call S60 C++ Apis in my Nokia WRT application?
Is it possible to call S60 C++ Apis in my Nokia WRT application?
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
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.
that you be the same as already siggested: 2- Implement your own local server in Symbian C++ from scratch .
just my opinion ....moving to Qt requires less effort than implements ad hoc http server or whatever
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.![]()
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.
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??
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.
Really?
this is interesing! Seems like turning your handset to be a local IIS. lol .
good effect!
Nokia is back!