• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef foodbusutilhfoo
2 #define foodbusutilhfoo
3 
4 /***
5   This file is part of avahi.
6 
7   avahi is free software; you can redistribute it and/or modify it
8   under the terms of the GNU Lesser General Public License as
9   published by the Free Software Foundation; either version 2.1 of the
10   License, or (at your option) any later version.
11 
12   avahi is distributed in the hope that it will be useful, but WITHOUT
13   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14   or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
15   Public License for more details.
16 
17   You should have received a copy of the GNU Lesser General Public
18   License along with avahi; if not, write to the Free Software
19   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20   USA.
21 ***/
22 
23 #include <inttypes.h>
24 
25 #include <dbus/dbus.h>
26 
27 #include <avahi-common/strlst.h>
28 #include <avahi-common/defs.h>
29 
30 #include "dbus-internal.h"
31 
32 DBusHandlerResult avahi_dbus_respond_error(DBusConnection *c, DBusMessage *m, int error, const char *text);
33 DBusHandlerResult avahi_dbus_respond_string(DBusConnection *c, DBusMessage *m, const char *text);
34 DBusHandlerResult avahi_dbus_respond_int32(DBusConnection *c, DBusMessage *m, int32_t i);
35 DBusHandlerResult avahi_dbus_respond_uint32(DBusConnection *c, DBusMessage *m, uint32_t u);
36 DBusHandlerResult avahi_dbus_respond_boolean(DBusConnection *c, DBusMessage *m, int b);
37 DBusHandlerResult avahi_dbus_respond_ok(DBusConnection *c, DBusMessage *m);
38 DBusHandlerResult avahi_dbus_respond_path(DBusConnection *c, DBusMessage *m, const char *path);
39 
40 void avahi_dbus_append_server_error(DBusMessage *reply);
41 
42 const char *avahi_dbus_map_browse_signal_name(AvahiBrowserEvent e);
43 
44 const char *avahi_dbus_map_resolve_signal_name(AvahiResolverEvent e);
45 
46 DBusHandlerResult avahi_dbus_handle_introspect(DBusConnection *c, DBusMessage *m, const char *fname);
47 
48 void avahi_dbus_append_string_list(DBusMessage *reply, AvahiStringList *txt);
49 
50 int avahi_dbus_read_rdata(DBusMessage *m, int idx, void **rdata, uint32_t *size);
51 int avahi_dbus_read_strlst(DBusMessage *m, int idx, AvahiStringList **l);
52 
53 int avahi_dbus_is_our_own_service(Client *c, AvahiIfIndex interface, AvahiProtocol protocol, const char *name, const char *type, const char *domain);
54 
55 int avahi_dbus_append_rdata(DBusMessage *message, const void *rdata, size_t size);
56 
57 #endif
58