Changeset 46820 in vbox for trunk/src/VBox/Main
- Timestamp:
- Jun 27, 2013 7:58:37 AM (11 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/HostNetworkInterfaceImpl.h
r43538 r46820 7 7 8 8 /* 9 * Copyright (C) 2006-201 2Oracle Corporation9 * Copyright (C) 2006-2013 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 79 79 80 80 HRESULT setVirtualBox(VirtualBox *pVBox); 81 #ifdef VBOX_WITH_RESOURCE_USAGE_API 81 82 void registerMetrics(PerformanceCollector *aCollector, ComPtr<IUnknown> objptr); 82 83 void unregisterMetrics(PerformanceCollector *aCollector, ComPtr<IUnknown> objptr); 84 #endif 83 85 84 86 private: -
trunk/src/VBox/Main/include/SharedFolderImpl.h
r44528 r46820 5 5 6 6 /* 7 * Copyright (C) 2006-201 1Oracle Corporation7 * Copyright (C) 2006-2013 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 100 100 101 101 /* weak parents (only one of them is not null) */ 102 #if !defined(VBOX_COM_INPROC) 102 103 Machine * const mMachine; 104 VirtualBox * const mVirtualBox; 105 #else 103 106 Console * const mConsole; 104 VirtualBox * const mVirtualBox; 107 #endif 105 108 106 109 struct Data; // opaque data struct, defined in SharedFolderImpl.cpp -
trunk/src/VBox/Main/src-all/ExtPackManagerImpl.cpp
r44529 r46820 46 46 #include "ProgressImpl.h" 47 47 #include "SystemPropertiesImpl.h" 48 #if !defined(VBOX_COM_INPROC) 48 49 #include "VirtualBoxImpl.h" 50 #endif 49 51 50 52 … … 81 83 }; 82 84 85 #if !defined(VBOX_COM_INPROC) 83 86 /** 84 87 * Private extension pack data. … … 102 105 RTMEMEF_NEW_AND_DELETE_OPERATORS(); 103 106 }; 107 #endif 104 108 105 109 /** … … 151 155 /** The list of installed extension packs. */ 152 156 ExtPackList llInstalledExtPacks; 157 #if !defined(VBOX_COM_INPROC) 153 158 /** Pointer to the VirtualBox object, our parent. */ 154 159 VirtualBox *pVirtualBox; 160 #endif 155 161 /** The current context. */ 156 162 VBOXEXTPACKCTX enmContext; … … 163 169 }; 164 170 171 #if !defined(VBOX_COM_INPROC) 165 172 /** 166 173 * Extension pack installation job. … … 706 713 } 707 714 715 #endif 708 716 709 717 … … 1884 1892 m->strBaseDir = szBaseDir; 1885 1893 m->strCertificatDirPath = szCertificatDir; 1894 #if !defined(VBOX_COM_INPROC) 1886 1895 m->pVirtualBox = a_pVirtualBox; 1896 #endif 1887 1897 m->enmContext = a_enmContext; 1888 1898 … … 2029 2039 } 2030 2040 2041 #if !defined(VBOX_COM_INPROC) 2031 2042 STDMETHODIMP ExtPackManager::OpenExtPackFile(IN_BSTR a_bstrTarballAndDigest, IExtPackFile **a_ppExtPackFile) 2032 2043 { … … 2117 2128 return hrc; 2118 2129 } 2130 #endif 2119 2131 2120 2132 STDMETHODIMP ExtPackManager::Cleanup(void) … … 2449 2461 } 2450 2462 2463 #if !defined(VBOX_COM_INPROC) 2451 2464 /** 2452 2465 * Refreshes the specified extension pack. … … 2849 2862 } 2850 2863 } 2864 #endif 2851 2865 2852 2866 /** … … 2876 2890 } 2877 2891 2892 #if !defined(VBOX_COM_INPROC) 2878 2893 /** 2879 2894 * Calls the pfnVMCreated hook for all working extension packs. … … 2894 2909 (*it)->callVmCreatedHook(m->pVirtualBox, a_pMachine, &autoLock); 2895 2910 } 2911 #endif 2896 2912 2897 2913 /** -
trunk/src/VBox/Main/src-all/ProgressImpl.cpp
r45367 r46820 28 28 #include "ProgressImpl.h" 29 29 30 #include "VirtualBoxImpl.h" 30 #if !defined(VBOX_COM_INPROC) 31 # include "VirtualBoxImpl.h" 32 #endif 31 33 #include "VirtualBoxErrorInfoImpl.h" 32 34 -
trunk/src/VBox/Main/src-all/SharedFolderImpl.cpp
r44528 r46820 5 5 6 6 /* 7 * Copyright (C) 2006-201 1Oracle Corporation7 * Copyright (C) 2006-2013 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 17 17 18 18 #include "SharedFolderImpl.h" 19 #include "VirtualBoxImpl.h" 20 #include "MachineImpl.h" 19 #if !defined(VBOX_COM_INPROC) 20 # include "VirtualBoxImpl.h" 21 # include "MachineImpl.h" 22 #endif 21 23 #include "ConsoleImpl.h" 22 24 … … 51 53 SharedFolder::SharedFolder() 52 54 : mParent(NULL), 55 #if !defined(VBOX_COM_INPROC) 53 56 mMachine(NULL), 54 mConsole(NULL),55 57 mVirtualBox(NULL) 58 #else 59 mConsole(NULL) 60 #endif 56 61 { 57 62 m = new Data; … … 78 83 ///////////////////////////////////////////////////////////////////////////// 79 84 85 #if !defined(VBOX_COM_INPROC) 80 86 /** 81 87 * Initializes the shared folder object. … … 148 154 } 149 155 156 # if 0 157 158 /** 159 * Initializes the shared folder object. 160 * 161 * This variant initializes a global instance that lives in the server address space. It is not presently used. 162 * 163 * @param aVirtualBox VirtualBox parent object 164 * @param aName logical name of the shared folder 165 * @param aHostPath full path to the shared folder on the host 166 * @param aWritable writable if true, readonly otherwise 167 * @param fFailOnError Whether to fail with an error if the shared folder path is bad. 168 * 169 * @return COM result indicator 170 */ 171 HRESULT SharedFolder::init(VirtualBox *aVirtualBox, 172 const Utf8Str &aName, 173 const Utf8Str &aHostPath, 174 bool aWritable, 175 bool aAutoMount, 176 bool fFailOnError) 177 { 178 /* Enclose the state transition NotReady->InInit->Ready */ 179 AutoInitSpan autoInitSpan(this); 180 AssertReturn(autoInitSpan.isOk(), E_FAIL); 181 182 unconst(mVirtualBox) = aVirtualBox; 183 184 HRESULT rc = protectedInit(aVirtualBox, aName, aHostPath, aWritable, aAutoMount); 185 186 /* Confirm a successful initialization when it's the case */ 187 if (SUCCEEDED(rc)) 188 autoInitSpan.setSucceeded(); 189 190 return rc; 191 } 192 193 # endif 194 195 #else 196 150 197 /** 151 198 * Initializes the shared folder object. … … 182 229 return rc; 183 230 } 184 185 #if 0186 187 /**188 * Initializes the shared folder object.189 *190 * This variant initializes a global instance that lives in the server address space. It is not presently used.191 *192 * @param aVirtualBox VirtualBox parent object193 * @param aName logical name of the shared folder194 * @param aHostPath full path to the shared folder on the host195 * @param aWritable writable if true, readonly otherwise196 * @param fFailOnError Whether to fail with an error if the shared folder path is bad.197 *198 * @return COM result indicator199 */200 HRESULT SharedFolder::init(VirtualBox *aVirtualBox,201 const Utf8Str &aName,202 const Utf8Str &aHostPath,203 bool aWritable,204 bool aAutoMount,205 bool fFailOnError)206 {207 /* Enclose the state transition NotReady->InInit->Ready */208 AutoInitSpan autoInitSpan(this);209 AssertReturn(autoInitSpan.isOk(), E_FAIL);210 211 unconst(mVirtualBox) = aVirtualBox;212 213 HRESULT rc = protectedInit(aVirtualBox, aName, aHostPath, aWritable, aAutoMount);214 215 /* Confirm a successful initialization when it's the case */216 if (SUCCEEDED(rc))217 autoInitSpan.setSucceeded();218 219 return rc;220 }221 222 231 #endif 223 232 … … 305 314 unconst(mParent) = NULL; 306 315 316 #if !defined(VBOX_COM_INPROC) 307 317 unconst(mMachine) = NULL; 318 unconst(mVirtualBox) = NULL; 319 #else 308 320 unconst(mConsole) = NULL; 309 unconst(mVirtualBox) = NULL; 321 #endif 310 322 } 311 323 -
trunk/src/VBox/Main/src-server/BandwidthControlImpl.cpp
r42551 r46820 5 5 6 6 /* 7 * Copyright (C) 2006-201 2Oracle Corporation7 * Copyright (C) 2006-2013 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 26 26 27 27 #include <iprt/cpp/utils.h> 28 #include <VBox/com/array.h> 29 #include <algorithm> 28 30 29 31 // defines -
trunk/src/VBox/Main/src-server/HostImpl.cpp
r46434 r46820 5 5 6 6 /* 7 * Copyright (C) 2004-201 2Oracle Corporation7 * Copyright (C) 2004-2013 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 158 158 159 159 #include "VBox/com/MultiResult.h" 160 #include "VBox/com/array.h" 160 161 161 162 #include <stdio.h> … … 2894 2895 listCopy = list; 2895 2896 HostNetworkInterfaceList::iterator itOld, itNew; 2897 # ifdef VBOX_WITH_RESOURCE_USAGE_API 2896 2898 PerformanceCollector *aCollector = m->pParent->performanceCollector(); 2899 # endif 2897 2900 for (itOld = m->llNetIfs.begin(); itOld != m->llNetIfs.end(); ++itOld) 2898 2901 { … … 2912 2915 } 2913 2916 if (fGone) 2917 { 2918 # ifdef VBOX_WITH_RESOURCE_USAGE_API 2914 2919 (*itOld)->unregisterMetrics(aCollector, this); 2920 # endif 2921 } 2915 2922 } 2916 2923 /* … … 2932 2939 } 2933 2940 else if (t == HostNetworkInterfaceType_Bridged) 2941 { 2942 # ifdef VBOX_WITH_RESOURCE_USAGE_API 2934 2943 (*itNew)->registerMetrics(aCollector, this); 2944 # endif 2945 } 2935 2946 } 2936 2947 m->llNetIfs = list; … … 3171 3182 } 3172 3183 3184 #endif /* VBOX_WITH_RESOURCE_USAGE_API */ 3185 3173 3186 3174 3187 /* static */ … … 3186 3199 } 3187 3200 3188 #endif /* VBOX_WITH_RESOURCE_USAGE_API */3189 3190 3201 /* vi: set tabstop=4 shiftwidth=4 expandtab: */ -
trunk/src/VBox/Main/src-server/HostNetworkInterfaceImpl.cpp
r44039 r46820 7 7 8 8 /* 9 * Copyright (C) 2006-201 2Oracle Corporation9 * Copyright (C) 2006-2013 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 22 22 #include "Logging.h" 23 23 #include "netif.h" 24 #include "Performance.h" 25 #include "PerformanceImpl.h" 24 #ifdef VBOX_WITH_RESOURCE_USAGE_API 25 # include "Performance.h" 26 # include "PerformanceImpl.h" 27 #endif 26 28 27 29 #include <iprt/cpp/utils.h> … … 86 88 return S_OK; 87 89 } 90 91 #ifdef VBOX_WITH_RESOURCE_USAGE_API 88 92 89 93 void HostNetworkInterface::registerMetrics(PerformanceCollector *aCollector, ComPtr<IUnknown> objptr) … … 140 144 aCollector->unregisterBaseMetricsFor(objptr, name); 141 145 } 146 147 #endif /* VBOX_WITH_RESOURCE_USAGE_API */ 142 148 143 149 #ifdef VBOX_WITH_HOSTNETIF_API -
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r46816 r46820 252 252 ///////////////////////////////////////////////////////////////////////////// 253 253 254 Machine::Machine() 255 : mCollectorGuest(NULL), 256 mPeer(NULL), 257 mParent(NULL), 258 mSerialPorts(), 259 mParallelPorts(), 260 uRegistryNeedsSaving(0) 254 Machine::Machine() : 255 #ifdef VBOX_WITH_RESOURCE_USAGE_API 256 mCollectorGuest(NULL), 257 #endif 258 mPeer(NULL), 259 mParent(NULL), 260 mSerialPorts(), 261 mParallelPorts(), 262 uRegistryNeedsSaving(0) 261 263 {} 262 264 … … 12582 12584 AutoMultiWriteLock3 multilock(mParent, mParent->host(), this COMMA_LOCKVAL_SRC_POS); 12583 12585 12584 #if 0 12585 // Trigger async cleanup tasks, avoid doing things here which are not 12586 // vital to be done immediately and maybe need more locks. This calls 12587 // Machine::unregisterMetrics(). 12588 mParent->onMachineUninit(mPeer); 12589 #else 12586 #ifdef VBOX_WITH_RESOURCE_USAGE_API 12590 12587 /* 12591 12588 * It is safe to call Machine::unregisterMetrics() here because … … 12594 12591 */ 12595 12592 unregisterMetrics(mParent->performanceCollector(), mPeer); 12596 #endif12597 12593 /* The guest must be unregistered after its metrics (@bugref{5949}). */ 12598 12594 LogAleksey(("{%p} " LOG_FN_FMT ": mCollectorGuest=%p\n", … … 12604 12600 mCollectorGuest = NULL; 12605 12601 } 12602 #endif 12606 12603 12607 12604 if (aReason == Uninit::Abnormal) … … 12797 12794 ULONG aVmNetRx, ULONG aVmNetTx) 12798 12795 { 12796 #ifdef VBOX_WITH_RESOURCE_USAGE_API 12799 12797 if (mCollectorGuest) 12800 12798 mCollectorGuest->updateStats(aValidStats, aCpuUser, aCpuKernel, aCpuIdle, … … 12804 12802 12805 12803 return S_OK; 12804 #else 12805 NOREF(aValidStats); 12806 NOREF(aCpuUser); 12807 NOREF(aCpuKernel); 12808 NOREF(aCpuIdle); 12809 NOREF(aMemTotal); 12810 NOREF(aMemFree); 12811 NOREF(aMemBalloon); 12812 NOREF(aMemShared); 12813 NOREF(aMemCache); 12814 NOREF(aPageTotal); 12815 NOREF(aAllocVMM); 12816 NOREF(aFreeVMM); 12817 NOREF(aBalloonedVMM); 12818 NOREF(aSharedVMM); 12819 NOREF(aVmNetRx); 12820 NOREF(aVmNetTx); 12821 return E_NOTIMPL; 12822 #endif 12806 12823 } 12807 12824 -
trunk/src/VBox/Main/src-server/NATEngineImpl.cpp
r45185 r46820 5 5 6 6 /* 7 * Copyright (C) 2010-201 2Oracle Corporation7 * Copyright (C) 2010-2013 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 27 27 #include <VBox/err.h> 28 28 #include <VBox/settings.h> 29 #include <VBox/com/array.h> 29 30 30 31 -
trunk/src/VBox/Main/src-server/USBControllerImpl.cpp
r45367 r46820 5 5 6 6 /* 7 * Copyright (C) 2005-201 2Oracle Corporation7 * Copyright (C) 2005-2013 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 34 34 #include <VBox/err.h> 35 35 #include <VBox/settings.h> 36 #include <VBox/com/array.h> 36 37 37 38 #include <algorithm> -
trunk/src/VBox/Main/src-server/VRDEServerImpl.cpp
r46610 r46820 30 30 #include <VBox/err.h> 31 31 #include <VBox/sup.h> 32 #include <VBox/com/array.h> 32 33 33 34 #include <VBox/RemoteDesktop/VRDE.h>
Note:
See TracChangeset
for help on using the changeset viewer.