Active Topics

 


Reply
Thread Tools
Posts: 1,048 | Thanked: 979 times | Joined on Mar 2008 @ SF Bay Area
#11
Originally Posted by smandava View Post
I am noob to the Qt Programming. I would love to get the GData parser if you have available.
This file has the code that logs into the contacts API and sends the requests to fetch the contacts - either all of them or from a specific date.
The function onGotContacts is the one which begins the parsing of the XML data returned by the Google Contacts API.

This file has the XML parser for the contacts data that you get from the previous file.
__________________
qgvdial: Google Voice client. All downloads
qgvtp: Phone integration for the n900 that dials out and sends texts using qgvdial.
mosquitto: message broker that implements the MQ Telemetry Transport protocol version 3.
qgvnotify: Google voice and contacts notifier for diablo and maemo.

If you want to thank me, click the Thanks button.
If you'd like to thank my applications, vote to move them to extras.
 

The Following User Says Thank You to uvatbc For This Useful Post:
Posts: 1,048 | Thanked: 979 times | Joined on Mar 2008 @ SF Bay Area
#12
Originally Posted by smandava View Post
Great. I wish there is a Qt API for alarmd.
Almost all QT classes that might be long running have signals to indicate completion. So if you use signals intelligently, there should be no CPU usage by your app while "waiting" for a QTimer to fire.

tl;dr: Use a QTimer and quickly get to the more interesting bits
__________________
qgvdial: Google Voice client. All downloads
qgvtp: Phone integration for the n900 that dials out and sends texts using qgvdial.
mosquitto: message broker that implements the MQ Telemetry Transport protocol version 3.
qgvnotify: Google voice and contacts notifier for diablo and maemo.

If you want to thank me, click the Thanks button.
If you'd like to thank my applications, vote to move them to extras.
 
javispedro's Avatar
Posts: 2,355 | Thanked: 5,249 times | Joined on Jan 2009 @ Barcelona
#13
Originally Posted by smandava View Post
Great. I wish there is a Qt API for alarmd.
You do not need it, the C API will work.

Note thought that it is Maemo-specific.
 
MohammadAG's Avatar
Posts: 2,473 | Thanked: 12,265 times | Joined on Oct 2009 @ Jerusalem, PS/IL
#14
A QTimer of 1000ms didn't affect my CPU much, so I guess it's light on processing/battery power :P
 
kif's Avatar
Posts: 60 | Thanked: 40 times | Joined on May 2010 @ Skovballe, Denmark
#15
Originally Posted by smandava View Post
I guess what Kim mentioned above is QtMobilty Contacts Api opens the address book for the user who started the process. For instance QContactManager.contacts() calls gives different results for user account and developer account even tho its the same binary is making the call.
You are mostly right, but it was very late

What I meant is that a daemon (QtService application) started from event.d (used in maemo) while booting will try to access for instance QContactManager.contacts() as root and not as user, resulting in many interesting errors.

The solution is to start the daemon as user (what I in the sleep deprived state I was in, called for user space), this is done by starting the daemon with the following command in event.d :

Code:
su -c '<path and name of your daemon>' -l user
After that everything should work as usual, with the exception of the missing GUI.

Kim
 
Posts: 7 | Thanked: 1 time | Joined on Apr 2010
#16
Code:
su -c '<path and name of your daemon>' -l user
Thanks for the clarification and the event.d info.
 
Reply


 
Forum Jump


All times are GMT. The time now is 11:27.