Index: /trunk/include/VBox/com/VirtualBox.h
===================================================================
--- /trunk/include/VBox/com/VirtualBox.h	(revision 30824)
+++ /trunk/include/VBox/com/VirtualBox.h	(revision 30825)
@@ -53,29 +53,3 @@
 #include "VBox/com/ptr.h"
 
-template <class I>
-inline HRESULT createCallbackWrapper(I* aInstance,
-                                     I** paWrapper)
-{
-    ComPtr<ILocalOwner> ptr;
-
-#ifdef VBOX_WITH_XPCOM /* very noisy in pedantic mode */
-    static const CLSID clsid = NS_CALLBACKWRAPPER_CID;
-    HRESULT rc = ptr.createInprocObject(clsid);
-#else
-    HRESULT rc = ptr.createInprocObject(CLSID_CallbackWrapper);
 #endif
-    if (FAILED(rc))
-        return rc;
-
-    rc = ptr->SetLocalObject(aInstance);
-    if (FAILED(rc))
-        return rc;
-
-    ComPtr<I> ptr2 = ptr;
-    if (ptr2.isNull())
-        return E_FAIL;
-
-    rc = ptr2.queryInterfaceTo(paWrapper);
-    return rc;
-}
-#endif
Index: /trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp	(revision 30824)
+++ /trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp	(revision 30825)
@@ -155,5 +155,5 @@
             case VBoxEventType_OnGuestPropertyChange:
             {
-                ComPtr<IGuestPropertyChangeEvent> gpcev = aEvent;
+                ComPtr<IGuestPropertyChangedEvent> gpcev = aEvent;
                 Assert(gpcev);
 
@@ -289,5 +289,5 @@
             {
 
-                ComPtr<IMouseCapabilityChangeEvent> mccev = aEvent;
+                ComPtr<IMouseCapabilityChangedEvent> mccev = aEvent;
                 Assert(mccev);
 
@@ -313,5 +313,5 @@
             case VBoxEventType_OnStateChange:
             {
-                ComPtr<IStateChangeEvent> scev = aEvent;
+                ComPtr<IStateChangedEvent> scev = aEvent;
                 Assert(scev);
 
@@ -324,5 +324,5 @@
             case VBoxEventType_OnRemoteDisplayInfoChange:
             {
-                ComPtr<IRemoteDisplayInfoChangeEvent> rdicev = aEvent;
+                ComPtr<IRemoteDisplayInfoChangedEvent> rdicev = aEvent;
                 Assert(rdicev);
 
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp	(revision 30824)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp	(revision 30825)
@@ -338,5 +338,5 @@
                 case VBoxEventType_OnGuestPropertyChange:
                 {
-                    ComPtr<IGuestPropertyChangeEvent> gpcev = ev;
+                    ComPtr<IGuestPropertyChangedEvent> gpcev = ev;
                     Assert(gpcev);
                     Bstr aNextStrGuid;
Index: /trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp	(revision 30824)
+++ /trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp	(revision 30825)
@@ -276,5 +276,5 @@
             {
 #ifdef VBOX_SECURELABEL
-                ComPtr<IExtraDataChangeEvent> edcev = aEvent;
+                ComPtr<IExtraDataChangedEvent> edcev = aEvent;
                 Assert(edcev);
                 Bstr key, machineId;
@@ -366,5 +366,5 @@
             case VBoxEventType_OnMousePointerShapeChange:
             {
-                ComPtr<IMousePointerShapeChangeEvent> mpscev = aEvent;
+                ComPtr<IMousePointerShapeChangedEvent> mpscev = aEvent;
                 Assert(mpscev);
                 PointerShapeChangeData *data;
@@ -399,5 +399,5 @@
             case VBoxEventType_OnMouseCapabilityChange:
             {
-                ComPtr<IMouseCapabilityChangeEvent> mccev = aEvent;
+                ComPtr<IMouseCapabilityChangedEvent> mccev = aEvent;
                 Assert(mccev);
                 mccev->COMGETTER(SupportsAbsolute)(&gfAbsoluteMouseGuest);
@@ -413,5 +413,5 @@
             case VBoxEventType_OnKeyboardLedsChange:
             {
-                ComPtr<IKeyboardLedsChangeEvent> klcev = aEvent;
+                ComPtr<IKeyboardLedsChangedEvent> klcev = aEvent;
                 Assert(klcev);
                 BOOL fNumLock, fCapsLock, fScrollLock;
@@ -432,5 +432,5 @@
             case VBoxEventType_OnStateChange:
             {
-                ComPtr<IStateChangeEvent> scev = aEvent;
+                ComPtr<IStateChangedEvent> scev = aEvent;
                 Assert(scev);
                 MachineState_T machineState;
Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.cpp	(revision 30824)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.cpp	(revision 30825)
@@ -66,5 +66,5 @@
         case KVBoxEventType_OnMachineStateChange:
         {
-            CMachineStateChangeEvent es(event);
+            CMachineStateChangedEvent es(event);
             emit sigMachineStateChange(es.GetMachineId(), es.GetState());
             break;
@@ -72,5 +72,5 @@
         case KVBoxEventType_OnMachineDataChange:
         {
-            CMachineDataChangeEvent es(event);
+            CMachineDataChangedEvent es(event);
             emit sigMachineDataChange(es.GetMachineId());
             break;
@@ -89,5 +89,5 @@
         case KVBoxEventType_OnExtraDataChange:
         {
-            CExtraDataChangeEvent es(event);
+            CExtraDataChangedEvent es(event);
             emit sigExtraDataChange(es.GetMachineId(), es.GetKey(), es.GetValue());
             break;
@@ -104,5 +104,5 @@
         case KVBoxEventType_OnSessionStateChange:
         {
-            CSessionStateChangeEvent es(event);
+            CSessionStateChangedEvent es(event);
             emit sigSessionStateChange(es.GetMachineId(), es.GetState());
             break;
@@ -114,5 +114,5 @@
         case KVBoxEventType_OnSnapshotChange:
         {
-            CSnapshotChangeEvent es(event);
+            CSnapshotChangedEvent es(event);
             emit sigSnapshotChange(es.GetMachineId(), es.GetSnapshotId());
             break;
@@ -126,5 +126,5 @@
         case KVBoxEventType_OnMousePointerShapeChange:
         {
-            CMousePointerShapeChangeEvent es(event);
+            CMousePointerShapeChangedEvent es(event);
             emit sigMousePointerShapeChange(es.GetVisible(), es.GetAlpha(), QPoint(es.GetXhot(), es.GetYhot()), QSize(es.GetWidth(), es.GetHeight()), es.GetShape());
             break;
@@ -132,5 +132,5 @@
         case KVBoxEventType_OnMouseCapabilityChange:
         {
-            CMouseCapabilityChangeEvent es(event);
+            CMouseCapabilityChangedEvent es(event);
             emit sigMouseCapabilityChange(es.GetSupportsAbsolute(), es.GetSupportsRelative(), es.GetNeedsHostCursor());
             break;
@@ -138,5 +138,5 @@
         case KVBoxEventType_OnKeyboardLedsChange:
         {
-            CKeyboardLedsChangeEvent es(event);
+            CKeyboardLedsChangedEvent es(event);
             emit sigKeyboardLedsChangeEvent(es.GetNumLock(), es.GetCapsLock(), es.GetScrollLock());
             break;
@@ -144,5 +144,5 @@
         case KVBoxEventType_OnStateChange:
         {
-            CStateChangeEvent es(event);
+            CStateChangedEvent es(event);
             emit sigStateChange(es.GetState());
             break;
@@ -155,5 +155,5 @@
         case KVBoxEventType_OnNetworkAdapterChange:
         {
-            CNetworkAdapterChangeEvent es(event);
+            CNetworkAdapterChangedEvent es(event);
             emit sigNetworkAdapterChange(es.GetNetworkAdapter());
             break;
@@ -166,5 +166,5 @@
         case KVBoxEventType_OnMediumChange:
         {
-            CMediumChangeEvent es(event);
+            CMediumChangedEvent es(event);
             emit sigMediumChange(es.GetMediumAttachment());
             break;
@@ -182,5 +182,5 @@
         case KVBoxEventType_OnUSBDeviceStateChange:
         {
-            CUSBDeviceStateChangeEvent es(event);
+            CUSBDeviceStateChangedEvent es(event);
             emit sigUSBDeviceStateChange(es.GetDevice(), es.GetAttached(), es.GetError());
             break;
@@ -188,5 +188,5 @@
         case KVBoxEventType_OnSharedFolderChange:
         {
-            CSharedFolderChangeEvent es(event);
+            CSharedFolderChangedEvent es(event);
             emit sigSharedFolderChange();
             break;
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h	(revision 30824)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h	(revision 30825)
@@ -34,5 +34,4 @@
 /* Local forwards */
 class UIActionsPool;
-class UIConsoleCallback;
 class UIFrameBuffer;
 class UIMachine;
@@ -209,5 +208,4 @@
     UIMachine *m_pMachine;
     CSession &m_session;
-    const CConsoleCallback m_callback;
 
     UIMachineMenuBar *m_pMenuPool;
@@ -261,3 +259,2 @@
 
 #endif // !___UIConsole_h___
-
Index: /trunk/src/VBox/Main/ConsoleImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/ConsoleImpl.cpp	(revision 30824)
+++ /trunk/src/VBox/Main/ConsoleImpl.cpp	(revision 30825)
@@ -255,8 +255,4 @@
 {
 public:
-    ComPtr<IConsoleCallback> ptrICb;
-    /** Bitmap of disabled callback methods, that is methods that has return
-     * VBOX_E_DONT_CALL_AGAIN. */
-    uint32_t                    bmDisabled;
     /** Callback bit indexes (for bmDisabled). */
     typedef enum
@@ -283,6 +279,5 @@
     } CallbackBit;
 
-    ConsoleCallbackRegistration(IConsoleCallback *pIConsoleCallback)
-        : ptrICb(pIConsoleCallback), bmDisabled(0)
+    ConsoleCallbackRegistration()
     {
         /* nothing */
@@ -292,47 +287,4 @@
     {
        /* nothing */
-    }
-
-    /** Equal operator for std::find. */
-    bool operator==(const ConsoleCallbackRegistration &rThat) const
-    {
-        return this->ptrICb == rThat.ptrICb;
-    }
-
-    /**
-     * Checks if the callback is wanted, i.e. if the method hasn't yet returned
-     * VBOX_E_DONT_CALL_AGAIN.
-     * @returns @c true if it is wanted, @c false if not.
-     * @param   enmBit      The callback, be sure to get this one right!
-     */
-    inline bool isWanted(CallbackBit enmBit) const
-    {
-        return !ASMBitTest(&bmDisabled, enmBit);
-    }
-
-    /**
-     * Called in response to VBOX_E_DONT_CALL_AGAIN.
-     * @param   enmBit      The callback, be sure to get this one right!
-     */
-    inline void setDontCallAgain(CallbackBit enmBit)
-    {
-        ASMAtomicBitSet(&bmDisabled, enmBit);
-    }
-
-    /**
-     * Handle a callback return code, picking up VBOX_E_DONT_CALL_AGAIN.
-     *
-     * @returns hrc or S_OK if VBOX_E_DONT_CALL_AGAIN.
-     * @param   enmBit      The callback, be sure to get this one right!
-     * @param   hrc         The status code returned by the callback.
-     */
-    inline HRESULT handleResult(CallbackBit enmBit, HRESULT hrc)
-    {
-        if (hrc == VBOX_E_DONT_CALL_AGAIN)
-        {
-            setDontCallAgain(enmBit);
-            hrc = S_OK;
-        }
-        return hrc;
     }
 };
@@ -349,84 +301,6 @@
 #define PREP_ARGS8(a1,a2,a3,a4,a5,a6,a7,a8)  a1, a2, a3, a4, a5, a6, a7, a8
 
-#ifdef RT_OS_WINDOWS
-
 /**
- * Macro used to prepare for COM event firing, note CComObjectRootEx locking.
- */
-#define CONSOLE_COM_EVENTS_START(name,count)    \
-   {                                            \
-      ComEventDesc evDesc;                      \
-                                                \
-      this->Lock();                             \
-      int nConnections = this->m_vec.GetSize(); \
-      if (nConnections)                         \
-         evDesc.init(#name, count);
-
-/**
- * Actual event firing for all connection points.
- * Note some subtlety in the fact that connection point list access
- * must be synchronized with CComObjectRootEx Lock()/Unlock() methods.
- */
-#define CONSOLE_COM_EVENTS_END()                                \
-    for (int i=0; i<nConnections; i++)                          \
-    {                                                           \
-        ComPtr<IUnknown> sp = this->m_vec.GetAt(i);             \
-        ComPtr<IDispatch> cbD;                                  \
-        cbD = sp;                                               \
-        if (cbD != NULL)                                        \
-        {                                                       \
-            CComVariant varResult;                              \
-            this->mComEvHelper.fire(cbD, evDesc, &varResult);   \
-        }                                                       \
-    }                                                           \
-    this->Unlock();                                             \
-   }
-
-/**
- * A bit non-trivial part about those macros is that we rely heavily on C++ type
- * casting and assignment operator overloading in CComVariant when instantiating
- * member template add(), and every add() here could be, ofc, different function.
- */
-#define PREP_COM_ARGS0()
-#define PREP_COM_ARGS1(a1)                      if (nConnections) evDesc.add(a1)
-#define PREP_COM_ARGS2(a1,a2)                   if (nConnections) evDesc.add(a1).add(a2)
-#define PREP_COM_ARGS3(a1,a2,a3)                if (nConnections) evDesc.add(a1).add(a2).add(a3)
-#define PREP_COM_ARGS4(a1,a2,a3,a4)             if (nConnections) evDesc.add(a1).add(a2).add(a3).add(a4)
-#define PREP_COM_ARGS5(a1,a2,a3,a4,a5)          if (nConnections) evDesc.add(a1).add(a2).add(a3).add(a4).add(a5)
-#define PREP_COM_ARGS6(a1,a2,a3,a4,a5,a6)       if (nConnections) evDesc.add(a1).add(a2).add(a3).add(a4).add(a5).add(a6)
-#define PREP_COM_ARGS7(a1,a2,a3,a4,a5,a6,a7)    if (nConnections) evDesc.add(a1).add(a2).add(a3).add(a4).add(a5).add(a6).add(a7)
-#define PREP_COM_ARGS8(a1,a2,a3,a4,a5,a6,a7,a8) if (nConnections) evDesc.add(a1).add(a2).add(a3).add(a4).add(a5).add(a6).add(a7).add(a8)
-
-#else
-
-/**
- * No COM events for XPCOM targets ofc.
- */
-#define CONSOLE_COM_EVENTS_START(name,count)
-#define CONSOLE_COM_EVENTS_END()
-#define PREP_COM_ARGS0()
-#define PREP_COM_ARGS1(a1)
-#define PREP_COM_ARGS2(a1,a2)
-#define PREP_COM_ARGS3(a1,a2,a3)
-#define PREP_COM_ARGS4(a1,a2,a3,a4)
-#define PREP_COM_ARGS5(a1,a2,a3,a4,a5)
-#define PREP_COM_ARGS6(a1,a2,a3,a4,a5,a6)
-#define PREP_COM_ARGS7(a1,a2,a3,a4,a5,a6,a7)
-#define PREP_COM_ARGS8(a1,a2,a3,a4,a5,a6,a7,a8)
-
-#endif
-
-/**
- * Macro for iterating the callback list (Console::mCallbacks) and invoking the
- * given method on each entry, along with firing appropriate COM events on Windows.
- *
- * This handles VBOX_E_DONT_CALL_AGAIN as well as removing dead interfaces
- * which.  This makes the code a big and clunky, thus this macro.  It may make
- * debugging and selective logging a bit of a pain, but duplicating this code
- * some seventeen times is much more of a pain.
- *
- * The caller must hold the console object lock - read or write, we don't care.
- * The caller must be a Console method - the console members accessible thru the
- * 'this' pointer.
+ * Macro for firing appropriate event.
  *
  * @param   CallbackMethod      The callback method, like OnKeyboardLedsChange.
@@ -435,28 +309,10 @@
  * @param   Args                Number of callback arguments
  */
-#define CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, Argc, Args, PrepComArgs, MaybeComma) \
+#define CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, Args, MaybeComma) \
     do \
     { \
-        CONSOLE_COM_EVENTS_START(CallbackMethod,Argc);   \
-        PrepComArgs; \
-        CONSOLE_COM_EVENTS_END();  \
         VBoxEventDesc evDesc; \
         evDesc.init(mEventSource, VBoxEventType_##CallbackMethod MaybeComma Args);     \
         evDesc.fire(/* don't wait for delivery */ 0); \
-        CallbackList::iterator it = this->mCallbacks.begin(); \
-        while (it != this->mCallbacks.end()) \
-        { \
-            if (it->isWanted(ConsoleCallbackRegistration::k ## CallbackMethod)) \
-            { \
-                HRESULT hrc = it->ptrICb-> CallbackMethod (Args);                   \
-                hrc = it->handleResult(ConsoleCallbackRegistration::k ## CallbackMethod, hrc); \
-                if (FAILED_DEAD_INTERFACE(hrc)) \
-                { \
-                    it = this->mCallbacks.erase(it); \
-                    continue; \
-                } \
-            } \
-            ++it; \
-        } \
     } while (0)
 
@@ -465,17 +321,17 @@
 /* Actual invocation macroses for different number of parameters */
 #define CONSOLE_DO_CALLBACKS0(CallbackMethod)                           \
-    CONSOLE_DO_CALLBACKS_GEN(CallbackMethod,  0, PREP_ARGS0(), PREP_COM_ARGS0(), NO_COMMA)
+    CONSOLE_DO_CALLBACKS_GEN(CallbackMethod,  PREP_ARGS0(), NO_COMMA)
 #define CONSOLE_DO_CALLBACKS1(CallbackMethod,Arg1)                      \
-    CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, 1, PREP_ARGS1(Arg1), PREP_COM_ARGS1(Arg1), COMMA)
+    CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, PREP_ARGS1(Arg1), COMMA)
 #define CONSOLE_DO_CALLBACKS2(CallbackMethod,Arg1,Arg2)                 \
-    CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, 2, PREP_ARGS2(Arg1,Arg2),PREP_COM_ARGS2(Arg1,Arg2), COMMA)
+    CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, PREP_ARGS2(Arg1,Arg2),COMMA)
 #define CONSOLE_DO_CALLBACKS3(CallbackMethod,Arg1,Arg2,Arg3)            \
-    CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, 3, PREP_ARGS3(Arg1,Arg2,Arg3), PREP_COM_ARGS3(Arg1,Arg2,Arg3), COMMA)
+    CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, PREP_ARGS3(Arg1,Arg2,Arg3), COMMA)
 #define CONSOLE_DO_CALLBACKS4(CallbackMethod,Arg1,Arg2,Arg3,Arg4)       \
-    CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, 4, PREP_ARGS4(Arg1,Arg2,Arg3,Arg4), PREP_COM_ARGS4(Arg1,Arg2,Arg3,Arg4), COMMA)
+    CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, PREP_ARGS4(Arg1,Arg2,Arg3,Arg4), COMMA)
 #define CONSOLE_DO_CALLBACKS7(CallbackMethod,Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7) \
-    CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, 7, PREP_ARGS7(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7), PREP_COM_ARGS7(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7), COMMA)
+    CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, PREP_ARGS7(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7), COMMA)
 #define CONSOLE_DO_CALLBACKS8(CallbackMethod,Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8) \
-    CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, 8, PREP_ARGS8(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8), PREP_COM_ARGS8(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7, Arg8), COMMA)
+    CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, PREP_ARGS8(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8), COMMA)
 
 // constructor / destructor
@@ -546,6 +402,4 @@
     unconst(mControl) = aControl;
 
-    mCallbackData.clear();
-
     /* Cache essential properties and objects */
 
@@ -606,9 +460,4 @@
     unconst(mAudioSniffer) = new AudioSniffer(this);
     AssertReturn(mAudioSniffer, E_FAIL);
-
-#ifdef RT_OS_WINDOWS
-    if (SUCCEEDED(rc))
-        rc = mComEvHelper.init(IID_IConsoleCallback);
-#endif
 
     /* Confirm a successful initialization when it's the case */
@@ -727,10 +576,4 @@
     // we don't perform uninit() as it's possible that some pending event refers to this source
     unconst(mEventSource).setNull();
-
-    /* Release all callbacks. Do this after uninitializing the components,
-     * as some of them are well-behaved and unregister their callbacks.
-     * These would trigger error messages complaining about trying to
-     * unregister a non-registered callback. */
-    mCallbacks.clear();
 
     /* dynamically allocated members of mCallbackData are uninitialized
@@ -3106,77 +2949,4 @@
 
     setMachineStateLocally(machineState);
-    return S_OK;
-}
-
-STDMETHODIMP Console::RegisterCallback(IConsoleCallback *aCallback)
-{
-    CheckComArgNotNull(aCallback);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    /* Query the interface we associate with IConsoleCallback as the caller
-       might've been compiled against a different SDK. */
-    void *pvCallback;
-    HRESULT hrc = aCallback->QueryInterface(COM_IIDOF(IConsoleCallback), &pvCallback);
-    if (FAILED(hrc))
-        return setError(hrc, tr("Incompatible IConsoleCallback interface - version mismatch?"));
-    aCallback = (IConsoleCallback *)pvCallback;
-
-    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    mCallbacks.push_back(CallbackList::value_type(aCallback));
-
-    /* Inform the callback about the current status (for example, the new
-     * callback must know the current mouse capabilities and the pointer
-     * shape in order to properly integrate the mouse pointer). */
-
-    if (mCallbackData.mpsc.valid)
-        aCallback->OnMousePointerShapeChange(mCallbackData.mpsc.visible,
-                                             mCallbackData.mpsc.alpha,
-                                             mCallbackData.mpsc.xHot,
-                                             mCallbackData.mpsc.yHot,
-                                             mCallbackData.mpsc.width,
-                                             mCallbackData.mpsc.height,
-                                             ComSafeArrayAsInParam(mCallbackData.mpsc.shape));
-    if (mCallbackData.mcc.valid)
-        aCallback->OnMouseCapabilityChange(mCallbackData.mcc.supportsAbsolute,
-                                           mCallbackData.mcc.supportsRelative,
-                                           mCallbackData.mcc.needsHostCursor);
-
-    aCallback->OnAdditionsStateChange();
-
-    if (mCallbackData.klc.valid)
-        aCallback->OnKeyboardLedsChange(mCallbackData.klc.numLock,
-                                        mCallbackData.klc.capsLock,
-                                        mCallbackData.klc.scrollLock);
-
-    /* Note: we don't call OnStateChange for new callbacks because the
-     * machine state is a) not actually changed on callback registration
-     * and b) can be always queried from Console. */
-
-    /* Drop the reference we got via QueryInterface. */
-    aCallback->Release();
-    return S_OK;
-}
-
-STDMETHODIMP Console::UnregisterCallback(IConsoleCallback *aCallback)
-{
-    CheckComArgNotNull(aCallback);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    CallbackList::iterator it;
-    it = std::find(mCallbacks.begin(),
-                   mCallbacks.end(),
-                   CallbackList::value_type(aCallback));
-    if (it == mCallbacks.end())
-        return setError(E_INVALIDARG,
-            tr("The given callback handler is not registered"));
-
-    mCallbacks.erase(it);
     return S_OK;
 }
@@ -4965,27 +4735,8 @@
 
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-    CallbackList::iterator it = mCallbacks.begin();
     VBoxEventDesc evDesc;
 
     if (aCheck)
     {
-        while (it != mCallbacks.end())
-        {
-            if (it->isWanted(ConsoleCallbackRegistration::kOnCanShowWindow))
-            {
-                BOOL canShow = FALSE;
-                HRESULT hrc = it->ptrICb->OnCanShowWindow(&canShow);
-                hrc = it->handleResult(ConsoleCallbackRegistration::kOnCanShowWindow, hrc);
-                if (FAILED_DEAD_INTERFACE(hrc))
-                {
-                    it = this->mCallbacks.erase(it);
-                    continue;
-                }
-                AssertComRC(hrc);
-                if (FAILED(hrc) || !canShow)
-                    return hrc;
-            }
-            ++it;
-        }
         evDesc.init(mEventSource, VBoxEventType_OnCanShowWindow);
         BOOL fDelivered = evDesc.fire(5000); /* Wait up to 5 secs for delivery */
@@ -5014,27 +4765,4 @@
     else
     {
-        while (it != mCallbacks.end())
-        {
-            if (it->isWanted(ConsoleCallbackRegistration::kOnShowWindow))
-            {
-                ULONG64 winId = 0;
-                HRESULT hrc = it->ptrICb->OnShowWindow(&winId);
-                hrc = it->handleResult(ConsoleCallbackRegistration::kOnCanShowWindow, hrc);
-                if (FAILED_DEAD_INTERFACE(hrc))
-                {
-                    it = this->mCallbacks.erase(it);
-                    continue;
-                }
-                AssertComRC(hrc);
-                if (FAILED(hrc))
-                    return hrc;
-
-                /* only one callback may return non-null winId */
-                Assert(*aWinId == 0 || winId == 0);
-                if (*aWinId == 0)
-                    *aWinId = winId;
-            }
-            ++it;
-        }
         evDesc.init(mEventSource, VBoxEventType_OnShowWindow, UINT64_C(0));
         BOOL fDelivered = evDesc.fire(5000); /* Wait up to 5 secs for delivery */
Index: /trunk/src/VBox/Main/ConsoleVRDPServer.cpp
===================================================================
--- /trunk/src/VBox/Main/ConsoleVRDPServer.cpp	(revision 30824)
+++ /trunk/src/VBox/Main/ConsoleVRDPServer.cpp	(revision 30825)
@@ -91,5 +91,5 @@
             case VBoxEventType_OnMousePointerShapeChange:
             {
-                ComPtr<IMousePointerShapeChangeEvent> mpscev = aEvent;
+                ComPtr<IMousePointerShapeChangedEvent> mpscev = aEvent;
                 Assert(mpscev);
                 BOOL    visible,  alpha;
@@ -110,5 +110,5 @@
             case VBoxEventType_OnMouseCapabilityChange:
             {
-                ComPtr<IMouseCapabilityChangeEvent> mccev = aEvent;
+                ComPtr<IMouseCapabilityChangedEvent> mccev = aEvent;
                 Assert(mccev);
                 if (m_server)
@@ -122,5 +122,5 @@
             case VBoxEventType_OnKeyboardLedsChange:
             {
-                ComPtr<IKeyboardLedsChangeEvent> klcev = aEvent;
+                ComPtr<IKeyboardLedsChangedEvent> klcev = aEvent;
                 Assert(klcev);
 
Index: /trunk/src/VBox/Main/DisplayImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/DisplayImpl.cpp	(revision 30824)
+++ /trunk/src/VBox/Main/DisplayImpl.cpp	(revision 30825)
@@ -747,5 +747,5 @@
         case VBoxEventType_OnStateChange:
         {
-            ComPtr<IStateChangeEvent> scev = aEvent;
+            ComPtr<IStateChangedEvent> scev = aEvent;
             Assert(scev);
             MachineState_T machineState;
Index: /trunk/src/VBox/Main/EventImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/EventImpl.cpp	(revision 30824)
+++ /trunk/src/VBox/Main/EventImpl.cpp	(revision 30825)
@@ -371,5 +371,5 @@
     ListenerRecord* mRef; /* must be weak reference */
     int32_t         mRefCnt;
-    
+
 public:
     EventMapRecord(ListenerRecord* aRef)
Index: /trunk/src/VBox/Main/Global.cpp
===================================================================
--- /trunk/src/VBox/Main/Global.cpp	(revision 30824)
+++ /trunk/src/VBox/Main/Global.cpp	(revision 30825)
@@ -434,5 +434,4 @@
         case VBOX_E_INVALID_SESSION_STATE:      return VERR_COM_INVALID_SESSION_STATE;
         case VBOX_E_OBJECT_IN_USE:              return VERR_COM_OBJECT_IN_USE;
-        case VBOX_E_DONT_CALL_AGAIN:            return VERR_COM_DONT_CALL_AGAIN;
 
         default:
@@ -480,5 +479,4 @@
         case VERR_COM_INVALID_SESSION_STATE:    return VBOX_E_INVALID_SESSION_STATE;
         case VERR_COM_OBJECT_IN_USE:            return VBOX_E_OBJECT_IN_USE;
-        case VERR_COM_DONT_CALL_AGAIN:          return VBOX_E_DONT_CALL_AGAIN;
 
         /* Other errors. */
Index: /trunk/src/VBox/Main/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Main/Makefile.kmk	(revision 30824)
+++ /trunk/src/VBox/Main/Makefile.kmk	(revision 30825)
@@ -639,5 +639,4 @@
 	SharedFolderImpl.cpp \
 	SessionImpl.cpp \
-	VirtualBoxCallbackImpl.cpp \
 	ConsoleImpl.cpp \
 	ConsoleImpl2.cpp \
@@ -659,6 +658,5 @@
 	win/dllmain.cpp \
 	win/VBoxC.def \
-	win/VBoxC.rc \
-	win/VBoxComEvents.cpp
+	win/VBoxC.rc
 
 
Index: unk/src/VBox/Main/VirtualBoxCallbackImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/VirtualBoxCallbackImpl.cpp	(revision 30824)
+++ 	(revision )
@@ -1,323 +1,0 @@
-/** @file
- *
- * VBox Client callback COM Class implementation
- */
-
-/*
- * Copyright (C) 2009 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-#include "VirtualBoxCallbackImpl.h"
-#include "Logging.h"
-#include "AutoCaller.h"
-
-HRESULT CallbackWrapper::FinalConstruct()
-{
-    return S_OK;
-}
-
-void CallbackWrapper::FinalRelease()
-{
-}
-
-// public initializers/uninitializers only for internal purposes
-HRESULT CallbackWrapper::init()
-{
-    AutoInitSpan autoInitSpan(this);
-    AssertReturn(autoInitSpan.isOk(), E_FAIL);
-    /* Confirm a successful initialization */
-    autoInitSpan.setSucceeded();
-    return S_OK;
-}
-
-void CallbackWrapper::uninit(bool aFinalRelease)
-{
-}
-
-// ILocalOwner methods
-/////////////////////////////////////////////////////////////////////////////
-
-STDMETHODIMP CallbackWrapper::SetLocalObject(IUnknown *aCallback)
-{
-    if (aCallback == NULL)
-    {
-        mVBoxCallback.setNull();
-        mConsoleCallback.setNull();
-        return S_OK;
-    }
-
-    if (!VALID_PTR (aCallback))
-        return E_POINTER;
-
-    mVBoxCallback = aCallback;
-    mConsoleCallback = aCallback;
-
-    // or some other error code?
-    AssertReturn(!!mVBoxCallback || !!mConsoleCallback, E_FAIL);
-
-    return S_OK;
-}
-
-// IVirtualBoxCallback methods
-/////////////////////////////////////////////////////////////////////////////
-STDMETHODIMP CallbackWrapper::OnMachineStateChange(IN_BSTR machineId, MachineState_T state)
-{
-    if (mVBoxCallback.isNull())
-        return S_OK;
-
-    return mVBoxCallback->OnMachineStateChange(machineId, state);
-}
-
-STDMETHODIMP CallbackWrapper::OnMachineDataChange(IN_BSTR machineId)
-{
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    if (mVBoxCallback.isNull())
-        return S_OK;
-
-    return mVBoxCallback->OnMachineDataChange(machineId);
-}
-
-
-STDMETHODIMP CallbackWrapper::OnExtraDataCanChange(IN_BSTR machineId, IN_BSTR key, IN_BSTR value,
-                                           BSTR *error, BOOL *changeAllowed)
-{
-    if (mVBoxCallback.isNull())
-        return S_OK;
-
-    return mVBoxCallback->OnExtraDataCanChange(machineId, key, value, error, changeAllowed);
-}
-
-STDMETHODIMP CallbackWrapper::OnExtraDataChange(IN_BSTR machineId, IN_BSTR key, IN_BSTR value)
-{
-    if (mVBoxCallback.isNull())
-        return S_OK;
-
-    return mVBoxCallback->OnExtraDataChange(machineId, key, value);
-}
-
-STDMETHODIMP CallbackWrapper::OnMediumRegistered(IN_BSTR mediaId, DeviceType_T mediaType,
-                              BOOL registered)
-{
-    if (mVBoxCallback.isNull())
-        return S_OK;
-
-    return mVBoxCallback->OnMediumRegistered(mediaId, mediaType, registered);
-}
-
-
-STDMETHODIMP CallbackWrapper::OnMachineRegistered(IN_BSTR aMachineId, BOOL registered)
-{
-    if (mVBoxCallback.isNull())
-        return S_OK;
-
-    return mVBoxCallback->OnMachineRegistered(aMachineId, registered);
-}
-
-STDMETHODIMP CallbackWrapper::OnSessionStateChange(IN_BSTR aMachineId, SessionState_T state)
-{
-    if (mVBoxCallback.isNull())
-        return S_OK;
-
-    return mVBoxCallback->OnSessionStateChange(aMachineId, state);
-}
-
-STDMETHODIMP CallbackWrapper::OnSnapshotTaken(IN_BSTR aMachineId, IN_BSTR aSnapshotId)
-{
-    if (mVBoxCallback.isNull())
-        return S_OK;
-
-    return mVBoxCallback->OnSnapshotTaken(aMachineId, aSnapshotId);
-}
-
-STDMETHODIMP CallbackWrapper::OnSnapshotDeleted(IN_BSTR aMachineId, IN_BSTR aSnapshotId)
-{
-    if (mVBoxCallback.isNull())
-        return S_OK;
-
-    return mVBoxCallback->OnSnapshotDeleted(aMachineId, aSnapshotId);
-}
-
-STDMETHODIMP CallbackWrapper::OnSnapshotChange(IN_BSTR aMachineId, IN_BSTR aSnapshotId)
-{
-    if (mVBoxCallback.isNull())
-        return S_OK;
-
-    return mVBoxCallback->OnSnapshotChange(aMachineId, aSnapshotId);
-}
-
-STDMETHODIMP CallbackWrapper::OnGuestPropertyChange(IN_BSTR aMachineId, IN_BSTR key, IN_BSTR value, IN_BSTR flags)
-{
-    if (mVBoxCallback.isNull())
-        return S_OK;
-
-    return mVBoxCallback->OnGuestPropertyChange(aMachineId, key, value, flags);
-}
-
-
-// IConsoleCallback methods
-/////////////////////////////////////////////////////////////////////////////
-STDMETHODIMP CallbackWrapper::OnMousePointerShapeChange(BOOL visible, BOOL alpha, ULONG xHot, ULONG yHot,
-                                                        ULONG width, ULONG height, ComSafeArrayIn(BYTE, shape))
-{
-    if (mConsoleCallback.isNull())
-        return S_OK;
-
-    return mConsoleCallback->OnMousePointerShapeChange(visible, alpha, xHot, yHot, width, height, ComSafeArrayInArg(shape));
-}
-
-
-STDMETHODIMP CallbackWrapper::OnMouseCapabilityChange(BOOL supportsAbsolute, BOOL supportsRelative, BOOL needsHostCursor)
-{
-    if (mConsoleCallback.isNull())
-        return S_OK;
-
-    return mConsoleCallback->OnMouseCapabilityChange(supportsAbsolute, supportsRelative, needsHostCursor);
-}
-
-STDMETHODIMP  CallbackWrapper::OnKeyboardLedsChange(BOOL fNumLock, BOOL fCapsLock, BOOL fScrollLock)
-{
-    if (mConsoleCallback.isNull())
-        return S_OK;
-
-    return mConsoleCallback->OnKeyboardLedsChange(fNumLock, fCapsLock, fScrollLock);
-}
-
-STDMETHODIMP CallbackWrapper::OnStateChange(MachineState_T machineState)
-{
-    if (mConsoleCallback.isNull())
-        return S_OK;
-
-    return mConsoleCallback->OnStateChange(machineState);
-}
-
-STDMETHODIMP CallbackWrapper::OnAdditionsStateChange()
-{
-    if (mConsoleCallback.isNull())
-        return S_OK;
-
-    return mConsoleCallback->OnAdditionsStateChange();
-}
-
-STDMETHODIMP CallbackWrapper::OnNetworkAdapterChange(INetworkAdapter *aNetworkAdapter)
-{
-    if (mConsoleCallback.isNull())
-        return S_OK;
-
-    return mConsoleCallback->OnNetworkAdapterChange(aNetworkAdapter);
-}
-
-STDMETHODIMP CallbackWrapper::OnSerialPortChange(ISerialPort *aSerialPort)
-{
-    if (mConsoleCallback.isNull())
-        return S_OK;
-
-    return mConsoleCallback->OnSerialPortChange(aSerialPort);
-}
-
-STDMETHODIMP CallbackWrapper::OnParallelPortChange(IParallelPort *aParallelPort)
-{
-    if (mConsoleCallback.isNull())
-        return S_OK;
-
-    return mConsoleCallback->OnParallelPortChange(aParallelPort);
-}
-
-STDMETHODIMP CallbackWrapper::OnRemoteDisplayInfoChange()
-{
-    if (mConsoleCallback.isNull())
-        return S_OK;
-
-    return mConsoleCallback->OnRemoteDisplayInfoChange();
-}
-
-STDMETHODIMP CallbackWrapper::OnVRDPServerChange()
-{
-    if (mConsoleCallback.isNull())
-        return S_OK;
-
-    return mConsoleCallback->OnVRDPServerChange();
-}
-
-STDMETHODIMP CallbackWrapper::OnUSBControllerChange()
-{
-    if (mConsoleCallback.isNull())
-        return S_OK;
-
-    return mConsoleCallback->OnUSBControllerChange();
-}
-
-STDMETHODIMP CallbackWrapper::OnUSBDeviceStateChange(IUSBDevice *aDevice,
-                                                        BOOL aAttached,
-                                                        IVirtualBoxErrorInfo *aError)
-{
-    if (mConsoleCallback.isNull())
-        return S_OK;
-
-    return mConsoleCallback->OnUSBDeviceStateChange(aDevice, aAttached, aError);
-}
-
-STDMETHODIMP CallbackWrapper::OnSharedFolderChange(Scope_T aScope)
-{
-    if (mConsoleCallback.isNull())
-        return S_OK;
-
-    return mConsoleCallback->OnSharedFolderChange(aScope);
-}
-
-STDMETHODIMP CallbackWrapper::OnStorageControllerChange()
-{
-    if (mConsoleCallback.isNull())
-        return S_OK;
-
-    return mConsoleCallback->OnStorageControllerChange();
-}
-
-STDMETHODIMP CallbackWrapper::OnMediumChange(IMediumAttachment *aMediumAttachment)
-{
-    if (mConsoleCallback.isNull())
-        return S_OK;
-
-    return mConsoleCallback->OnMediumChange(aMediumAttachment);
-}
-
-STDMETHODIMP CallbackWrapper::OnCPUChange(ULONG aCPU, BOOL aRemove)
-{
-    if (mConsoleCallback.isNull())
-        return S_OK;
-
-    return mConsoleCallback->OnCPUChange(aCPU, aRemove);
-}
-
-STDMETHODIMP CallbackWrapper::OnRuntimeError(BOOL fFatal, IN_BSTR id, IN_BSTR message)
-{
-    if (mConsoleCallback.isNull())
-        return S_OK;
-
-    return mConsoleCallback->OnRuntimeError(fFatal, id, message);
-}
-
-STDMETHODIMP CallbackWrapper::OnCanShowWindow(BOOL *canShow)
-{
-    if (mConsoleCallback.isNull())
-        return S_OK;
-
-    return mConsoleCallback->OnCanShowWindow(canShow);
-}
-
-STDMETHODIMP CallbackWrapper::OnShowWindow(ULONG64 *winId)
-{
-    if (mConsoleCallback.isNull())
-        return S_OK;
-
-    return mConsoleCallback->OnShowWindow(winId);
-}
-
Index: /trunk/src/VBox/Main/VirtualBoxImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/VirtualBoxImpl.cpp	(revision 30824)
+++ /trunk/src/VBox/Main/VirtualBoxImpl.cpp	(revision 30825)
@@ -118,8 +118,4 @@
 {
 public:
-    ComPtr<IVirtualBoxCallback> ptrICb;
-    /** Bitmap of disabled callback methods, that is methods that has return
-     * VBOX_E_DONT_CALL_AGAIN. */
-    uint32_t                    bmDisabled;
     /** Callback bit indexes (for bmDisabled). */
     typedef enum
@@ -138,6 +134,5 @@
     } CallbackBit;
 
-    VirtualBoxCallbackRegistration(IVirtualBoxCallback *pIVirtualBoxCallback)
-        : ptrICb(pIVirtualBoxCallback), bmDisabled(0)
+    VirtualBoxCallbackRegistration()
     {
         /* nothing */
@@ -147,30 +142,4 @@
     {
        /* nothing */
-    }
-
-    /** Equal operator for std::find. */
-    bool operator==(const VirtualBoxCallbackRegistration &rThat) const
-    {
-        return this->ptrICb == rThat.ptrICb;
-    }
-
-    /**
-     * Checks if the callback is wanted, i.e. if the method hasn't yet returned
-     * VBOX_E_DONT_CALL_AGAIN.
-     * @returns @c true if it is wanted, @c false if not.
-     * @param   enmBit      The callback, be sure to get this one right!
-     */
-    inline bool isWanted(CallbackBit enmBit) const
-    {
-        return !ASMBitTest(&bmDisabled, enmBit);
-    }
-
-    /**
-     * Called in response to VBOX_E_DONT_CALL_AGAIN.
-     * @param   enmBit      The callback, be sure to get this one right!
-     */
-    inline void setDontCallAgain(CallbackBit enmBit)
-    {
-        ASMAtomicBitSet(&bmDisabled, enmBit);
     }
 };
@@ -204,10 +173,5 @@
     void *handler();
 
-    virtual HRESULT handleCallback(const ComPtr<IVirtualBoxCallback> &aCallback) = 0;
     virtual HRESULT prepareEventDesc(IEventSource* aSource, VBoxEventDesc& aEvDesc) = 0;
-
-#ifdef RT_OS_WINDOWS
-    virtual HRESULT prepareComEventDesc(ComEventDesc& aEvDesc) = 0;
-#endif
 
 private:
@@ -218,7 +182,5 @@
      */
     VirtualBox        *mVirtualBox;
-
 protected:
-    /** The callback being called, used for handling VBOX_E_DONT_CALL_AGAIN. */
     VirtualBoxCallbackRegistration::CallbackBit mWhat;
 };
@@ -343,5 +305,4 @@
     RWLockHandle                        mtxProgressOperations;
     ProgressMap                         mapProgressOperations;
-    CallbackList                        llCallbacks;
 
     // the following are data for the client watcher thread
@@ -600,8 +561,4 @@
     }
 
-#ifdef RT_OS_WINDOWS
-    if (SUCCEEDED(rc))
-        rc = m->mComEvHelper.init(IID_IVirtualBoxCallback);
-#endif
     /* Confirm a successful initialization when it's the case */
     if (SUCCEEDED(rc))
@@ -753,13 +710,4 @@
     }
 #endif /* VBOX_WITH_RESOURCE_USAGE_API */
-
-    LogFlowThisFunc(("Releasing callbacks...\n"));
-    if (m->llCallbacks.size())
-    {
-        /* release all callbacks */
-        LogWarningFunc(("%d unregistered callbacks!\n",
-                        m->llCallbacks.size()));
-        m->llCallbacks.clear();
-    }
 
     LogFlowThisFunc(("Terminating the async event handler...\n"));
@@ -2113,59 +2061,4 @@
 }
 
-/**
- *  @note Locks this object for writing.
- */
-STDMETHODIMP VirtualBox::RegisterCallback(IVirtualBoxCallback *aCallback)
-{
-    LogFlowThisFunc(("aCallback=%p\n", aCallback));
-
-    CheckComArgNotNull(aCallback);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    /* Query the interface we associate with IVirtualBoxCallback as the caller
-       might've been compiled against a different SDK. */
-    void *pvCallback;
-    HRESULT hrc = aCallback->QueryInterface(COM_IIDOF(IVirtualBoxCallback), &pvCallback);
-    if (FAILED(hrc))
-        return setError(hrc, tr("Incompatible IVirtualBoxCallback interface - version mismatch?"));
-    aCallback = (IVirtualBoxCallback *)pvCallback;
-
-    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-    m->llCallbacks.push_back(CallbackList::value_type(aCallback));
-
-    aCallback->Release();
-    return S_OK;
-}
-
-/**
- *  @note Locks this object for writing.
- */
-STDMETHODIMP VirtualBox::UnregisterCallback(IVirtualBoxCallback *aCallback)
-{
-    CheckComArgNotNull(aCallback);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    HRESULT rc = S_OK;
-
-    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    CallbackList::iterator it;
-    it = std::find(m->llCallbacks.begin(),
-                   m->llCallbacks.end(),
-                   CallbackList::value_type(aCallback));
-    if (it == m->llCallbacks.end())
-        rc = E_INVALIDARG;
-    else
-        m->llCallbacks.erase(it);
-
-    LogFlowThisFunc(("aCallback=%p, rc=%08X\n", aCallback, rc));
-    return rc;
-}
-
-
 STDMETHODIMP VirtualBox::WaitForPropertyChange(IN_BSTR /* aWhat */,
                                                ULONG /* aTimeout */,
@@ -2572,22 +2465,4 @@
 }
 
-/**
- * Removes a dead callback.
- * @param aCallback     The reference to the registered callback interface.
- */
-void VirtualBox::removeDeadCallback(const ComPtr<IVirtualBoxCallback> &aCallback)
-{
-    /* find and delete */
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-    CallbackList::iterator it = std::find(m->llCallbacks.begin(),
-                                          m->llCallbacks.end(),
-                                          CallbackList::value_type(aCallback));
-    if (it != m->llCallbacks.end())
-    {
-        LogRel(("Removing dead callback: %p\n", &*it));
-        m->llCallbacks.erase(it);
-    }
-}
-
 /** Event for onMachineStateChange(), onMachineDataChange(), onMachineRegistered() */
 struct MachineEvent : public VirtualBox::CallbackEvent
@@ -2607,44 +2482,18 @@
         {}
 
-    HRESULT handleCallback(const ComPtr<IVirtualBoxCallback> &aCallback)
+    virtual HRESULT prepareEventDesc(IEventSource* aSource, VBoxEventDesc& aEvDesc)
     {
         switch (mWhat)
         {
             case VirtualBoxCallbackRegistration::kOnMachineDataChange:
-                LogFlow(("OnMachineDataChange: id={%ls}\n", id.raw()));
-                return aCallback->OnMachineDataChange(id);
+                aEvDesc.init(aSource, VBoxEventType_OnMachineDataChange, id.raw());
+                break;
 
             case VirtualBoxCallbackRegistration::kOnMachineStateChange:
-                LogFlow(("OnMachineStateChange: id={%ls}, state=%d\n",
-                         id.raw(), state));
-                return aCallback->OnMachineStateChange(id, state);
+                aEvDesc.init(aSource, VBoxEventType_OnMachineStateChange, id.raw(), state);
+                break;
 
             case VirtualBoxCallbackRegistration::kOnMachineRegistered:
-                LogFlow(("OnMachineRegistered: id={%ls}, registered=%d\n",
-                         id.raw(), registered));
-                return aCallback->OnMachineRegistered(id, registered);
-
-            default:
-                AssertFailedReturn(S_OK);
-        }
-    }
-#ifdef RT_OS_WINDOWS
-    HRESULT prepareComEventDesc(ComEventDesc& aEvDesc)
-    {
-        switch (mWhat)
-        {
-            case VirtualBoxCallbackRegistration::kOnMachineDataChange:
-                aEvDesc.init("OnMachineDataChange", 1);
-                aEvDesc.add(id);
-                break;
-
-            case VirtualBoxCallbackRegistration::kOnMachineStateChange:
-                aEvDesc.init("OnMachineStateChange", 2);
-                aEvDesc.add(id).add((int)state);
-                break;
-
-            case VirtualBoxCallbackRegistration::kOnMachineRegistered:
-                aEvDesc.init("OnMachineRegistered", 2);
-                aEvDesc.add(id).add(registered);
+                aEvDesc.init(aSource, VBoxEventType_OnMachineRegistered, id.raw(), registered);
                 break;
 
@@ -2654,26 +2503,4 @@
          return S_OK;
     }
-#endif
-    virtual HRESULT prepareEventDesc(IEventSource* aSource, VBoxEventDesc& aEvDesc)
-    {
-        switch (mWhat)
-        {
-            case VirtualBoxCallbackRegistration::kOnMachineDataChange:
-                aEvDesc.init(aSource, VBoxEventType_OnMachineDataChange, id.raw());
-                break;
-
-            case VirtualBoxCallbackRegistration::kOnMachineStateChange:
-                aEvDesc.init(aSource, VBoxEventType_OnMachineStateChange, id.raw(), state);
-                break;
-
-            case VirtualBoxCallbackRegistration::kOnMachineRegistered:
-                aEvDesc.init(aSource, VBoxEventType_OnMachineRegistered, id.raw(), registered);
-                break;
-
-            default:
-                AssertFailedReturn(S_OK);
-         }
-         return S_OK;
-    }
 
     Bstr id;
@@ -2710,46 +2537,6 @@
     AssertComRCReturn(autoCaller.rc(), autoCaller.rc());
 
-    CallbackList list;
-    {
-        AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-        list = m->llCallbacks;
-    }
-
     BOOL allowChange = TRUE;
-    CallbackList::iterator it = list.begin();
     Bstr id = aId.toUtf16();
-    while ((it != list.end()) && allowChange)
-    {
-        if (it->isWanted(VirtualBoxCallbackRegistration::kOnExtraDataCanChange))
-        {
-            HRESULT rc = it->ptrICb->OnExtraDataCanChange(id, aKey, aValue,
-                                                          aError.asOutParam(),
-                                                          &allowChange);
-            if (FAILED(rc))
-            {
-                if (rc == VBOX_E_DONT_CALL_AGAIN)
-                {
-                    /* Have to update the original. */
-                    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-                    CallbackList::iterator itOrg;
-                    itOrg = std::find(m->llCallbacks.begin(),
-                                      m->llCallbacks.end(),
-                                      CallbackList::value_type(it->ptrICb));
-                    if (itOrg != m->llCallbacks.end())
-                        itOrg->setDontCallAgain(VirtualBoxCallbackRegistration::kOnExtraDataCanChange);
-                }
-                else if (FAILED_DEAD_INTERFACE(rc))
-                    removeDeadCallback(it->ptrICb);
-
-                /* if a call to this method fails for some reason (for ex., because
-                 * the other side is dead), we ensure allowChange stays true
-                 * (MS COM RPC implementation seems to zero all output vars before
-                 * issuing an IPC call or after a failure, so it's essential
-                 * there) */
-                allowChange = TRUE;
-            }
-        }
-        ++it;
-    }
 
     VBoxEventDesc evDesc;
@@ -2791,18 +2578,4 @@
     {}
 
-    HRESULT handleCallback(const ComPtr<IVirtualBoxCallback> &aCallback)
-    {
-        LogFlow(("OnExtraDataChange: machineId={%ls}, key='%ls', val='%ls'\n",
-                 machineId.raw(), key.raw(), val.raw()));
-        return aCallback->OnExtraDataChange(machineId, key, val);
-    }
-#ifdef RT_OS_WINDOWS
-    HRESULT prepareComEventDesc(ComEventDesc& aEvDesc)
-    {
-       aEvDesc.init("OnExtraDataChange", 3);
-       aEvDesc.add(machineId).add(key).add(val);
-       return S_OK;
-    }
-#endif
     virtual HRESULT prepareEventDesc(IEventSource* aSource, VBoxEventDesc& aEvDesc)
     {
@@ -2837,19 +2610,4 @@
     {}
 
-    HRESULT handleCallback(const ComPtr<IVirtualBoxCallback> &aCallback)
-    {
-        LogFlow(("OnSessionStateChange: machineId={%ls}, sessionState=%d\n",
-                 machineId.raw(), sessionState));
-        return aCallback->OnSessionStateChange(machineId, sessionState);
-    }
-
-#ifdef RT_OS_WINDOWS
-    HRESULT prepareComEventDesc(ComEventDesc& aEvDesc)
-    {
-       aEvDesc.init("OnSessionStateChange", 2);
-       aEvDesc.add(machineId).add((int)sessionState);
-       return S_OK;
-    }
-#endif
     virtual HRESULT prepareEventDesc(IEventSource* aSource, VBoxEventDesc& aEvDesc)
     {
@@ -2877,39 +2635,4 @@
         {}
 
-    HRESULT handleCallback(const ComPtr<IVirtualBoxCallback> &aCallback)
-    {
-        Bstr mid = machineId.toUtf16();
-        Bstr sid = snapshotId.toUtf16();
-
-        switch (mWhat)
-        {
-            case VirtualBoxCallbackRegistration::kOnSnapshotTaken:
-                LogFlow(("OnSnapshotTaken: machineId={%RTuuid}, snapshotId={%RTuuid}\n",
-                          machineId.ptr(), snapshotId.ptr()));
-                return aCallback->OnSnapshotTaken(mid, sid);
-
-            case VirtualBoxCallbackRegistration::kOnSnapshotDeleted:
-                LogFlow(("OnSnapshotDeleted: machineId={%RTuuid}, snapshotId={%RTuuid}\n",
-                          machineId.ptr(), snapshotId.ptr()));
-                return aCallback->OnSnapshotDeleted(mid, sid);
-
-            case VirtualBoxCallbackRegistration::kOnSnapshotChange:
-                LogFlow(("OnSnapshotChange: machineId={%RTuuid}, snapshotId={%RTuuid}\n",
-                          machineId.ptr(), snapshotId.ptr()));
-                return aCallback->OnSnapshotChange(mid, sid);
-
-            default:
-                AssertFailedReturn(S_OK);
-        }
-    }
-
-#ifdef RT_OS_WINDOWS
-    HRESULT prepareComEventDesc(ComEventDesc& aEvDesc)
-    {
-       aEvDesc.init("OnSnapshotTaken", 2);
-       aEvDesc.add(machineId.toUtf16()).add(snapshotId.toUtf16());
-       return S_OK;
-    }
-#endif
     virtual HRESULT prepareEventDesc(IEventSource* aSource, VBoxEventDesc& aEvDesc)
     {
@@ -2961,19 +2684,4 @@
     {}
 
-    HRESULT handleCallback(const ComPtr<IVirtualBoxCallback> &aCallback)
-    {
-        LogFlow(("OnGuestPropertyChange: machineId={%RTuuid}, name='%ls', value='%ls', flags='%ls'\n",
-                 machineId.ptr(), name.raw(), value.raw(), flags.raw()));
-        return aCallback->OnGuestPropertyChange(machineId.toUtf16(), name, value, flags);
-    }
-
-#ifdef RT_OS_WINDOWS
-    HRESULT prepareComEventDesc(ComEventDesc& aEvDesc)
-    {
-       aEvDesc.init("OnGuestPropertyChange", 4);
-       aEvDesc.add(machineId.toUtf16()).add(name).add(value).add(flags);
-       return S_OK;
-    }
-#endif
     virtual HRESULT prepareEventDesc(IEventSource* aSource, VBoxEventDesc& aEvDesc)
     {
@@ -4669,53 +4377,4 @@
     }
 
-    CallbackList callbacks;
-#ifdef RT_OS_WINDOWS
-    EventListenersList listeners;
-#endif
-    {
-        /* Make a copy to release the lock before iterating */
-        AutoReadLock alock(mVirtualBox COMMA_LOCKVAL_SRC_POS);
-        callbacks = mVirtualBox->m->llCallbacks;
-#ifdef RT_OS_WINDOWS
-	IUnknown** pp;
-	for (pp = mVirtualBox->m_vec.begin(); pp < mVirtualBox->m_vec.end(); pp++)
-	{
-            listeners.Add(*pp);
-        }
-#endif
-    }
-
-
-#ifdef RT_OS_WINDOWS
-    {
-     ComEventDesc evDesc;
-
-     int nConnections = listeners.GetSize();
-     /* Only prepare args if someone really needs them */
-     if (nConnections)
-        prepareComEventDesc(evDesc);
-
-     for (int i=0; i<nConnections; i++)
-     {
-        ComPtr<IUnknown> sp = listeners.GetAt(i);
-        ComPtr<IVirtualBoxCallback> cbI;
-        ComPtr<IDispatch> cbD;
-
-        cbI = sp;
-        cbD = sp;
-
-        /**
-         * Would be just handleCallback(cbI) in an ideal world, unfortunately our
-	 * consumers want to be invoked via IDispatch, thus going the hard way.
-         */
-        if (cbI != NULL && cbD != NULL)
-        {
-             CComVariant varResult;
-             mVirtualBox->m->mComEvHelper.fire(cbD, evDesc, &varResult);
-             // what we gonna do with the result?
-        }
-     }
-    }
-#endif
 
     {
@@ -4724,27 +4383,4 @@
 
         evDesc.fire(/* don't wait for delivery */0);
-    }
-
-    for (CallbackList::const_iterator it = callbacks.begin();
-         it != callbacks.end();
-         ++it)
-    {
-        if (it->isWanted(mWhat))
-        {
-            HRESULT hrc = handleCallback(it->ptrICb);
-            if (hrc == VBOX_E_DONT_CALL_AGAIN)
-            {
-                /* Have to update the original. */
-                AutoReadLock alock(mVirtualBox COMMA_LOCKVAL_SRC_POS);
-                CallbackList::iterator itOrg;
-                itOrg = std::find(mVirtualBox->m->llCallbacks.begin(),
-                                  mVirtualBox->m->llCallbacks.end(),
-                                  CallbackList::value_type(it->ptrICb));
-                if (itOrg != mVirtualBox->m->llCallbacks.end())
-                    itOrg->setDontCallAgain(mWhat);
-            }
-            else if (FAILED_DEAD_INTERFACE(hrc))
-                mVirtualBox->removeDeadCallback(it->ptrICb);
-        }
     }
 
Index: /trunk/src/VBox/Main/glue/tests/TestVBox.java
===================================================================
--- /trunk/src/VBox/Main/glue/tests/TestVBox.java	(revision 30824)
+++ /trunk/src/VBox/Main/glue/tests/TestVBox.java	(revision 30825)
@@ -16,176 +16,6 @@
 import java.math.BigInteger;
 
-class VBoxCallbacks extends VBoxObjectBase implements IVirtualBoxCallback
-{
-    public void onGuestPropertyChange(String machineId, String name, String value, String flags)
-    {
-        System.out.println("onGuestPropertyChange -- VM: " + machineId + ", " + name + "->" + value);
-    }
-    public void onSnapshotChange(String machineId, String snapshotId)
-    {
-        System.out.println("onSnapshotChange -- VM: " + machineId + ", snap: " + snapshotId);
-
-    }
-    public void onSnapshotDeleted(String machineId, String snapshotId)
-    {
-        System.out.println("onSnapshotDeleted -- VM: " + machineId + ", snap: " + snapshotId);
-    }
-    public void onSnapshotTaken(String machineId, String snapshotId)
-    {
-        System.out.println("onSnapshotTaken -- VM: " + machineId + ", snap: " + snapshotId);
-    }
-    public void onSessionStateChange(String machineId, SessionState state)
-    {
-        System.out.println("onSessionStateChange -- VM: " + machineId + ", state: " + state);
-    }
-    public void onMachineRegistered(String machineId, Boolean registered)
-    {
-        System.out.println("onMachineRegistered -- VM: " + machineId + ", registered: " + registered);
-    }
-    public void onMediumRegistered(String mediumId, DeviceType mediumType, Boolean registered)
-    {
-        System.out.println("onMediumRegistered -- ID: " + mediumId + ", type=" + mediumType + ", registered: " + registered);
-    }
-    public void onExtraDataChange(String machineId, String key, String value)
-    {
-        System.out.println("onExtraDataChange -- VM: " + machineId + ": " + key+"->"+value);
-    }
-    public Boolean onExtraDataCanChange(String machineId, String key, String value, Holder<String> error)
-    {
-        return true;
-    }
-    public void onMachineDataChange(String machineId)
-    {
-        System.out.println("onMachineDataChange -- VM: " + machineId);
-    }
-    public void onMachineStateChange(String machineId, MachineState state)
-    {
-        System.out.println("onMachineStateChange -- VM: " + machineId + ", state: " + state);
-    }
-}
-
-class ConsoleCallbacks extends VBoxObjectBase implements IConsoleCallback
-{
-    String mach;
-    ConsoleCallbacks(String mach)
-    {
-       this.mach = mach;
-    }
-    public void onMousePointerShapeChange(Boolean visible, Boolean alpha, Long xHot, Long yHot, Long width, Long height, List<Short> shape)
-    {
-       System.out.println("onMousePointerShapeChange -- VM: " + mach);
-    }
-    public void onMouseCapabilityChange(Boolean supportsAbsolute, Boolean supportsRelative, Boolean needsHostCursor)
-    {
-       System.out.println("onMouseCapabilityChange -- VM: " + mach+" abs="+supportsAbsolute+ " rel="+supportsRelative+" need host="+needsHostCursor);
-    }
-    public void onKeyboardLedsChange(Boolean numLock, Boolean capsLock, Boolean scrollLock)
-    {
-       System.out.println("onKeyboardLedsChange -- VM: " + mach);
-    }
-    public void onStateChange(org.virtualbox_3_3.MachineState state)
-    {
-       System.out.println("onStateChange -- VM: " + mach);
-    }
-    public void onAdditionsStateChange()
-    {
-       System.out.println("onAdditionsStateChange -- VM: " + mach);
-    }
-    public void onNetworkAdapterChange(org.virtualbox_3_3.INetworkAdapter networkAdapter)
-    {
-       System.out.println("onNetworkAdapterChange -- VM: " + mach);
-    }
-    public void onSerialPortChange(org.virtualbox_3_3.ISerialPort serialPort)
-    {
-       System.out.println("onSerialPortChange -- VM: " + mach);
-    }
-    public void onParallelPortChange(org.virtualbox_3_3.IParallelPort parallelPort)
-    {
-       System.out.println("onParallelPortChange -- VM: " + mach);
-    }
-    public void onStorageControllerChange()
-    {
-       System.out.println("onStorageControllerChange -- VM: " + mach);
-    }
-    public void onMediumChange(org.virtualbox_3_3.IMediumAttachment mediumAttachment)
-    {
-       System.out.println("onMediumChange -- VM: " + mach);
-    }
-    public void onCPUChange(Long cpu, Boolean add)
-    {
-       System.out.println("onCPUChange -- VM: " + mach);
-    }
-    public void onVRDPServerChange()
-    {
-       System.out.println("onVRDPServerChange -- VM: " + mach);
-    }
-    public void onRemoteDisplayInfoChange()
-    {
-       System.out.println("onRemoteDisplayInfoChange -- VM: " + mach);
-    }
-    public void onUSBControllerChange()
-    {
-       System.out.println("onUSBControllerChange -- VM: " + mach);
-    }
-    public void onUSBDeviceStateChange(org.virtualbox_3_3.IUSBDevice device, Boolean attached, org.virtualbox_3_3.IVirtualBoxErrorInfo error)
-    {
-       System.out.println("onUSBDeviceStateChange -- VM: " + mach);
-    }
-    public void onSharedFolderChange(org.virtualbox_3_3.Scope scope)
-    {
-       System.out.println("onSharedFolderChange -- VM: " + mach);
-    }
-
-    public void onRuntimeError(Boolean fatal, String id, String message)
-    {
-       System.out.println("onRuntimeError -- VM: " + mach);
-    }
-
-    public Boolean onCanShowWindow()
-    {
-       System.out.println("onCanShowWindow -- VM: " + mach);
-       return true;
-    }
-
-    public BigInteger onShowWindow()
-    {
-       System.out.println("onShowWindow -- VM: " + mach);
-       return BigInteger.ZERO;
-    }
-}
-
 public class TestVBox
 {
-    static void testCallbacks(VirtualBoxManager mgr, IVirtualBox vbox)
-    {
-
-        IVirtualBoxCallback cbs = new VBoxCallbacks();
-        mgr.registerGlobalCallback(vbox, cbs);
-
-        IMachine mach = vbox.getMachines().get(0);
-        IConsoleCallback mcbs = new ConsoleCallbacks(mach.getName());
-
-        ISession session = null;
-        try {
-          session = mgr.openMachineSession(mach);
-          mgr.registerMachineCallback(session, mcbs);
-
-          for (int i=0; i<100; i++)
-          {
-            mgr.waitForEvents(500);
-          }
-
-          System.out.println("done waiting");
-
-          mgr.unregisterMachineCallback(session, mcbs);
-        } catch (Exception e) {
-          e.printStackTrace();
-        } finally {
-          mgr.closeMachineSession(session);
-        }
-        mgr.unregisterGlobalCallback(vbox, cbs);
-    }
-
-
     static void processEvent(IEvent ev)
     {
@@ -198,5 +28,5 @@
         {
             case OnMachineStateChange:
-                IMachineStateChangeEvent mcse = IMachineStateChangeEvent.queryInterface(ev);
+                IMachineStateChangedEvent mcse = IMachineStateChangedEvent.queryInterface(ev);
                 if (mcse == null)
                     System.out.println("Cannot query an interface");
@@ -223,5 +53,5 @@
     {
         // active mode for Java doesn't fully work yet, and using passive
-        // is more portable (the only mode for MSCOM and WS) and thus generally 
+        // is more portable (the only mode for MSCOM and WS) and thus generally
         // recommended
         IEventListener listener = active ? mgr.createListener(new EventHandler()) : es.createListener();
@@ -285,5 +115,4 @@
             testEnumeration(mgr, vbox);
             testStart(mgr, vbox);
-            //testCallbacks(mgr, vbox);
             testEvents(mgr, vbox.getEventSource(), false);
 
Index: /trunk/src/VBox/Main/glue/vboxapi.py
===================================================================
--- /trunk/src/VBox/Main/glue/vboxapi.py	(revision 30824)
+++ /trunk/src/VBox/Main/glue/vboxapi.py	(revision 30825)
@@ -217,5 +217,4 @@
             win32com.client.gencache.EnsureDispatch('VirtualBox.Session')
             win32com.client.gencache.EnsureDispatch('VirtualBox.VirtualBox')
-            win32com.client.gencache.EnsureDispatch('VirtualBox.CallbackWrapper')
 
     def getSessionObject(self, vbox):
@@ -245,33 +244,4 @@
         import pythoncom
         pythoncom.CoUninitialize()
-
-    def createCallback(self, iface, impl, arg):
-        d = {}
-        d['BaseClass'] = impl
-        d['arg'] = arg
-        d['tlb_guid'] = PlatformMSCOM.VBOX_TLB_GUID
-        str = ""
-        str += "import win32com.server.util\n"
-        str += "import pythoncom\n"
-
-        str += "class "+iface+"Impl(BaseClass):\n"
-        str += "   _com_interfaces_ = ['"+iface+"']\n"
-        str += "   _typelib_guid_ = tlb_guid\n"
-        str += "   _typelib_version_ = 1, 0\n"
-        str += "   _reg_clsctx_ = pythoncom.CLSCTX_INPROC_SERVER\n"
-        # Maybe we'd better implement Dynamic invoke policy, to be more flexible here
-        str += "   _reg_policy_spec_ = 'win32com.server.policy.EventHandlerPolicy'\n"
-
-        # generate capitalized version of callback methods -
-        # that's how Python COM looks them up
-        for m in dir(impl):
-           if m.startswith("on"):
-             str += "   "+ComifyName(m)+"=BaseClass."+m+"\n"
-
-        str += "   def __init__(self): BaseClass.__init__(self, arg)\n"
-        str += "result = win32com.client.Dispatch('VirtualBox.CallbackWrapper')\n"
-        str += "result.SetLocalObject(win32com.server.util.wrap("+iface+"Impl()))\n"
-        exec (str,d,d)
-        return d['result']
 
     def createListener(self, impl, arg):
@@ -292,5 +262,5 @@
         str += "   _reg_policy_spec_ = 'win32com.server.policy.EventHandlerPolicy'\n"
 
-        # capitalized version of callback method
+        # capitalized version of listener method
         str += "   HandleEvent=BaseClass.handleEvent\n"
         str += "   def __init__(self): BaseClass.__init__(self, arg)\n"
@@ -370,18 +340,4 @@
         import xpcom
         xpcom._xpcom.DetachThread()
-
-    def createCallback(self, iface, impl, arg):
-        d = {}
-        d['BaseClass'] = impl
-        d['arg'] = arg
-        str = ""
-        str += "import xpcom.components\n"
-        str += "class "+iface+"Impl(BaseClass):\n"
-        str += "   _com_interfaces_ = xpcom.components.interfaces."+iface+"\n"
-        str += "   def __init__(self): BaseClass.__init__(self, arg)\n"
-        str += "result = xpcom.components.classes['@virtualbox.org/CallbackWrapper;1'].createInstance()\n"
-        str += "result.setLocalObject("+iface+"Impl())\n"
-        exec (str,d,d)
-        return d['result']
 
     def createListener(self, impl, arg):
@@ -478,7 +434,4 @@
         pass
 
-    def createCallback(self, iface, impl, arg):
-        raise Exception("no callbacks for webservices")
-
     def createListener(self, impl, arg):
         raise Exception("no active listeners for webservices")
@@ -581,7 +534,4 @@
         self.platform.deinitPerThread()
 
-    def createCallback(self, iface, impl, arg):
-        return self.platform.createCallback(iface, impl, arg)
-
     def createListener(self, impl, arg = None):
         return self.platform.createListener(impl, arg)
Index: /trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 30824)
+++ /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 30825)
@@ -372,11 +372,4 @@
   </result>
 
-  <result name="VBOX_E_DONT_CALL_AGAIN" value="0x80BB000D">
-    <desc>
-      Returned by callback methods which does not need to be called again
-      because the client does not actually make use of them.
-    </desc>
-  </result>
-
   <!--
     Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
@@ -1205,300 +1198,8 @@
   </interface>
 
-  <interface
-     name="ILocalOwner" extends="$unknown"
-     uuid="308FF42A-DC45-49D4-A950-B1EEE5E00BB5" wsmap="suppress"
-     >
-    <desc>
-      The ILocalOwner interface allows to register local objects
-      (created without COM calls, but with new()).
-      Once registered, calls to methods of such objects can be made
-      from remote COM processes.
-      The main usecase is the event callback implementation where
-      API clients provide callback objects.
-    </desc>
-    <method name="setLocalObject">
-      <desc>
-        Set local object.
-      </desc>
-      <param name="object" type="$unknown" dir="in">
-        <desc>Local object to forward requests to.
-          If null, clears currently set local object.</desc>
-      </param>
-    </method>
-  </interface>
-
   <!--
   // IVirtualBox
   /////////////////////////////////////////////////////////////////////////
   -->
-
-  <interface
-     name="IVirtualBoxCallback" extends="$unknown"
-     uuid="7f6a65b6-ad5d-4a67-8872-0b11cb7ea95c"
-     wsmap="suppress"
-     >
-
-    <method name="onMachineStateChange">
-      <desc>
-        The execution state of the given machine has changed.
-        <see>IMachine::state</see>
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-      <param name="machineId" type="uuid" mod="string" dir="in">
-        <desc>ID of the machine this event relates to.</desc>
-      </param>
-      <param name="state" type="MachineState" dir="in">
-        <desc>New execution state.</desc>
-      </param>
-    </method>
-
-    <method name="onMachineDataChange">
-      <desc>
-        Any of the settings of the given machine has changed.
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-      <param name="machineId" type="uuid" mod="string" dir="in">
-        <desc>ID of the machine this event relates to.</desc>
-      </param>
-    </method>
-
-    <method name="onExtraDataCanChange">
-      <desc>
-        Notification when someone tries to change extra data for
-        either the given machine or (if @c null) global extra data.
-        This gives the chance to veto against changes.
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP. Change is allowed.
-        </result>
-      </desc>
-      <param name="machineId" type="uuid" mod="string" dir="in">
-        <desc>
-          ID of the machine this event relates to
-          (@c null ID for global extra data change requests).
-        </desc>
-      </param>
-      <param name="key" type="wstring" dir="in">
-        <desc>
-          Extra data key for the attempted write.
-        </desc>
-      </param>
-      <param name="value" type="wstring" dir="in">
-        <desc>
-          Extra data value for the given key.
-        </desc>
-      </param>
-      <param name="error" type="wstring" dir="out">
-        <desc>
-          Optional error message describing the reason of the
-          veto (ignored if this notification returns @c true).
-        </desc>
-      </param>
-      <param name="allowChange" type="boolean" dir="return">
-        <desc>
-          Flag to indicate whether the callee agrees (@c true)
-          or vetoes against the change (@c false).
-        </desc>
-      </param>
-    </method>
-
-    <method name="onExtraDataChange">
-      <desc>
-        Notification when machine specific or global extra data
-        has changed.
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-      <param name="machineId" type="uuid" mod="string" dir="in">
-        <desc>
-          ID of the machine this event relates to.
-          Null for global extra data changes.
-        </desc>
-      </param>
-      <param name="key" type="wstring" dir="in">
-        <desc>
-          Extra data key that has changed.
-        </desc>
-      </param>
-      <param name="value" type="wstring" dir="in">
-        <desc>
-          Extra data value for the given key.
-        </desc>
-      </param>
-    </method>
-
-    <method name="onMediumRegistered">
-      <desc>
-        The given medium was registered or unregistered
-        within this VirtualBox installation.
-
-        The @a mediumType parameter describes what type of
-        medium the specified @a mediumId refers to. Possible
-        values are:
-
-        <ul>
-        <li><link to="DeviceType_HardDisk"/>: the medium is a hard disk
-        that, if registered, can be obtained using the
-        <link to="IVirtualBox::getHardDisk"/> call.</li>
-        <li><link to="DeviceType_DVD"/>: the medium is a CD/DVD image
-        that, if registered, can be obtained using the
-        <link to="IVirtualBox::getDVDImage"/> call.</li>
-        <li><link to="DeviceType_Floppy"/>: the medium is a Floppy image
-        that, if registered, can be obtained using the
-        <link to="IVirtualBox::getFloppyImage"/> call.</li>
-        </ul>
-
-        Note that if this is a deregistration notification,
-        there is no way to access the object representing the
-        unregistered medium. It is supposed that the
-        application will do required cleanup based on the
-        @a mediumId value.
-
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-      <param name="mediumId" type="uuid" mod="string" dir="in">
-        <desc>ID of the medium this event relates to.</desc>
-      </param>
-      <param name="mediumType" type="DeviceType" dir="in">
-        <desc>Type of the medium this event relates to.</desc>
-      </param>
-      <param name="registered" type="boolean" dir="in">
-        <desc>
-          If @c true, the medium was registered, otherwise it was
-          unregistered.
-        </desc>
-      </param>
-    </method>
-
-    <method name="onMachineRegistered">
-      <desc>
-        The given machine was registered or unregistered
-        within this VirtualBox installation.
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-      <param name="machineId" type="uuid" mod="string" dir="in">
-        <desc>ID of the machine this event relates to.</desc>
-      </param>
-      <param name="registered" type="boolean" dir="in">
-        <desc>
-          If @c true, the machine was registered, otherwise it was
-          unregistered.
-        </desc>
-      </param>
-    </method>
-
-    <method name="onSessionStateChange">
-      <desc>
-        The state of the session for the given machine was changed.
-        <see>IMachine::sessionState</see>
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-      <param name="machineId" type="uuid" mod="string" dir="in">
-        <desc>ID of the machine this event relates to.</desc>
-      </param>
-      <param name="state" type="SessionState" dir="in">
-        <desc>New session state.</desc>
-      </param>
-    </method>
-
-    <method name="onSnapshotTaken">
-      <desc>
-        A new snapshot of the machine has been taken.
-        <see>ISnapshot</see>
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-      <param name="machineId" type="uuid" mod="string" dir="in">
-        <desc>ID of the machine this event relates to.</desc>
-      </param>
-      <param name="snapshotId" type="uuid" mod="string" dir="in">
-        <desc>ID of the new snapshot.</desc>
-      </param>
-    </method>
-
-    <method name="onSnapshotDeleted">
-      <desc>
-        Snapshot of the given machine has been deleted.
-
-        <note>
-          This notification is delivered <b>after</b> the snapshot
-          object has been uninitialized on the server (so that any
-          attempt to call its methods will return an error).
-        </note>
-
-        <see>ISnapshot</see>
-
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-      <param name="machineId" type="uuid" mod="string" dir="in">
-        <desc>ID of the machine this event relates to.</desc>
-      </param>
-      <param name="snapshotId" type="uuid" mod="string" dir="in">
-        <desc>
-          ID of the deleted snapshot. @c null means the current machine
-          state has been deleted (restored from the current snapshot).
-        </desc>
-      </param>
-    </method>
-
-    <method name="onSnapshotChange">
-      <desc>
-        Snapshot properties (name and/or description) have been changed.
-        <see>ISnapshot</see>
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-      <param name="machineId" type="uuid" mod="string" dir="in">
-        <desc>ID of the machine this event relates to.</desc>
-      </param>
-      <param name="snapshotId" type="uuid" mod="string" dir="in">
-        <desc>ID of the changed snapshot.</desc>
-      </param>
-    </method>
-
-    <method name="onGuestPropertyChange">
-      <desc>
-        Notification when a guest property has changed.
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-      <param name="machineId" type="uuid" mod="string" dir="in">
-        <desc>
-          ID of the machine this event relates to.
-        </desc>
-      </param>
-      <param name="name" type="wstring" dir="in">
-        <desc>
-          The name of the property that has changed.
-        </desc>
-      </param>
-      <param name="value" type="wstring" dir="in">
-        <desc>
-          The new property value.
-        </desc>
-      </param>
-      <param name="flags" type="wstring" dir="in">
-        <desc>
-          The new property flags.
-        </desc>
-      </param>
-    </method>
-
-  </interface>
 
   <interface
@@ -1959,6 +1660,5 @@
         <link to="#openMachine"/> within this VirtualBox installation. After
         successful method invocation, the
-        <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
-        to all registered callbacks.
+        <link to="IMachineRegisteredEvent"/> event is fired.
 
         <note>
@@ -2013,6 +1713,5 @@
         Unregisters the machine previously registered using
         <link to="#registerMachine"/>. After successful method invocation, the
-        <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
-        to all registered callbacks.
+        <link to="IMachineRegisteredEvent"/> event is fired.
 
         <note>
@@ -2571,13 +2270,13 @@
         <note>
           Before performing the actual data change, this method will ask all
-          registered callbacks using the
-          <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
-          notification for a permission. If one of the callbacks refuses the
+          registered event listener using the
+          <link to="IExtraDataCanChangeEvent"/>
+          notification for a permission. If one of the listeners refuses the
           new value, the change will not be performed.
         </note>
         <note>
           On success, the
-          <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
-          is called to inform all registered callbacks about a successful data
+          <link to="IExtraDataChanged"/> notification
+          is called to inform all registered listeners about a successful data
           change.
         </note>
@@ -2854,34 +2553,4 @@
       <param name="machineId" type="uuid" mod="string" dir="in">
         <desc>ID of the virtual machine to open a session with.</desc>
-      </param>
-    </method>
-
-    <method name="registerCallback">
-      <desc>
-        Registers a new global VirtualBox callback. The methods of the given
-        callback object will be called by VirtualBox when an appropriate
-        event occurs.
-
-        <result name="E_INVALIDARG">
-          A @c null callback cannot be registered.
-        </result>
-
-      </desc>
-      <param name="callback" type="IVirtualBoxCallback" dir="in">
-        <desc>Callback object to register.</desc>
-      </param>
-    </method>
-
-    <method name="unregisterCallback">
-      <desc>
-        Unregisters the previously registered global VirtualBox callback.
-
-        <result name="E_INVALIDARG">
-          Specified @a callback not registered.
-        </result>
-
-      </desc>
-      <param name="callback" type="IVirtualBoxCallback" dir="in">
-        <desc>Callback object to unregister.</desc>
       </param>
     </method>
@@ -4725,5 +4394,5 @@
         A comma-separated list of simple glob patterns.  Changes to guest
         properties whose name matches one of the patterns will generate an
-        <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
+        <link to="IGuestPropertyChangedEvent"/> signal.
       </desc>
     </attribute>
@@ -5289,13 +4958,13 @@
         <note>
           Before performing the actual data change, this method will ask all
-          registered callbacks using the
-          <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
-          notification for a permission. If one of the callbacks refuses the
+          registered listeners using the
+          <link to="IExtraDataCanChangeEvent"/>
+          notification for a permission. If one of the listeners refuses the
           new value, the change will not be performed.
         </note>
         <note>
           On success, the
-          <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
-          is called to inform all registered callbacks about a successful data
+          <link to="IExtraDataChangedEvent"/> notification
+          is called to inform all registered listeners about a successful data
           change.
         </note>
@@ -5525,5 +5194,5 @@
         method.
         <note>
-          The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
+          The method sends <link to="IMachineDataChangedEvent"/>
           notification event after the configuration has been successfully
           saved (only for registered machines).
@@ -6155,481 +5824,4 @@
 
   <interface
-     name="IConsoleCallback" extends="$unknown"
-     uuid="60703f8d-81e4-4b45-a147-dcfd07692b19"
-     wsmap="suppress"
-     >
-
-    <desc>
-        This interface is used by a client of the Main API that need to
-        be notified of events. For example, a graphical user interface
-        can use this to learn about machine state changes so they can
-        update the list of virtual machines without having to rely
-        on polling.
-
-        Whenever relevant events occur in VirtualBox, the callbacks in
-        objects of this interface are called. In order for this to be
-        useful, a client needs to create its own subclass that implements
-        this interface in which the methods for the relevant callbacks
-        are overridden. An instance of this subclass interface can then
-        be passed to <link to="IConsole::registerCallback" />.
-    </desc>
-
-    <method name="onMousePointerShapeChange">
-      <desc>
-        Notification when the guest mouse pointer shape has
-        changed. The new shape data is given.
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-      <param name="visible" type="boolean" dir="in">
-        <desc>
-          Flag whether the pointer is visible.
-        </desc>
-      </param>
-      <param name="alpha" type="boolean" dir="in">
-        <desc>
-          Flag whether the pointer has an alpha channel.
-        </desc>
-      </param>
-      <param name="xHot" type="unsigned long" dir="in">
-        <desc>
-          The pointer hot spot x coordinate.
-        </desc>
-      </param>
-      <param name="yHot" type="unsigned long" dir="in">
-        <desc>
-          The pointer hot spot y coordinate.
-        </desc>
-      </param>
-      <param name="width" type="unsigned long" dir="in">
-        <desc>
-          Width of the pointer shape in pixels.
-        </desc>
-      </param>
-      <param name="height" type="unsigned long" dir="in">
-        <desc>
-          Height of the pointer shape in pixels.
-        </desc>
-      </param>
-      <param name="shape" type="octet" safearray="yes" dir="in">
-        <desc>
-          Shape buffer arrays.
-
-          The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
-          followed by a 32-bpp XOR (color) mask.
-
-          For pointers without alpha channel the XOR mask pixels are 32
-          bit values: (lsb)BGR0(msb). For pointers with alpha channel
-          the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
-
-          An AND mask is used for pointers with alpha channel, so if the
-          callback does not support alpha, the pointer could be
-          displayed as a normal color pointer.
-
-          The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
-          size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
-          height</tt>. The padding bits at the end of each scanline are
-          undefined.
-
-          The XOR mask follows the AND mask on the next 4-byte aligned
-          offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
-          Bytes in the gap between the AND and the XOR mask are undefined.
-          The XOR mask scanlines have no gap between them and the size of
-          the XOR mask is: <tt>cXor = width * 4 * height</tt>.
-
-          <note>
-            If @a shape is 0, only the pointer visibility is changed.
-          </note>
-        </desc>
-      </param>
-    </method>
-
-    <method name="onMouseCapabilityChange">
-      <desc>
-        Notification when the mouse capabilities reported by the
-        guest have changed. The new capabilities are passed.
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-      <param name="supportsAbsolute" type="boolean" dir="in"/>
-      <param name="supportsRelative" type="boolean" dir="in"/>
-      <param name="needsHostCursor" type="boolean" dir="in"/>
-    </method>
-
-    <method name="onKeyboardLedsChange">
-      <desc>
-        Notification when the guest OS executes the KBD_CMD_SET_LEDS command
-        to alter the state of the keyboard LEDs.
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-      <param name="numLock" type="boolean" dir="in"/>
-      <param name="capsLock" type="boolean" dir="in"/>
-      <param name="scrollLock" type="boolean" dir="in"/>
-    </method>
-
-    <method name="onStateChange">
-      <desc>
-        Notification when the execution state of the machine has changed.
-        The new state will be given.
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-      <param name="state" type="MachineState" dir="in"/>
-    </method>
-
-    <method name="onAdditionsStateChange">
-      <desc>
-        Notification when a Guest Additions property changes.
-        Interested callees should query IGuest attributes to
-        find out what has changed.
-      </desc>
-    </method>
-
-    <method name="onNetworkAdapterChange">
-      <desc>
-        Notification when a property of one of the
-        virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
-        changes.  Interested callees should use INetworkAdapter methods and
-        attributes to find out what has changed.
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-      <param name="networkAdapter" type="INetworkAdapter" dir="in">
-        <desc>Network adapter that is subject to change.</desc>
-      </param>
-    </method>
-
-    <method name="onSerialPortChange">
-      <desc>
-        Notification when a property of one of the
-        virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
-        Interested callees should use ISerialPort methods and attributes
-        to find out what has changed.
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-      <param name="serialPort" type="ISerialPort" dir="in">
-        <desc>Serial port that is subject to change.</desc>
-      </param>
-    </method>
-
-    <method name="onParallelPortChange">
-      <desc>
-        Notification when a property of one of the
-        virtual <link to="IMachine::getParallelPort">parallel ports</link>
-        changes.  Interested callees should use ISerialPort methods and
-        attributes to find out what has changed.
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-      <param name="parallelPort" type="IParallelPort" dir="in">
-        <desc>Parallel port that is subject to change.</desc>
-      </param>
-    </method>
-
-    <method name="onStorageControllerChange">
-      <desc>
-        Notification when a property of one of the
-        virtual <link to="IMachine::storageControllers">storage controllers</link>
-        changes. Interested callees should query the corresponding collections
-        to find out what has changed.
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-    </method>
-
-    <method name="onMediumChange">
-      <desc>
-        Notification when a
-        <link to="IMachine::mediumAttachments">medium attachment</link>
-        changes.
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-      <param name="mediumAttachment" type="IMediumAttachment" dir="in">
-        <desc>Medium attachment that is subject to change.</desc>
-      </param>
-    </method>
-
-    <method name="onCPUChange">
-      <desc>
-        Notification when a CPU changes.
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-      <param name="cpu" type="unsigned long" dir="in">
-        <desc>The CPU which changed</desc>
-      </param>
-      <param name="add" type="boolean" dir="in">
-        <desc>Flag whether the CPU was added or removed</desc>
-      </param>
-    </method>
-
-    <method name="onVRDPServerChange">
-      <desc>
-        Notification when a property of the
-        <link to="IMachine::VRDPServer">VRDP server</link> changes.
-        Interested callees should use IVRDPServer methods and attributes to
-        find out what has changed.
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-    </method>
-
-    <method name="onRemoteDisplayInfoChange">
-      <desc>
-        Notification when the status of the VRDP server changes. Interested callees
-        should use <link to="IConsole::RemoteDisplayInfo">IRemoteDisplayInfo</link>
-        attributes to find out what is the current status.
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-    </method>
-
-    <method name="onUSBControllerChange">
-      <desc>
-        Notification when a property of the virtual
-        <link to="IMachine::USBController">USB controller</link> changes.
-        Interested callees should use IUSBController methods and attributes to
-        find out what has changed.
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-    </method>
-
-    <method name="onUSBDeviceStateChange">
-      <desc>
-        Notification when a USB device is attached to or detached from
-        the virtual USB controller.
-
-        This notification is sent as a result of the indirect
-        request to attach the device because it matches one of the
-        machine USB filters, or as a result of the direct request
-        issued by <link to="IConsole::attachUSBDevice"/> or
-        <link to="IConsole::detachUSBDevice"/>.
-        This notification is sent in case of both a succeeded and a
-        failed request completion. When the request succeeds, the
-        @a error parameter is @c null, and the given device has been
-        already added to (when @a attached is @c true) or removed from
-        (when @a attached is @c false) the collection represented by
-        <link to="IConsole::USBDevices"/>. On failure, the collection
-        doesn't change and the @a error parameter represents the error
-        message describing the failure.
-
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-      <param name="device" type="IUSBDevice" dir="in">
-        <desc>Device that is subject to state change.</desc>
-      </param>
-      <param name="attached" type="boolean" dir="in">
-        <desc>
-          @c true if the device was attached and @c false otherwise.
-        </desc>
-      </param>
-      <param name="error" type="IVirtualBoxErrorInfo" dir="in">
-        <desc>
-          @c null on success or an error message object on failure.
-        </desc>
-      </param>
-    </method>
-
-    <method name="onSharedFolderChange">
-      <desc>
-        Notification when a shared folder is added or removed.
-        The @a scope argument defines one of three scopes:
-        <link to="IVirtualBox::sharedFolders">global shared folders</link>
-        (<link to="Scope_Global">Global</link>),
-        <link to="IMachine::sharedFolders">permanent shared folders</link> of
-        the machine (<link to="Scope_Machine">Machine</link>) or <link
-        to="IConsole::sharedFolders">transient shared folders</link> of the
-        machine (<link to="Scope_Session">Session</link>). Interested callees
-        should use query the corresponding collections to find out what has
-        changed.
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-      <param name="scope" type="Scope" dir="in">
-        <desc>Scope of the notification.</desc>
-      </param>
-    </method>
-
-    <method name="onRuntimeError">
-      <desc>
-        Notification when an error happens during the virtual
-        machine execution.
-
-        There are three kinds of runtime errors:
-        <ul>
-          <li><i>fatal</i></li>
-          <li><i>non-fatal with retry</i></li>
-          <li><i>non-fatal warnings</i></li>
-        </ul>
-
-        <b>Fatal</b> errors are indicated by the @a fatal parameter set
-        to @c true. In case of fatal errors, the virtual machine
-        execution is always paused before calling this notification, and
-        the notification handler is supposed either to immediately save
-        the virtual machine state using <link to="IConsole::saveState"/>
-        or power it off using <link to="IConsole::powerDown"/>.
-        Resuming the execution can lead to unpredictable results.
-
-        <b>Non-fatal</b> errors and warnings are indicated by the
-        @a fatal parameter set to @c false. If the virtual machine
-        is in the Paused state by the time the error notification is
-        received, it means that the user can <i>try to resume</i> the machine
-        execution after attempting to solve the problem that caused the
-        error. In this case, the notification handler is supposed
-        to show an appropriate message to the user (depending on the
-        value of the @a id parameter) that offers several actions such
-        as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
-        wants to retry, the notification handler should continue
-        the machine execution using the <link to="IConsole::resume"/>
-        call. If the machine execution is not Paused during this
-        notification, then it means this notification is a <i>warning</i>
-        (for example, about a fatal condition that can happen very soon);
-        no immediate action is required from the user, the machine
-        continues its normal execution.
-
-        Note that in either case the notification handler
-        <b>must not</b> perform any action directly on a thread
-        where this notification is called. Everything it is allowed to
-        do is to post a message to another thread that will then talk
-        to the user and take the corresponding action.
-
-        Currently, the following error identifiers are known:
-        <ul>
-          <li><tt>"HostMemoryLow"</tt></li>
-          <li><tt>"HostAudioNotResponding"</tt></li>
-          <li><tt>"VDIStorageFull"</tt></li>
-          <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
-        </ul>
-
-        <note>
-          This notification is not designed to be implemented by
-          more than one callback at a time. If you have multiple
-          IConsoleCallback instances registered on the given
-          IConsole object, make sure you simply do nothing but
-          return @c S_OK from all but one of them that does actual
-          user notification and performs necessary actions.
-        </note>
-
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-      <param name="fatal" type="boolean" dir="in">
-        <desc>Whether the error is fatal or not</desc>
-      </param>
-      <param name="id" type="wstring" dir="in">
-        <desc>Error identifier</desc>
-      </param>
-      <param name="message" type="wstring" dir="in">
-        <desc>Optional error message</desc>
-      </param>
-    </method>
-
-    <method name="onCanShowWindow">
-      <desc>
-        Notification when a call to
-        <link to="IMachine::canShowConsoleWindow"/> is made by a
-        front-end to check if a subsequent call to
-        <link to="IMachine::showConsoleWindow"/> can succeed.
-
-        The callee should give an answer appropriate to the current
-        machine state in the @a canShow argument. This answer must
-        remain valid at least until the next
-        <link to="IConsole::state">machine state</link> change.
-
-        <note>
-          This notification is not designed to be implemented by
-          more than one callback at a time. If you have multiple
-          IConsoleCallback instances registered on the given
-          IConsole object, make sure you simply do nothing but
-          return @c true and @c S_OK from all but one of them that
-          actually manages console window activation.
-        </note>
-
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-      <param name="canShow" type="boolean" dir="return">
-        <desc>
-          @c true if the console window can be shown and @c false otherwise.
-        </desc>
-      </param>
-    </method>
-
-    <method name="onShowWindow">
-      <desc>
-        Notification when a call to
-        <link to="IMachine::showConsoleWindow"/>
-        requests the console window to be activated and brought to
-        foreground on the desktop of the host PC.
-
-        This notification should cause the VM console process to
-        perform the requested action as described above. If it is
-        impossible to do it at a time of this notification, this
-        method should return a failure.
-
-        Note that many modern window managers on many platforms
-        implement some sort of focus stealing prevention logic, so
-        that it may be impossible to activate a window without the
-        help of the currently active application (which is supposedly
-        an initiator of this notification). In this case, this method
-        must return a non-zero identifier that represents the
-        top-level window of the VM console process. The caller, if it
-        represents a currently active process, is responsible to use
-        this identifier (in a platform-dependent manner) to perform
-        actual window activation.
-
-        This method must set @a winId to zero if it has performed all
-        actions necessary to complete the request and the console
-        window is now active and in foreground, to indicate that no
-        further action is required on the caller's side.
-
-        <note>
-          This notification is not designed to be implemented by
-          more than one callback at a time. If you have multiple
-          IConsoleCallback instances registered on the given
-          IConsole object, make sure you simply do nothing but
-          return @c S_OK from all but one of them that actually
-          manages console window activation.
-        </note>
-
-        <result name="VBOX_E_DONT_CALL_AGAIN">
-          Do not call again, this method is a NOP.
-        </result>
-      </desc>
-      <param name="winId" type="unsigned long long" dir="return">
-        <desc>
-          Platform-dependent identifier of the top-level VM console
-          window, or zero if this method has performed all actions
-          necessary to implement the <i>show window</i> semantics for
-          the given platform and/or this VirtualBox front-end.
-        </desc>
-      </param>
-    </method>
-
-  </interface>
-
-  <interface
      name="IRemoteDisplayInfo" extends="$unknown"
      uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
@@ -7454,23 +6646,4 @@
     </method>
 
-    <method name="registerCallback">
-      <desc>
-        Registers a new console callback on this instance. The methods of the
-        callback interface will be called by this instance when the appropriate
-        event occurs.
-      </desc>
-      <param name="callback" type="IConsoleCallback" dir="in"/>
-    </method>
-
-    <method name="unregisterCallback">
-      <desc>
-        Unregisters the console callback previously registered using
-        <link to="#registerCallback"/>.
-        <result name="E_INVALIDARG">
-          Given @a callback handler is not registered.
-        </result>
-      </desc>
-      <param name="callback" type="IConsoleCallback" dir="in"/>
-    </method>
   </interface>
 
@@ -11042,6 +10215,6 @@
         or not.
         <note>
-          You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
-          callback to be instantly informed about changes of this attribute
+          You can use the <link to="IMouseCapabilityChangedEvent"/>
+          event to be instantly informed about changes of this attribute
           during virtual machine execution.
         </note>
@@ -11055,6 +10228,6 @@
         or not.
         <note>
-          You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
-          callback to be instantly informed about changes of this attribute
+          You can use the <link to="IMouseCapabilityChangedEvent"/>
+          event to be instantly informed about changes of this attribute
           during virtual machine execution.
         </note>
@@ -11068,6 +10241,6 @@
         cursor on demand.
         <note>
-          You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
-          callback to be instantly informed about changes of this attribute
+          You can use the <link to="IMouseCapabilityChangedEvent"/>
+          event to be instantly informed about changes of this attribute
           during virtual machine execution.
         </note>
@@ -13442,7 +12615,7 @@
         Called by <link to="IMachine::canShowConsoleWindow"/> and by
         <link to="IMachine::showConsoleWindow"/> in order to notify
-        console callbacks
-        <link to="IConsoleCallback::onCanShowWindow"/>
-        and <link to="IConsoleCallback::onShowWindow"/>.
+        console listeners
+        <link to="ICanShowWindowEvent"/>
+        and <link to="IShowWindowEvent"/>.
 
         <result name="VBOX_E_INVALID_OBJECT_STATE">
@@ -14618,15 +13791,15 @@
     <const name="OnMachineStateChange" value="32">
       <desc>
-        <see>IMachineStateChangeEvent</see>
+        <see>IMachineStateChangedEvent</see>
       </desc>
     </const>
     <const name="OnMachineDataChange" value="33">
       <desc>
-        <see>IMachineDataChangeEvent</see>
+        <see>IMachineDataChangedEvent</see>
       </desc>
     </const>
     <const name="OnExtraDataChange" value="34">
       <desc>
-        <see>IExtraDataChangeEvent</see>
+        <see>IExtraDataChangedEvent</see>
       </desc>
     </const>
@@ -14648,5 +13821,5 @@
     <const name="OnSessionStateChange" value="38">
       <desc>
-        <see>ISessionStateChangeEvent</see>
+        <see>ISessionStateChangedEvent</see>
       </desc>
     </const>
@@ -14663,10 +13836,10 @@
     <const name="OnSnapshotChange" value="41">
       <desc>
-        <see>ISnapshotChangeEvent</see>
+        <see>ISnapshotChangedEvent</see>
       </desc>
     </const>
     <const name="OnGuestPropertyChange" value="42">
       <desc>
-        <see>IGuestPropertyChangeEvent</see>
+        <see>IGuestPropertyChangedEvent</see>
       </desc>
     </const>
@@ -14674,70 +13847,70 @@
     <const name="OnMousePointerShapeChange" value="43">
       <desc>
-        <see>IMousePointerShapeChangeEvent</see>
+        <see>IMousePointerShapeChangedEvent</see>
       </desc>
     </const>
     <const name="OnMouseCapabilityChange" value="44">
       <desc>
-        <see>IMouseCapabilityChangeEvent</see>
+        <see>IMouseCapabilityChangedEvent</see>
       </desc>
     </const>
     <const name="OnKeyboardLedsChange" value="45">
       <desc>
-        <see>IKeyboardLedsChangeEvent</see>
+        <see>IKeyboardLedsChangedEvent</see>
       </desc>
     </const>
     <const name="OnStateChange" value="46">
       <desc>
-        <see>IStateChangeEvent</see>
+        <see>IStateChangedEvent</see>
       </desc>
     </const>
     <const name="OnAdditionsStateChange" value="47">
       <desc>
-        <see>IAdditionsStateChangeEvent</see>
+        <see>IAdditionsStateChangedEvent</see>
       </desc>
     </const>
     <const name="OnNetworkAdapterChange" value="48">
       <desc>
-        <see>INetworkAdapterChangeEvent</see>
+        <see>INetworkAdapterChangedEvent</see>
       </desc>
     </const>
     <const name="OnSerialPortChange" value="49">
       <desc>
-        <see>ISerialPortChangeEvent</see>
+        <see>ISerialPortChangedEvent</see>
       </desc>
     </const>
     <const name="OnParallelPortChange" value="50">
       <desc>
-        <see>IParallelPortChangeEvent</see>
+        <see>IParallelPortChangedEvent</see>
       </desc>
     </const>
     <const name="OnStorageControllerChange" value="51">
       <desc>
-        <see>IStorageControllerChangeEvent</see>
+        <see>IStorageControllerChangedEvent</see>
       </desc>
     </const>
     <const name="OnMediumChange" value="52">
       <desc>
-        <see>IMediumChangeEvent</see>
+        <see>IMediumChangedEvent</see>
       </desc>
     </const>
     <const name="OnVRDPServerChange" value="53">
       <desc>
-        <see>IVRDPServerChangeEvent</see>
+        <see>IVRDPServerChangedEvent</see>
       </desc>
     </const>
     <const name="OnUSBControllerChange" value="54">
       <desc>
-        <see>IUSBControllerChangeEvent</see>
+        <see>IUSBControllerChangedEvent</see>
       </desc>
     </const>
     <const name="OnUSBDeviceStateChange" value="55">
       <desc>
-        <see>IUSBDeviceStateChangeEvent</see>
+        <see>IUSBDeviceStateChangedEvent</see>
       </desc>
     </const>
     <const name="OnSharedFolderChange" value="56">
       <desc>
-        <see>ISharedFolderChangeEvent</see>
+        <see>ISharedFolderChangedEvent</see>
       </desc>
     </const>
@@ -14759,15 +13932,15 @@
     <const name="OnCPUChange" value="60">
       <desc>
-        <see>ICPUChangeEvent</see>
+        <see>ICPUChangedEvent</see>
       </desc>
     </const>
     <const name="OnRemoteDisplayInfoChange" value="61">
       <desc>
-        <see>IRemoteDisplayInfoChangeEvent</see>
+        <see>IRemoteDisplayInfoChangedEvent</see>
       </desc>
     </const>
     <const name="OnEventSourceChange" value="62">
       <desc>
-        <see>IEventSourceChangeEvent</see>
+        <see>IEventSourceChangedEvent</see>
       </desc>
     </const>
@@ -14977,5 +14150,5 @@
 
   <interface
-      name="IMachineStateChangeEvent" extends="IMachineEvent"
+      name="IMachineStateChangedEvent" extends="IMachineEvent"
       uuid="5748F794-48DF-438D-85EB-98FFD70D18C9"
       wsmap="managed" autogen="VBoxEvent" id="OnMachineStateChange"
@@ -14989,5 +14162,5 @@
 
   <interface
-      name="IMachineDataChangeEvent" extends="IMachineEvent"
+      name="IMachineDataChangedEvent" extends="IMachineEvent"
       uuid="6AA70A6C-0DCA-4810-8C5C-457B278E3D49"
       wsmap="managed" autogen="VBoxEvent" id="OnMachineDataChange"
@@ -15017,5 +14190,5 @@
 
   <interface
-      name="ISessionStateChangeEvent" extends="IMachineEvent"
+      name="ISessionStateChangedEvent" extends="IMachineEvent"
       uuid="714a3eef-799a-4489-86cd-fe8e45b2ff8e"
       wsmap="managed" autogen="VBoxEvent" id="OnSessionStateChange"
@@ -15034,5 +14207,5 @@
 
   <interface
-      name="IGuestPropertyChangeEvent" extends="IMachineEvent"
+      name="IGuestPropertyChangedEvent" extends="IMachineEvent"
       uuid="3f63597a-26f1-4edb-8dd2-6bddd0912368"
       wsmap="managed" autogen="VBoxEvent" id="OnGuestPropertyChange"
@@ -15105,5 +14278,5 @@
 
   <interface
-     name="ISnapshotChangeEvent" extends="ISnapshotEvent"
+     name="ISnapshotChangedEvent" extends="ISnapshotEvent"
      uuid="07541941-8079-447a-a33e-47a69c7980db"
      wsmap="managed" autogen="VBoxEvent" id="OnSnapshotChange"
@@ -15116,5 +14289,5 @@
 
   <interface
-     name="IMousePointerShapeChangeEvent" extends="IEvent"
+     name="IMousePointerShapeChangedEvent" extends="IEvent"
      uuid="a6dcf6e8-416b-4181-8c4a-45ec95177aef"
      wsmap="managed" autogen="VBoxEvent" id="OnMousePointerShapeChange"
@@ -15189,5 +14362,5 @@
 
   <interface
-     name="IMouseCapabilityChangeEvent" extends="IEvent"
+     name="IMouseCapabilityChangedEvent" extends="IEvent"
      uuid="d633ad48-820c-4207-b46c-6bd3596640d5"
      wsmap="managed" autogen="VBoxEvent" id="OnMouseCapabilityChange"
@@ -15215,5 +14388,5 @@
 
   <interface
-     name="IKeyboardLedsChangeEvent" extends="IEvent"
+     name="IKeyboardLedsChangedEvent" extends="IEvent"
      uuid="6DDEF35E-4737-457B-99FC-BC52C851A44F"
      wsmap="managed" autogen="VBoxEvent" id="OnKeyboardLedsChange"
@@ -15241,5 +14414,5 @@
 
   <interface
-     name="IStateChangeEvent" extends="IEvent"
+     name="IStateChangedEvent" extends="IEvent"
      uuid="4376693C-CF37-453B-9289-3B0F521CAF27"
      wsmap="managed" autogen="VBoxEvent" id="OnStateChange"
@@ -15257,5 +14430,5 @@
 
   <interface
-     name="IAdditionsStateChangeEvent" extends="IEvent"
+     name="IAdditionsStateChangedEvent" extends="IEvent"
      uuid="D70F7915-DA7C-44C8-A7AC-9F173490446A"
      wsmap="managed" autogen="VBoxEvent" id="OnAdditionsStateChange"
@@ -15269,5 +14442,5 @@
 
   <interface
-     name="INetworkAdapterChangeEvent" extends="IEvent"
+     name="INetworkAdapterChangedEvent" extends="IEvent"
      uuid="08889892-1EC6-4883-801D-77F56CFD0103"
      wsmap="managed" autogen="VBoxEvent" id="OnNetworkAdapterChange"
@@ -15287,5 +14460,5 @@
 
   <interface
-     name="ISerialPortChangeEvent" extends="IEvent"
+     name="ISerialPortChangedEvent" extends="IEvent"
      uuid="3BA329DC-659C-488B-835C-4ECA7AE71C6C"
      wsmap="managed" autogen="VBoxEvent" id="OnSerialPortChange"
@@ -15305,5 +14478,5 @@
 
   <interface
-     name="IParallelPortChangeEvent" extends="IEvent"
+     name="IParallelPortChangedEvent" extends="IEvent"
      uuid="813C99FC-9849-4F47-813E-24A75DC85615"
      wsmap="managed" autogen="VBoxEvent" id="OnParallelPortChange"
@@ -15323,5 +14496,5 @@
 
   <interface
-     name="IStorageControllerChangeEvent" extends="IEvent"
+     name="IStorageControllerChangedEvent" extends="IEvent"
      uuid="715212BF-DA59-426E-8230-3831FAA52C56"
      wsmap="managed" autogen="VBoxEvent" id="OnStorageControllerChange"
@@ -15335,5 +14508,5 @@
 
   <interface
-     name="IMediumChangeEvent" extends="IEvent"
+     name="IMediumChangedEvent" extends="IEvent"
      uuid="0FE2DA40-5637-472A-9736-72019EABD7DE"
      wsmap="managed" autogen="VBoxEvent" id="OnMediumChange"
@@ -15352,5 +14525,5 @@
 
    <interface
-     name="ICPUChangeEvent" extends="IEvent"
+     name="ICPUChangedEvent" extends="IEvent"
      uuid="D0F0BECC-EE17-4D17-A8CC-383B0EB55E9D"
      wsmap="managed" autogen="VBoxEvent" id="OnCPUChange"
@@ -15372,5 +14545,5 @@
 
   <interface
-     name="IVRDPServerChangeEvent" extends="IEvent"
+     name="IVRDPServerChangedEvent" extends="IEvent"
      uuid="726038B6-6279-4A7A-8037-D041693D1915"
      wsmap="managed" autogen="VBoxEvent" id="OnVRDPServerChange"
@@ -15385,5 +14558,5 @@
 
    <interface
-     name="IRemoteDisplayInfoChangeEvent" extends="IEvent"
+     name="IRemoteDisplayInfoChangedEvent" extends="IEvent"
      uuid="65B556C5-2A99-47D8-B311-FC177F0914CD"
      wsmap="managed" autogen="VBoxEvent" id="OnRemoteDisplayInfoChange"
@@ -15397,5 +14570,5 @@
 
   <interface
-     name="IUSBControllerChangeEvent" extends="IEvent"
+     name="IUSBControllerChangedEvent" extends="IEvent"
      uuid="93BADC0C-61D9-4940-A084-E6BB29AF3D83"
      wsmap="managed" autogen="VBoxEvent" id="OnUSBControllerChange"
@@ -15410,5 +14583,5 @@
 
   <interface
-     name="IUSBDeviceStateChangeEvent" extends="IEvent"
+     name="IUSBDeviceStateChangedEvent" extends="IEvent"
      uuid="806da61b-6679-422a-b629-51b06b0c6d93"
      wsmap="managed" autogen="VBoxEvent" id="OnUSBDeviceStateChange"
@@ -15451,5 +14624,5 @@
 
    <interface
-     name="ISharedFolderChangeEvent" extends="IEvent"
+     name="ISharedFolderChangedEvent" extends="IEvent"
      uuid="B66349B5-3534-4239-B2DE-8E1535D94C0B"
      wsmap="managed" autogen="VBoxEvent" id="OnSharedFolderChange"
@@ -15548,5 +14721,5 @@
 
    <interface
-     name="IEventSourceChangeEvent" extends="IEvent"
+     name="IEventSourceChangedEvent" extends="IEvent"
      uuid="e7932cb8-f6d4-4ab6-9cbf-558eb8959a6a"
      waitable="yes"
@@ -15571,5 +14744,5 @@
 
   <interface
-      name="IExtraDataChangeEvent" extends="IEvent"
+      name="IExtraDataChangedEvent" extends="IEvent"
       uuid="024F00CE-6E0B-492A-A8D0-968472A94DC7"
       wsmap="managed" autogen="VBoxEvent" id="OnExtraDataChange"
@@ -15734,5 +14907,4 @@
            namespace="virtualbox.org">
       <interface name="IVirtualBox" default="yes"/>
-      <eventsink name="IVirtualBoxCallback" default="yes"/>
     </class>
   </module>
@@ -15747,12 +14919,4 @@
            namespace="virtualbox.org">
       <interface name="IConsole" default="yes"/>
-      <eventsink name="IConsoleCallback" default="yes"/>
-    </class>
-
-    <class name="CallbackWrapper" uuid="0AD9C4CE-3C33-4C2D-AC7B-B008196787A0"
-           namespace="virtualbox.org">
-      <interface name="ILocalOwner" default="yes"/>
-      <interface name="IVirtualBoxCallback"/>
-      <interface name="IConsoleCallback"/>
     </class>
   </module>
Index: /trunk/src/VBox/Main/idl/midl.xsl
===================================================================
--- /trunk/src/VBox/Main/idl/midl.xsl	(revision 30824)
+++ /trunk/src/VBox/Main/idl/midl.xsl	(revision 30825)
@@ -838,3 +838,2 @@
 
 </xsl:stylesheet>
-
Index: /trunk/src/VBox/Main/include/ConsoleImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/ConsoleImpl.h	(revision 30824)
+++ /trunk/src/VBox/Main/include/ConsoleImpl.h	(revision 30825)
@@ -36,5 +36,4 @@
 class AudioSniffer;
 class ConsoleVRDPServer;
-class ConsoleCallbackRegistration;      /* See ConsoleImpl.cpp. */
 class VMMDev;
 class Progress;
@@ -84,6 +83,4 @@
 #ifdef RT_OS_WINDOWS
     , public CComCoClass<Console, &CLSID_Console>
-    , public IConnectionPointContainerImpl<Console>
-    , public IConnectionPointImpl<Console, &IID_IConsoleCallback, CComDynamicUnkArray>
 #endif
 {
@@ -104,11 +101,4 @@
         COM_INTERFACE_ENTRY(IConnectionPointContainer)
     END_COM_MAP()
-
-#ifdef RT_OS_WINDOWS
-    BEGIN_CONNECTION_POINT_MAP(Console)
-         CONNECTION_POINT_ENTRY(IID_IConsoleCallback)
-    END_CONNECTION_POINT_MAP()
-#endif
-
 
     Console();
@@ -163,6 +153,4 @@
     STDMETHOD(RestoreSnapshot)(ISnapshot *aSnapshot, IProgress **aProgress);
     STDMETHOD(Teleport)(IN_BSTR aHostname, ULONG aPort, IN_BSTR aPassword, ULONG aMaxDowntime, IProgress **aProgress);
-    STDMETHOD(RegisterCallback)(IConsoleCallback *aCallback);
-    STDMETHOD(UnregisterCallback)(IConsoleCallback *aCallback);
 
     // public methods for internal purposes only
@@ -682,7 +670,4 @@
     ComObjPtr<Progress> mptrCancelableProgress;
 
-    typedef std::list<ConsoleCallbackRegistration> CallbackList;
-    CallbackList mCallbacks;
-
     struct
     {
@@ -733,8 +718,4 @@
     mCallbackData;
 
-#ifdef RT_OS_WINDOWS
-    ComEventsHelper                     mComEvHelper;
-#endif
-
     friend struct VMTask;
 };
Index: unk/src/VBox/Main/include/VirtualBoxCallbackImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/VirtualBoxCallbackImpl.h	(revision 30824)
+++ 	(revision )
@@ -1,101 +1,0 @@
-/*
- * Copyright (C) 2009-2010 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-#ifndef ____H_VIRTUALBOXCALLBACKIMPL
-#define ____H_VIRTUALBOXCALLBACKIMPL
-
-#include "VirtualBoxBase.h"
-#ifdef RT_OS_WINDOWS
-# include "win/resource.h"
-#endif
-
-class ATL_NO_VTABLE CallbackWrapper :
-    public VirtualBoxBase,
-    VBOX_SCRIPTABLE_IMPL(ILocalOwner),
-    VBOX_SCRIPTABLE_IMPL(IConsoleCallback),
-    VBOX_SCRIPTABLE_IMPL(IVirtualBoxCallback)
-#ifdef RT_OS_WINDOWS
-    , public CComCoClass<CallbackWrapper, &CLSID_CallbackWrapper>
-#endif
-{
-public:
-
-    VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(CallbackWrapper, IVirtualBoxCallback)
-
-    DECLARE_CLASSFACTORY()
-
-    DECLARE_REGISTRY_RESOURCEID(IDR_VIRTUALBOX)
-    DECLARE_NOT_AGGREGATABLE(CallbackWrapper)
-
-    DECLARE_PROTECT_FINAL_CONSTRUCT()
-
-    BEGIN_COM_MAP(CallbackWrapper)
-        COM_INTERFACE_ENTRY2(IDispatch, ILocalOwner)
-        COM_INTERFACE_ENTRY(ISupportErrorInfo)
-        COM_INTERFACE_ENTRY(ILocalOwner)
-        COM_INTERFACE_ENTRY(IVirtualBoxCallback)
-        COM_INTERFACE_ENTRY(IConsoleCallback)
-    END_COM_MAP()
-
-    HRESULT FinalConstruct();
-    void FinalRelease();
-
-    // public initializers/uninitializers only for internal purposes
-    HRESULT init();
-    void uninit(bool aFinalRelease);
-
-    // ILocalOwner methods
-    STDMETHOD(SetLocalObject)(IUnknown *aLocalObject);
-
-    // IVirtualBoxCallback methods
-    STDMETHOD(OnMachineStateChange)(IN_BSTR machineId, MachineState_T state);
-    STDMETHOD(OnMachineDataChange)(IN_BSTR machineId);
-    STDMETHOD(OnExtraDataCanChange)(IN_BSTR machineId, IN_BSTR key, IN_BSTR value,
-                                    BSTR *error, BOOL *changeAllowed);
-    STDMETHOD(OnExtraDataChange)(IN_BSTR machineId, IN_BSTR key, IN_BSTR value);
-    STDMETHOD(OnMediumRegistered)(IN_BSTR mediaId, DeviceType_T mediaType,
-                                  BOOL registered);
-    STDMETHOD(OnMachineRegistered)(IN_BSTR machineId, BOOL registered);
-    STDMETHOD(OnSessionStateChange)(IN_BSTR machineId, SessionState_T state);
-    STDMETHOD(OnSnapshotTaken)(IN_BSTR aMachineId, IN_BSTR aSnapshotId);
-    STDMETHOD(OnSnapshotDeleted)(IN_BSTR aMachineId, IN_BSTR aSnapshotId);
-    STDMETHOD(OnSnapshotChange)(IN_BSTR aMachineId, IN_BSTR aSnapshotId);
-    STDMETHOD(OnGuestPropertyChange)(IN_BSTR machineId, IN_BSTR key, IN_BSTR value, IN_BSTR flags);
-
-    // IConsoleCallback
-    STDMETHOD(OnMousePointerShapeChange)(BOOL visible, BOOL alpha, ULONG xHot, ULONG yHot,
-                                         ULONG width, ULONG height, ComSafeArrayIn(BYTE, shape));
-    STDMETHOD(OnMouseCapabilityChange)(BOOL supportsAbsolute, BOOL supportsRelative, BOOL needsHostCursor);
-    STDMETHOD(OnKeyboardLedsChange)(BOOL fNumLock, BOOL fCapsLock, BOOL fScrollLock);
-    STDMETHOD(OnStateChange)(MachineState_T machineState);
-    STDMETHOD(OnAdditionsStateChange)();
-    STDMETHOD(OnNetworkAdapterChange)(INetworkAdapter *aNetworkAdapter);
-    STDMETHOD(OnSerialPortChange)(ISerialPort *aSerialPort);
-    STDMETHOD(OnParallelPortChange)(IParallelPort *aParallelPort);
-    STDMETHOD(OnVRDPServerChange)();
-    STDMETHOD(OnRemoteDisplayInfoChange)();
-    STDMETHOD(OnUSBControllerChange)();
-    STDMETHOD(OnUSBDeviceStateChange)(IUSBDevice *aDevice, BOOL aAttached,
-                                       IVirtualBoxErrorInfo *aError);
-    STDMETHOD(OnSharedFolderChange)(Scope_T aScope);
-    STDMETHOD(OnStorageControllerChange)();
-    STDMETHOD(OnMediumChange)(IMediumAttachment *iMediumAttachment);
-    STDMETHOD(OnCPUChange)(ULONG aCPU, BOOL aRemove);
-    STDMETHOD(OnRuntimeError)(BOOL fFatal, IN_BSTR id, IN_BSTR message);
-    STDMETHOD(OnCanShowWindow)(BOOL *canShow);
-    STDMETHOD(OnShowWindow)(ULONG64 *winId);
-
-private:
-    ComPtr<IVirtualBoxCallback> mVBoxCallback;
-    ComPtr<IConsoleCallback>    mConsoleCallback;
-};
-#endif // ____H_VIRTUALBOXCALLBACKIMPL
Index: /trunk/src/VBox/Main/include/VirtualBoxImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/VirtualBoxImpl.h	(revision 30824)
+++ /trunk/src/VBox/Main/include/VirtualBoxImpl.h	(revision 30825)
@@ -61,6 +61,4 @@
 #ifdef RT_OS_WINDOWS
     , public CComCoClass<VirtualBox, &CLSID_VirtualBox>
-    , public IConnectionPointContainerImpl<VirtualBox>
-    , public IConnectionPointImpl<VirtualBox, &IID_IVirtualBoxCallback, CComDynamicUnkArray>
 #endif
 {
@@ -68,5 +66,4 @@
 public:
 
-    typedef std::list< VirtualBoxCallbackRegistration > CallbackList;
     typedef std::list< ComPtr<IInternalSessionControl> > InternalControlList;
 
@@ -89,12 +86,4 @@
         COM_INTERFACE_ENTRY(IConnectionPointContainer)
     END_COM_MAP()
-
-#ifdef RT_OS_WINDOWS
-    BEGIN_CONNECTION_POINT_MAP(VirtualBox)
-         CONNECTION_POINT_ENTRY(IID_IVirtualBoxCallback)
-    END_CONNECTION_POINT_MAP()
-
-    typedef CComDynamicUnkArray EventListenersList;
-#endif
 
     // to postpone generation of the default ctor/dtor
@@ -174,7 +163,4 @@
     STDMETHOD(OpenExistingSession) (ISession *aSession, IN_BSTR aMachineId);
 
-    STDMETHOD(RegisterCallback) (IVirtualBoxCallback *aCallback);
-    STDMETHOD(UnregisterCallback) (IVirtualBoxCallback *aCallback);
-
     STDMETHOD(WaitForPropertyChange) (IN_BSTR aWhat, ULONG aTimeout,
                                       BSTR *aChanged, BSTR *aValues);
@@ -217,6 +203,4 @@
     void updateClientWatcher();
 
-    void removeDeadCallback(const ComPtr<IVirtualBoxCallback> &aCallback);
-
     void onMachineStateChange(const Guid &aId, MachineState_T aState);
     void onMachineDataChange(const Guid &aId);
Index: /trunk/src/VBox/Main/xpcom/module.cpp
===================================================================
--- /trunk/src/VBox/Main/xpcom/module.cpp	(revision 30824)
+++ /trunk/src/VBox/Main/xpcom/module.cpp	(revision 30825)
@@ -45,5 +45,4 @@
 #include "ConsoleImpl.h"
 #include "ConsoleVRDPServer.h"
-#include "VirtualBoxCallbackImpl.h"
 
 #include "Logging.h"
@@ -78,6 +77,4 @@
 NS_DECL_CLASSINFO(Console)
 NS_IMPL_THREADSAFE_ISUPPORTS1_CI(Console, IConsole)
-NS_DECL_CLASSINFO(CallbackWrapper)
-NS_IMPL_THREADSAFE_ISUPPORTS3_CI(CallbackWrapper, IVirtualBoxCallback, IConsoleCallback, ILocalOwner)
 
 /**
@@ -135,7 +132,4 @@
 NS_GENERIC_FACTORY_CONSTRUCTOR_WITH_RC (Session)
 
-NS_GENERIC_FACTORY_CONSTRUCTOR_WITH_RC (CallbackWrapper)
-
-
 /**
  *  Component definition table.
@@ -157,16 +151,4 @@
         &NS_CLASSINFO_NAME(Session) // global class info & flags
     },
-    {
-        "CallbackWrapper component", // description
-        NS_CALLBACKWRAPPER_CID, NS_CALLBACKWRAPPER_CONTRACTID, // CID/ContractID
-        CallbackWrapperConstructor, // constructor function
-        NULL, // registration function
-        NULL, // deregistration function
-        NULL, // destructor function
-        NS_CI_INTERFACE_GETTER_NAME(CallbackWrapper), // interfaces function
-        NULL, // language helper
-        &NS_CLASSINFO_NAME(CallbackWrapper) // global class info & flags
-    }
-
 };
 
