Changeset 35722 in vbox for trunk/src/VBox/Frontends/VBoxHeadless
- Timestamp:
- Jan 26, 2011 4:37:16 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 69665
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp
r35446 r35722 99 99 100 100 virtual ~VirtualBoxClientEventListener() 101 { 102 } 103 104 HRESULT init() 105 { 106 return S_OK; 107 } 108 109 void uninit() 101 110 { 102 111 } … … 145 154 146 155 virtual ~VirtualBoxEventListener() 156 { 157 } 158 159 HRESULT init() 160 { 161 return S_OK; 162 } 163 164 void uninit() 147 165 { 148 166 } … … 252 270 253 271 virtual ~ConsoleEventListener() 272 { 273 } 274 275 HRESULT init() 276 { 277 return S_OK; 278 } 279 280 void uninit() 254 281 { 255 282 } … … 763 790 ComPtr<IMachine> machine; 764 791 bool fSessionOpened = false; 765 IEventListener *vboxClientListener = NULL;766 IEventListener *vboxListener = NULL;767 Co nsoleEventListenerImpl *consoleListener = NULL;792 ComPtr<IEventListener> vboxClientListener; 793 ComPtr<IEventListener> vboxListener; 794 ComObjPtr<ConsoleEventListenerImpl> consoleListener; 768 795 769 796 do … … 1001 1028 ComPtr<IEventSource> pES; 1002 1029 CHECK_ERROR(pVirtualBoxClient, COMGETTER(EventSource)(pES.asOutParam())); 1003 vboxClientListener = new VirtualBoxClientEventListenerImpl(); 1030 ComObjPtr<VirtualBoxClientEventListenerImpl> listener; 1031 listener.createObject(); 1032 listener->init(new VirtualBoxClientEventListener()); 1033 vboxClientListener = listener; 1004 1034 com::SafeArray<VBoxEventType_T> eventTypes; 1005 1035 eventTypes.push_back(VBoxEventType_OnVBoxSVCAvailabilityChanged); … … 1011 1041 ComPtr<IEventSource> es; 1012 1042 CHECK_ERROR(console, COMGETTER(EventSource)(es.asOutParam())); 1013 consoleListener = new ConsoleEventListenerImpl(); 1043 consoleListener.createObject(); 1044 consoleListener->init(new ConsoleEventListener()); 1014 1045 com::SafeArray<VBoxEventType_T> eventTypes; 1015 1046 eventTypes.push_back(VBoxEventType_OnMouseCapabilityChanged); … … 1166 1197 ComPtr<IEventSource> es; 1167 1198 CHECK_ERROR(virtualBox, COMGETTER(EventSource)(es.asOutParam())); 1168 vboxListener = new VirtualBoxEventListenerImpl(); 1199 ComObjPtr<VirtualBoxEventListenerImpl> listener; 1200 listener.createObject(); 1201 listener->init(new VirtualBoxEventListener()); 1202 vboxListener = listener; 1169 1203 com::SafeArray<VBoxEventType_T> eventTypes; 1170 1204 eventTypes.push_back(VBoxEventType_OnGuestPropertyChanged);
Note:
See TracChangeset
for help on using the changeset viewer.