View Single Post
SPARTAN563's Avatar
Posts: 92 | Thanked: 92 times | Joined on May 2011 @ Stellenbosch, South Africa
#9
Ah, yeah in Qt they have a signal that gets emitted by the QDBusConnection::interface() object called serviceOwnerChanged which does the same thing. Unfortunately it doesn't give me quite what I want as like you said, is just shows when an app launches.
What the libdbus classes give me (if you look at what dbus-monitor can do) is the ability to "eavesdrop" on which method calls are made across the bus. So all I really need to do is check to see if a call is made to the top_application function, if it is I grab the dbus path and compare it to the ones I have stored in memory (from the .service files) and if it matches any of my "locked" ones I just lock the phone.

All sounds great in theory but unfortunately the dbus bindings are having a field day with my Qt install (156 errors and counting... :P) because Qt doesn't use many of the headers that it depends on.
Overall, a royal PITA

Thanks anyway, am sure that those calls will come in useful at some point. I wonder, do you know if A) those signals are triggered on an app that doesn't make use of DBus and B) you can determine the source of origin?

If !B then I could always use them as a trigger for the check routine rather than having a continuous check (would just have to implement some kind of anti-spam protection), but if B it would be really, really useful
__________________
Sierra Softworks
 

The Following User Says Thank You to SPARTAN563 For This Useful Post: