dbus-signature.h 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
  2. /* dbus-signatures.h utility functions for D-Bus types
  3. *
  4. * Copyright (C) 2005 Red Hat Inc.
  5. *
  6. * Licensed under the Academic Free License version 2.1
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * 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. #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION)
  24. #error "Only <dbus/dbus.h> can be included directly, this file may disappear or change contents."
  25. #endif
  26. #ifndef DBUS_SIGNATURES_H
  27. #define DBUS_SIGNATURES_H
  28. #include <dbus/dbus-macros.h>
  29. #include <dbus/dbus-types.h>
  30. #include <dbus/dbus-errors.h>
  31. DBUS_BEGIN_DECLS
  32. /**
  33. * @addtogroup DBusSignature
  34. * @{
  35. */
  36. /**
  37. * DBusSignatureIter struct; contains no public fields
  38. */
  39. typedef struct
  40. {
  41. void *dummy1; /**< Don't use this */
  42. void *dummy2; /**< Don't use this */
  43. dbus_uint32_t dummy8; /**< Don't use this */
  44. int dummy12; /**< Don't use this */
  45. int dummy17; /**< Don't use this */
  46. } DBusSignatureIter;
  47. DBUS_EXPORT
  48. void dbus_signature_iter_init (DBusSignatureIter *iter,
  49. const char *signature);
  50. DBUS_EXPORT
  51. int dbus_signature_iter_get_current_type (const DBusSignatureIter *iter);
  52. DBUS_EXPORT
  53. char * dbus_signature_iter_get_signature (const DBusSignatureIter *iter);
  54. DBUS_EXPORT
  55. int dbus_signature_iter_get_element_type (const DBusSignatureIter *iter);
  56. DBUS_EXPORT
  57. dbus_bool_t dbus_signature_iter_next (DBusSignatureIter *iter);
  58. DBUS_EXPORT
  59. void dbus_signature_iter_recurse (const DBusSignatureIter *iter,
  60. DBusSignatureIter *subiter);
  61. DBUS_EXPORT
  62. dbus_bool_t dbus_signature_validate (const char *signature,
  63. DBusError *error);
  64. DBUS_EXPORT
  65. dbus_bool_t dbus_signature_validate_single (const char *signature,
  66. DBusError *error);
  67. DBUS_EXPORT
  68. dbus_bool_t dbus_type_is_valid (int typecode);
  69. DBUS_EXPORT
  70. dbus_bool_t dbus_type_is_basic (int typecode);
  71. DBUS_EXPORT
  72. dbus_bool_t dbus_type_is_container (int typecode);
  73. DBUS_EXPORT
  74. dbus_bool_t dbus_type_is_fixed (int typecode);
  75. /** @} */
  76. DBUS_END_DECLS
  77. #endif /* DBUS_SIGNATURE_H */