Changeset 105018 in vbox for trunk/src/VBox/Main/src-all
- Timestamp:
- Jun 25, 2024 11:06:29 AM (10 months ago)
- svn:sync-xref-src-repo-rev:
- 163636
- Location:
- trunk/src/VBox/Main/src-all
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-all/ConsoleSharedFolderImpl.cpp
r105016 r105018 44 44 Data() 45 45 : fWritable(false), 46 fAutoMount(false), 47 enmSymlinkPolicy(SymlinkPolicy_None) 46 fAutoMount(false) 48 47 { } 49 48 … … 54 53 const Utf8Str strAutoMountPoint; 55 54 Utf8Str strLastAccessError; 56 SymlinkPolicy_T enmSymlinkPolicy;57 55 }; 58 56 … … 307 305 } 308 306 309 HRESULT ConsoleSharedFolder::getSymlinkPolicy(SymlinkPolicy_T *aSymlinkPolicy)310 {311 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);312 *aSymlinkPolicy = m->enmSymlinkPolicy;313 return S_OK;314 }315 316 HRESULT ConsoleSharedFolder::setSymlinkPolicy(SymlinkPolicy_T aSymlinkPolicy)317 {318 RT_NOREF(aSymlinkPolicy);319 return E_NOTIMPL;320 }321 307 322 308 const Utf8Str& ConsoleSharedFolder::i_getName() const … … 345 331 } 346 332 347 const SymlinkPolicy_T ConsoleSharedFolder::i_getSymlinkPolicy() const348 {349 return m->enmSymlinkPolicy;350 }351 352 333 /* vi: set tabstop=4 shiftwidth=4 expandtab: */ -
trunk/src/VBox/Main/src-all/SharedFolderImpl.cpp
r105016 r105018 46 46 Data() 47 47 : fWritable(false), 48 fAutoMount(false), 49 enmSymlinkPolicy(SymlinkPolicy_None) 48 fAutoMount(false) 50 49 { } 51 50 … … 56 55 const Utf8Str strAutoMountPoint; 57 56 Utf8Str strLastAccessError; 58 SymlinkPolicy_T enmSymlinkPolicy;59 57 }; 60 58 … … 111 109 bool aAutoMount, 112 110 const Utf8Str &aAutoMountPoint, 113 bool fFailOnError, 114 SymlinkPolicy_T enmSymlinkPolicy) 111 bool fFailOnError) 115 112 { 116 113 /* Enclose the state transition NotReady->InInit->Ready */ … … 120 117 unconst(mMachine) = aMachine; 121 118 122 HRESULT hrc = i_protectedInit(aMachine, aName, aHostPath, aWritable, aAutoMount, aAutoMountPoint, fFailOnError, 123 enmSymlinkPolicy); 119 HRESULT hrc = i_protectedInit(aMachine, aName, aHostPath, aWritable, aAutoMount, aAutoMountPoint, fFailOnError); 124 120 125 121 /* Confirm a successful initialization when it's the case */ … … 156 152 aThat->m->fAutoMount, 157 153 aThat->m->strAutoMountPoint, 158 false /* fFailOnError */, 159 aThat->m->enmSymlinkPolicy); 154 false /* fFailOnError */ ); 160 155 161 156 /* Confirm a successful initialization when it's the case */ … … 219 214 bool aAutoMount, 220 215 const Utf8Str &aAutoMountPoint, 221 bool fFailOnError, 222 SymlinkPolicy_T enmSymlinkPolicy) 223 { 224 LogFlowThisFunc(("aName={%s}, aHostPath={%s}, aWritable={%d}, aAutoMount={%d} enmSymlinkPolicy={%d}\n", 225 aName.c_str(), aHostPath.c_str(), aWritable, aAutoMount, enmSymlinkPolicy)); 216 bool fFailOnError) 217 { 218 LogFlowThisFunc(("aName={%s}, aHostPath={%s}, aWritable={%d}, aAutoMount={%d}\n", 219 aName.c_str(), aHostPath.c_str(), aWritable, aAutoMount)); 226 220 227 221 ComAssertRet(aParent && aName.isNotEmpty() && aHostPath.isNotEmpty(), E_INVALIDARG); … … 277 271 m->fAutoMount = aAutoMount; 278 272 unconst(m->strAutoMountPoint) = aAutoMountPoint; 279 m->enmSymlinkPolicy = enmSymlinkPolicy;280 273 281 274 return S_OK; … … 392 385 } 393 386 394 HRESULT SharedFolder::getSymlinkPolicy(SymlinkPolicy_T *aSymlinkPolicy)395 {396 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);397 *aSymlinkPolicy = m->enmSymlinkPolicy;398 return S_OK;399 }400 401 HRESULT SharedFolder::setSymlinkPolicy(SymlinkPolicy_T aSymlinkPolicy)402 {403 switch (aSymlinkPolicy)404 {405 case SymlinkPolicy_AllowedToAnyTarget:406 case SymlinkPolicy_AllowedInShareSubtree:407 case SymlinkPolicy_AllowedToRelativeTargets:408 case SymlinkPolicy_Forbidden:409 break;410 default:411 return setError(E_INVALIDARG, tr("The symbolic link policy specified (%d) is invalid."), aSymlinkPolicy);412 }413 414 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);415 m->enmSymlinkPolicy = aSymlinkPolicy;416 return S_OK;417 }418 387 419 388 const Utf8Str& SharedFolder::i_getName() const … … 442 411 } 443 412 444 const SymlinkPolicy_T SharedFolder::i_getSymlinkPolicy() const445 {446 return m->enmSymlinkPolicy;447 }448 449 413 /* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note:
See TracChangeset
for help on using the changeset viewer.