Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate

Advertising

martin
Wednesday, April 11th, 2007 at 8:53:45am UTC 

  1. diff -Nru /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/autobuild.sh /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/autobuild.sh
  2. --- /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/autobuild.sh        2006-07-06 00:34:17.000000000 +0200
  3. +++ /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/autobuild.sh        2006-11-05 22:47:57.000000000 +0100
  4. @@ -48,13 +48,9 @@
  5.      NOW=`date +"%s"`
  6.      EXTRA_RELEASE=".$USER$NOW"
  7.    fi
  8. -  rpmbuild -ta --define "extra_release $EXTRA_RELEASE" --clean $NAME-*.tar.gz
  9. +  # The --nodeps bit is a nasty hack to force build
  10. +  # against the dbus from autobuild, rather than a
  11. +  # (non-existant) installed RPM
  12. +  rpmbuild -ta --define "extra_release $EXTRA_RELEASE" --clean $NAME-*.tar.gz --nodeps
  13.  fi
  14.  
  15. -# Skip debian pkg for now
  16. -exit 0
  17. -
  18. -if [ -f /usr/bin/fakeroot ]; then
  19. -  fakeroot debian/rules clean
  20. -  fakeroot debian/rules DESTDIR=$HOME/packages/debian binary
  21. -fi
  22. diff -Nru /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/CHANGES /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/CHANGES
  23. --- /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/CHANGES     2006-07-06 00:34:37.000000000 +0200
  24. +++ /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/CHANGES     2006-11-05 22:47:57.000000000 +0100
  25. @@ -1,3 +1,31 @@
  26. +Changes since 0.33.3
  27. +
  28. + - Fixed service owner used for org.freedesktop.DBus object
  29. +   to make signal handling on the bus work again
  30. +
  31. + - Pass return value for signal handling callbacks all the
  32. +   way back to DBus
  33. +
  34. + - Fix multiple problems with marshalling of variant data
  35. +   types
  36. +
  37. + - Replace use of dbus_connection_disconnect with _close
  38. +   when compiling against dbus >= 0.90
  39. +
  40. + - Call dbus_connection_unref in the DESTROY method of
  41. +   connection object
  42. +
  43. + - Fix reference counting in connection & pending call
  44. +   objects
  45. +
  46. + - Added example of galago desktop notifications
  47. +
  48. + - Fix test suite errors
  49. +
  50. + - Added missing import statement
  51. +
  52. + - Throw Net::DBus::Error if an async call fails
  53. +
  54.  Changes since 0.33.2
  55.  
  56.   - Fixed parsing of introspection data if there are processing
  57. diff -Nru /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/DBus.xs /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/DBus.xs
  58. --- /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/DBus.xs     2007-04-11 10:53:39.000000000 +0200
  59. +++ /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/DBus.xs     2006-11-05 22:47:57.000000000 +0100
  60. @@ -23,10 +23,11 @@
  61.  
  62.  #include <dbus/dbus.h>
  63.  
  64. -#if PD_DO_DEBUG
  65. -#define PD_DEBUG(...) if (getenv("PD_DEBUG")) fprintf(stderr, __VA_ARGS__)
  66. +#if NET_DBUS_DEBUG
  67. +static int net_dbus_debug = 0;
  68. +#define DEBUG_MSG(...) if (net_dbus_debug) fprintf(stderr, __VA_ARGS__)
  69.  #else
  70. -#define PD_DEBUG(...)
  71. +#define DEBUG_MSG(...)
  72.  #endif
  73.  
  74.  
  75. @@ -39,7 +40,7 @@
  76.  
  77.  void
  78.  _object_release(void *obj) {
  79. -    PD_DEBUG("Releasing object count on %p\n", obj);
  80. +    DEBUG_MSG("Releasing object count on %p\n", obj);
  81.      SvREFCNT_dec((SV*)obj);
  82.  }
  83.  
  84. @@ -51,7 +52,7 @@
  85.      SV *h_sv;
  86.      dSP;
  87.  
  88. -    PD_DEBUG("Watch generic callback %p %p %s %d\n", watch, data, key, server);
  89. +    DEBUG_MSG("Watch generic callback %p %p %s %d\n", watch, data, key, server);
  90.  
  91.      if (server) {
  92.        selfref = (SV*)dbus_server_get_data((DBusServer*)data, server_data_slot);
  93. @@ -60,7 +61,7 @@
  94.      }
  95.      self = (HV*)SvRV(selfref);
  96.  
  97. -    PD_DEBUG("Got owner %p\n", self);
  98. +    DEBUG_MSG("Got owner %p\n", self);
  99.  
  100.      call = hv_fetch(self, key, strlen(key), 0);
  101.  
  102. @@ -198,7 +199,7 @@
  103.        return;
  104.      }
  105.  
  106. -    PD_DEBUG("Created connection in callback %p\n", new_connection);
  107. +    DEBUG_MSG("Created connection in callback %p\n", new_connection);
  108.      /* The DESTROY method will de-ref it later */
  109.      dbus_connection_ref(new_connection);
  110.  
  111. @@ -234,11 +235,11 @@
  112.      selfref = (SV*)dbus_connection_get_data(con, connection_data_slot);
  113.      self = (HV*)SvRV(selfref);
  114.  
  115. -    PD_DEBUG("Create message in filter %p\n", msg);
  116. -    PD_DEBUG("  Type %d\n", dbus_message_get_type(msg));
  117. -    PD_DEBUG("  Interface %s\n", dbus_message_get_interface(msg) ? dbus_message_get_interface(msg) : "");
  118. -    PD_DEBUG("  Path %s\n", dbus_message_get_path(msg) ? dbus_message_get_path(msg) : "");
  119. -    PD_DEBUG("  Member %s\n", dbus_message_get_member(msg) ? dbus_message_get_member(msg) : "");
  120. +    DEBUG_MSG("Create message in filter %p\n", msg);
  121. +    DEBUG_MSG("  Type %d\n", dbus_message_get_type(msg));
  122. +    DEBUG_MSG("  Interface %s\n", dbus_message_get_interface(msg) ? dbus_message_get_interface(msg) : "");
  123. +    DEBUG_MSG("  Path %s\n", dbus_message_get_path(msg) ? dbus_message_get_path(msg) : "");
  124. +    DEBUG_MSG("  Member %s\n", dbus_message_get_member(msg) ? dbus_message_get_member(msg) : "");
  125.      /* Will be de-refed in the DESTROY method */
  126.      dbus_message_ref(msg);
  127.      value = sv_newmortal();
  128. @@ -254,14 +255,14 @@
  129.      PUTBACK;
  130.  
  131.      count = call_method("_message_filter", G_SCALAR);
  132. -    /* XXX POPi prints use of uninitialized value ?!?!?! */
  133. -if (0) {
  134. +    SPAGAIN;
  135.      if (count == 1) {
  136.        handled = POPi;
  137.      } else {
  138.        handled = 0;
  139.      }
  140. -}
  141. +    PUTBACK;
  142. +    DEBUG_MSG("Handled %d %d\n", count, handled);
  143.      FREETMPS;
  144.      LEAVE;
  145.  
  146. @@ -275,6 +276,7 @@
  147.      HV *self;
  148.      dSP;
  149.  
  150. +    DEBUG_MSG("In pending call callback %p\n", call);
  151.      selfref = (SV*)dbus_pending_call_get_data(call, pending_call_data_slot);
  152.      self = (HV*)SvRV(selfref);
  153.  
  154. @@ -317,11 +319,11 @@
  155.      SV *value;
  156.      dSP;
  157.  
  158. -    PD_DEBUG("Got message in callback %p\n", msg);
  159. -    PD_DEBUG("  Type %d\n", dbus_message_get_type(msg));
  160. -    PD_DEBUG("  Interface %s\n", dbus_message_get_interface(msg) ? dbus_message_get_interface(msg) : "");
  161. -    PD_DEBUG("  Path %s\n", dbus_message_get_path(msg) ? dbus_message_get_path(msg) : "");
  162. -    PD_DEBUG("  Member %s\n", dbus_message_get_member(msg) ? dbus_message_get_member(msg) : "");
  163. +    DEBUG_MSG("Got message in callback %p\n", msg);
  164. +    DEBUG_MSG("  Type %d\n", dbus_message_get_type(msg));
  165. +    DEBUG_MSG("  Interface %s\n", dbus_message_get_interface(msg) ? dbus_message_get_interface(msg) : "");
  166. +    DEBUG_MSG("  Path %s\n", dbus_message_get_path(msg) ? dbus_message_get_path(msg) : "");
  167. +    DEBUG_MSG("  Member %s\n", dbus_message_get_member(msg) ? dbus_message_get_member(msg) : "");
  168.      /* Will be de-refed in the DESTROY method */
  169.      dbus_message_ref(msg);
  170.      value = sv_newmortal();
  171. @@ -402,6 +404,9 @@
  172.      {
  173.         HV *constants;
  174.  
  175. +       if (getenv("NET_DBUS_DEBUG"))
  176. +         net_dbus_debug = 1;
  177. +
  178.         /* not the 'standard' way of doing perl constants, but a lot easier to maintain */
  179.  
  180.         constants = perl_get_hv("Net::DBus::Binding::Bus::_constants", TRUE);
  181. @@ -459,6 +464,7 @@
  182.      CODE:
  183.         dbus_error_init(&error);
  184.         con = dbus_connection_open(address, &error);
  185. +        dbus_connection_ref(con);
  186.         if (!con) {
  187.           _croak_error (&error);
  188.         }
  189. @@ -477,7 +483,22 @@
  190.         dbus_connection_set_data(con, connection_data_slot, owner, _object_release);
  191.  
  192.  void
  193. -dbus_connection_close(con)
  194. +dbus_connection_disconnect(con)
  195. +       DBusConnection *con;
  196. +    CODE:
  197. +       DEBUG_MSG("Closing connection %p\n", con);
  198. +#if HAVE_CONN_DISCONNECT
  199. +       dbus_connection_disconnect(con);
  200. +#else
  201. +       dbus_connection_close(con);
  202. +#endif
  203. +
  204. +void
  205. +dbus_connection_ref(con)
  206. +       DBusConnection *con;
  207. +
  208. +void
  209. +dbus_connection_unref(con)
  210.         DBusConnection *con;
  211.  
  212.  int
  213. @@ -519,13 +540,11 @@
  214.         if (!(reply = dbus_connection_send_with_reply_and_block(con, msg, timeout, &error))) {
  215.           _croak_error(&error);
  216.         }
  217. -       PD_DEBUG("Create msg reply %p\n", reply);
  218. -       PD_DEBUG("  Type %d\n", dbus_message_get_type(reply));
  219. -       PD_DEBUG("  Interface %s\n", dbus_message_get_interface(reply) ? dbus_message_get_interface(reply) : "");
  220. -       PD_DEBUG("  Path %s\n", dbus_message_get_path(reply) ? dbus_message_get_path(reply) : "");
  221. -       PD_DEBUG("  Member %s\n", dbus_message_get_member(reply) ? dbus_message_get_member(reply) : "");
  222. -       // XXX needed ?
  223. -       //dbus_message_ref(reply);
  224. +       DEBUG_MSG("Create msg reply %p\n", reply);
  225. +       DEBUG_MSG("  Type %d\n", dbus_message_get_type(reply));
  226. +       DEBUG_MSG("  Interface %s\n", dbus_message_get_interface(reply) ? dbus_message_get_interface(reply) : "");
  227. +       DEBUG_MSG("  Path %s\n", dbus_message_get_path(reply) ? dbus_message_get_path(reply) : "");
  228. +       DEBUG_MSG("  Member %s\n", dbus_message_get_member(reply) ? dbus_message_get_member(reply) : "");
  229.         RETVAL = reply;
  230.      OUTPUT:
  231.         RETVAL
  232. @@ -542,9 +561,7 @@
  233.         if (!dbus_connection_send_with_reply(con, msg, &reply, timeout)) {
  234.           croak("not enough memory to send message");
  235.         }
  236. -       PD_DEBUG("Create pending call %p\n", reply);
  237. -       // XXX needed ?
  238. -       //dbus_pending_call_ref(reply);
  239. +       DEBUG_MSG("Create pending call %p\n", reply);
  240.         RETVAL = reply;
  241.      OUTPUT:
  242.         RETVAL
  243. @@ -571,7 +588,9 @@
  244.  _dispatch(con)
  245.         DBusConnection *con;
  246.      CODE:
  247. +       DEBUG_MSG("IN dispatch\n");
  248.         while(dbus_connection_dispatch(con) == DBUS_DISPATCH_DATA_REMAINS);
  249. +       DEBUG_MSG("Completed \n");
  250.  
  251.  void
  252.  _set_watch_callbacks(con)
  253. @@ -637,7 +656,7 @@
  254.         SV *code;
  255.      CODE:
  256.         SvREFCNT_inc(code);
  257. -       PD_DEBUG("Adding filter %p\n", code);
  258. +       DEBUG_MSG("Adding filter %p\n", code);
  259.         dbus_connection_add_filter(con, _message_filter, code, _filter_release);
  260.  
  261.  dbus_bool_t
  262. @@ -661,7 +680,7 @@
  263.         DBusError error;
  264.      CODE:
  265.         dbus_error_init(&error);
  266. -       PD_DEBUG("Adding match %s\n", rule);
  267. +       DEBUG_MSG("Adding match %s\n", rule);
  268.         dbus_bus_add_match(con, rule, &error);
  269.         if (dbus_error_is_set(&error)) {
  270.           _croak_error(&error);
  271. @@ -675,7 +694,7 @@
  272.         DBusError error;
  273.      CODE:
  274.         dbus_error_init(&error);
  275. -       PD_DEBUG("Removeing match %s\n", rule);
  276. +       DEBUG_MSG("Removeing match %s\n", rule);
  277.         dbus_bus_remove_match(con, rule, &error);
  278.         if (dbus_error_is_set(&error)) {
  279.           _croak_error(&error);
  280. @@ -704,11 +723,9 @@
  281.  void
  282.  DESTROY(con)
  283.         DBusConnection *con;
  284. -   CODE:
  285. -       PD_DEBUG("Destroying connection %p\n", con);
  286. -       dbus_connection_close(con);
  287. -       // XXX do we need this or not ?
  288. -       //dbus_connection_unref(con);
  289. +    CODE:
  290. +       DEBUG_MSG("Unrefing connection %p\n", con);
  291. +       dbus_connection_unref(con);
  292.  
  293.  
  294.  MODULE = Net::DBus::Binding::Server        PACKAGE = Net::DBus::Binding::Server
  295. @@ -724,7 +741,7 @@
  296.      CODE:
  297.         dbus_error_init(&error);
  298.         server = dbus_server_listen(address, &error);
  299. -       PD_DEBUG("Created server %p on address %s", server, address);
  300. +       DEBUG_MSG("Created server %p on address %s\n", server, address);
  301.         if (!server) {
  302.           _croak_error(&error);
  303.         }
  304. @@ -792,7 +809,7 @@
  305.  DESTROY(server)
  306.         DBusServer *server;
  307.     CODE:
  308. -       PD_DEBUG("Destroying server %p\n", server);
  309. +       DEBUG_MSG("Destroying server %p\n", server);
  310.         dbus_server_unref(server);
  311.  
  312.  
  313. @@ -809,6 +826,7 @@
  314.      CODE:
  315.         dbus_error_init(&error);
  316.         con = dbus_bus_get(type, &error);
  317. +        dbus_connection_ref(con);
  318.         if (!con) {
  319.           _croak_error(&error);
  320.         }
  321. @@ -830,8 +848,8 @@
  322.         if (!msg) {
  323.           croak("No memory to allocate message");
  324.         }
  325. -       PD_DEBUG("Create msg new %p\n", msg);
  326. -       PD_DEBUG("  Type %d\n", dbus_message_get_type(msg));
  327. +       DEBUG_MSG("Create msg new %p\n", msg);
  328. +       DEBUG_MSG("  Type %d\n", dbus_message_get_type(msg));
  329.         RETVAL = msg;
  330.      OUTPUT:
  331.         RETVAL
  332. @@ -863,11 +881,11 @@
  333.  DESTROY(msg)
  334.         DBusMessage *msg;
  335.      CODE:
  336. -       PD_DEBUG("De-referencing message %p\n", msg);
  337. -       PD_DEBUG("  Type %d\n", dbus_message_get_type(msg));
  338. -       PD_DEBUG("  Interface %s\n", dbus_message_get_interface(msg) ? dbus_message_get_interface(msg) : "");
  339. -       PD_DEBUG("  Path %s\n", dbus_message_get_path(msg) ? dbus_message_get_path(msg) : "");
  340. -       PD_DEBUG("  Member %s\n", dbus_message_get_member(msg) ? dbus_message_get_member(msg) : "");
  341. +       DEBUG_MSG("De-referencing message %p\n", msg);
  342. +       DEBUG_MSG("  Type %d\n", dbus_message_get_type(msg));
  343. +       DEBUG_MSG("  Interface %s\n", dbus_message_get_interface(msg) ? dbus_message_get_interface(msg) : "");
  344. +       DEBUG_MSG("  Path %s\n", dbus_message_get_path(msg) ? dbus_message_get_path(msg) : "");
  345. +       DEBUG_MSG("  Member %s\n", dbus_message_get_member(msg) ? dbus_message_get_member(msg) : "");
  346.         dbus_message_unref(msg);
  347.  
  348.  dbus_bool_t
  349. @@ -941,11 +959,11 @@
  350.         if (!msg) {
  351.           croak("No memory to allocate message");
  352.         }
  353. -       PD_DEBUG("Create msg new signal %p\n", msg);
  354. -       PD_DEBUG("  Type %d\n", dbus_message_get_type(msg));
  355. -       PD_DEBUG("  Interface %s\n", dbus_message_get_interface(msg) ? dbus_message_get_interface(msg) : "");
  356. -       PD_DEBUG("  Path %s\n", dbus_message_get_path(msg) ? dbus_message_get_path(msg) : "");
  357. -       PD_DEBUG("  Member %s\n", dbus_message_get_member(msg) ? dbus_message_get_member(msg) : "");
  358. +       DEBUG_MSG("Create msg new signal %p\n", msg);
  359. +       DEBUG_MSG("  Type %d\n", dbus_message_get_type(msg));
  360. +       DEBUG_MSG("  Interface %s\n", dbus_message_get_interface(msg) ? dbus_message_get_interface(msg) : "");
  361. +       DEBUG_MSG("  Path %s\n", dbus_message_get_path(msg) ? dbus_message_get_path(msg) : "");
  362. +       DEBUG_MSG("  Member %s\n", dbus_message_get_member(msg) ? dbus_message_get_member(msg) : "");
  363.         RETVAL = msg;
  364.      OUTPUT:
  365.         RETVAL
  366. @@ -967,11 +985,11 @@
  367.         if (!msg) {
  368.           croak("No memory to allocate message");
  369.         }
  370. -       PD_DEBUG("Create msg new method call %p\n", msg);
  371. -       PD_DEBUG("  Type %d\n", dbus_message_get_type(msg));
  372. -       PD_DEBUG("  Interface %s\n", dbus_message_get_interface(msg) ? dbus_message_get_interface(msg) : "");
  373. -       PD_DEBUG("  Path %s\n", dbus_message_get_path(msg) ? dbus_message_get_path(msg) : "");
  374. -       PD_DEBUG("  Member %s\n", dbus_message_get_member(msg) ? dbus_message_get_member(msg) : "");
  375. +       DEBUG_MSG("Create msg new method call %p\n", msg);
  376. +       DEBUG_MSG("  Type %d\n", dbus_message_get_type(msg));
  377. +       DEBUG_MSG("  Interface %s\n", dbus_message_get_interface(msg) ? dbus_message_get_interface(msg) : "");
  378. +       DEBUG_MSG("  Path %s\n", dbus_message_get_path(msg) ? dbus_message_get_path(msg) : "");
  379. +       DEBUG_MSG("  Member %s\n", dbus_message_get_member(msg) ? dbus_message_get_member(msg) : "");
  380.         RETVAL = msg;
  381.      OUTPUT:
  382.         RETVAL
  383. @@ -993,11 +1011,11 @@
  384.         dbus_message_set_interface(msg, dbus_message_get_interface(call));
  385.         dbus_message_set_path(msg, dbus_message_get_path(call));
  386.         dbus_message_set_member(msg, dbus_message_get_member(call));
  387. -       PD_DEBUG("Create msg new method return %p\n", msg);
  388. -       PD_DEBUG("  Type %d\n", dbus_message_get_type(msg));
  389. -       PD_DEBUG("  Interface %s\n", dbus_message_get_interface(msg) ? dbus_message_get_interface(msg) : "");
  390. -       PD_DEBUG("  Path %s\n", dbus_message_get_path(msg) ? dbus_message_get_path(msg) : "");
  391. -       PD_DEBUG("  Member %s\n", dbus_message_get_member(msg) ? dbus_message_get_member(msg) : "");
  392. +       DEBUG_MSG("Create msg new method return %p\n", msg);
  393. +       DEBUG_MSG("  Type %d\n", dbus_message_get_type(msg));
  394. +       DEBUG_MSG("  Interface %s\n", dbus_message_get_interface(msg) ? dbus_message_get_interface(msg) : "");
  395. +       DEBUG_MSG("  Path %s\n", dbus_message_get_path(msg) ? dbus_message_get_path(msg) : "");
  396. +       DEBUG_MSG("  Member %s\n", dbus_message_get_member(msg) ? dbus_message_get_member(msg) : "");
  397.         RETVAL = msg;
  398.      OUTPUT:
  399.         RETVAL
  400. @@ -1018,11 +1036,11 @@
  401.         if (!msg) {
  402.           croak("No memory to allocate message");
  403.         }
  404. -       PD_DEBUG("Create msg new error %p\n", msg);
  405. -       PD_DEBUG("  Type %d\n", dbus_message_get_type(msg));
  406. -       PD_DEBUG("  Interface %s\n", dbus_message_get_interface(msg) ? dbus_message_get_interface(msg) : "");
  407. -       PD_DEBUG("  Path %s\n", dbus_message_get_path(msg) ? dbus_message_get_path(msg) : "");
  408. -       PD_DEBUG("  Member %s\n", dbus_message_get_member(msg) ? dbus_message_get_member(msg) : "");
  409. +       DEBUG_MSG("Create msg new error %p\n", msg);
  410. +       DEBUG_MSG("  Type %d\n", dbus_message_get_type(msg));
  411. +       DEBUG_MSG("  Interface %s\n", dbus_message_get_interface(msg) ? dbus_message_get_interface(msg) : "");
  412. +       DEBUG_MSG("  Path %s\n", dbus_message_get_path(msg) ? dbus_message_get_path(msg) : "");
  413. +       DEBUG_MSG("  Member %s\n", dbus_message_get_member(msg) ? dbus_message_get_member(msg) : "");
  414.         RETVAL = msg;
  415.      OUTPUT:
  416.         RETVAL
  417. @@ -1032,8 +1050,18 @@
  418.  PROTOTYPES: ENABLE
  419.  
  420.  DBusMessage *
  421. -dbus_pending_call_steal_reply(call)
  422. +_steal_reply(call)
  423.         DBusPendingCall *call;
  424. + PREINIT:
  425. +        DBusMessage *msg;
  426. +    CODE:
  427. +        DEBUG_MSG("Stealing pending call reply %p\n", call);
  428. +       msg = dbus_pending_call_steal_reply(call);
  429. +        dbus_message_ref(msg);
  430. +        DEBUG_MSG("Got reply message %p\n", msg);
  431. +        RETVAL = msg;
  432. +  OUTPUT:
  433. +        RETVAL
  434.  
  435.  void
  436.  dbus_pending_call_block(call)
  437. @@ -1053,14 +1081,14 @@
  438.         SV *code;
  439.      CODE:
  440.         SvREFCNT_inc(code);
  441. -       PD_DEBUG("Adding pending call notify %p\n", code);
  442. +       DEBUG_MSG("Adding pending call notify %p\n", code);
  443.         dbus_pending_call_set_notify(call, _pending_call_callback, code, _pending_call_notify_release);
  444.  
  445.  void
  446.  DESTROY (call)
  447.         DBusPendingCall *call;
  448.      CODE:
  449. -       PD_DEBUG("Unrefing pending call %p", call);
  450. +       DEBUG_MSG("Unrefing pending call %p", call);
  451.         dbus_pending_call_unref(call);
  452.  
  453.  MODULE = Net::DBus::Binding::C::Watch      PACKAGE = Net::DBus::Binding::C::Watch
  454. @@ -1094,7 +1122,7 @@
  455.         DBusWatch *watch;
  456.         unsigned int flags;
  457.      CODE:
  458. -       PD_DEBUG("Handling event %d on fd %d (%p)\n", flags, dbus_watch_get_fd(watch), watch);
  459. +       DEBUG_MSG("Handling event %d on fd %d (%p)\n", flags, dbus_watch_get_fd(watch), watch);
  460.         dbus_watch_handle(watch, flags);
  461.  
  462.  
  463. @@ -1136,7 +1164,7 @@
  464.  handle(timeout)
  465.         DBusTimeout *timeout;
  466.      CODE:
  467. -       PD_DEBUG("Handling timeout event %p\n", timeout);
  468. +       DEBUG_MSG("Handling timeout event %p\n", timeout);
  469.         dbus_timeout_handle(timeout);
  470.  
  471.  void *
  472. @@ -1426,7 +1454,7 @@
  473.  DESTROY(iter)
  474.         DBusMessageIter *iter;
  475.      CODE:
  476. -       PD_DEBUG("Destroying iterator %p\n", iter);
  477. +       DEBUG_MSG("Destroying iterator %p\n", iter);
  478.         dbus_free(iter);
  479.  
  480.  MODULE = Net::DBus          PACKAGE = Net::DBus
  481. diff -Nru /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/debian/changelog /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/debian/changelog
  482. --- /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/debian/changelog    2007-04-11 10:53:39.000000000 +0200
  483. +++ /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/debian/changelog    2007-04-11 10:53:39.000000000 +0200
  484. @@ -1,3 +1,14 @@
  485. +libnet-dbus-perl (0.33.4-1) unstable; urgency=low
  486. +
  487. +  * New upstream release
  488. +    - Closes: #408881
  489. +  * Acknowledge NMU.  Thanks Michael Ablassmeier!
  490. +    - Closes: #386925
  491. +  * Disable tests until next upstream release.  CPAN bug #22850
  492. +    - Closes: #395861
  493. +
  494. + -- Jack Bates <[email protected]>  Wed,  7 Mar 2007 01:04:06 -0800
  495. +
  496.  libnet-dbus-perl (0.33.3-1.1) unstable; urgency=low
  497.  
  498.    * Non-maintainer upload.
  499. diff -Nru /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/debian/rules /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/debian/rules
  500. --- /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/debian/rules        2007-04-11 10:53:39.000000000 +0200
  501. +++ /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/debian/rules        2007-04-11 10:53:39.000000000 +0200
  502. @@ -53,7 +53,8 @@
  503.         dh_clean -k
  504.  
  505.         # Add commands to install the package into debian/$PACKAGE_NAME here
  506. -       $(MAKE) test
  507. +       # TODO: Re-enable tests for next upstream release.  CPAN bug #22850
  508. +       #$(MAKE) test
  509.         $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
  510.  
  511.         # As this is a architecture dependent package, we are not
  512. diff -Nru /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/examples/example-service-async.pl /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/examples/example-service-async.pl
  513. --- /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/examples/example-service-async.pl   2006-07-06 00:34:37.000000000 +0200
  514. +++ /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/examples/example-service-async.pl   2006-11-05 22:47:57.000000000 +0100
  515. @@ -35,6 +35,22 @@
  516.      return ["Hello", " from example-service-async.pl"];
  517.  }
  518.  
  519. +dbus_method("GetDict", [], [["dict", "string", "string"]]);
  520. +sub GetDict {
  521. +    my $self = shift;
  522. +    print "Do get dict\n";
  523. +    sleep 10;
  524. +    return {"first" => "Hello Dict", "second" => " from example-service.pl"};
  525. +}
  526. +
  527. +dbus_method("GetTuple", [], [["struct", "string", "string"]]);
  528. +sub GetTuple {
  529. +    my $self = shift;
  530. +    print "Do get tuple\n";
  531. +    sleep 10;
  532. +    return ["Hello Tuple", " from example-service.pl"];
  533. +}
  534. +
  535.  package main;
  536.  
  537.  my $bus = Net::DBus->session();
  538. diff -Nru /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/examples/notification.pl /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/examples/notification.pl
  539. --- /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/examples/notification.pl    1970-01-01 01:00:00.000000000 +0100
  540. +++ /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/examples/notification.pl    2006-11-05 22:47:57.000000000 +0100
  541. @@ -0,0 +1,19 @@
  542. +#!/usr/bin/perl
  543. +
  544. +use Net::DBus qw(:typing);
  545. +
  546. +
  547. +my $bus = Net::DBus->session;
  548. +
  549. +my $svc = $bus->get_service("org.freedesktop.Notifications");
  550. +my $obj = $svc->get_object("/org/freedesktop/Notifications");
  551. +
  552. +$obj->Notify("notification.pl",
  553. +            0,
  554. +            '',
  555. +            "Demo notification",
  556. +            "Demonstrating using of desktop\n" .
  557. +            "notifications from Net::DBus\n",
  558. +            ["done", "Done"],
  559. +            {"desktop-entry" => "virt-manager", x => dbus_variant(dbus_int32(200)), y => dbus_variant(dbus_int32(200))},
  560. +            2_000);
  561. diff -Nru /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/lib/Net/DBus/ASyncReply.pm /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/lib/Net/DBus/ASyncReply.pm
  562. --- /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/lib/Net/DBus/ASyncReply.pm  2006-07-06 00:34:37.000000000 +0200
  563. +++ /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/lib/Net/DBus/ASyncReply.pm  2006-11-05 22:47:57.000000000 +0100
  564. @@ -154,6 +154,13 @@
  565.  
  566.      my $reply = $self->{pending_call}->get_reply;
  567.  
  568. +    if ($reply->isa("Net::DBus::Binding::Message::Error")) {
  569. +       my $iter = $reply->iterator();
  570. +       my $desc = $iter->get_string();
  571. +       die Net::DBus::Error->new(name => $reply->get_error_name,
  572. +                              message => $desc);
  573. +    }
  574. +
  575.      my @reply;
  576.      if ($self->{introspector}) {
  577.         @reply = $self->{introspector}->decode($reply, "methods", $self->{method_name}, "returns");
  578. diff -Nru /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/lib/Net/DBus/Binding/Connection.pm /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/lib/Net/DBus/Binding/Connection.pm
  579. --- /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/lib/Net/DBus/Binding/Connection.pm  2007-04-11 10:53:39.000000000 +0200
  580. +++ /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/lib/Net/DBus/Binding/Connection.pm  2006-11-05 22:47:57.000000000 +0100
  581. @@ -144,7 +144,7 @@
  582.  sub disconnect {
  583.      my $self = shift;
  584.      
  585. -    $self->{connection}->dbus_connection_close();
  586. +    $self->{connection}->dbus_connection_disconnect();
  587.  }
  588.  
  589.  =item $con->flush()
  590. @@ -555,7 +555,7 @@
  591.      my $replyto = shift;
  592.      my $name = shift;
  593.      my $description = shift;
  594. -   
  595. +
  596.      return Net::DBus::Binding::Message::Error->new(replyto => $replyto,
  597.                                               name => $name,
  598.                                               description => $description);
  599. diff -Nru /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/lib/Net/DBus/Binding/Introspector.pm /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/lib/Net/DBus/Binding/Introspector.pm
  600. --- /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/lib/Net/DBus/Binding/Introspector.pm        2006-07-06 00:34:37.000000000 +0200
  601. +++ /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/lib/Net/DBus/Binding/Introspector.pm        2006-11-05 22:47:57.000000000 +0100
  602. @@ -140,8 +140,8 @@
  603.         $self->{children} = exists $params{children} ? $params{children} : [];
  604.      }
  605.  
  606. -    # XXX it is really a bug that these aren't included in the introspection
  607. -    # data the bus generates
  608. +    # Some versions of dbus failed to include signals in introspection data
  609. +    # so this code adds them, letting us keep compatability with old versions
  610.      if ($self->{object_path} eq "/org/freedesktop/DBus") {
  611.         if (!$self->has_signal("NameOwnerChanged")) {
  612.             $self->add_signal("NameOwnerChanged", ["string","string","string"], "org.freedesktop.DBus");
  613. @@ -702,7 +702,7 @@
  614.                    $current = pop @cont;
  615.                }
  616.             } elsif ($type eq "v") {
  617. -              push @{$current}, "variant";
  618. +              push @{$current}, ["variant"];
  619.                if ($current->[0] eq "array") {
  620.                    $current = pop @cont;
  621.                }
  622. diff -Nru /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/lib/Net/DBus/Binding/PendingCall.pm /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/lib/Net/DBus/Binding/PendingCall.pm
  623. --- /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/lib/Net/DBus/Binding/PendingCall.pm 2006-07-06 00:34:37.000000000 +0200
  624. +++ /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/lib/Net/DBus/Binding/PendingCall.pm 2006-11-05 22:47:57.000000000 +0100
  625. @@ -130,14 +130,12 @@
  626.  sub get_reply {
  627.      my $self = shift;
  628.  
  629. -    my $reply = $self->{pending_call}->dbus_pending_call_steal_reply();
  630. +    my $reply = $self->{pending_call}->_steal_reply();
  631.      my $type = $reply->dbus_message_get_type;
  632.      if ($type == &Net::DBus::Binding::Message::MESSAGE_TYPE_ERROR) {
  633. -       return $self->{connection}->make_error_message($self->{method_call},
  634. -                                                 $reply);
  635. +       return $self->{connection}->make_raw_message($reply);
  636.      } elsif ($type == &Net::DBus::Binding::Message::MESSAGE_TYPE_METHOD_RETURN) {
  637. -       return $self->{connection}->make_method_return_message($self->{method_call},
  638. -                                                        $reply);
  639. +       return $self->{connection}->make_raw_message($reply);
  640.      } else {
  641.         die "unknown method reply type $type";
  642.      }
  643. diff -Nru /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/lib/Net/DBus/Test/MockConnection.pm /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/lib/Net/DBus/Test/MockConnection.pm
  644. --- /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/lib/Net/DBus/Test/MockConnection.pm 2006-07-06 00:34:37.000000000 +0200
  645. +++ /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/lib/Net/DBus/Test/MockConnection.pm 2006-11-05 22:47:57.000000000 +0100
  646. @@ -62,6 +62,7 @@
  647.  use strict;
  648.  use warnings;
  649.  
  650. +use Net::DBus::Error;
  651.  use Net::DBus::Test::MockMessage;
  652.  use Net::DBus::Binding::Message::MethodCall;
  653.  use Net::DBus::Binding::Message::MethodReturn;
  654. diff -Nru /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/lib/Net/DBus/Test/MockIterator.pm /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/lib/Net/DBus/Test/MockIterator.pm
  655. --- /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/lib/Net/DBus/Test/MockIterator.pm   2006-07-06 00:34:37.000000000 +0200
  656. +++ /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/lib/Net/DBus/Test/MockIterator.pm   2006-11-05 22:47:57.000000000 +0100
  657. @@ -113,8 +113,8 @@
  658.  sub next {
  659.      my $self = shift;
  660.  
  661. -    if ($self->{position} < $#{$self->{data}}) {
  662. -       $self->{position}++;
  663. +    $self->{position}++;
  664. +    if ($self->{position} <= $#{$self->{data}}) {
  665.         return 1;
  666.      }
  667.      return 0;
  668. @@ -456,7 +456,7 @@
  669.  
  670.  sub get_dict {
  671.      my $self = shift;
  672. -   
  673. +
  674.      my $iter = $self->_recurse();
  675.      my $type = $iter->get_arg_type();
  676.      my $dict = {};
  677. @@ -483,7 +483,7 @@
  678.  sub get_array {
  679.      my $self = shift;
  680.      my $array_type = shift;
  681. -   
  682. +
  683.      my $iter = $self->_recurse();
  684.      my $type = $iter->get_arg_type();
  685.      my $array = [];
  686. @@ -525,7 +525,7 @@
  687.  
  688.  sub get_struct {
  689.      my $self = shift;
  690. -   
  691. +
  692.      my $iter = $self->_recurse();
  693.      my $type = $iter->get_arg_type();
  694.      my $struct = [];
  695. @@ -843,7 +843,7 @@
  696.  
  697.  sub get_arg_type {
  698.      my $self = shift;
  699. -   
  700. +
  701.      return &Net::DBus::Binding::Message::TYPE_INVALID
  702.         if $self->{position} > $#{$self->{data}};
  703.  
  704. @@ -868,7 +868,7 @@
  705.      if ($data->[0] != &Net::DBus::Binding::Message::TYPE_ARRAY) {
  706.         die "current element is not an array";
  707.      }
  708. -    return $data->[2];
  709. +    return $data->[1]->[0]->[0];
  710.  }
  711.  
  712.  
  713. @@ -885,8 +885,9 @@
  714.      my $type = $data->[0];
  715.      if ($type != &Net::DBus::Binding::Message::TYPE_STRUCT &&
  716.         $type != &Net::DBus::Binding::Message::TYPE_ARRAY &&
  717. +       $type != &Net::DBus::Binding::Message::TYPE_DICT_ENTRY &&
  718.         $type != &Net::DBus::Binding::Message::TYPE_VARIANT) {
  719. -       die "current data element is not a container";
  720. +       die "current data element '$type' is not a container";
  721.      }
  722.  
  723.      return $self->_new(data => $data->[1],
  724. diff -Nru /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/lib/Net/DBus.pm /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/lib/Net/DBus.pm
  725. --- /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/lib/Net/DBus.pm     2006-07-06 00:34:37.000000000 +0200
  726. +++ /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/lib/Net/DBus.pm     2006-11-05 22:47:57.000000000 +0100
  727. @@ -87,7 +87,7 @@
  728.  use warnings;
  729.  
  730.  BEGIN {
  731. -    our $VERSION = '0.33.3';
  732. +    our $VERSION = '0.33.4';
  733.      require XSLoader;
  734.      XSLoader::load('Net::DBus', $VERSION);
  735.  }
  736. @@ -250,10 +250,9 @@
  737.         # ... Add support for GLib and POE
  738.      }
  739.  
  740. -    $self->get_connection->add_filter(sub { $self->_signal_func(@_) });
  741. +    $self->get_connection->add_filter(sub { return $self->_signal_func(@_); });
  742.  
  743. -    # XXX is it ok to fix '1:0' as the owner of this ?
  744. -    $self->{bus} = Net::DBus::RemoteService->new($self, ":1.0", "org.freedesktop.DBus");
  745. +    $self->{bus} = Net::DBus::RemoteService->new($self, "org.freedesktop.DBus", "org.freedesktop.DBus");
  746.  
  747.      return $self;
  748.  }
  749. diff -Nru /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/Makefile.PL /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/Makefile.PL
  750. --- /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/Makefile.PL 2006-07-06 00:34:17.000000000 +0200
  751. +++ /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/Makefile.PL 2006-11-05 22:47:57.000000000 +0100
  752. @@ -3,6 +3,9 @@
  753.  # See lib/ExtUtils/MakeMaker.pm for details of how to influence
  754.  # the contents of the Makefile that is written.
  755.  
  756. +`pkg-config --atleast-version=0.90 dbus-1`;
  757. +my $has_0_90 = (($? >> 8) == 0 ? 1 : 0);
  758. +
  759.  my $DBUS_LIBS = `pkg-config --libs dbus-1`;
  760.  my $DBUS_CFLAGS = `pkg-config --cflags dbus-1`;
  761.  
  762. @@ -21,10 +24,11 @@
  763.                  'Time::HiRes' => 0,
  764.                  'XML::Twig' => 0,
  765.                  },
  766. -#    'ABSTRACT_FROM' => 'lib/Net/DBus.pm',
  767.               'AUTHOR' => 'Daniel Berrange <[email protected]>',
  768. -             'LIBS' => [$DBUS_LIBS],
  769. -             'DEFINE' => "-DDBUS_API_SUBJECT_TO_CHANGE -DPD_DO_DEBUG=1",
  770. +             'LIBS' => [$DBUS_LIBS],
  771. +             'DEFINE' => ($has_0_90 ?
  772. +                        "-DDBUS_API_SUBJECT_TO_CHANGE -DHAVE_CONN_DISCONNECT=0 -DNET_DBUS_DEBUG=1" :
  773. +                        "-DDBUS_API_SUBJECT_TO_CHANGE -DHAVE_CONN_DISCONNECT=1 -DNET_DBUS_DEBUG=1"),
  774.               'INC' => "-Wall $DBUS_CFLAGS",
  775.               'depend' => {
  776.                  Net-DBus.spec => '$(VERSION_FROM)',
  777. diff -Nru /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/MANIFEST /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/MANIFEST
  778. --- /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/MANIFEST    2006-07-06 00:51:44.000000000 +0200
  779. +++ /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/MANIFEST    2006-11-05 23:35:13.000000000 +0100
  780. @@ -13,6 +13,7 @@
  781.  examples/example-signal-emitter.pl
  782.  examples/example-signal-receiver.pl
  783.  examples/lshal.pl
  784. +examples/notification.pl
  785.  lib/Net/DBus.pm
  786.  lib/Net/DBus/Annotation.pm
  787.  lib/Net/DBus/ASyncReply.pm
  788. @@ -48,7 +49,6 @@
  789.  Makefile.PL
  790.  MANIFEST                     This list of files
  791.  MANIFEST.SKIP
  792. -META.yml
  793.  Net-DBus.spec.PL
  794.  README
  795.  t/00-constants.t
  796. @@ -67,5 +67,7 @@
  797.  t/60-object-props.t
  798.  t/65-object-magic.t
  799.  t/70-errors.t
  800. +t/75-notifications.t
  801.  typemap
  802.  Net-DBus.spec
  803. +META.yml                                 Module meta-data (added by MakeMaker)
  804. diff -Nru /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/META.yml /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/META.yml
  805. --- /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/META.yml    2006-07-06 00:52:07.000000000 +0200
  806. +++ /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/META.yml    2006-11-05 23:35:13.000000000 +0100
  807. @@ -1,7 +1,7 @@
  808.  # http://module-build.sourceforge.net/META-spec.html
  809.  #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
  810.  name:         Net-DBus
  811. -version:      0.33.3
  812. +version:      0.33.4
  813.  version_from: lib/Net/DBus.pm
  814.  installdirs:  site
  815.  requires:
  816. @@ -10,4 +10,4 @@
  817.      XML::Twig:                     0
  818.  
  819.  distribution_type: module
  820. -generated_by: ExtUtils::MakeMaker version 6.17
  821. +generated_by: ExtUtils::MakeMaker version 6.30
  822. diff -Nru /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/Net-DBus.spec /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/Net-DBus.spec
  823. --- /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/Net-DBus.spec       2006-07-06 00:51:52.000000000 +0200
  824. +++ /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/Net-DBus.spec       2006-11-05 23:34:48.000000000 +0100
  825. @@ -12,7 +12,7 @@
  826.  
  827.  Summary: Perl API to the DBus message system
  828.  Name: perl-%{appname}
  829. -Version: 0.33.3
  830. +Version: 0.33.4
  831.  Release: 1%{_extra_release}
  832.  License: GPL
  833.  Group: Applications/Internet
  834. @@ -21,12 +21,12 @@
  835.  #BuildArchitectures: noarch
  836.  Requires: perl = %{perlversion}
  837.  # For XML::Twig
  838. -Requires: perl-XML-Twig
  839. +Requires: perl(XML::Twig)
  840.  # For Time::HiRes
  841. -Requires: perl-Time-HiRes
  842. +Requires: perl(Time::HiRes)
  843.  Requires: dbus >= 0.33
  844.  BuildRequires: dbus-devel >= 0.33
  845. -BuildRequires: perl-XML-Twig
  846. +BuildRequires: perl(XML::Twig)
  847.  
  848.  %description
  849.  Provides a Perl API to the DBus message system
  850. diff -Nru /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/Net-DBus.spec.PL /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/Net-DBus.spec.PL
  851. --- /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/Net-DBus.spec.PL    2006-07-06 00:34:17.000000000 +0200
  852. +++ /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/Net-DBus.spec.PL    2006-11-05 22:47:57.000000000 +0100
  853. @@ -50,12 +50,12 @@
  854.  #BuildArchitectures: noarch
  855.  Requires: perl = %{perlversion}
  856.  # For XML::Twig
  857. -Requires: perl-XML-Twig
  858. +Requires: perl(XML::Twig)
  859.  # For Time::HiRes
  860. -Requires: perl-Time-HiRes
  861. +Requires: perl(Time::HiRes)
  862.  Requires: dbus >= 0.33
  863.  BuildRequires: dbus-devel >= 0.33
  864. -BuildRequires: perl-XML-Twig
  865. +BuildRequires: perl(XML::Twig)
  866.  
  867.  %description
  868.  Provides a Perl API to the DBus message system
  869. diff -Nru /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/t/30-server.t /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/t/30-server.t
  870. --- /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/t/30-server.t       2006-07-06 00:34:37.000000000 +0200
  871. +++ /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/t/30-server.t       2006-11-05 22:47:57.000000000 +0100
  872. @@ -4,7 +4,7 @@
  873.  use strict;
  874.  use warnings;
  875.  
  876. -BEGIN {
  877. +BEGIN {
  878.          use_ok('Net::DBus::Binding::Server');
  879.          use_ok('Net::DBus::Binding::Connection');
  880.          use_ok('Net::DBus::Reactor');
  881. @@ -20,6 +20,7 @@
  882.  
  883.  my $incoming;
  884.  $server->set_connection_callback(sub {
  885. +  $server = shift;
  886.    $incoming = shift;
  887.  });
  888.  
  889. diff -Nru /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/t/75-notifications.t /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/t/75-notifications.t
  890. --- /tmp/i8IRuFUeZO/libnet-dbus-perl-0.33.3/t/75-notifications.t        1970-01-01 01:00:00.000000000 +0100
  891. +++ /tmp/hhQc2kJzIF/libnet-dbus-perl-0.33.4/t/75-notifications.t        2006-11-05 22:47:57.000000000 +0100
  892. @@ -0,0 +1,71 @@
  893. +# -*- perl -*-
  894. +use Test::More tests => 10;
  895. +
  896. +# This test case is primarily about variants - but
  897. +# in particular the signature of org.freedesktop.Notifications.Notify
  898. +
  899. +use strict;
  900. +use warnings;
  901. +
  902. +BEGIN {
  903. +    use_ok('Net::DBus') or die;
  904. +    use_ok('Net::DBus::Object') or die;
  905. +};
  906. +
  907. +
  908. +package MyObject;
  909. +
  910. +use base qw(Net::DBus::Object);
  911. +use Net::DBus::Exporter qw(org.cpan.Net.DBus.Test.Notify);
  912. +
  913. +sub new {
  914. +    my $class = shift;
  915. +    my $service = shift;
  916. +    my $self = $class->SUPER::new($service, "/org/cpan/Net/DBus/Test/Notify");
  917. +   
  918. +    bless $self, $class;
  919. +
  920. +    $self->{data} = {};
  921. +
  922. +    return $self;
  923. +}
  924. +
  925. +dbus_method("Notify", ["string", "uint32", "string", "string", "string", ["array", "string"], [ "dict", "string", ["variant"]], "int32"],["uint32"]);
  926. +sub Notify {
  927. +    my $self = shift;
  928. +
  929. +    $self->{data} = \@_;
  930. +
  931. +    return 0;
  932. +}
  933. +
  934. +package main;
  935. +
  936. +my $bus = Net::DBus->test;
  937. +
  938. +my $svc = $bus->export_service("org.cpan.Net.DBus.Test.Notify");
  939. +my $obj = MyObject->new($svc);
  940. +
  941. +my $rsvc = $bus->get_service("org.cpan.Net.DBus.Test.Notify");
  942. +my $robj = $rsvc->get_object("/org/cpan/Net/DBus/Test/Notify");
  943. +
  944. +my $res = $robj->Notify(
  945. +                     "dbus-test", # Application name
  946. +                     7, # replaces_id (0 -> nothing)
  947. +                     'someicon', #app_icon ("" -> no icon)
  948. +                     'Test event', # summary
  949. +                     "This is a test to see if DBUS works nicely in Perl.\nI hope that this works.", # body
  950. +                     ["frob", "wibble"], # actions
  951. +                     {"ooh" => "eek", "bar" => "wizz"}, # hints
  952. +                     2_000 # expire_timeout in milliseconds
  953. +                     );
  954. +
  955. +is($obj->{data}->[0], "dbus-test", "name is correct");
  956. +is($obj->{data}->[1], 7, "replacesid is correct");
  957. +is($obj->{data}->[2], "someicon", "icon is correct");
  958. +is($obj->{data}->[3], "Test event", "summary is correct");
  959. +is($obj->{data}->[4], "This is a test to see if DBUS works nicely in Perl.\nI hope that this works.", "name is correct");
  960. +is_deeply($obj->{data}->[5], ["frob", "wibble"], "actions is correct");
  961. +is_deeply($obj->{data}->[6], {"ooh" => "eek", "bar" => "wizz"}, "hints is correct");
  962. +is($obj->{data}->[7], 2_000, "timeout is correct");
  963. +

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will not expire by default. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

comments powered by Disqus
worth-right
worth-right
worth-right