VirtualBox

source: vbox/trunk/include/VBox/dbus.h@ 41745

Last change on this file since 41745 was 36567, checked in by vboxsync, 14 years ago

ugly.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
1/** @file
2 * Module to dynamically load libdbus and load all symbols which are needed by
3 * VirtualBox.
4 */
5
6/*
7 * Copyright (C) 2008 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * The contents of this file may alternatively be used under the terms
18 * of the Common Development and Distribution License Version 1.0
19 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20 * VirtualBox OSE distribution, in which case the provisions of the
21 * CDDL are applicable instead of those of the GPL.
22 *
23 * You may elect to license modified versions of this file under the
24 * terms and conditions of either the GPL or the CDDL or both.
25 */
26
27#ifndef ___VBox_dbus_h
28#define ___VBox_dbus_h
29
30#include <iprt/types.h>
31#include <iprt/stdarg.h>
32
33#ifndef __cplusplus
34# error "This header requires C++ to avoid name clashes."
35#endif
36
37/** Types and defines from the dbus header files which we need. These are
38 * taken more or less verbatim from the DBus public interface header files. */
39struct DBusError
40{
41 const char *name;
42 const char *message;
43 unsigned int dummy1 : 1;
44 unsigned int dummy2 : 1;
45 unsigned int dummy3 : 1;
46 unsigned int dummy4 : 1;
47 unsigned int dummy5 : 1;
48 void *padding1;
49};
50typedef struct DBusError DBusError;
51
52struct DBusConnection;
53typedef struct DBusConnection DBusConnection;
54
55typedef uint32_t dbus_bool_t;
56typedef uint32_t dbus_uint32_t;
57typedef enum { DBUS_BUS_SESSON, DBUS_BUS_SYSTEM, DBUS_BUS_STARTER } DBusBusType;
58
59struct DBusMessage;
60typedef struct DBusMessage DBusMessage;
61
62struct DBusMessageIter
63{
64 void *dummy1;
65 void *dummy2;
66 dbus_uint32_t dummy3;
67 int dummy4;
68 int dummy5;
69 int dummy6;
70 int dummy7;
71 int dummy8;
72 int dummy9;
73 int dummy10;
74 int dummy11;
75 int pad1;
76 int pad2;
77 void *pad3;
78};
79typedef struct DBusMessageIter DBusMessageIter;
80
81#define DBUS_ERROR_NO_MEMORY "org.freedesktop.DBus.Error.NoMemory"
82
83/* Primitive types */
84#define DBUS_TYPE_INVALID ((int) '\0')
85#define DBUS_TYPE_INT32 ((int) 'i')
86#define DBUS_TYPE_UINT32 ((int) 'u')
87#define DBUS_TYPE_STRING ((int) 's')
88#define DBUS_TYPE_STRING_AS_STRING "s"
89
90/* Compound types */
91#define DBUS_TYPE_ARRAY ((int) 'a')
92#define DBUS_TYPE_ARRAY_AS_STRING "a"
93#define DBUS_TYPE_DICT_ENTRY ((int) 'e')
94#define DBUS_TYPE_DICT_ENTRY_AS_STRING "e"
95
96typedef enum
97{
98 DBUS_HANDLER_RESULT_HANDLED,
99 DBUS_HANDLER_RESULT_NOT_YET_HANDLED,
100 DBUS_HANDLER_RESULT_NEED_MEMORY
101} DBusHandlerResult;
102
103typedef DBusHandlerResult (* DBusHandleMessageFunction)(DBusConnection *,
104 DBusMessage *, void *);
105typedef void (* DBusFreeFunction) (void *);
106
107/* Declarations of the functions that we need from libdbus-1 */
108#define VBOX_DBUS_GENERATE_HEADER
109
110#include <VBox/dbus-calls.h>
111
112#undef VBOX_DBUS_GENERATE_HEADER
113
114#endif /* ___VBox_DBus_h not defined */
115/* vi: set tabstop=4 shiftwidth=4 expandtab: */
116
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette