more newbie questions....

Thomas Green <TGreen2-vhQsaQLC7V1Wk0Htik3J/[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <C2BC44D770753C45AAAC42695FB5BE02AF696B19@SLC-EXMB01.CORP.SRELAY.COM>
Two questions... 

First I'm trying to connect to a signal from connman.  I obtain a proxy thus:

ManagerProxy = g_dbus_proxy_new_sync (DbusConnection,
                                    G_DBUS_PROXY_FLAGS_NONE,
                                    NULL,
                                    CONNMAN_SERVICE,          // "net.connman"
                                    CONNMAN_MANAGER_PATH,        // "/"
                                    CONNMAN_MANAGER_INTERFACE,        // "net.connman.manager"
                                    NULL,
                                    &DbusError);
Then I try to attach to the ServicesChanged signal using a gcclosure that was generated by glib-genmarshal...

   Closure = g_cclosure_new(G_CALLBACK(ServicesChangedCallback), this, NULL);
    g_closure_set_marshal(Closure, marshal_VOID__BOXED_BOXED);
    g_signal_connect_closure(ManagerProxy, "ServicesChanged", Closure, true);

but I get the error 

(process:12548): GLib-GObject-WARNING **: /build/buildd/glib2.0-2.40.0/./gobject/gsignal.c:2362: signal 'ServicesChanged' is invalid for instance '0x8127048' of type 'GDBusProxy'

What am I missing to be able to connect to this signal?

Second question....
Again, in connman, I've got a dict that I'm doing lookups on.  All work except when I am trying to lookup the key "IPv4" which is supposed to return a nested dict.

GVariant *tmpVariant;
If (!g_variant_dict_lookup(Dict, "IPv4", "a{sv}", &tmpVariant))
    return(error);
if (!g_variant_is_container(tmpVariant))
    return(error)

the lookup works, but the call to make sure it is a container aborts with this message:
GLib:ERROR:/build/buildd/glib2.0-2.40.0/./glib/gvarianttypeinfo.c:163:g_variant_type_info_check: assertion failed: (info->alignment == 0 || info->alignment == 1 || info->alignment == 3 || info->alignment == 7)

What kind of container am I supposed to use, or am I doing the lookup incorrectly?

Thanks,

Tom

_______________________________________________
dbus mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dbus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.