Changeset 23223 in vbox for trunk/include
- Timestamp:
- Sep 22, 2009 3:50:03 PM (15 years ago)
- Location:
- trunk/include
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/com/VirtualBoxErrorInfo.h
r22173 r23223 7 7 8 8 /* 9 * Copyright (C) 2008 Sun Microsystems, Inc.9 * Copyright (C) 2008-2009 Sun Microsystems, Inc. 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 56 56 */ 57 57 class ATL_NO_VTABLE VirtualBoxErrorInfo 58 #if !defined (VBOX_WITH_XPCOM)59 58 : public CComObjectRootEx <CComMultiThreadModel> 60 #else61 : public CComObjectRootEx62 #endif63 59 , public IVirtualBoxErrorInfo 64 60 { … … 73 69 COM_INTERFACE_ENTRY (IVirtualBoxErrorInfo) 74 70 END_COM_MAP() 75 76 NS_DECL_ISUPPORTS77 71 78 72 VirtualBoxErrorInfo() : mResultCode (S_OK) {} … … 127 121 */ 128 122 class ATL_NO_VTABLE VirtualBoxErrorInfoGlue 129 #if !defined (VBOX_WITH_XPCOM)130 123 : public CComObjectRootEx <CComMultiThreadModel> 131 #else132 : public CComObjectRootEx133 #endif134 124 , public IVirtualBoxErrorInfo 135 125 { … … 144 134 COM_INTERFACE_ENTRY (IVirtualBoxErrorInfo) 145 135 END_COM_MAP() 146 147 NS_DECL_ISUPPORTS148 136 149 137 VirtualBoxErrorInfoGlue() {} -
trunk/include/VBox/com/defs.h
r22305 r23223 84 84 /* these are XPCOM only, one for every interface implemented */ 85 85 #define NS_DECL_ISUPPORTS 86 #define NS_DECL_IVIRTUALBOX87 #define NS_DECL_IMACHINECOLLECTION88 #define NS_DECL_IMACHINE89 86 90 87 /** Returns @c true if @a rc represents a warning result code */ … … 245 242 #define DECLARE_REGISTRY_RESOURCEID(a) 246 243 #define DECLARE_NOT_AGGREGATABLE(a) 247 #define DECLARE_PROTECT_FINAL_CONSTRUCT( a)244 #define DECLARE_PROTECT_FINAL_CONSTRUCT() 248 245 #define BEGIN_COM_MAP(a) 249 246 #define COM_INTERFACE_ENTRY(a) 250 247 #define COM_INTERFACE_ENTRY2(a,b) 251 #define END_COM_MAP( a)248 #define END_COM_MAP() NS_DECL_ISUPPORTS 252 249 253 250 #define HRESULT nsresult … … 339 336 #define COM_IIDOF(I) NS_GET_IID (I) 340 337 341 /* Twovery simple ATL emulator classes to provide338 /* A few very simple ATL emulator classes to provide 342 339 * FinalConstruct()/FinalRelease() functionality on Linux. */ 343 340 344 class CComObjectRootEx 341 class CComMultiThreadModel 342 { 343 }; 344 345 template <class Base> class CComObjectRootEx : public Base 345 346 { 346 347 public: -
trunk/include/VBox/com/ptr.h
r22708 r23223 84 84 static void addref(C *p) 85 85 { 86 int cRefs = p->AddRef(); 87 LOGREF("ADDREF ", p, cRefs); 86 p->AddRef(); 88 87 } 89 88 static void release(C *p) 90 89 { 91 int cRefs = p->Release(); 92 LOGREF("RELEASE", p, cRefs); 90 p->Release(); 93 91 } 94 92 }; -
trunk/include/VBox/settings.h
r23179 r23223 175 175 bool fAutoReset; // optional, only for diffs, default is false 176 176 PropertiesMap properties; 177 HardDiskType_ThdType;177 MediumType_T hdType; 178 178 179 179 MediaList llChildren; // only used with hard disks … … 274 274 }; 275 275 276 struct DVDDrive277 {278 DVDDrive()279 : fPassThrough(false)280 {}281 282 bool fPassThrough;283 com::Guid uuid; // if != NULL, UUID of mounted ISO image284 com::Utf8Str strHostDriveSrc; // if != NULL, value of <HostDrive>/@src285 };286 287 struct FloppyDrive288 {289 FloppyDrive()290 : fEnabled(true)291 {}292 293 bool fEnabled; // optional, defaults to true294 com::Guid uuid; // if != NULL, UUID of mounted ISO image295 com::Utf8Str strHostDriveSrc; // if != NULL, value of <HostDrive>/@src296 };297 298 276 struct USBController 299 277 { … … 435 413 bool fAccelerate3D, 436 414 fAccelerate2DVideo; // requires settings version 1.8 (VirtualBox 3.1) 437 uint32_t cFirmwareType; // ditto415 FirmwareType_T firmwareType; // requires settings version 1.9 (VirtualBox 3.1) 438 416 439 417 VRDPSettings vrdpSettings; 440 418 441 419 BIOSSettings biosSettings; 442 DVDDrive dvdDrive;443 FloppyDrive floppyDrive;444 420 USBController usbController; 445 421 NetworkAdaptersList llNetworkAdapters; … … 460 436 }; 461 437 438 /** 439 * A device attached to a storage controller. This can either be a 440 * hard disk or a DVD drive or a floppy drive and also specifies 441 * which medium is "in" the drive; as a result, this is a combination 442 * of the Main IMedium and IMediumAttachment interfaces. 443 */ 462 444 struct AttachedDevice 463 445 { 464 446 AttachedDevice() 465 : type(HardDisk), 447 : deviceType(DeviceType_Null), 448 fPassThrough(false), 466 449 lPort(0), 467 450 lDevice(0) 468 451 {} 469 452 470 enum { HardDisk } type; // @todo: implement DVD attachments here 453 DeviceType_T deviceType; // only HardDisk, DVD or Floppy are allowed 454 455 // DVDs can be in pass-through mode: 456 bool fPassThrough; 457 471 458 int32_t lPort; 472 459 int32_t lDevice; 460 461 // if an image file is attached to the device (ISO, RAW, or hard disk image such as VDI), 462 // this is its UUID; it depends on deviceType which media registry this then needs to 463 // be looked up in. If no image file (only permitted for DVDs and floppies), then the UUID is NULL 473 464 com::Guid uuid; 465 466 // for DVDs and floppies, the attachment can also be a host device: 467 com::Utf8Str strHostDriveSrc; // if != NULL, value of <HostDrive>/@src 474 468 }; 475 469 typedef std::list<AttachedDevice> AttachedDevicesList; … … 541 535 void readHardDiskAttachments_pre1_7(const xml::ElementNode &elmHardDiskAttachments, Storage &strg); 542 536 void readStorageControllers(const xml::ElementNode &elmStorageControllers, Storage &strg); 537 void readDVDAndFloppies_pre1_9(const xml::ElementNode &elmHardware, Storage &strg); 543 538 void readSnapshot(const xml::ElementNode &elmSnapshot, Snapshot &snap); 544 539 void readMachine(const xml::ElementNode &elmMachine); 545 540 546 void writeHardware(xml::ElementNode &elmParent, const Hardware &hw );541 void writeHardware(xml::ElementNode &elmParent, const Hardware &hw, const Storage &strg); 547 542 void writeStorageControllers(xml::ElementNode &elmParent, const Storage &st); 548 543 void writeSnapshot(xml::ElementNode &elmParent, const Snapshot &snap); -
trunk/include/iprt/ministring_cpp.h
r22173 r23223 212 212 } 213 213 214 /** 215 * Appends a copy of @a that to "this". 216 * @param that 217 */ 218 MiniString& append(const MiniString &that) 219 { 220 size_t cbThis = length(); 221 size_t cbThat = that.length(); 222 223 if (cbThat) 224 { 225 size_t cbBoth = cbThis + cbThat + 1; 226 227 reserve(cbBoth); 228 // calls realloc(cbBoth) and sets m_cbAllocated 229 230 memcpy(m_psz + cbThis, that.m_psz, cbThat); 231 m_psz[cbThis + cbThat] = '\0'; 232 m_cbLength = cbBoth - 1; 233 } 234 return *this; 235 } 214 MiniString& append(const MiniString &that); 215 MiniString& append(char c); 236 216 237 217 /**
Note:
See TracChangeset
for help on using the changeset viewer.