]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/gpe-beam/gpe-beam-0.2.8/dbus-new-api.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / gpe-beam / gpe-beam-0.2.8 / dbus-new-api.patch
1 --- gpe-beam-0.2.7/dbus.c.orig  2005-08-29 21:05:28 +0200
2 +++ gpe-beam-0.2.7/dbus.c       2005-08-29 21:07:11 +0200
3 @@ -40,7 +40,11 @@
4      return obex_client_handle_dbus_request (connection, message);
5    
6    if (dbus_message_is_signal (message,
7 +#ifndef DBUS_INTERFACE_LOCAL
8                                DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL,
9 +#else
10 +                              DBUS_INTERFACE_LOCAL,
11 +#endif
12                                "Disconnected"))
13      exit (0);
14    
15 @@ -70,10 +70,18 @@
16  
17        dbus_connection_register_object_path (connection, object_path, &dbus_obex_vtable, NULL);
18  
19 +#ifndef DBUS_INTERFACE_LOCAL
20        dbus_bus_acquire_service (connection, SERVICE_NAME, 0, &error);
21 +#else
22 +      dbus_bus_request_name (connection, SERVICE_NAME, 0, &error);
23 +#endif
24        if (dbus_error_is_set (&error))
25         {
26 +#ifndef DBUS_INTERFACE_LOCAL
27           gpe_error_box_fmt (_("Failed to acquire service: %s"), error.message);
28 +#else
29 +         gpe_error_box_fmt (_("Failed to request name: %s"), error.message);
30 +#endif
31           dbus_error_free (&error);
32         }
33      }
34 --- gpe-beam-0.2.7/obexclient-dbus.c.orig       2005-08-29 21:05:33 +0200
35 +++ gpe-beam-0.2.7/obexclient-dbus.c    2005-08-29 21:10:00 +0200
36 @@ -73,7 +73,11 @@
37    if (dbus_message_iter_get_arg_type (&iter) != DBUS_TYPE_STRING)
38      goto wrong_args;
39  
40 +#ifndef DBUS_INTERFACE_LOCAL
41    filename = dbus_message_iter_get_string (&iter);
42 +#else
43 +  dbus_message_iter_get_basic (&iter, &filename);
44 +#endif
45  
46    if (!dbus_message_iter_next (&iter))
47      goto wrong_args;
48 @@ -81,16 +81,28 @@
49    if (dbus_message_iter_get_arg_type (&iter) != DBUS_TYPE_STRING)
50      goto wrong_args;
51  
52 +#ifndef DBUS_INTERFACE_LOCAL
53    mime_type = dbus_message_iter_get_string (&iter);
54 +#else
55 +  dbus_message_iter_get_basic (&iter, &mime_type);
56 +#endif
57  
58    if (!dbus_message_iter_next (&iter))
59      goto wrong_args;
60    
61    if (dbus_message_iter_get_arg_type (&iter) != DBUS_TYPE_ARRAY
62 +#ifndef DBUS_INTERFACE_LOCAL
63        || dbus_message_iter_get_array_type (&iter) != DBUS_TYPE_BYTE)
64 +#else
65 +      || dbus_message_iter_get_element_type (&iter) != DBUS_TYPE_BYTE)
66 +#endif
67      goto wrong_args;
68  
69 +#ifndef DBUS_INTERFACE_LOCAL
70    dbus_message_iter_get_byte_array (&iter, &data, &len);
71 +#else
72 +  dbus_message_iter_get_fixed_array (&iter, &data, &len);
73 +#endif
74  
75    reply = dbus_message_new_method_return (message);
76    if (!reply)