Hi,
Having been unable to find an extension that implements an interface to get at the hwrmpowerstate items (at least the ChargerStatus), I decided it was time to dive into python extension writing myself.
The result is a generic interface to the RProperty class (which implements the Publish & Subscribe interface in Symbian C++). With this extension you can get at the KHWRMBatteryLevel, KHWRMBatteryStatus, and KHWRMChargingStatus keys of the KPSUidHWRMPowerState category.
(of course, since it is a generic interface, you can get at other categories & keys as well)
Now this code is not perfect yet, it crashes python when you exit the interpreter, and there may be some other issues, however, it works for me, I can get at the chargerstatus settings, and can even subscribe to changes.
Open Issues:
1) Exit code & Error handling is not properly done everywhere, causing an error upon exit of the interpreter
2) Access rights are set to their defaults upon creation. This may not allow you to share properties between processes.
Sources can be found here: http://code.google.com/p/tracker-py/...properties/src
Unsigned SIS can be found here: http://code.google.com/p/tracker-py/...properties.sis
Update: Zip package for Module Repository can be found here: http://code.google.com/p/tracker-py/...properties.zip
Currently, I have only support for 1.9.x releases of python.
A port to 1.4.5 is in the works, but for those eager to port it themselves, here are some tips from an earlier port:
http://discussion.forum.nokia.com/fo...d.php?t=169265
Regards,
Mark.

Reply With Quote






