chiark / gitweb /
bus: s/sd_message_handler_t/sd_bus_message_handler_t/g
authorLennart Poettering <lennart@poettering.net>
Sun, 31 Mar 2013 14:26:14 +0000 (16:26 +0200)
committerLennart Poettering <lennart@poettering.net>
Sun, 31 Mar 2013 14:26:14 +0000 (16:26 +0200)
src/libsystemd-bus/bus-internal.h
src/libsystemd-bus/bus-match.c
src/libsystemd-bus/bus-match.h
src/libsystemd-bus/sd-bus.c
src/libsystemd-bus/sd-bus.h

index 1dcb383..a11dc8c 100644 (file)
@@ -35,7 +35,7 @@
 #include "bus-match.h"
 
 struct reply_callback {
-        sd_message_handler_t callback;
+        sd_bus_message_handler_t callback;
         void *userdata;
         usec_t timeout;
         uint64_t serial;
@@ -43,14 +43,14 @@ struct reply_callback {
 };
 
 struct filter_callback {
-        sd_message_handler_t callback;
+        sd_bus_message_handler_t callback;
         void *userdata;
 
         LIST_FIELDS(struct filter_callback, callbacks);
 };
 
 struct object_callback {
-        sd_message_handler_t callback;
+        sd_bus_message_handler_t callback;
         void *userdata;
 
         char *path;
index ff1edfa..972ac8e 100644 (file)
@@ -481,7 +481,7 @@ static int bus_match_find_compare_value(
 
 static int bus_match_add_leaf(
                 struct bus_match_node *where,
-                sd_message_handler_t callback,
+                sd_bus_message_handler_t callback,
                 void *userdata,
                 struct bus_match_node **ret) {
 
@@ -511,7 +511,7 @@ static int bus_match_add_leaf(
 
 static int bus_match_find_leaf(
                 struct bus_match_node *where,
-                sd_message_handler_t callback,
+                sd_bus_message_handler_t callback,
                 void *userdata,
                 struct bus_match_node **ret) {
 
@@ -778,7 +778,7 @@ fail:
 int bus_match_add(
                 struct bus_match_node *root,
                 const char *match,
-                sd_message_handler_t callback,
+                sd_bus_message_handler_t callback,
                 void *userdata,
                 struct bus_match_node **ret) {
 
@@ -819,7 +819,7 @@ finish:
 int bus_match_remove(
                 struct bus_match_node *root,
                 const char *match,
-                sd_message_handler_t callback,
+                sd_bus_message_handler_t callback,
                 void *userdata) {
 
         struct match_component *components = NULL;
index 0a63b55..a31c5d6 100644 (file)
@@ -58,7 +58,7 @@ struct bus_match_node {
                         char *str;
                 } value;
                 struct {
-                        sd_message_handler_t callback;
+                        sd_bus_message_handler_t callback;
                         void *userdata;
                 } leaf;
                 struct {
@@ -70,8 +70,8 @@ struct bus_match_node {
 
 int bus_match_run(sd_bus *bus, struct bus_match_node *root, int ret, sd_bus_message *m);
 
-int bus_match_add(struct bus_match_node *root, const char *match, sd_message_handler_t callback, void *userdata, struct bus_match_node **ret);
-int bus_match_remove(struct bus_match_node *root, const char *match, sd_message_handler_t callback, void *userdata);
+int bus_match_add(struct bus_match_node *root, const char *match, sd_bus_message_handler_t callback, void *userdata, struct bus_match_node **ret);
+int bus_match_remove(struct bus_match_node *root, const char *match, sd_bus_message_handler_t callback, void *userdata);
 
 void bus_match_free(struct bus_match_node *node);
 
index 0a263ea..9b9281d 100644 (file)
@@ -1117,7 +1117,7 @@ static int timeout_compare(const void *a, const void *b) {
 int sd_bus_send_with_reply(
                 sd_bus *bus,
                 sd_bus_message *m,
-                sd_message_handler_t callback,
+                sd_bus_message_handler_t callback,
                 void *userdata,
                 uint64_t usec,
                 uint64_t *serial) {
@@ -1946,7 +1946,7 @@ int sd_bus_flush(sd_bus *bus) {
         }
 }
 
-int sd_bus_add_filter(sd_bus *bus, sd_message_handler_t callback, void *userdata) {
+int sd_bus_add_filter(sd_bus *bus, sd_bus_message_handler_t callback, void *userdata) {
         struct filter_callback *f;
 
         if (!bus)
@@ -1964,7 +1964,7 @@ int sd_bus_add_filter(sd_bus *bus, sd_message_handler_t callback, void *userdata
         return 0;
 }
 
-int sd_bus_remove_filter(sd_bus *bus, sd_message_handler_t callback, void *userdata) {
+int sd_bus_remove_filter(sd_bus *bus, sd_bus_message_handler_t callback, void *userdata) {
         struct filter_callback *f;
 
         if (!bus)
@@ -1987,7 +1987,7 @@ static int bus_add_object(
                 sd_bus *bus,
                 bool fallback,
                 const char *path,
-                sd_message_handler_t callback,
+                sd_bus_message_handler_t callback,
                 void *userdata) {
 
         struct object_callback *c;
@@ -2032,7 +2032,7 @@ static int bus_remove_object(
                 sd_bus *bus,
                 bool fallback,
                 const char *path,
-                sd_message_handler_t callback,
+                sd_bus_message_handler_t callback,
                 void *userdata) {
 
         struct object_callback *c;
@@ -2059,23 +2059,23 @@ static int bus_remove_object(
         return 1;
 }
 
-int sd_bus_add_object(sd_bus *bus, const char *path, sd_message_handler_t callback, void *userdata) {
+int sd_bus_add_object(sd_bus *bus, const char *path, sd_bus_message_handler_t callback, void *userdata) {
         return bus_add_object(bus, false, path, callback, userdata);
 }
 
-int sd_bus_remove_object(sd_bus *bus, const char *path, sd_message_handler_t callback, void *userdata) {
+int sd_bus_remove_object(sd_bus *bus, const char *path, sd_bus_message_handler_t callback, void *userdata) {
         return bus_remove_object(bus, false, path, callback, userdata);
 }
 
-int sd_bus_add_fallback(sd_bus *bus, const char *prefix, sd_message_handler_t callback, void *userdata) {
+int sd_bus_add_fallback(sd_bus *bus, const char *prefix, sd_bus_message_handler_t callback, void *userdata) {
         return bus_add_object(bus, true, prefix, callback, userdata);
 }
 
-int sd_bus_remove_fallback(sd_bus *bus, const char *prefix, sd_message_handler_t callback, void *userdata) {
+int sd_bus_remove_fallback(sd_bus *bus, const char *prefix, sd_bus_message_handler_t callback, void *userdata) {
         return bus_remove_object(bus, true, prefix, callback, userdata);
 }
 
-int sd_bus_add_match(sd_bus *bus, const char *match, sd_message_handler_t callback, void *userdata) {
+int sd_bus_add_match(sd_bus *bus, const char *match, sd_bus_message_handler_t callback, void *userdata) {
         int r = 0;
 
         if (!bus)
@@ -2101,7 +2101,7 @@ int sd_bus_add_match(sd_bus *bus, const char *match, sd_message_handler_t callba
         return r;
 }
 
-int sd_bus_remove_match(sd_bus *bus, const char *match, sd_message_handler_t callback, void *userdata) {
+int sd_bus_remove_match(sd_bus *bus, const char *match, sd_bus_message_handler_t callback, void *userdata) {
         int r = 0, q = 0;
 
         if (!bus)
index e0970cd..413b7dc 100644 (file)
@@ -33,9 +33,6 @@ extern "C" {
 #endif
 
 /* TODO:
- * - sd_message_handler_t needs to be renamed to sd_bus_message_handler_t
- *
- * Later:
  * - add page donation logic
  * - api for appending/reading fixed arrays
  * - merge busctl into systemctl or so?
@@ -51,7 +48,7 @@ typedef struct {
         int need_free;
 } sd_bus_error;
 
-typedef int (*sd_message_handler_t)(sd_bus *bus, int ret, sd_bus_message *m, void *userdata);
+typedef int (*sd_bus_message_handler_t)(sd_bus *bus, int ret, sd_bus_message *m, void *userdata);
 
 /* Connections */
 
@@ -78,7 +75,7 @@ int sd_bus_can_send(sd_bus *bus, char type);
 int sd_bus_get_peer(sd_bus *bus, sd_id128_t *peer);
 
 int sd_bus_send(sd_bus *bus, sd_bus_message *m, uint64_t *serial);
-int sd_bus_send_with_reply(sd_bus *bus, sd_bus_message *m, sd_message_handler_t callback, void *userdata, uint64_t usec, uint64_t *serial);
+int sd_bus_send_with_reply(sd_bus *bus, sd_bus_message *m, sd_bus_message_handler_t callback, void *userdata, uint64_t usec, uint64_t *serial);
 int sd_bus_send_with_reply_cancel(sd_bus *bus, uint64_t serial);
 int sd_bus_send_with_reply_and_block(sd_bus *bus, sd_bus_message *m, uint64_t usec, sd_bus_error *error, sd_bus_message **r);
 
@@ -89,17 +86,17 @@ int sd_bus_process(sd_bus *bus, sd_bus_message **r);
 int sd_bus_wait(sd_bus *bus, uint64_t timeout_usec);
 int sd_bus_flush(sd_bus *bus);
 
-int sd_bus_add_filter(sd_bus *bus, sd_message_handler_t callback, void *userdata);
-int sd_bus_remove_filter(sd_bus *bus, sd_message_handler_t callback, void *userdata);
+int sd_bus_add_filter(sd_bus *bus, sd_bus_message_handler_t callback, void *userdata);
+int sd_bus_remove_filter(sd_bus *bus, sd_bus_message_handler_t callback, void *userdata);
 
-int sd_bus_add_object(sd_bus *bus, const char *path, sd_message_handler_t callback, void *userdata);
-int sd_bus_remove_object(sd_bus *bus, const char *path, sd_message_handler_t callback, void *userdata);
+int sd_bus_add_object(sd_bus *bus, const char *path, sd_bus_message_handler_t callback, void *userdata);
+int sd_bus_remove_object(sd_bus *bus, const char *path, sd_bus_message_handler_t callback, void *userdata);
 
-int sd_bus_add_fallback(sd_bus *bus, const char *prefix, sd_message_handler_t callback, void *userdata);
-int sd_bus_remove_fallback(sd_bus *bus, const char *prefix, sd_message_handler_t callback, void *userdata);
+int sd_bus_add_fallback(sd_bus *bus, const char *prefix, sd_bus_message_handler_t callback, void *userdata);
+int sd_bus_remove_fallback(sd_bus *bus, const char *prefix, sd_bus_message_handler_t callback, void *userdata);
 
-int sd_bus_add_match(sd_bus *bus, const char *match, sd_message_handler_t callback, void *userdata);
-int sd_bus_remove_match(sd_bus *bus, const char *match, sd_message_handler_t callback, void *userdata);
+int sd_bus_add_match(sd_bus *bus, const char *match, sd_bus_message_handler_t callback, void *userdata);
+int sd_bus_remove_match(sd_bus *bus, const char *match, sd_bus_message_handler_t callback, void *userdata);
 
 /* Message object */