libqmi and python

Dan Williams dcbw at redhat.com
Wed Aug 7 15:44:12 PDT 2013


On Wed, 2013-08-07 at 22:57 +0200, Simone Ferlin-Oliveira wrote:
> Hi Dan,
> I solved the problem from before because I have just seen the main patch
> and its remaining comments here:
> http://lists.freedesktop.org/archives/libqmi-devel/2012-November/000353.html
> 
> I followed your comments and the rest of the patch, but I still get one
> warning:
> qmi-device.c:298: Warning: libqmi:
> qmi_device_get_service_version_info_finish: return value: Missing
> (element-type) annotation

Probably something like:

 * Returns: (transfer container) (element-type QmiDeviceServiceVersionInfo): a
 * #GArray of #QmiDeviceServiceVersionInfo elements, or #NULL if @error is set.
 * The returned value should be freed with g_array_unref().

I think it should be 'transfer container' because the array knows how to
dispose of the elements.  I'm not 100% sure of the element-type, but
since that's the structure that's getting passed back, I believe that's
how it gets formatted here since the struct is all part of the same
package.  This *might* require boxing that struct though.

Dan

> 
> 
> On 7 August 2013 22:49, Dan Williams <dcbw at redhat.com> wrote:
> 
> > On Wed, 2013-08-07 at 22:11 +0200, Simone Ferlin-Oliveira wrote:
> > > Thanks,
> > > I compiled libqmi with the patch and trying the sample code in the
> > > mailing-list I get the following error:
> >
> > Which patch is that?
> >
> > Dan
> >
> > > device is ready
> > > device is open
> > > Traceback (most recent call last):
> > >   File "./libqmi-test.py", line 25, in device_allocate_client_ready
> > >     client = device.allocate_client_finish(result)
> > >
> > > AttributeError: 'Device' object has no attribute 'allocate_client_finish'
> > >
> > > The method is in gir and printing all attributes from the object, the
> > > method is not there:
> > >
> > > ['__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__',
> > > '__weakref__', '_force_floating', '_ref', '_ref_sink', '_unref',
> > > '_unsupported_data_method', '_unsupported_method', 'allocate_client',
> > > 'bind_property', 'bind_property_full', 'chain', 'close', 'command',
> > > 'compat_control', 'connect', 'connect_after', 'connect_object',
> > > 'connect_object_after', 'disconnect', 'disconnect_by_func', 'emit',
> > > 'emit_stop_by_name', 'force_floating', 'freeze_notify',
> > 'g_type_instance',
> > > 'get_data', 'get_path', 'get_path_display', 'get_properties',
> > > 'get_property', 'get_qdata', 'get_service_version_info', 'handler_block',
> > > 'handler_block_by_func', 'handler_disconnect', 'handler_is_connected',
> > > 'handler_unblock', 'handler_unblock_by_func', 'init_async',
> > 'init_finish',
> > > 'interface_find_property', 'interface_install_property',
> > > 'interface_list_properties', 'is_floating', 'is_open', 'new',
> > 'new_finish',
> > > 'newv_async', 'notify', 'notify_by_pspec', 'open', 'open_finish',
> > 'parent',
> > > 'priv', 'props', 'qdata', 'ref', 'ref_count', 'ref_sink',
> > 'release_client',
> > > 'release_client_finish', 'replace_data', 'replace_qdata', 'run_dispose',
> > > 'set_data', 'set_instance_id', 'set_instance_id_finish',
> > 'set_properties',
> > > 'set_property', 'steal_data', 'steal_qdata', 'stop_emission',
> > > 'stop_emission_by_name', 'thaw_notify', 'unref', 'watch_closure',
> > > 'weak_ref']
> > >
> > > Any ideas?
> > >
> > >
> > >
> > > On 7 August 2013 17:26, Dan Williams <dcbw at redhat.com> wrote:
> > >
> > > > On Wed, 2013-08-07 at 09:49 +0200, Simone Ferlin-Oliveira wrote:
> > > > > Hi,
> > > > >
> > > > > I am wondering if there is any python 'binding' to work with libqmi?
> > > > > I found few links in the mailing list, but no follow up.
> > > >
> > > > Not at the moment.  The best way is likely to add GObject Introspection
> > > > annotations so that the existing Python GOI infrastructure could be
> > > > utilized.
> > > >
> > > > Dan
> > > >
> > > >
> > > _______________________________________________
> > > libqmi-devel mailing list
> > > libqmi-devel at lists.freedesktop.org
> > > http://lists.freedesktop.org/mailman/listinfo/libqmi-devel
> >
> >
> >
> _______________________________________________
> libqmi-devel mailing list
> libqmi-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libqmi-devel




More information about the libqmi-devel mailing list