<div dir="ltr"><div>Dear All.</div><div> </div><div>I am trying to making a parser with <span style="background:yellow"><span><span>dbus</span></span></span>-glib library.</div><div> </div><div>I met a problems during getting result from <span><span>dbus</span></span>_g_proxy_call().</div>
<div> </div><div>According to <span><span>connman</span></span> interfacing document, net.<span><span>connman</span></span>.Manager.<span><span>GetServices</span></span> method is in "a(<span><span>oa</span></span>{<span><span>sv</span></span>})" - please refer last paste.</div>
<div> </div><div>Now I am trying to read messages likes this.</div><div> </div><div> if (<span><span>dbus</span></span>_g_proxy_call (proxy, "<span><span>GetServices</span></span>",&error,<br> G_TYPE_INVALID,<br>
<span><span>dbus</span></span>_g_type_get_map ("<span><span>GHashTable</span></span>",<br> <span><span>DBUS</span></span>_TYPE_G_OBJECT_PATH,<br> <span><span>dbus</span></span>_g_type_get_map("<span><span>GHashTable</span></span>", G_TYPE_STRING, G_TYPE_VARIANT)),<br>
&service_hash,<br> G_TYPE_INVALID)) </div><div> </div><div>but. I met this messages in <span>dbus</span>_g_proxy_call().</div><div> </div><div>Error getting Manager properties: [Expected D-BUS dict entry, got type code 'r']</div>
<div> </div><div>actually 'r' means structure, I <span><span>don't</span></span> have any idea to get this result.</div><div> </div><div>Is there any way can i get reply message at once?</div><div> </div><div>
please kindly help me.</div><div> </div><div>==========================</div><div><br> array [<br> <span><span>struct</span></span> {<br> object path "/net/<span><span>connman</span></span>/service/<span><span>wifi</span></span>_00904cef02b0_594266616d696c79_managed_<span><span>psk</span></span>"<br>
array [<br> dict entry(<br> string "Type"<br> variant string "<span><span>wifi</span></span>"<br> )<br> dict entry(<br>
string "Security"<br> variant array [<br> string "<span><span>psk</span></span>"<br> string "<span><span>wps</span></span>"<br>
]<br> )<br> dict entry(<br> string "State"<br> variant string "idle"<br> )<br> ...<br> dict entry(<br>
string "Timeservers"<br> variant array [<br> ]<br> )<br> ...<br> ]<br> }<br> <span><span>struct</span></span> {<br> object path "/net/<span><span>connman</span></span>/service/<span><span>wifi</span></span>_00904cef02b0_697074696d655f626268_managed_<span><span>psk</span></span>"<br>
array [<br> dict entry(<br> string "Type"<br> variant string "<span><span>wifi</span></span>"<br> )<br> dict entry(<br>
string "Security"<br> variant array [<br> string "<span><span>psk</span></span>"<br> ]<br> )<br> dict entry(<br>
string "State"<br> variant string "idle"<br> )<br> ...<br> dict entry(<br> string "Provider"<br> variant array [<br>
]<br> )<br> ...<br> ]<br> }<br> ]<br></div><div>==========================</div><div> </div><div># <span><span>gdbus</span></span> introspect --system --<span><span>dest</span></span> net.<span><span>connman</span></span> --object-path /<br>
node / {<br> interface org.<span><span>freedesktop</span></span>.<span><span>DBus</span></span>.<span><span>Introspectable</span></span> {<br> methods:<br> Introspect(out s <span><span>xml</span></span>);<br> signals:<br>
properties:<br> };<br> interface net.<span><span>connman</span></span>.Manager {<br> methods:<br> <span><span>GetProperties</span></span>(out a{<span><span>sv</span></span>} properties);<br> <span><span>SetProperty</span></span>(in s name,<br>
in v value);<br> <span><span>GetTechnologies</span></span>(out a(<span><span>oa</span></span>{<span><span>sv</span></span>}) technologies);<br> @org.<span><span>freedesktop</span></span>.<span><span>DBus</span></span>.Deprecated("true")<br>
<span><span>RemoveProvider</span></span>(in o provider);<br> <span><span>GetServices</span></span>(out a(<span><span>oa</span></span>{<span><span>sv</span></span>}) services);<br> @org.<span><span>freedesktop</span></span>.<span><span>DBus</span></span>.Deprecated("true")<br>
<span><span>ConnectProvider</span></span>(in a{<span><span>sv</span></span>} provider,<br> out o path);<br> <span><span>RegisterAgent</span></span>(in o path);<br> <span><span>UnregisterAgent</span></span>(in o path);<br>
<span><span>RegisterCounter</span></span>(in o path,<br> in u accuracy,<br> in u period);<br> <span><span>UnregisterCounter</span></span>(in o path);<br> <span><span>CreateSession</span></span>(in a{<span><span>sv</span></span>} settings,<br>
in o notifier,<br> out o session);<br> <span><span>DestroySession</span></span>(in o session);<br> <span><span>RequestPrivateNetwork</span></span>(out o path,<br> out a{<span><span>sv</span></span>} settings,<br>
out h socket);<br> <span><span>ReleasePrivateNetwork</span></span>(in o path);<br> signals:<br> <span><span>PropertyChanged</span></span>(s name,<br> v value);<br>
<span><span>TechnologyAdded</span></span>(o path,<br> a{<span><span>sv</span></span>} properties);<br> <span><span>TechnologyRemoved</span></span>(o path);<br> <span><span>ServicesChanged</span></span>(a(<span><span>oa</span></span>{<span><span>sv</span></span>}) changed,<br>
<span><span>ao</span></span> removed);<br> properties:<br> };<br> interface net.<span><span>connman</span></span>.Clock {<br> methods:<br> <span><span>GetProperties</span></span>(out a{<span><span>sv</span></span>} properties);<br>
<span><span>SetProperty</span></span>(in s name,<br> in v value);<br> signals:<br> <span><span>PropertyChanged</span></span>(s name,<br> v value);<br> properties:<br>
};<br> node net {<br> };<br>};<br></div><div> </div></div>