- Timestamp:
- Jan 18, 2008 5:37:39 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 27325
- Location:
- trunk
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/shflsvc.h
r6379 r6382 943 943 HGCMFunctionParameter mapping; 944 944 945 /** bool, in: Writable946 * True (default) if the folder is writable.947 */948 949 945 } VBoxSFAddMapping; 950 946 951 #define SHFL_CPARMS_ADD_MAPPING ( 3)947 #define SHFL_CPARMS_ADD_MAPPING (2) 952 948 953 949 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r6379 r6382 592 592 RTPrintf("VBoxManage sharedfolder add <vmname>|<uuid>\n" 593 593 " -name <name> -hostpath <hostpath>\n" 594 " [-transient] [-readonly]\n"594 " [-transient]\n" 595 595 "\n"); 596 596 } … … 1907 1907 CHECK_ERROR_RET(sfEnum, GetNext(sf.asOutParam()), rc); 1908 1908 Bstr name, hostPath; 1909 BOOL writable;1910 1909 sf->COMGETTER(Name)(name.asOutParam()); 1911 1910 sf->COMGETTER(HostPath)(hostPath.asOutParam()); 1912 sf->COMGETTER(Writable)(&writable);1913 1911 if (!numSharedFolders && details != VMINFO_MACHINEREADABLE) 1914 1912 RTPrintf("\n\n"); … … 1921 1919 } 1922 1920 else 1923 RTPrintf("Name: '%lS', Host path: '%lS' (machine mapping), %s\n", 1924 name.raw(), hostPath.raw(), writable ? "writable" : "readonly"); 1921 RTPrintf("Name: '%lS', Host path: '%lS' (machine mapping)\n", name.raw(), hostPath.raw()); 1925 1922 ++numSharedFolders; 1926 1923 CHECK_ERROR_RET(sfEnum, HasMore(&fMore), rc); … … 7025 7022 char *hostpath = NULL; 7026 7023 bool fTransient = false; 7027 bool fWritable = true;7028 7024 7029 7025 for (int i = 2; i < argc; i++) … … 7046 7042 i++; 7047 7043 hostpath = argv[i]; 7048 } 7049 else if (strcmp(argv[i], "-readonly") == 0) 7050 { 7051 fWritable = false; 7044 7052 7045 } 7053 7046 else if (strcmp(argv[i], "-transient") == 0) … … 7078 7071 CHECK_ERROR_RET(aSession, COMGETTER(Console)(console.asOutParam()), 1); 7079 7072 7080 CHECK_ERROR(console, CreateSharedFolder(Bstr(name), Bstr(hostpath) , fWritable));7073 CHECK_ERROR(console, CreateSharedFolder(Bstr(name), Bstr(hostpath))); 7081 7074 7082 7075 if (console) … … 7091 7084 aSession->COMGETTER(Machine)(machine.asOutParam()); 7092 7085 7093 CHECK_ERROR(machine, CreateSharedFolder(Bstr(name), Bstr(hostpath) , fWritable));7086 CHECK_ERROR(machine, CreateSharedFolder(Bstr(name), Bstr(hostpath))); 7094 7087 7095 7088 if (SUCCEEDED(rc)) -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxSharedFoldersSettings.ui
r6379 r6382 241 241 <function returnType="int">dialogType() {return mDialogType;}</function> 242 242 <function access="private">removeSharedFolder( const QString &, const QString &, VBoxSharedFoldersSettings::SFDialogType )</function> 243 <function access="private">createSharedFolder( const QString &, const QString &, bool,VBoxSharedFoldersSettings::SFDialogType )</function>243 <function access="private">createSharedFolder( const QString &, const QString &, VBoxSharedFoldersSettings::SFDialogType )</function> 244 244 <function>getFromGlobal()</function> 245 245 <function>getFromMachine( const CMachine & )</function> -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxSharedFoldersSettings.ui.h
r6379 r6382 404 404 void VBoxSharedFoldersSettings::createSharedFolder (const QString & aName, 405 405 const QString & aPath, 406 bool aWritable,407 406 SFDialogType aType) 408 407 { … … 418 417 { 419 418 Assert (!mMachine.isNull()); 420 mMachine.CreateSharedFolder (aName, aPath , aWritable);419 mMachine.CreateSharedFolder (aName, aPath); 421 420 if (!mMachine.isOk()) 422 421 vboxProblem().cannotCreateSharedFolder (this, mMachine, … … 427 426 { 428 427 Assert (!mConsole.isNull()); 429 mConsole.CreateSharedFolder (aName, aPath , aWritable);428 mConsole.CreateSharedFolder (aName, aPath); 430 429 if (!mConsole.isOk()) 431 430 vboxProblem().cannotCreateSharedFolder (this, mConsole, … … 574 573 if (item && !item->getText (0).isNull() && !item->getText (1).isNull() 575 574 && item->getText (2) == "edited") 576 createSharedFolder (item->getText (0), item->getText (1), t rue, type);575 createSharedFolder (item->getText (0), item->getText (1), type); 577 576 iterator = iterator->nextSibling(); 578 577 } -
trunk/src/VBox/HostServices/SharedFolders/mappings.cpp
r6379 r6382 28 28 * 29 29 */ 30 int vbsfMappingsAdd (PSHFLSTRING pFolderName, PSHFLSTRING pMapName , uint32_t fWritable)30 int vbsfMappingsAdd (PSHFLSTRING pFolderName, PSHFLSTRING pMapName) 31 31 { 32 32 int i; … … 73 73 FolderMapping[i].fValid = true; 74 74 FolderMapping[i].cMappings = 0; 75 FolderMapping[i].fWritable = fWritable;76 75 77 76 /* Check if the host file system is case sensitive */ … … 233 232 } 234 233 235 int vbsfMappingsQueryWritable (SHFLCLIENTDATA *pClient, SHFLROOT root, bool *fWritable)236 {237 int rc = VINF_SUCCESS;238 239 LogFlow(("vbsfMappingsQueryWritable: pClient = %p, root = %d\n",240 pClient, root));241 242 if (root >= SHFL_MAX_MAPPINGS)243 return VERR_INVALID_PARAMETER;244 245 if (FolderMapping[root].fValid == true)246 *fWritable = FolderMapping[root].fWritable;247 else248 rc = VERR_FILE_NOT_FOUND;249 250 LogFlow(("vbsfMappingsQuery:Writable return rc = %Vrc\n", rc));251 252 return rc;253 }254 255 234 static int vbsfQueryMappingIndex (PRTUTF16 utf16Name, size_t *pIndex) 256 235 { -
trunk/src/VBox/HostServices/SharedFolders/mappings.h
r6379 r6382 31 31 bool fHostCaseSensitive; 32 32 bool fGuestCaseSensitive; 33 bool fWritable;34 33 } MAPPING, *PMAPPING; 35 34 … … 38 37 bool vbsfMappingQuery(uint32_t iMapping, PMAPPING *pMapping); 39 38 40 int vbsfMappingsAdd (PSHFLSTRING pFolderName, PSHFLSTRING pMapName , uint32_t fWritable);39 int vbsfMappingsAdd (PSHFLSTRING pFolderName, PSHFLSTRING pMapName); 41 40 int vbsfMappingsRemove (PSHFLSTRING pMapName); 42 41 43 42 int vbsfMappingsQuery (SHFLCLIENTDATA *pClient, SHFLMAPPING *pMappings, uint32_t *pcMappings); 44 43 int vbsfMappingsQueryName (SHFLCLIENTDATA *pClient, SHFLROOT root, SHFLSTRING *pString); 45 int vbsfMappingsQueryWritable (SHFLCLIENTDATA *pClient, SHFLROOT root, bool *fWritable);46 44 47 45 int vbsfMapFolder (SHFLCLIENTDATA *pClient, PSHFLSTRING pszMapName, RTUCS2 delimiter, bool fCaseSensitive, SHFLROOT *pRoot); -
trunk/src/VBox/HostServices/SharedFolders/service.cpp
r6379 r6382 1097 1097 else if ( paParms[0].type != VBOX_HGCM_SVC_PARM_PTR /* host folder name */ 1098 1098 || paParms[1].type != VBOX_HGCM_SVC_PARM_PTR /* guest map name */ 1099 || paParms[2].type != VBOX_HGCM_SVC_PARM_32BIT /* fWritable */1100 1099 ) 1101 1100 { … … 1109 1108 SHFLSTRING *pMapName = (SHFLSTRING *)paParms[1].u.pointer.addr; 1110 1109 uint32_t cbStringMap = paParms[1].u.pointer.size; 1111 uint32_t fWritable = paParms[2].u.uint32;1112 1110 1113 1111 /* Verify parameters values. */ … … 1123 1121 { 1124 1122 /* Execute the function. */ 1125 rc = vbsfMappingsAdd (pFolderName, pMapName , fWritable);1123 rc = vbsfMappingsAdd (pFolderName, pMapName); 1126 1124 1127 1125 if (VBOX_SUCCESS(rc)) -
trunk/src/VBox/HostServices/SharedFolders/vbsf.cpp
r6379 r6382 1018 1018 } 1019 1019 } 1020 1021 /* write access requested? */1022 if (pParms->CreateFlags & ( SHFL_CF_ACT_REPLACE_IF_EXISTS1023 | SHFL_CF_ACT_OVERWRITE_IF_EXISTS1024 | SHFL_CF_ACT_CREATE_IF_NEW1025 | SHFL_CF_ACCESS_WRITE))1026 {1027 /* is the guest allowed to write to this share? */1028 bool fWritable;1029 rc = vbsfMappingsQueryWritable (pClient, root, &fWritable);1030 if (RT_FAILURE(rc) || !fWritable)1031 return VERR_WRITE_PROTECT;1032 }1033 1034 1020 if (BIT_FLAG(pParms->CreateFlags, SHFL_CF_DIRECTORY)) 1035 1021 { -
trunk/src/VBox/Main/ConsoleImpl.cpp
r6381 r6382 882 882 vrc = SSMR3PutStrZ (pSSM, hostPath); 883 883 AssertRC (vrc); 884 885 // XXX886 // vrc = SSMR3PutBool (pSSM, folder->writable());887 // AssertRC (vrc);888 884 } 889 885 … … 957 953 ComObjPtr <SharedFolder> sharedFolder; 958 954 sharedFolder.createObject(); 959 HRESULT rc = sharedFolder->init (that, name, hostPath , true); /* TODO: fWritable */955 HRESULT rc = sharedFolder->init (that, name, hostPath); 960 956 AssertComRCReturn (rc, VERR_INTERNAL_ERROR); 961 957 … … 1319 1315 for (SharedFolderMap::const_iterator it = mSharedFolders.begin(); 1320 1316 it != mSharedFolders.end(); ++ it) 1321 sharedFolders [it->first] = SharedFolderData(it->second->hostPath(), it->second->writable());1317 sharedFolders [it->first] = it->second->hostPath(); 1322 1318 } 1323 1319 … … 1995 1991 1996 1992 STDMETHODIMP 1997 Console::CreateSharedFolder (INPTR BSTR aName, INPTR BSTR aHostPath , BOOL aWritable)1993 Console::CreateSharedFolder (INPTR BSTR aName, INPTR BSTR aHostPath) 1998 1994 { 1999 1995 if (!aName || !aHostPath) … … 2023 2019 2024 2020 sharedFolder.createObject(); 2025 rc = sharedFolder->init (this, aName, aHostPath , aWritable);2021 rc = sharedFolder->init (this, aName, aHostPath); 2026 2022 CheckComRCReturnRC (rc); 2027 2023 … … 2051 2047 2052 2048 /* second, create the given folder */ 2053 rc = createSharedFolder (aName, SharedFolderData (aHostPath, aWritable));2049 rc = createSharedFolder (aName, aHostPath); 2054 2050 CheckComRCReturnRC (rc); 2055 2051 } … … 4199 4195 Bstr name; 4200 4196 Bstr hostPath; 4201 BOOL writable;4202 4197 4203 4198 rc = folder->COMGETTER(Name) (name.asOutParam()); … … 4205 4200 rc = folder->COMGETTER(HostPath) (hostPath.asOutParam()); 4206 4201 CheckComRCBreakRC (rc); 4207 rc = folder->COMGETTER(Writable) (&writable); 4208 4209 mMachineSharedFolders.insert (std::make_pair (name, SharedFolderData (hostPath, writable))); 4202 4203 mMachineSharedFolders.insert (std::make_pair (name, hostPath)); 4210 4204 4211 4205 /* send changes to HGCM if the VM is running */ … … 4214 4208 { 4215 4209 SharedFolderDataMap::iterator it = oldFolders.find (name); 4216 if (it == oldFolders.end() || it->second .mHostPath!= hostPath)4210 if (it == oldFolders.end() || it->second != hostPath) 4217 4211 { 4218 4212 /* a new machine folder is added or … … 4229 4223 rc = removeSharedFolder (name); 4230 4224 /* create the new machine folder */ 4231 rc = createSharedFolder (name, SharedFolderData (hostPath, writable));4225 rc = createSharedFolder (name, hostPath); 4232 4226 } 4233 4227 } … … 4308 4302 * @note Doesn't lock anything. 4309 4303 */ 4310 HRESULT Console::createSharedFolder (INPTR BSTR aName, SharedFolderData aData)4304 HRESULT Console::createSharedFolder (INPTR BSTR aName, INPTR BSTR aHostPath) 4311 4305 { 4312 4306 ComAssertRet (aName && *aName, E_FAIL); 4313 ComAssertRet (a Data.mHostPath && *aData.mHostPath, E_FAIL);4307 ComAssertRet (aHostPath && *aHostPath, E_FAIL); 4314 4308 4315 4309 /* sanity checks */ … … 4317 4311 AssertReturn (mVMMDev->isShFlActive(), E_FAIL); 4318 4312 4319 VBOXHGCMSVCPARM parms[ SHFL_CPARMS_ADD_MAPPING];4313 VBOXHGCMSVCPARM parms[2]; 4320 4314 SHFLSTRING *pFolderName, *pMapName; 4321 4315 size_t cbString; 4322 4316 4323 Log (("Adding shared folder '%ls' -> '%ls'\n", aName, a Data.mHostPath.raw()));4324 4325 cbString = (RTStrUcs2Len (a Data.mHostPath) + 1) * sizeof (RTUCS2);4317 Log (("Adding shared folder '%ls' -> '%ls'\n", aName, aHostPath)); 4318 4319 cbString = (RTStrUcs2Len (aHostPath) + 1) * sizeof (RTUCS2); 4326 4320 if (cbString >= UINT16_MAX) 4327 4321 return setError (E_INVALIDARG, tr ("The name is too long")); 4328 4322 pFolderName = (SHFLSTRING *) RTMemAllocZ (sizeof (SHFLSTRING) + cbString); 4329 4323 Assert (pFolderName); 4330 memcpy (pFolderName->String.ucs2, a Data.mHostPath, cbString);4324 memcpy (pFolderName->String.ucs2, aHostPath, cbString); 4331 4325 4332 4326 pFolderName->u16Size = (uint16_t)cbString; … … 4354 4348 parms[1].u.pointer.size = sizeof (SHFLSTRING) + (uint16_t)cbString; 4355 4349 4356 parms[2].type = VBOX_HGCM_SVC_PARM_32BIT;4357 parms[2].u.uint32 = aData.mWritable;4358 4359 4350 int vrc = mVMMDev->hgcmHostCall ("VBoxSharedFolders", 4360 4351 SHFL_FN_ADD_MAPPING, 4361 SHFL_CPARMS_ADD_MAPPING, &parms[0]);4352 2, &parms[0]); 4362 4353 RTMemFree (pFolderName); 4363 4354 RTMemFree (pMapName); … … 4367 4358 tr ("Could not create a shared folder '%ls' " 4368 4359 "mapped to '%ls' (%Vrc)"), 4369 aName, a Data.mHostPath.raw(), vrc);4360 aName, aHostPath, vrc); 4370 4361 4371 4362 return S_OK; -
trunk/src/VBox/Main/MachineImpl.cpp
r6379 r6382 2372 2372 2373 2373 STDMETHODIMP 2374 Machine::CreateSharedFolder (INPTR BSTR aName, INPTR BSTR aHostPath , BOOL aWritable)2374 Machine::CreateSharedFolder (INPTR BSTR aName, INPTR BSTR aHostPath) 2375 2375 { 2376 2376 if (!aName || !aHostPath) … … 2392 2392 2393 2393 sharedFolder.createObject(); 2394 rc = sharedFolder->init (machine(), aName, aHostPath , aWritable);2394 rc = sharedFolder->init (machine(), aName, aHostPath); 2395 2395 CheckComRCReturnRC (rc); 2396 2396 … … 4314 4314 Bstr hostPath = (*it).stringValue ("hostPath"); 4315 4315 4316 bool writable = (*it).value <bool> ("writable"); 4317 4318 rc = CreateSharedFolder (name, hostPath, writable); 4316 rc = CreateSharedFolder (name, hostPath); 4319 4317 CheckComRCReturnRC (rc); 4320 4318 } … … 5663 5661 folderNode.setValue <Bstr> ("name", folder->name()); 5664 5662 folderNode.setValue <Bstr> ("hostPath", folder->hostPath()); 5665 folderNode.setValue <bool> ("writable", folder->writable());5666 5663 } 5667 5664 } -
trunk/src/VBox/Main/SharedFolderImpl.cpp
r6379 r6382 58 58 * @param aName logical name of the shared folder 59 59 * @param aHostPath full path to the shared folder on the host 60 * @param aWritable writable if true, readonly otherwise61 60 * 62 61 * @return COM result indicator 63 62 */ 64 63 HRESULT SharedFolder::init (Machine *aMachine, 65 const BSTR aName, const BSTR aHostPath , bool aWritable)64 const BSTR aName, const BSTR aHostPath) 66 65 { 67 66 /* Enclose the state transition NotReady->InInit->Ready */ … … 71 70 unconst (mMachine) = aMachine; 72 71 73 HRESULT rc = protectedInit (aMachine, aName, aHostPath , aWritable);72 HRESULT rc = protectedInit (aMachine, aName, aHostPath); 74 73 75 74 /* Confirm a successful initialization when it's the case */ … … 101 100 102 101 HRESULT rc = protectedInit (aMachine, aThat->mData.mName, 103 aThat->mData.mHostPath , aThat->mData.mWritable);102 aThat->mData.mHostPath); 104 103 105 104 /* Confirm a successful initialization when it's the case */ … … 116 115 * @param aName logical name of the shared folder 117 116 * @param aHostPath full path to the shared folder on the host 118 * @param aWritable writable if true, readonly otherwise119 117 * 120 118 * @return COM result indicator 121 119 */ 122 120 HRESULT SharedFolder::init (Console *aConsole, 123 const BSTR aName, const BSTR aHostPath , bool aWritable)121 const BSTR aName, const BSTR aHostPath) 124 122 { 125 123 /* Enclose the state transition NotReady->InInit->Ready */ … … 129 127 unconst (mConsole) = aConsole; 130 128 131 HRESULT rc = protectedInit (aConsole, aName, aHostPath , aWritable);129 HRESULT rc = protectedInit (aConsole, aName, aHostPath); 132 130 133 131 /* Confirm a successful initialization when it's the case */ … … 144 142 * @param aName logical name of the shared folder 145 143 * @param aHostPath full path to the shared folder on the host 146 * @param aWritable writable if true, readonly otherwise147 144 * 148 145 * @return COM result indicator 149 146 */ 150 147 HRESULT SharedFolder::init (VirtualBox *aVirtualBox, 151 const BSTR aName, const BSTR aHostPath , bool aWritable)148 const BSTR aName, const BSTR aHostPath) 152 149 { 153 150 /* Enclose the state transition NotReady->InInit->Ready */ … … 157 154 unconst (mVirtualBox) = aVirtualBox; 158 155 159 HRESULT rc = protectedInit (aVirtualBox, aName, aHostPath , aWritable);156 HRESULT rc = protectedInit (aVirtualBox, aName, aHostPath); 160 157 161 158 /* Confirm a successful initialization when it's the case */ … … 173 170 */ 174 171 HRESULT SharedFolder::protectedInit (VirtualBoxBaseWithChildrenNEXT *aParent, 175 const BSTR aName, const BSTR aHostPath, bool aWritable) 176 { 177 LogFlowThisFunc (("aName={%ls}, aHostPath={%ls}, aWritable={%d}\n", 178 aName, aHostPath, aWritable)); 172 const BSTR aName, const BSTR aHostPath) 173 { 174 LogFlowThisFunc (("aName={%ls}, aHostPath={%ls}\n", aName, aHostPath)); 179 175 180 176 ComAssertRet (aParent && aName && aHostPath, E_INVALIDARG); … … 220 216 unconst (mData.mName) = aName; 221 217 unconst (mData.mHostPath) = hostPath; 222 mData.mWritable = aWritable;223 218 224 219 return S_OK; … … 312 307 } 313 308 314 STDMETHODIMP SharedFolder::COMGETTER(Writable) (BOOL *aWritable)315 {316 if (!aWritable)317 return E_POINTER;318 319 *aWritable = mData.mWritable;320 321 return S_OK;322 } -
trunk/src/VBox/Main/VirtualBoxImpl.cpp
r6379 r6382 1575 1575 1576 1576 STDMETHODIMP 1577 VirtualBox::CreateSharedFolder (INPTR BSTR aName, INPTR BSTR aHostPath , BOOL aWritable)1577 VirtualBox::CreateSharedFolder (INPTR BSTR aName, INPTR BSTR aHostPath) 1578 1578 { 1579 1579 if (!aName || !aHostPath) -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r6379 r6382 1573 1573 <desc>Full path to the shared folder in the host file system.</desc> 1574 1574 </param> 1575 <param name="writable" type="boolean" dir="in">1576 <desc>Whether the share is writable or readonly</desc>1577 </param>1578 1575 </method> 1579 1576 … … 3049 3046 <desc>Full path to the shared folder in the host file system.</desc> 3050 3047 </param> 3051 <param name="writable" type="boolean" dir="in">3052 <desc>Whether the share is writable or readonly</desc>3053 </param>3054 3048 </method> 3055 3049 … … 3907 3901 <param name="hostPath" type="wstring" dir="in"> 3908 3902 <desc>Full path to the shared folder in the host file system.</desc> 3909 </param>3910 <param name="writable" type="boolean" dir="in">3911 <desc>Whether the share is writable or readonly</desc>3912 3903 </param> 3913 3904 </method> … … 9046 9037 </desc> 9047 9038 </attribute> 9048 9049 <attribute name="writable" type="boolean" readonly="yes">9050 <desc>9051 Whether the folder defined by the host path is writable or9052 not.9053 </desc>9054 </attribute>9055 9039 9056 9040 </interface> -
trunk/src/VBox/Main/include/ConsoleImpl.h
r6379 r6382 134 134 STDMETHOD(AttachUSBDevice) (INPTR GUIDPARAM aId); 135 135 STDMETHOD(DetachUSBDevice) (INPTR GUIDPARAM aId, IUSBDevice **aDevice); 136 STDMETHOD(CreateSharedFolder) (INPTR BSTR aName, INPTR BSTR aHostPath , BOOL aWritable);136 STDMETHOD(CreateSharedFolder) (INPTR BSTR aName, INPTR BSTR aHostPath); 137 137 STDMETHOD(RemoveSharedFolder) (INPTR BSTR aName); 138 138 STDMETHOD(TakeSnapshot) (INPTR BSTR aName, INPTR BSTR aDescription, … … 353 353 typedef SafeVMPtrBase <true> SafeVMPtrQuiet; 354 354 355 class SharedFolderData356 {357 public:358 SharedFolderData() {}359 SharedFolderData(Bstr aHostPath, BOOL aWritable)360 : mHostPath (aHostPath)361 , mWritable (aWritable) {}362 SharedFolderData(const SharedFolderData& aThat)363 : mHostPath (aThat.mHostPath)364 , mWritable (aThat.mWritable) {}365 Bstr mHostPath;366 BOOL mWritable;367 };368 355 typedef std::map <Bstr, ComObjPtr <SharedFolder> > SharedFolderMap; 369 typedef std::map <Bstr, SharedFolderData> SharedFolderDataMap;356 typedef std::map <Bstr, Bstr> SharedFolderDataMap; 370 357 371 358 private: … … 399 386 SharedFolderDataMap::const_iterator &aIt); 400 387 401 HRESULT createSharedFolder (INPTR BSTR aName, SharedFolderData aData);388 HRESULT createSharedFolder (INPTR BSTR aName, INPTR BSTR aHostPath); 402 389 HRESULT removeSharedFolder (INPTR BSTR aName); 403 390 -
trunk/src/VBox/Main/include/MachineImpl.h
r6379 r6382 498 498 STDMETHOD(FindSnapshot) (INPTR BSTR aName, ISnapshot **aSnapshot); 499 499 STDMETHOD(SetCurrentSnapshot) (INPTR GUIDPARAM aId); 500 STDMETHOD(CreateSharedFolder) (INPTR BSTR aName, INPTR BSTR aHostPath , BOOL aWritable);500 STDMETHOD(CreateSharedFolder) (INPTR BSTR aName, INPTR BSTR aHostPath); 501 501 STDMETHOD(RemoveSharedFolder) (INPTR BSTR aName); 502 502 STDMETHOD(CanShowConsoleWindow) (BOOL *aCanShow); -
trunk/src/VBox/Main/include/SharedFolderImpl.h
r6379 r6382 41 41 const Bstr mName; 42 42 const Bstr mHostPath; 43 bool mWritable;44 43 }; 45 44 … … 63 62 64 63 // public initializer/uninitializer for internal purposes only 65 HRESULT init (Machine *aMachine, const BSTR aName, const BSTR aHostPath , bool aWritable);64 HRESULT init (Machine *aMachine, const BSTR aName, const BSTR aHostPath); 66 65 HRESULT initCopy (Machine *aMachine, SharedFolder *aThat); 67 HRESULT init (Console *aConsole, const BSTR aName, const BSTR aHostPath , bool aWritable);68 HRESULT init (VirtualBox *aVirtualBox, const BSTR aName, const BSTR aHostPath , bool aWritable);66 HRESULT init (Console *aConsole, const BSTR aName, const BSTR aHostPath); 67 HRESULT init (VirtualBox *aVirtualBox, const BSTR aName, const BSTR aHostPath); 69 68 void uninit(); 70 69 … … 73 72 STDMETHOD(COMGETTER(HostPath)) (BSTR *aHostPath); 74 73 STDMETHOD(COMGETTER(Accessible)) (BOOL *aAccessible); 75 STDMETHOD(COMGETTER(Writable)) (BOOL *aWritable);76 74 77 75 // public methods for internal purposes only … … 83 81 const Bstr &name() const { return mData.mName; } 84 82 const Bstr &hostPath() const { return mData.mHostPath; } 85 BOOL writable() const { return mData.mWritable; }86 83 87 84 // for VirtualBoxSupportErrorInfoImpl … … 91 88 92 89 HRESULT protectedInit (VirtualBoxBaseWithChildrenNEXT *aParent, 93 const BSTR aName, const BSTR aHostPath , bool aWritable);90 const BSTR aName, const BSTR aHostPath); 94 91 95 92 private: -
trunk/src/VBox/Main/include/VirtualBoxImpl.h
r6379 r6382 161 161 162 162 STDMETHOD(GetGuestOSType) (INPTR BSTR aId, IGuestOSType **aType); 163 STDMETHOD(CreateSharedFolder) (INPTR BSTR aName, INPTR BSTR aHostPath , BOOL aWritable);163 STDMETHOD(CreateSharedFolder) (INPTR BSTR aName, INPTR BSTR aHostPath); 164 164 STDMETHOD(RemoveSharedFolder) (INPTR BSTR aName); 165 165 STDMETHOD(GetNextExtraDataKey) (INPTR BSTR aKey, BSTR *aNextKey, BSTR *aNextValue); -
trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd
r6379 r6382 630 630 <xsd:attribute name="name" type="TNonEmptyString" use="required"/> 631 631 <xsd:attribute name="hostPath" type="TLocalFile" use="required"/> 632 <xsd:attribute name="writable" type="xsd:boolean" default="true"/>633 632 </xsd:complexType> 634 633
Note:
See TracChangeset
for help on using the changeset viewer.