~ubuntu-branches/ubuntu/trusty/virtualbox-ose/trusty

« back to all changes in this revision

Viewing changes to src/VBox/Main/include/vbox-dbus.h

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-12-18 16:44:29 UTC
  • mfrom: (0.3.3 upstream) (0.4.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091218164429-jd34ccexpv5na11a
Tags: 3.1.2-dfsg-1ubuntu1
* Merge from Debian unstable (LP: #498219), remaining changes:
  - Disable update action
    - debian/patches/u01-disable-update-action.dpatch
  - VirtualBox should go in Accessories, not in System tools (LP: #288590)
    - debian/virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add Apport hook
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Add Launchpad integration
    - debian/control
    - debian/lpi-bug.xpm
    - debian/patches/u02-lp-integration.dpatch
* Fixes the following bugs:
  - Kernel module fails to build with Linux >= 2.6.32 (LP: #474625)
  - X.Org drivers need to be rebuilt against X-Server 1.7 (LP: #495935)
  - The *-source packages try to build the kernel modules even though the
    kernel headers aren't available (LP: #473334)
* Replace *-source packages with transitional packages for *-dkms.
* Adapt u01-disable-update-action.dpatch and u02-lp-integration.dpatch for
  new upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/** @file
2
 
 *
3
 
 * Module to dynamically load libdbus and load all symbols
4
 
 * which are needed by VirtualBox.
5
 
 */
6
 
 
7
 
/*
8
 
 * Copyright (C) 2008 Sun Microsystems, Inc.
9
 
 *
10
 
 * This file is part of VirtualBox Open Source Edition (OSE), as
11
 
 * available from http://www.virtualbox.org. This file is free software;
12
 
 * you can redistribute it and/or modify it under the terms of the GNU
13
 
 * General Public License (GPL) as published by the Free Software
14
 
 * Foundation, in version 2 as it comes in the "COPYING" file of the
15
 
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16
 
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17
 
 *
18
 
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
19
 
 * Clara, CA 95054 USA or visit http://www.sun.com if you need
20
 
 * additional information or have any questions.
21
 
 */
22
 
 
23
 
#ifndef ____H_VBOX_DBUS
24
 
#define ____H_VBOX_DBUS
25
 
 
26
 
#include <stdint.h>
27
 
 
28
 
#define VBOX_DBUS_1_3_LIB "libdbus-1.so.3"
29
 
 
30
 
/** Types and defines from the dbus header files which we need.  These are
31
 
 * taken more or less verbatim from the DBus public interface header files. */
32
 
struct DBusError
33
 
{
34
 
    const char *name;
35
 
    const char *message;
36
 
    unsigned int dummy1 : 1;
37
 
    unsigned int dummy2 : 1;
38
 
    unsigned int dummy3 : 1;
39
 
    unsigned int dummy4 : 1;
40
 
    unsigned int dummy5 : 1;
41
 
    void *padding1;
42
 
};
43
 
struct DBusConnection;
44
 
typedef struct DBusConnection DBusConnection;
45
 
typedef uint32_t dbus_bool_t;
46
 
typedef uint32_t dbus_uint32_t;
47
 
typedef enum { DBUS_BUS_SESSON, DBUS_BUS_SYSTEM, DBUS_BUS_STARTER } DBusBusType;
48
 
struct DBusMessage;
49
 
typedef struct DBusMessage DBusMessage;
50
 
struct DBusMessageIter
51
 
52
 
    void *dummy1;
53
 
    void *dummy2;
54
 
    dbus_uint32_t dummy3;
55
 
    int dummy4;
56
 
    int dummy5;
57
 
    int dummy6;
58
 
    int dummy7;
59
 
    int dummy8;
60
 
    int dummy9;
61
 
    int dummy10;
62
 
    int dummy11;
63
 
    int pad1;
64
 
    int pad2;
65
 
    void *pad3;
66
 
};
67
 
typedef struct DBusMessageIter DBusMessageIter;
68
 
 
69
 
#define DBUS_ERROR_NO_MEMORY                  "org.freedesktop.DBus.Error.NoMemory"
70
 
#define DBUS_TYPE_INVALID       ((int) '\0')
71
 
#define DBUS_TYPE_STRING        ((int) 's')
72
 
#define DBUS_TYPE_ARRAY         ((int) 'a')
73
 
#define DBUS_TYPE_DICT_ENTRY    ((int) 'e')
74
 
 
75
 
typedef enum
76
 
{
77
 
  DBUS_HANDLER_RESULT_HANDLED,
78
 
  DBUS_HANDLER_RESULT_NOT_YET_HANDLED,
79
 
  DBUS_HANDLER_RESULT_NEED_MEMORY
80
 
} DBusHandlerResult;
81
 
 
82
 
typedef DBusHandlerResult (*DBusHandleMessageFunction) (DBusConnection *,
83
 
                                                        DBusMessage *, void *);
84
 
typedef void (*DBusFreeFunction) (void *);
85
 
 
86
 
/* Declarations of the functions that we need from libdbus-1 */
87
 
#define VBOX_PROXY_STUB(function, rettype, signature, shortsig) \
88
 
extern rettype ( function ) signature ;
89
 
 
90
 
#include "vbox-dbus-internal.h"
91
 
 
92
 
#undef VBOX_PROXY_STUB
93
 
 
94
 
/**
95
 
 * Try to dynamically load the DBus library.  This function should be called
96
 
 * before attempting to use any of the DBus functions.  It is safe to call this
97
 
 * function multiple times.
98
 
 *
99
 
 * @returns iprt status code
100
 
 */
101
 
extern int VBoxLoadDBusLib(void);
102
 
 
103
 
#endif /* ____H_VBOX_DBUS not defined */
104
 
/* vi: set tabstop=4 shiftwidth=4 expandtab: */
105