Changeset 2567 in vbox for trunk/src/VBox/Main/include
- Timestamp:
- May 9, 2007 4:38:24 PM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 21034
- Location:
- trunk/src/VBox/Main/include
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/DVDImageImpl.h
r1 r2567 26 26 #include "Collection.h" 27 27 28 #include <iprt/path.h> 29 28 30 class VirtualBox; 29 31 30 32 class ATL_NO_VTABLE DVDImage : 33 public VirtualBoxBaseNEXT, 31 34 public VirtualBoxSupportErrorInfoImpl <DVDImage, IDVDImage>, 32 35 public VirtualBoxSupportTranslation <DVDImage>, 33 public VirtualBoxBase,34 36 public IDVDImage 35 37 { 36 38 public: 37 39 38 // to satisfy the ComObjPtr template (we have const members) 39 DVDImage() {} 40 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT (DVDImage) 40 41 41 42 DECLARE_NOT_AGGREGATABLE(DVDImage) … … 50 51 NS_DECL_ISUPPORTS 51 52 53 DECLARE_EMPTY_CTOR_DTOR (DVDImage) 54 52 55 HRESULT FinalConstruct(); 53 56 void FinalRelease(); 54 57 55 58 // public initializer/uninitializer for internal purposes only 56 HRESULT init (VirtualBox * parent, const BSTR filePath,57 BOOL isRegistered, const Guid &id);59 HRESULT init (VirtualBox *aParent, const BSTR aFilePath, 60 BOOL aRegistered, const Guid &aId); 58 61 void uninit(); 59 62 60 63 // IDVDImage properties 61 STDMETHOD(COMGETTER(Id)) (GUIDPARAMOUT id);62 STDMETHOD(COMGETTER(FilePath)) (BSTR * filePath);63 STDMETHOD(COMGETTER(Accessible)) (BOOL *a ccessible);64 STDMETHOD(COMGETTER(Size)) (ULONG64 *s ize);64 STDMETHOD(COMGETTER(Id)) (GUIDPARAMOUT aId); 65 STDMETHOD(COMGETTER(FilePath)) (BSTR *aFilePath); 66 STDMETHOD(COMGETTER(Accessible)) (BOOL *aAccessible); 67 STDMETHOD(COMGETTER(Size)) (ULONG64 *sSize); 65 68 66 69 // public methods for internal purposes only 70 // (ensure there is a caller and a read lock before calling them!) 67 71 68 72 const Bstr &filePath() { return mImageFile; } … … 78 82 79 83 /** weak parent */ 80 ComObjPtr <VirtualBox, ComWeakRef> mParent;84 const ComObjPtr <VirtualBox, ComWeakRef> mParent; 81 85 82 86 BOOL mAccessible; … … 89 93 COM_DECL_READONLY_ENUM_AND_COLLECTION_BEGIN (DVDImage) 90 94 91 STDMETHOD(FindByPath) (INPTR BSTR path, IDVDImage **dvdImage)95 STDMETHOD(FindByPath) (INPTR BSTR aPath, IDVDImage **aDVDImage) 92 96 { 93 if (! path)97 if (!aPath) 94 98 return E_INVALIDARG; 95 if (! dvdImage)99 if (!aDVDImage) 96 100 return E_POINTER; 97 101 98 *dvdImage = NULL; 102 Utf8Str path = aPath; 103 *aDVDImage = NULL; 99 104 Vector::value_type found; 100 105 Vector::iterator it = vec.begin(); … … 103 108 Bstr filePath; 104 109 (*it)->COMGETTER(FilePath) (filePath.asOutParam()); 105 if ( filePath == path)110 if (RTPathCompare (Utf8Str (filePath), path) == 0) 106 111 found = *it; 107 112 ++ it; … … 110 115 if (!found) 111 116 return setError (E_INVALIDARG, DVDImageCollection::tr ( 112 "The DVD image named '%ls' could not be found"), path);117 "The DVD image named '%ls' could not be found"), aPath); 113 118 114 return found.queryInterfaceTo ( dvdImage);119 return found.queryInterfaceTo (aDVDImage); 115 120 } 116 121 -
trunk/src/VBox/Main/include/FloppyImageImpl.h
r1 r2567 26 26 #include "Collection.h" 27 27 28 #include <iprt/path.h> 29 28 30 class VirtualBox; 29 31 30 32 class ATL_NO_VTABLE FloppyImage : 33 public VirtualBoxBaseNEXT, 31 34 public VirtualBoxSupportErrorInfoImpl <FloppyImage, IFloppyImage>, 32 35 public VirtualBoxSupportTranslation <FloppyImage>, 33 public VirtualBoxBase,34 36 public IFloppyImage 35 37 { 36 38 public: 37 39 38 // to satisfy the ComObjPtr template (we have const members) 39 FloppyImage() {} 40 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT (FloppyImage) 40 41 41 42 DECLARE_NOT_AGGREGATABLE(FloppyImage) … … 50 51 NS_DECL_ISUPPORTS 51 52 53 DECLARE_EMPTY_CTOR_DTOR (FloppyImage) 54 52 55 HRESULT FinalConstruct(); 53 56 void FinalRelease(); 54 57 55 58 // public initializer/uninitializer for internal purposes only 56 HRESULT init (VirtualBox * parent, const BSTR filePath,57 BOOL isRegistered, const Guid &id);59 HRESULT init (VirtualBox *aParent, const BSTR aFilePath, 60 BOOL aRegistered, const Guid &aId); 58 61 void uninit(); 59 62 60 63 // IFloppyImage properties 61 STDMETHOD(COMGETTER(Id)) (GUIDPARAMOUT id);62 STDMETHOD(COMGETTER(FilePath)) (BSTR * filePath);63 STDMETHOD(COMGETTER(Accessible)) (BOOL *a ccessible);64 STDMETHOD(COMGETTER(Size)) (ULONG * size);64 STDMETHOD(COMGETTER(Id)) (GUIDPARAMOUT aId); 65 STDMETHOD(COMGETTER(FilePath)) (BSTR *aFilePath); 66 STDMETHOD(COMGETTER(Accessible)) (BOOL *aAccessible); 67 STDMETHOD(COMGETTER(Size)) (ULONG *aSize); 65 68 66 69 // public methods for internal purposes only 70 // (ensure there is a caller and a read lock before calling them!) 67 71 68 72 const Bstr &filePath() { return mImageFile; } … … 78 82 79 83 /** weak parent */ 80 ComObjPtr <VirtualBox, ComWeakRef> mParent;84 const ComObjPtr <VirtualBox, ComWeakRef> mParent; 81 85 82 86 BOOL mAccessible; … … 89 93 COM_DECL_READONLY_ENUM_AND_COLLECTION_BEGIN (FloppyImage) 90 94 91 STDMETHOD(FindByPath) (INPTR BSTR path, IFloppyImage **floppyImage)95 STDMETHOD(FindByPath) (INPTR BSTR aPath, IFloppyImage **aFloppyImage) 92 96 { 93 if (! path)97 if (!aPath) 94 98 return E_INVALIDARG; 95 if (! floppyImage)99 if (!aFloppyImage) 96 100 return E_POINTER; 97 101 98 *floppyImage = NULL; 102 Utf8Str path = aPath; 103 *aFloppyImage = NULL; 99 104 Vector::value_type found; 100 105 Vector::iterator it = vec.begin(); … … 103 108 Bstr filePath; 104 109 (*it)->COMGETTER(FilePath) (filePath.asOutParam()); 105 if ( filePath == path)110 if (RTPathCompare (Utf8Str (filePath), path) == 0) 106 111 found = *it; 107 112 ++ it; … … 110 115 if (!found) 111 116 return setError (E_INVALIDARG, FloppyImageCollection::tr ( 112 "The floppy image named '%ls' could not be found"), path);117 "The floppy image named '%ls' could not be found"), aPath); 113 118 114 return found.queryInterfaceTo ( floppyImage);119 return found.queryInterfaceTo (aFloppyImage); 115 120 } 116 121 -
trunk/src/VBox/Main/include/GuestImpl.h
r1 r2567 46 46 NS_DECL_ISUPPORTS 47 47 48 DECLARE_EMPTY_CTOR_DTOR (Guest) 49 48 50 HRESULT FinalConstruct(); 49 51 void FinalRelease(); … … 54 56 55 57 // IGuest properties 56 STDMETHOD(COMGETTER(OSType )) (IGuestOSType **aOSType);58 STDMETHOD(COMGETTER(OSTypeId)) (BSTR *aOSTypeId); 57 59 STDMETHOD(COMGETTER(AdditionsActive)) (BOOL *aAdditionsActive); 58 60 STDMETHOD(COMGETTER(AdditionsVersion)) (BSTR *aAdditionsVersion); … … 63 65 64 66 // public methods that are not in IDL 65 void setAdditionsVersion (Bstr version);67 void setAdditionsVersion (Bstr aVersion); 66 68 67 69 // for VirtualBoxSupportErrorInfoImpl … … 74 76 Data() : mAdditionsActive (FALSE) {} 75 77 76 ComPtr <IGuestOSType> mGuestOSType;78 Bstr mOSTypeId; 77 79 BOOL mAdditionsActive; 78 80 Bstr mAdditionsVersion; … … 80 82 81 83 ComObjPtr <Console, ComWeakRef> mParent; 82 Shareable <Data>mData;84 Data mData; 83 85 }; 84 86 -
trunk/src/VBox/Main/include/GuestOSTypeImpl.h
r1721 r2567 29 29 30 30 class ATL_NO_VTABLE GuestOSType : 31 public VirtualBoxBaseNEXT, 31 32 public VirtualBoxSupportErrorInfoImpl <GuestOSType, IGuestOSType>, 32 33 public VirtualBoxSupportTranslation <GuestOSType>, 33 public VirtualBoxBase,34 34 public IGuestOSType 35 35 { 36 36 public: 37 37 38 GuestOSType(); 39 virtual ~GuestOSType(); 38 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT (DVDImage) 40 39 41 40 DECLARE_NOT_AGGREGATABLE(GuestOSType) … … 50 49 NS_DECL_ISUPPORTS 51 50 51 DECLARE_EMPTY_CTOR_DTOR (GuestOSType) 52 53 HRESULT FinalConstruct(); 54 void FinalRelease(); 55 52 56 // public initializer/uninitializer for internal purposes only 53 HRESULT init (const char *id, const char *description, OSType osType, 54 uint32_t ramSize, uint32_t vramSize, uint32_t hddSize); 57 HRESULT init (const char *aId, const char *aDescription, OSType aOSType, 58 uint32_t aRAMSize, uint32_t aVRAMSize, uint32_t aHDDSize); 59 void uninit(); 55 60 56 61 // IGuestOSType properties 57 STDMETHOD(COMGETTER(Id)) (BSTR * id);58 STDMETHOD(COMGETTER(Description)) (BSTR * description);59 STDMETHOD(COMGETTER(RecommendedRAM)) (ULONG * ramSize);60 STDMETHOD(COMGETTER(RecommendedVRAM)) (ULONG * ramSize);61 STDMETHOD(COMGETTER(RecommendedHDD)) (ULONG * hddSize);62 STDMETHOD(COMGETTER(Id)) (BSTR *aId); 63 STDMETHOD(COMGETTER(Description)) (BSTR *aDescription); 64 STDMETHOD(COMGETTER(RecommendedRAM)) (ULONG *aRAMSize); 65 STDMETHOD(COMGETTER(RecommendedVRAM)) (ULONG *aVRAMSize); 66 STDMETHOD(COMGETTER(RecommendedHDD)) (ULONG *aHDDSize); 62 67 63 68 // public methods only for internal purposes … … 69 74 private: 70 75 71 Bstr mID;72 Bstr mDescription;73 OSType mOSType;74 uint32_t mRAMSize;75 uint32_t mVRAMSize;76 uint32_t mHDDSize;77 uint32_t mMonitorCount;76 const Bstr mID; 77 const Bstr mDescription; 78 const OSType mOSType; 79 const uint32_t mRAMSize; 80 const uint32_t mVRAMSize; 81 const uint32_t mHDDSize; 82 const uint32_t mMonitorCount; 78 83 }; 79 84 -
trunk/src/VBox/Main/include/MachineImpl.h
r2540 r2567 214 214 mNameSync == that.mNameSync && 215 215 mDescription == that.mDescription && 216 mOSType .equalsTo (that.mOSType)&&216 mOSTypeId == that.mOSTypeId && 217 217 mSnapshotFolderFull == that.mSnapshotFolderFull); 218 218 } … … 221 221 BOOL mNameSync; 222 222 Bstr mDescription; 223 ComPtr <IGuestOSType> mOSType;223 Bstr mOSTypeId; 224 224 Bstr mSnapshotFolder; 225 225 Bstr mSnapshotFolderFull; … … 314 314 STDMETHOD(COMSETTER(Description))(INPTR BSTR aDescription); 315 315 STDMETHOD(COMGETTER(Id))(GUIDPARAMOUT aId); 316 STDMETHOD(COMGETTER(OSType )) (IGuestOSType **aOSType);317 STDMETHOD(COMSETTER(OSType )) (IGuestOSType *aOSType);316 STDMETHOD(COMGETTER(OSTypeId)) (BSTR *aOSTypeId); 317 STDMETHOD(COMSETTER(OSTypeId)) (INPTR BSTR aOSTypeId); 318 318 STDMETHOD(COMGETTER(MemorySize))(ULONG *memorySize); 319 319 STDMETHOD(COMSETTER(MemorySize))(ULONG memorySize); -
trunk/src/VBox/Main/include/VirtualBoxImpl.h
r2463 r2567 166 166 STDMETHOD(UnregisterFloppyImage) (INPTR GUIDPARAM aId, IFloppyImage **aFloppyImage); 167 167 168 STDMETHOD( FindGuestOSType)(INPTR BSTR aId, IGuestOSType **aType);169 STDMETHOD(CreateSharedFolder) (INPTR BSTR aName, INPTR BSTR aHostPath);170 STDMETHOD(RemoveSharedFolder) (INPTR BSTR aName);171 STDMETHOD(GetNextExtraDataKey) (INPTR BSTR aKey, BSTR *aNextKey, BSTR *aNextValue);172 STDMETHOD(GetExtraData) (INPTR BSTR aKey, BSTR *aValue);173 STDMETHOD(SetExtraData) (INPTR BSTR aKey, INPTR BSTR aValue);168 STDMETHOD(GetGuestOSType) (INPTR BSTR aId, IGuestOSType **aType); 169 STDMETHOD(CreateSharedFolder) (INPTR BSTR aName, INPTR BSTR aHostPath); 170 STDMETHOD(RemoveSharedFolder) (INPTR BSTR aName); 171 STDMETHOD(GetNextExtraDataKey) (INPTR BSTR aKey, BSTR *aNextKey, BSTR *aNextValue); 172 STDMETHOD(GetExtraData) (INPTR BSTR aKey, BSTR *aValue); 173 STDMETHOD(SetExtraData) (INPTR BSTR aKey, INPTR BSTR aValue); 174 174 STDMETHOD(OpenSession) (ISession *aSession, INPTR GUIDPARAM aMachineId); 175 175 STDMETHOD(OpenRemoteSession) (ISession *aSession, INPTR GUIDPARAM aMachineId, 176 176 INPTR BSTR aType, IProgress **aProgress); 177 177 STDMETHOD(OpenExistingSession) (ISession *aSession, INPTR GUIDPARAM aMachineId); 178 STDMETHOD(RegisterCallback) (IVirtualBoxCallback *callback);179 STDMETHOD(UnregisterCallback) (IVirtualBoxCallback *callback);178 STDMETHOD(RegisterCallback) (IVirtualBoxCallback *callback); 179 STDMETHOD(UnregisterCallback) (IVirtualBoxCallback *callback); 180 180 181 181 /* public methods only for internal purposes */ … … 209 209 void onSnapshotChange (const Guid &aMachineId, const Guid &aSnapshotId); 210 210 211 Com Ptr <IGuestOSType> getUnknownOSType();211 ComObjPtr <GuestOSType> getUnknownOSType(); 212 212 213 213 typedef std::vector <ComObjPtr <SessionMachine> > SessionMachineVector;
Note:
See TracChangeset
for help on using the changeset viewer.