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