dbus-address.h 2.08 KB
Newer Older
1
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
2 3 4 5
/* dbus-address.h  Server address parser.
 *
 * Copyright (C) 2003  CodeFactory AB
 *
6
 * Licensed under the Academic Free License version 2.1
7 8 9 10 11 12 13 14 15 16 17 18 19
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
20
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
21 22 23 24 25 26 27 28 29 30 31 32
 *
 */
#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION)
#error "Only <dbus/dbus.h> can be included directly, this file may disappear or change contents."
#endif

#ifndef DBUS_ADDRESS_H
#define DBUS_ADDRESS_H

#include <dbus/dbus-types.h>
#include <dbus/dbus-errors.h>

33 34 35 36 37 38 39
DBUS_BEGIN_DECLS

/**
 * @addtogroup DBusAddress
 * @{
 */

40
/** Opaque type representing one of the semicolon-separated items in an address */
41 42
typedef struct DBusAddressEntry DBusAddressEntry;

43
DBUS_EXPORT
44 45 46
dbus_bool_t dbus_parse_address            (const char         *address,
					   DBusAddressEntry ***entry,
					   int                *array_len,
47
					   DBusError          *error);
48
DBUS_EXPORT
49 50
const char *dbus_address_entry_get_value  (DBusAddressEntry   *entry,
					   const char         *key);
51
DBUS_EXPORT
52
const char *dbus_address_entry_get_method (DBusAddressEntry   *entry);
53
DBUS_EXPORT
54 55
void        dbus_address_entries_free     (DBusAddressEntry  **entries);

56
DBUS_EXPORT
57
char* dbus_address_escape_value   (const char *value);
58
DBUS_EXPORT
59 60
char* dbus_address_unescape_value (const char *value,
                                   DBusError  *error);
61

62 63 64 65
/** @} */

DBUS_END_DECLS

66 67
#endif /* DBUS_ADDRESS_H */