View Single Post
Posts: 1,048 | Thanked: 979 times | Joined on Mar 2008 @ SF Bay Area
#3
Originally Posted by smandava View Post
Hi,

My requirement is to create a Qt based backend service that runs when the device boots and call a function periodically (say every 15 minutes). Very similar to a cron tab.

So far I could find QDBus and QtMobility service framework modules that shows how to implement a service. It is not clear from the documentation weather these services can be run as daemons or the service die after serving the client request.

Can somebody provide a qt way of creating service that runs as daemon and doesn't hurt device battery? Any example projects or code snippets would be much appreciated.

Thanks,
Sateesh.
It depends what you want to achieve. A service is fundamentally an application that has no user interaction and thus no need for a UI.
It may be instructed to perform certain functionality by "poking" it using an IPC mechanism like DBus.

If you intend your service to be cross platform to Windows or Mac, then you should use QtService.
Installing and starting the service is heavily dependent on the target OS:
eg. Most Linux variants have upstart / init.d / event.d, Windows would require you to setup registry entries or invoke SCM.
__________________
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.