00001 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ 00002 /* dbus-signatures.h utility functions for D-Bus types 00003 * 00004 * Copyright (C) 2005 Red Hat Inc. 00005 * 00006 * Licensed under the Academic Free License version 2.1 00007 * 00008 * This program is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * This program is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program; if not, write to the Free Software 00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00021 * 00022 */ 00023 #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) 00024 #error "Only <dbus/dbus.h> can be included directly, this file may disappear or change contents." 00025 #endif 00026 00027 #ifndef DBUS_SIGNATURES_H 00028 #define DBUS_SIGNATURES_H 00029 00030 #include <dbus/dbus-macros.h> 00031 #include <dbus/dbus-types.h> 00032 #include <dbus/dbus-errors.h> 00033 00034 DBUS_BEGIN_DECLS 00035 00044 typedef struct 00045 { 00046 void *dummy1; 00047 void *dummy2; 00048 dbus_uint32_t dummy8; 00049 int dummy12; 00050 int dummy17; 00051 } DBusSignatureIter; 00052 00053 void dbus_signature_iter_init (DBusSignatureIter *iter, 00054 const char *signature); 00055 00056 int dbus_signature_iter_get_current_type (const DBusSignatureIter *iter); 00057 00058 char * dbus_signature_iter_get_signature (const DBusSignatureIter *iter); 00059 00060 int dbus_signature_iter_get_element_type (const DBusSignatureIter *iter); 00061 00062 dbus_bool_t dbus_signature_iter_next (DBusSignatureIter *iter); 00063 00064 void dbus_signature_iter_recurse (const DBusSignatureIter *iter, 00065 DBusSignatureIter *subiter); 00066 00067 dbus_bool_t dbus_signature_validate (const char *signature, 00068 DBusError *error); 00069 00070 dbus_bool_t dbus_signature_validate_single (const char *signature, 00071 DBusError *error); 00072 00073 dbus_bool_t dbus_type_is_basic (int typecode); 00074 dbus_bool_t dbus_type_is_container (int typecode); 00075 dbus_bool_t dbus_type_is_fixed (int typecode); 00076 00079 DBUS_END_DECLS 00080 00081 #endif /* DBUS_SIGNATURE_H */