1 |
dev-zero 08/11/28 21:52:58 |
2 |
|
3 |
Added: 1.8-ODS-API.patch |
4 |
Log: |
5 |
Incorporated ODS-API patch (thanks to Paul Philippov) |
6 |
(Portage version: 2.2_rc16/cvs/Linux 2.6.27.5 x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 net-wireless/bluez-gnome/files/1.8-ODS-API.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-wireless/bluez-gnome/files/1.8-ODS-API.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-wireless/bluez-gnome/files/1.8-ODS-API.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: 1.8-ODS-API.patch |
15 |
=================================================================== |
16 |
--- bluez-gnome-1.8/common/marshal.list 2008-08-25 00:14:24.000000000 +0300 |
17 |
+++ bluez-gnome-1.8.patched/common/marshal.list 2008-11-14 14:28:22.000000000 +0200 |
18 |
@@ -3,3 +3,4 @@ |
19 |
VOID:STRING,STRING |
20 |
VOID:STRING,STRING,UINT64 |
21 |
VOID:UINT64 |
22 |
+VOID:STRING,STRING,STRING |
23 |
--- bluez-gnome-1.8/sendto/main.c 2008-10-04 22:32:56.000000000 +0300 |
24 |
+++ bluez-gnome-1.8.patched/sendto/main.c 2008-11-14 14:52:38.000000000 +0200 |
25 |
@@ -64,6 +64,8 @@ |
26 |
static gint64 first_update = 0; |
27 |
static gint64 last_update = 0; |
28 |
|
29 |
+static DBusGProxy *session_proxy = NULL; |
30 |
+ |
31 |
static gchar *filename_to_path(const gchar *filename) |
32 |
{ |
33 |
GFile *file; |
34 |
@@ -354,7 +356,16 @@ |
35 |
static void error_occurred(DBusGProxy *proxy, const gchar *name, |
36 |
const gchar *message, gpointer user_data) |
37 |
{ |
38 |
- transfer_completed(proxy, user_data); |
39 |
+ gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress), |
40 |
+ _("Error Occurred")); |
41 |
+ |
42 |
+ gchar *text = g_strdup_printf("<span foreground=\"red\">%s</span>", |
43 |
+ message); |
44 |
+ gtk_label_set_markup(GTK_LABEL(label_status), text); |
45 |
+ g_free(text); |
46 |
+ |
47 |
+ gtk_dialog_set_response_sensitive(GTK_DIALOG(dialog), |
48 |
+ GTK_RESPONSE_CLOSE, TRUE); |
49 |
} |
50 |
|
51 |
static void session_connected(DBusGProxy *proxy, gpointer user_data) |
52 |
@@ -363,7 +374,7 @@ |
53 |
|
54 |
first_update = get_system_time(); |
55 |
|
56 |
- send_file(proxy); |
57 |
+ send_file(session_proxy); |
58 |
} |
59 |
|
60 |
#define OPENOBEX_CONNECTION_FAILED "org.openobex.Error.ConnectionAttemptFailed" |
61 |
@@ -407,60 +418,44 @@ |
62 |
if (dbus_g_proxy_end_call(proxy, call, &error, |
63 |
DBUS_TYPE_G_OBJECT_PATH, &path, |
64 |
G_TYPE_INVALID) == FALSE) { |
65 |
- gchar *text, *message; |
66 |
+ gchar *message; |
67 |
|
68 |
message = get_error_message(error); |
69 |
|
70 |
- text = g_strdup_printf("<span foreground=\"red\">%s</span>", |
71 |
- message); |
72 |
- gtk_label_set_markup(GTK_LABEL(label_status), text); |
73 |
- g_free(text); |
74 |
+ error_occurred(proxy,NULL,message,NULL); |
75 |
|
76 |
g_free(message); |
77 |
|
78 |
- gtk_dialog_set_response_sensitive(GTK_DIALOG(dialog), |
79 |
- GTK_RESPONSE_CLOSE, TRUE); |
80 |
return; |
81 |
} |
82 |
- |
83 |
- proxy = dbus_g_proxy_new_for_name(conn, "org.openobex", |
84 |
+ session_proxy = dbus_g_proxy_new_for_name(conn, "org.openobex", |
85 |
path, "org.openobex.Session"); |
86 |
|
87 |
- dbus_g_proxy_add_signal(proxy, "Connected", G_TYPE_INVALID); |
88 |
- |
89 |
- dbus_g_proxy_connect_signal(proxy, "Connected", |
90 |
- G_CALLBACK(session_connected), NULL, NULL); |
91 |
- |
92 |
- dbus_g_proxy_add_signal(proxy, "ErrorOccurred", |
93 |
- G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID); |
94 |
- |
95 |
- dbus_g_proxy_connect_signal(proxy, "ErrorOccurred", |
96 |
- G_CALLBACK(error_occurred), NULL, NULL); |
97 |
- |
98 |
- dbus_g_proxy_add_signal(proxy, "Cancelled", G_TYPE_INVALID); |
99 |
+ dbus_g_proxy_add_signal(session_proxy, "Cancelled", |
100 |
+ G_TYPE_INVALID); |
101 |
|
102 |
- dbus_g_proxy_connect_signal(proxy, "Cancelled", |
103 |
+ dbus_g_proxy_connect_signal(session_proxy, "Cancelled", |
104 |
G_CALLBACK(transfer_cancelled), NULL, NULL); |
105 |
|
106 |
- dbus_g_proxy_add_signal(proxy, "TransferStarted", G_TYPE_STRING, |
107 |
- G_TYPE_STRING, G_TYPE_UINT64, G_TYPE_INVALID); |
108 |
+ dbus_g_proxy_add_signal(session_proxy, "TransferStarted", |
109 |
+ G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT64, |
110 |
+ G_TYPE_INVALID); |
111 |
|
112 |
- dbus_g_proxy_connect_signal(proxy, "TransferStarted", |
113 |
+ dbus_g_proxy_connect_signal(session_proxy, "TransferStarted", |
114 |
G_CALLBACK(transfer_started), NULL, NULL); |
115 |
|
116 |
- dbus_g_proxy_add_signal(proxy, "TransferProgress", |
117 |
+ dbus_g_proxy_add_signal(session_proxy, "TransferProgress", |
118 |
G_TYPE_UINT64, G_TYPE_INVALID); |
119 |
|
120 |
- dbus_g_proxy_connect_signal(proxy, "TransferProgress", |
121 |
+ dbus_g_proxy_connect_signal(session_proxy, "TransferProgress", |
122 |
G_CALLBACK(transfer_progress), NULL, NULL); |
123 |
|
124 |
- dbus_g_proxy_add_signal(proxy, "TransferCompleted", G_TYPE_INVALID); |
125 |
+ dbus_g_proxy_add_signal(session_proxy, "TransferCompleted", |
126 |
+ G_TYPE_INVALID); |
127 |
|
128 |
- dbus_g_proxy_connect_signal(proxy, "TransferCompleted", |
129 |
+ dbus_g_proxy_connect_signal(session_proxy, "TransferCompleted", |
130 |
G_CALLBACK(transfer_completed), NULL, NULL); |
131 |
|
132 |
- dbus_g_proxy_call(proxy, "Connect", NULL, G_TYPE_INVALID, |
133 |
- G_TYPE_INVALID); |
134 |
} |
135 |
|
136 |
static gchar *get_name(DBusGProxy *device) |
137 |
@@ -767,6 +762,10 @@ |
138 |
dbus_g_object_register_marshaller(marshal_VOID__UINT64, |
139 |
G_TYPE_NONE, G_TYPE_UINT64, G_TYPE_INVALID); |
140 |
|
141 |
+ dbus_g_object_register_marshaller(marshal_VOID__STRING_STRING_STRING, |
142 |
+ G_TYPE_NONE, DBUS_TYPE_G_OBJECT_PATH, |
143 |
+ G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID); |
144 |
+ |
145 |
device_name = get_device_name(option_device); |
146 |
if (device_name == NULL) |
147 |
device_name = g_strdup(option_device); |
148 |
@@ -787,9 +786,23 @@ |
149 |
dbus_g_proxy_connect_signal(proxy, "NameOwnerChanged", |
150 |
G_CALLBACK(name_owner_changed), NULL, NULL); |
151 |
|
152 |
+ dbus_g_proxy_add_signal(proxy, "SessionConnected", |
153 |
+ DBUS_TYPE_G_OBJECT_PATH, G_TYPE_INVALID); |
154 |
+ |
155 |
+ dbus_g_proxy_connect_signal(proxy, "SessionConnected", |
156 |
+ G_CALLBACK(session_connected), NULL, NULL); |
157 |
+ |
158 |
+ dbus_g_proxy_add_signal(proxy, "SessionConnectError", |
159 |
+ DBUS_TYPE_G_OBJECT_PATH, G_TYPE_STRING, |
160 |
+ G_TYPE_STRING, G_TYPE_INVALID); |
161 |
+ |
162 |
+ dbus_g_proxy_connect_signal(proxy, "SessionConnectError", |
163 |
+ G_CALLBACK(error_occurred), NULL, NULL); |
164 |
+ |
165 |
dbus_g_proxy_begin_call(proxy, "CreateBluetoothSession", |
166 |
create_notify, NULL, NULL, |
167 |
G_TYPE_STRING, option_device, |
168 |
+ G_TYPE_STRING, "00:00:00:00:00:00", |
169 |
G_TYPE_STRING, "opp", G_TYPE_INVALID); |
170 |
} else { |
171 |
GHashTable *hash = NULL; |