Re: [Vala] dbus-glib-1.vapi Proxy Class
- From: Alexander Werle <awerle huebinet de>
- To: Ethan Osten <senoki gmail com>, vala-list gnome org
- Subject: Re: [Vala] dbus-glib-1.vapi Proxy Class
- Date: Tue, 18 Mar 2008 10:15:25 +0100
Am Montag, den 17.03.2008, 23:16 +0100 schrieb Ethan Osten:
On Mon, 2008-03-17 at 10:50 +0100, Alexander Werle wrote:
Hi,
I'm trying to use the
"Proxy.for_name (Connection! connection, string! name, string! path,
string! interface_)"
constructor of the Proxy class from dbus-glib-1.vapi. I want to call
a
method from openobex dbus-api.
This is my code to create the Proxy object:
<snip>
I can't find "dbus_g_proxy_free" in any of the underlying c code
files.
Has anybody had the same problem and can help me?
Is there a reason you aren't using the built-in Vala syntax for DBus?
eg.
using OpenOBEX;
[DBusInterface (name = "org.openobex.Manager")]
interface OpenOBEX.Interface;
DBus.Connection conn = DBus.Bus.get(DBus.BusType.SYSTEM);
OpenOBEX.Interface proxy =
conn.get_object<OpenOBEX.Interface>("org.openobex", "/org/openobex");
And then compiling that the same way that you did your manual version?
- Ethan Osten
I tried it this way. But calling
proxy.CreateBluetoothSession (address, "opp")
doesn't return anything. I expected to get the path for the created
session. But without the session path I can't execute the following:
OpenOBEX.Session session = conn.get_object<OpenOBEX.Session>
("org.openobex", session_path);
session.Connected += session_connected;
session.Disconnected += session_disconnected;
session.TransferStarted += transfer_started;
session.TransferCompleted += transfer_completed;
session.ErrorOccurred += error_occurred;
So I took a look on the c code for "Gnome sendTo()" and there they used
Proxy.begin_call(...) and Proxy.end_call(...).
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]