Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:55:12

0001 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
0002 /* dbus-address.h  Server address parser.
0003  *
0004  * Copyright (C) 2003  CodeFactory AB
0005  *
0006  * Licensed under the Academic Free License version 2.1
0007  *
0008  * This program is free software; you can redistribute it and/or modify
0009  * it under the terms of the GNU General Public License as published by
0010  * the Free Software Foundation; either version 2 of the License, or
0011  * (at your option) any later version.
0012  *
0013  * This program is distributed in the hope that it will be useful,
0014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0016  * GNU General Public License for more details.
0017  *
0018  * You should have received a copy of the GNU General Public License
0019  * along with this program; if not, write to the Free Software
0020  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
0021  *
0022  */
0023 #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION)
0024 #error "Only <dbus/dbus.h> can be included directly, this file may disappear or change contents."
0025 #endif
0026 
0027 #ifndef DBUS_ADDRESS_H
0028 #define DBUS_ADDRESS_H
0029 
0030 #include <dbus/dbus-types.h>
0031 #include <dbus/dbus-errors.h>
0032 
0033 DBUS_BEGIN_DECLS
0034 
0035 /**
0036  * @addtogroup DBusAddress
0037  * @{
0038  */
0039 
0040 /** Opaque type representing one of the semicolon-separated items in an address */
0041 typedef struct DBusAddressEntry DBusAddressEntry;
0042 
0043 DBUS_EXPORT
0044 dbus_bool_t dbus_parse_address            (const char         *address,
0045                        DBusAddressEntry ***entry_result,
0046                        int                *array_len,
0047                        DBusError          *error);
0048 DBUS_EXPORT
0049 const char *dbus_address_entry_get_value  (DBusAddressEntry   *entry,
0050                        const char         *key);
0051 DBUS_EXPORT
0052 const char *dbus_address_entry_get_method (DBusAddressEntry   *entry);
0053 DBUS_EXPORT
0054 void        dbus_address_entries_free     (DBusAddressEntry  **entries);
0055 
0056 DBUS_EXPORT
0057 char* dbus_address_escape_value   (const char *value);
0058 DBUS_EXPORT
0059 char* dbus_address_unescape_value (const char *value,
0060                                    DBusError  *error);
0061 
0062 /**
0063  * Clear a variable or struct member that contains an array of #DBusAddressEntry.
0064  * If it does not contain #NULL, the entries that were previously
0065  * there are freed with dbus_address_entries_free().
0066  *
0067  * This is similar to dbus_clear_connection(): see that function
0068  * for more details.
0069  *
0070  * @param pointer_to_entries A pointer to a variable or struct member.
0071  * pointer_to_entries must not be #NULL, but *pointer_to_entries
0072  * may be #NULL.
0073  */
0074 static inline void
0075 dbus_clear_address_entries (DBusAddressEntry ***pointer_to_entries)
0076 {
0077   _dbus_clear_pointer_impl (DBusAddressEntry *, pointer_to_entries,
0078                             dbus_address_entries_free);
0079 }
0080 
0081 /** @} */
0082 
0083 DBUS_END_DECLS
0084 
0085 #endif /* DBUS_ADDRESS_H */