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

« back to all changes in this revision

Viewing changes to src/VBox/Main/webservice/vboxweb.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:
25
25
 
26
26
void WebLog(const char *pszFormat, ...);
27
27
 
28
 
// #ifdef DEBUG
29
28
#define WEBDEBUG(a) if (g_fVerbose) { WebLog a; }
30
 
// #else
31
 
// #define WEBDEBUG(a) do { } while(0)
32
 
// #endif
 
29
 
 
30
#define LOG_GROUP LOG_GROUP_WEBSERVICE
 
31
#include <VBox/log.h>
 
32
 
 
33
#include <VBox/com/VirtualBox.h>
 
34
#include <VBox/com/Guid.h>
 
35
 
 
36
#include <VBox/err.h>
 
37
 
 
38
#include <iprt/stream.h>
 
39
 
 
40
#include <string>
 
41
 
33
42
 
34
43
/****************************************************************************
35
44
 *
37
46
 *
38
47
 ****************************************************************************/
39
48
 
40
 
extern ComPtr <IVirtualBox> G_pVirtualBox;
 
49
extern ComPtr<IVirtualBox> g_pVirtualBox;
41
50
extern bool g_fVerbose;
42
51
 
43
52
extern PRTSTREAM g_pstrLog;
52
61
typedef std::string WSDLT_ID;               // combined managed object ref (session ID plus object ID)
53
62
typedef std::string vbox__uuid;
54
63
 
55
 
// type used internally by our class
56
 
// typedef WSDLT_ID ManagedObjectID;
57
 
 
58
 
// #define VBOXWEB_ERROR_BASE                      10000
59
 
// #define VBOXWEB_INVALID_MANAGED_OBJECT          (VBOXWEB_ERROR_BASE + 0)
60
 
// #define VBOXWEB_INVALID_MANAGED_OBJECT_TYPE     (VBOXWEB_ERROR_BASE + 1)
61
 
 
62
64
/****************************************************************************
63
65
 *
64
66
 * SOAP exceptions
89
91
class ManagedObjectRef;
90
92
 
91
93
/**
92
 
 *
 
94
 *  An instance of this gets created for every client that logs onto the
 
95
 *  webservice (via the special IWebsessionManager::logon() SOAP API) and
 
96
 *  maintains the managed object references for that session.
93
97
 */
94
98
class WebServiceSession
95
99
{
97
101
 
98
102
    private:
99
103
        uint64_t                    _uSessionID;
100
 
        WebServiceSessionPrivate    *_pp;
 
104
        WebServiceSessionPrivate    *_pp;               // opaque data struct (defined in vboxweb.cpp)
101
105
        bool                        _fDestructing;
102
106
 
103
107
        ManagedObjectRef            *_pISession;
227
231
    {
228
232
        if (fNullAllowed && pRef == NULL)
229
233
        {
230
 
          pComPtr.setNull();
231
 
          return 0;
 
234
            pComPtr.setNull();
 
235
            return 0;
232
236
        }
233
237
 
234
238
        // pRef->getComPtr returns a ComPtr<IUnknown>; by casting it to
235
 
        // ComPtr<T>, we implicitly do a queryInterface() call
 
239
        // ComPtr<T>, we implicitly do a COM queryInterface() call
236
240
        if (pComPtr = pRef->getComPtr())
237
241
            return 0;
238
242
 
265
269
        return "";
266
270
    }
267
271
 
268
 
    WebServiceSession* pSession;
 
272
    WebServiceSession *pSession;
269
273
    if ((pSession = WebServiceSession::findSessionFromRef(idParent)))
270
274
    {
271
275
        // WEBDEBUG(("\n-- found session for %s\n", idParent.c_str()));