How can i get values from net.connman.Manager.GetServices with dbus-glib
Seungjae Lee
mixxer.lee at gmail.com
Fri May 31 02:05:23 PDT 2013
Dear All.
I am trying to making a parser with dbus-glib library.
I met a problems during getting result from dbus_g_proxy_call().
According to connman interfacing document,
net.connman.Manager.GetServicesmethod is in "a(
oa{sv})" - please refer last paste.
Now I am trying to read messages likes this.
if (dbus_g_proxy_call (proxy, "GetServices",&error,
G_TYPE_INVALID,
dbus_g_type_get_map ("GHashTable",
DBUS_TYPE_G_OBJECT_PATH,
dbus_g_type_get_map("GHashTable", G_TYPE_STRING, G_TYPE_VARIANT)),
&service_hash,
G_TYPE_INVALID))
but. I met this messages in dbus_g_proxy_call().
Error getting Manager properties: [Expected D-BUS dict entry, got type code
'r']
actually 'r' means structure, I don't have any idea to get this result.
Is there any way can i get reply message at once?
please kindly help me.
==========================
array [
struct {
object path "/net/connman/service/wifi
_00904cef02b0_594266616d696c79_managed_psk"
array [
dict entry(
string "Type"
variant string "wifi"
)
dict entry(
string "Security"
variant array [
string "psk"
string "wps"
]
)
dict entry(
string "State"
variant string "idle"
)
...
dict entry(
string "Timeservers"
variant array [
]
)
...
]
}
struct {
object path "/net/connman/service/wifi
_00904cef02b0_697074696d655f626268_managed_psk"
array [
dict entry(
string "Type"
variant string "wifi"
)
dict entry(
string "Security"
variant array [
string "psk"
]
)
dict entry(
string "State"
variant string "idle"
)
...
dict entry(
string "Provider"
variant array [
]
)
...
]
}
]
==========================
# gdbus introspect --system --dest net.connman --object-path /
node / {
interface org.freedesktop.DBus.Introspectable {
methods:
Introspect(out s xml);
signals:
properties:
};
interface net.connman.Manager {
methods:
GetProperties(out a{sv} properties);
SetProperty(in s name,
in v value);
GetTechnologies(out a(oa{sv}) technologies);
@org.freedesktop.DBus.Deprecated("true")
RemoveProvider(in o provider);
GetServices(out a(oa{sv}) services);
@org.freedesktop.DBus.Deprecated("true")
ConnectProvider(in a{sv} provider,
out o path);
RegisterAgent(in o path);
UnregisterAgent(in o path);
RegisterCounter(in o path,
in u accuracy,
in u period);
UnregisterCounter(in o path);
CreateSession(in a{sv} settings,
in o notifier,
out o session);
DestroySession(in o session);
RequestPrivateNetwork(out o path,
out a{sv} settings,
out h socket);
ReleasePrivateNetwork(in o path);
signals:
PropertyChanged(s name,
v value);
TechnologyAdded(o path,
a{sv} properties);
TechnologyRemoved(o path);
ServicesChanged(a(oa{sv}) changed,
ao removed);
properties:
};
interface net.connman.Clock {
methods:
GetProperties(out a{sv} properties);
SetProperty(in s name,
in v value);
signals:
PropertyChanged(s name,
v value);
properties:
};
node net {
};
};
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20130531/72387e8e/attachment-0001.html>
More information about the dbus
mailing list