libqmi with python
Andrew Bird
ajb at spheresystems.co.uk
Thu Aug 8 03:33:22 PDT 2013
Hi Simone,
I stopped working on this, just after making it work when I discovered that the project
(Wader) I wanted this for could only use static not gi bindings without a rewrite. At the time backward
compatibility right back to Ubuntu 8.04 was important, hence the drop. I always intended to clean up
what I'd done and submit it to the list, but time and the fast pace of libqmi wasn't on my side.
I've attached the remaining patches I have left here in my repo, they should apply straight
after those sent to the list(cc'd). I think the missing portion you want is the generation of bindings for
things that are autogenerated. Incidentally one of the commit logs does report the get_manufacturer
call as working. I'm not sure if they'll apply to the current HEAD, or even work if you can. Feel free to
use them as a basis for further refinement, perhaps you can get them into libqmi proper?
Have fun,
Andrew
On Thursday 08 August 2013 12:03:27 Simone Ferlin-Oliveira wrote:
Hi Andrew,
I applied the patch you did to add introspection for python and libqmi.
First of all, thanks a lot for the effort and the documentation!
Here is the link for the patch:
http://lists.freedesktop.org/archives/libqmi-devel/2012-November/000353.html[1]
I used the code sample you had online:
http://lists.freedesktop.org/archives/libqmi-devel/2012-November/000363.html[2]
and I get something like this:
Traceback (most recent call last):
File "./gi-libqmi.py", line 32, in device_allocate_client_ready
client.get_manufacturer(WontTakeNone, 15, None, get_manufacturer_ready, None)
AttributeError: '__main__.QmiClientDms' object has no attribute 'get_manufacturer'
I followed some of your discussion with Alexander in the list, but I sould not completely understand
what was the issue here.
I see in the doc that get_manufacter ist not there though:
https://developer.gnome.org/libqmi-glib/1.0/QmiClient.html[3]
Is it supposed to be like this?
Thanks,
Simone
-----------
This is a print dir of the object:
device is ready
device is open
allocated
['__class__', '__copy__', '__deepcopy__', '__delattr__', '__dict__', '__doc__', '__eq__', '__format__',
'__gdoc__', '__ge__', '__getattribute__', '__gpointer__', '__grefcount__', '__gsignals__', '__gt__',
'__gtype__', '__hash__', '__info__', '__init__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__',
'__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '_force_floating',
'_ref', '_ref_sink', '_unref', '_unsupported_data_method', '_unsupported_method', 'bind_property',
'bind_property_full', 'chain', 'check_version', 'compat_control', 'connect', 'connect_after',
'connect_object', 'connect_object_after', 'disconnect', 'disconnect_by_func', 'do_process_indication',
'emit', 'emit_stop_by_name', 'force_floating', 'freeze_notify', 'g_type_instance', 'get_cid', 'get_data',
'get_device', 'get_next_transaction_id', 'get_properties', 'get_property', 'get_qdata', 'get_service',
'get_version', 'handler_block', 'handler_block_by_func', 'handler_disconnect', 'handler_is_connected',
'handler_unblock', 'handler_unblock_by_func', 'interface_find_property', 'interface_install_property',
'interface_list_properties', 'is_floating', 'new', 'notify', 'notify_by_pspec', 'parent', 'peek_device', 'priv',
'process_indication', 'props', 'qdata', 'ref', 'ref_count', 'ref_sink', 'replace_data', 'replace_qdata',
'run_dispose', 'set_data', 'set_properties', 'set_property', 'steal_data', 'steal_qdata', 'stop_emission',
'stop_emission_by_name', 'thaw_notify', 'unref', 'watch_closure', 'weak_ref']
--------
[1] http://lists.freedesktop.org/archives/libqmi-devel/2012-November/000353.html
[2] http://lists.freedesktop.org/archives/libqmi-devel/2012-November/000363.html
[3] https://developer.gnome.org/libqmi-glib/1.0/QmiClient.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libqmi-devel/attachments/20130808/9eb9752f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Remove-whitespace-as-gir-generation-barfs.patch
Type: text/x-patch
Size: 1283 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libqmi-devel/attachments/20130808/9eb9752f/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Add-generated-files-to-introspection.patch
Type: text/x-patch
Size: 1598 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libqmi-devel/attachments/20130808/9eb9752f/attachment-0008.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Add-annotation-to-output-strings-in-the-generated-ou.patch
Type: text/x-patch
Size: 1320 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libqmi-devel/attachments/20130808/9eb9752f/attachment-0009.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Allow-unused-parameters-to-have-null-passed-in.patch
Type: text/x-patch
Size: 1067 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libqmi-devel/attachments/20130808/9eb9752f/attachment-0010.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-Add-more-output-annotation.patch
Type: text/x-patch
Size: 2515 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libqmi-devel/attachments/20130808/9eb9752f/attachment-0011.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Change-scope-notified-to-call.patch
Type: text/x-patch
Size: 844 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libqmi-devel/attachments/20130808/9eb9752f/attachment-0012.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-Set-get_version-output-annotations.patch
Type: text/x-patch
Size: 887 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libqmi-devel/attachments/20130808/9eb9752f/attachment-0013.bin>
More information about the libqmi-devel
mailing list