Path: blob/master/thirdparty/linuxbsd_headers/dbus/dbus-address.h
9898 views
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */1/* dbus-address.h Server address parser.2*3* Copyright (C) 2003 CodeFactory AB4*5* Licensed under the Academic Free License version 2.16*7* This program is free software; you can redistribute it and/or modify8* it under the terms of the GNU General Public License as published by9* the Free Software Foundation; either version 2 of the License, or10* (at your option) any later version.11*12* This program is distributed in the hope that it will be useful,13* but WITHOUT ANY WARRANTY; without even the implied warranty of14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15* GNU General Public License for more details.16*17* You should have received a copy of the GNU General Public License18* along with this program; if not, write to the Free Software19* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA20*21*/22#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION)23#error "Only <dbus/dbus.h> can be included directly, this file may disappear or change contents."24#endif2526#ifndef DBUS_ADDRESS_H27#define DBUS_ADDRESS_H2829#include <dbus/dbus-types.h>30#include <dbus/dbus-errors.h>3132DBUS_BEGIN_DECLS3334/**35* @addtogroup DBusAddress36* @{37*/3839/** Opaque type representing one of the semicolon-separated items in an address */40typedef struct DBusAddressEntry DBusAddressEntry;4142DBUS_EXPORT43dbus_bool_t dbus_parse_address (const char *address,44DBusAddressEntry ***entry_result,45int *array_len,46DBusError *error);47DBUS_EXPORT48const char *dbus_address_entry_get_value (DBusAddressEntry *entry,49const char *key);50DBUS_EXPORT51const char *dbus_address_entry_get_method (DBusAddressEntry *entry);52DBUS_EXPORT53void dbus_address_entries_free (DBusAddressEntry **entries);5455DBUS_EXPORT56char* dbus_address_escape_value (const char *value);57DBUS_EXPORT58char* dbus_address_unescape_value (const char *value,59DBusError *error);6061/**62* Clear a variable or struct member that contains an array of #DBusAddressEntry.63* If it does not contain #NULL, the entries that were previously64* there are freed with dbus_address_entries_free().65*66* This is similar to dbus_clear_connection(): see that function67* for more details.68*69* @param pointer_to_entries A pointer to a variable or struct member.70* pointer_to_entries must not be #NULL, but *pointer_to_entries71* may be #NULL.72*/73static inline void74dbus_clear_address_entries (DBusAddressEntry ***pointer_to_entries)75{76_dbus_clear_pointer_impl (DBusAddressEntry *, pointer_to_entries,77dbus_address_entries_free);78}7980/** @} */8182DBUS_END_DECLS8384#endif /* DBUS_ADDRESS_H */85868788