VirtualBox

Changeset 6382 in vbox for trunk


Ignore:
Timestamp:
Jan 18, 2008 5:37:39 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
27325
Message:

backed out again, needs build fixes on Windows

Location:
trunk
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/shflsvc.h

    r6379 r6382  
    943943    HGCMFunctionParameter mapping;
    944944
    945     /** bool, in: Writable
    946      * True (default) if the folder is writable.
    947      */
    948 
    949945} VBoxSFAddMapping;
    950946
    951 #define SHFL_CPARMS_ADD_MAPPING  (3)
     947#define SHFL_CPARMS_ADD_MAPPING  (2)
    952948
    953949
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp

    r6379 r6382  
    592592        RTPrintf("VBoxManage sharedfolder     add <vmname>|<uuid>\n"
    593593                 "                            -name <name> -hostpath <hostpath>\n"
    594                  "                            [-transient] [-readonly]\n"
     594                 "                            [-transient]\n"
    595595                 "\n");
    596596    }
     
    19071907            CHECK_ERROR_RET(sfEnum, GetNext(sf.asOutParam()), rc);
    19081908            Bstr name, hostPath;
    1909             BOOL writable;
    19101909            sf->COMGETTER(Name)(name.asOutParam());
    19111910            sf->COMGETTER(HostPath)(hostPath.asOutParam());
    1912             sf->COMGETTER(Writable)(&writable);
    19131911            if (!numSharedFolders && details != VMINFO_MACHINEREADABLE)
    19141912                RTPrintf("\n\n");
     
    19211919            }
    19221920            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());
    19251922            ++numSharedFolders;
    19261923            CHECK_ERROR_RET(sfEnum, HasMore(&fMore), rc);
     
    70257022        char *hostpath = NULL;
    70267023        bool fTransient = false;
    7027         bool fWritable = true;
    70287024
    70297025        for (int i = 2; i < argc; i++)
     
    70467042                i++;
    70477043                hostpath = argv[i];
    7048             }
    7049             else if (strcmp(argv[i], "-readonly") == 0)
    7050             {
    7051                 fWritable = false;
     7044
    70527045            }
    70537046            else if (strcmp(argv[i], "-transient") == 0)
     
    70787071            CHECK_ERROR_RET(aSession, COMGETTER(Console)(console.asOutParam()), 1);
    70797072
    7080             CHECK_ERROR(console, CreateSharedFolder(Bstr(name), Bstr(hostpath), fWritable));
     7073            CHECK_ERROR(console, CreateSharedFolder(Bstr(name), Bstr(hostpath)));
    70817074
    70827075            if (console)
     
    70917084            aSession->COMGETTER(Machine)(machine.asOutParam());
    70927085
    7093             CHECK_ERROR(machine, CreateSharedFolder(Bstr(name), Bstr(hostpath), fWritable));
     7086            CHECK_ERROR(machine, CreateSharedFolder(Bstr(name), Bstr(hostpath)));
    70947087
    70957088            if (SUCCEEDED(rc))
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxSharedFoldersSettings.ui

    r6379 r6382  
    241241    <function returnType="int">dialogType() {return mDialogType;}</function>
    242242    <function access="private">removeSharedFolder( const QString &amp;, const QString &amp;, VBoxSharedFoldersSettings::SFDialogType )</function>
    243     <function access="private">createSharedFolder( const QString &amp;, const QString &amp;, bool, VBoxSharedFoldersSettings::SFDialogType )</function>
     243    <function access="private">createSharedFolder( const QString &amp;, const QString &amp;, VBoxSharedFoldersSettings::SFDialogType )</function>
    244244    <function>getFromGlobal()</function>
    245245    <function>getFromMachine( const CMachine &amp; )</function>
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxSharedFoldersSettings.ui.h

    r6379 r6382  
    404404void VBoxSharedFoldersSettings::createSharedFolder (const QString & aName,
    405405                                                    const QString & aPath,
    406                                                     bool aWritable,
    407406                                                    SFDialogType aType)
    408407{
     
    418417        {
    419418            Assert (!mMachine.isNull());
    420             mMachine.CreateSharedFolder (aName, aPath, aWritable);
     419            mMachine.CreateSharedFolder (aName, aPath);
    421420            if (!mMachine.isOk())
    422421                vboxProblem().cannotCreateSharedFolder (this, mMachine,
     
    427426        {
    428427            Assert (!mConsole.isNull());
    429             mConsole.CreateSharedFolder (aName, aPath, aWritable);
     428            mConsole.CreateSharedFolder (aName, aPath);
    430429            if (!mConsole.isOk())
    431430                vboxProblem().cannotCreateSharedFolder (this, mConsole,
     
    574573        if (item && !item->getText (0).isNull() && !item->getText (1).isNull()
    575574            && item->getText (2) == "edited")
    576             createSharedFolder (item->getText (0), item->getText (1), true, type);
     575            createSharedFolder (item->getText (0), item->getText (1), type);
    577576        iterator = iterator->nextSibling();
    578577    }
  • trunk/src/VBox/HostServices/SharedFolders/mappings.cpp

    r6379 r6382  
    2828 *
    2929 */
    30 int vbsfMappingsAdd (PSHFLSTRING pFolderName, PSHFLSTRING pMapName, uint32_t fWritable)
     30int vbsfMappingsAdd (PSHFLSTRING pFolderName, PSHFLSTRING pMapName)
    3131{
    3232    int i;
     
    7373            FolderMapping[i].fValid    = true;
    7474            FolderMapping[i].cMappings = 0;
    75             FolderMapping[i].fWritable = fWritable;
    7675
    7776            /* Check if the host file system is case sensitive */
     
    233232}
    234233
    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     else
    248         rc = VERR_FILE_NOT_FOUND;
    249 
    250     LogFlow(("vbsfMappingsQuery:Writable return rc = %Vrc\n", rc));
    251 
    252     return rc;
    253 }
    254 
    255234static int vbsfQueryMappingIndex (PRTUTF16 utf16Name, size_t *pIndex)
    256235{
  • trunk/src/VBox/HostServices/SharedFolders/mappings.h

    r6379 r6382  
    3131    bool        fHostCaseSensitive;
    3232    bool        fGuestCaseSensitive;
    33     bool        fWritable;
    3433} MAPPING, *PMAPPING;
    3534
     
    3837bool vbsfMappingQuery(uint32_t iMapping, PMAPPING *pMapping);
    3938
    40 int vbsfMappingsAdd (PSHFLSTRING pFolderName, PSHFLSTRING pMapName, uint32_t fWritable);
     39int vbsfMappingsAdd (PSHFLSTRING pFolderName, PSHFLSTRING pMapName);
    4140int vbsfMappingsRemove (PSHFLSTRING pMapName);
    4241
    4342int vbsfMappingsQuery (SHFLCLIENTDATA *pClient, SHFLMAPPING *pMappings, uint32_t *pcMappings);
    4443int vbsfMappingsQueryName (SHFLCLIENTDATA *pClient, SHFLROOT root, SHFLSTRING *pString);
    45 int vbsfMappingsQueryWritable (SHFLCLIENTDATA *pClient, SHFLROOT root, bool *fWritable);
    4644
    4745int vbsfMapFolder (SHFLCLIENTDATA *pClient, PSHFLSTRING pszMapName, RTUCS2 delimiter, bool fCaseSensitive, SHFLROOT *pRoot);
  • trunk/src/VBox/HostServices/SharedFolders/service.cpp

    r6379 r6382  
    10971097        else if (   paParms[0].type != VBOX_HGCM_SVC_PARM_PTR     /* host folder name */
    10981098                 || paParms[1].type != VBOX_HGCM_SVC_PARM_PTR     /* guest map name */
    1099                  || paParms[2].type != VBOX_HGCM_SVC_PARM_32BIT   /* fWritable */
    11001099                )
    11011100        {
     
    11091108            SHFLSTRING *pMapName    = (SHFLSTRING *)paParms[1].u.pointer.addr;
    11101109            uint32_t cbStringMap    = paParms[1].u.pointer.size;
    1111             uint32_t fWritable      = paParms[2].u.uint32;
    11121110
    11131111            /* Verify parameters values. */
     
    11231121            {
    11241122                /* Execute the function. */
    1125                 rc = vbsfMappingsAdd (pFolderName, pMapName, fWritable);
     1123                rc = vbsfMappingsAdd (pFolderName, pMapName);
    11261124
    11271125                if (VBOX_SUCCESS(rc))
  • trunk/src/VBox/HostServices/SharedFolders/vbsf.cpp

    r6379 r6382  
    10181018                }
    10191019            }
    1020 
    1021             /* write access requested? */
    1022             if (pParms->CreateFlags & (  SHFL_CF_ACT_REPLACE_IF_EXISTS
    1023                                        | SHFL_CF_ACT_OVERWRITE_IF_EXISTS
    1024                                        | SHFL_CF_ACT_CREATE_IF_NEW
    1025                                        | 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 
    10341020            if (BIT_FLAG(pParms->CreateFlags, SHFL_CF_DIRECTORY))
    10351021            {
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r6381 r6382  
    882882        vrc = SSMR3PutStrZ (pSSM, hostPath);
    883883        AssertRC (vrc);
    884 
    885 //        XXX
    886 //        vrc = SSMR3PutBool (pSSM, folder->writable());
    887 //        AssertRC (vrc);
    888884    }
    889885
     
    957953        ComObjPtr <SharedFolder> sharedFolder;
    958954        sharedFolder.createObject();
    959         HRESULT rc = sharedFolder->init (that, name, hostPath, true); /* TODO: fWritable */
     955        HRESULT rc = sharedFolder->init (that, name, hostPath);
    960956        AssertComRCReturn (rc, VERR_INTERNAL_ERROR);
    961957
     
    13191315        for (SharedFolderMap::const_iterator it = mSharedFolders.begin();
    13201316             it != mSharedFolders.end(); ++ it)
    1321             sharedFolders [it->first] = SharedFolderData(it->second->hostPath(), it->second->writable());
     1317            sharedFolders [it->first] = it->second->hostPath();
    13221318    }
    13231319
     
    19951991
    19961992STDMETHODIMP
    1997 Console::CreateSharedFolder (INPTR BSTR aName, INPTR BSTR aHostPath, BOOL aWritable)
     1993Console::CreateSharedFolder (INPTR BSTR aName, INPTR BSTR aHostPath)
    19981994{
    19991995    if (!aName || !aHostPath)
     
    20232019
    20242020    sharedFolder.createObject();
    2025     rc = sharedFolder->init (this, aName, aHostPath, aWritable);
     2021    rc = sharedFolder->init (this, aName, aHostPath);
    20262022    CheckComRCReturnRC (rc);
    20272023
     
    20512047
    20522048        /* second, create the given folder */
    2053         rc = createSharedFolder (aName, SharedFolderData (aHostPath, aWritable));
     2049        rc = createSharedFolder (aName, aHostPath);
    20542050        CheckComRCReturnRC (rc);
    20552051    }
     
    41994195            Bstr name;
    42004196            Bstr hostPath;
    4201             BOOL writable;
    42024197
    42034198            rc = folder->COMGETTER(Name) (name.asOutParam());
     
    42054200            rc = folder->COMGETTER(HostPath) (hostPath.asOutParam());
    42064201            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));
    42104204
    42114205            /* send changes to HGCM if the VM is running */
     
    42144208            {
    42154209                SharedFolderDataMap::iterator it = oldFolders.find (name);
    4216                 if (it == oldFolders.end() || it->second.mHostPath != hostPath)
     4210                if (it == oldFolders.end() || it->second != hostPath)
    42174211                {
    42184212                    /* a new machine folder is added or
     
    42294223                            rc = removeSharedFolder (name);
    42304224                        /* create the new machine folder */
    4231                         rc = createSharedFolder (name, SharedFolderData (hostPath, writable));
     4225                        rc = createSharedFolder (name, hostPath);
    42324226                    }
    42334227                }
     
    43084302 *  @note Doesn't lock anything.
    43094303 */
    4310 HRESULT Console::createSharedFolder (INPTR BSTR aName, SharedFolderData aData)
     4304HRESULT Console::createSharedFolder (INPTR BSTR aName, INPTR BSTR aHostPath)
    43114305{
    43124306    ComAssertRet (aName && *aName, E_FAIL);
    4313     ComAssertRet (aData.mHostPath && *aData.mHostPath, E_FAIL);
     4307    ComAssertRet (aHostPath && *aHostPath, E_FAIL);
    43144308
    43154309    /* sanity checks */
     
    43174311    AssertReturn (mVMMDev->isShFlActive(), E_FAIL);
    43184312
    4319     VBOXHGCMSVCPARM  parms[SHFL_CPARMS_ADD_MAPPING];
     4313    VBOXHGCMSVCPARM  parms[2];
    43204314    SHFLSTRING      *pFolderName, *pMapName;
    43214315    size_t           cbString;
    43224316
    4323     Log (("Adding shared folder '%ls' -> '%ls'\n", aName, aData.mHostPath.raw()));
    4324 
    4325     cbString = (RTStrUcs2Len (aData.mHostPath) + 1) * sizeof (RTUCS2);
     4317    Log (("Adding shared folder '%ls' -> '%ls'\n", aName, aHostPath));
     4318
     4319    cbString = (RTStrUcs2Len (aHostPath) + 1) * sizeof (RTUCS2);
    43264320    if (cbString >= UINT16_MAX)
    43274321        return setError (E_INVALIDARG, tr ("The name is too long"));
    43284322    pFolderName = (SHFLSTRING *) RTMemAllocZ (sizeof (SHFLSTRING) + cbString);
    43294323    Assert (pFolderName);
    4330     memcpy (pFolderName->String.ucs2, aData.mHostPath, cbString);
     4324    memcpy (pFolderName->String.ucs2, aHostPath, cbString);
    43314325
    43324326    pFolderName->u16Size   = (uint16_t)cbString;
     
    43544348    parms[1].u.pointer.size = sizeof (SHFLSTRING) + (uint16_t)cbString;
    43554349
    4356     parms[2].type = VBOX_HGCM_SVC_PARM_32BIT;
    4357     parms[2].u.uint32 = aData.mWritable;
    4358 
    43594350    int vrc = mVMMDev->hgcmHostCall ("VBoxSharedFolders",
    43604351                                     SHFL_FN_ADD_MAPPING,
    4361                                      SHFL_CPARMS_ADD_MAPPING, &parms[0]);
     4352                                     2, &parms[0]);
    43624353    RTMemFree (pFolderName);
    43634354    RTMemFree (pMapName);
     
    43674358                         tr ("Could not create a shared folder '%ls' "
    43684359                             "mapped to '%ls' (%Vrc)"),
    4369                          aName, aData.mHostPath.raw(), vrc);
     4360                         aName, aHostPath, vrc);
    43704361
    43714362    return S_OK;
  • trunk/src/VBox/Main/MachineImpl.cpp

    r6379 r6382  
    23722372
    23732373STDMETHODIMP
    2374 Machine::CreateSharedFolder (INPTR BSTR aName, INPTR BSTR aHostPath, BOOL aWritable)
     2374Machine::CreateSharedFolder (INPTR BSTR aName, INPTR BSTR aHostPath)
    23752375{
    23762376    if (!aName || !aHostPath)
     
    23922392
    23932393    sharedFolder.createObject();
    2394     rc = sharedFolder->init (machine(), aName, aHostPath, aWritable);
     2394    rc = sharedFolder->init (machine(), aName, aHostPath);
    23952395    CheckComRCReturnRC (rc);
    23962396
     
    43144314                Bstr hostPath = (*it).stringValue ("hostPath");
    43154315
    4316                 bool writable = (*it).value <bool> ("writable");
    4317 
    4318                 rc = CreateSharedFolder (name, hostPath, writable);
     4316                rc = CreateSharedFolder (name, hostPath);
    43194317                CheckComRCReturnRC (rc);
    43204318            }
     
    56635661            folderNode.setValue <Bstr> ("name", folder->name());
    56645662            folderNode.setValue <Bstr> ("hostPath", folder->hostPath());
    5665             folderNode.setValue <bool> ("writable", folder->writable());
    56665663        }
    56675664    }
  • trunk/src/VBox/Main/SharedFolderImpl.cpp

    r6379 r6382  
    5858 *  @param aName        logical name of the shared folder
    5959 *  @param aHostPath    full path to the shared folder on the host
    60  *  @param aWritable    writable if true, readonly otherwise
    6160 *
    6261 *  @return          COM result indicator
    6362 */
    6463HRESULT SharedFolder::init (Machine *aMachine,
    65                             const BSTR aName, const BSTR aHostPath, bool aWritable)
     64                            const BSTR aName, const BSTR aHostPath)
    6665{
    6766    /* Enclose the state transition NotReady->InInit->Ready */
     
    7170    unconst (mMachine) = aMachine;
    7271
    73     HRESULT rc = protectedInit (aMachine, aName, aHostPath, aWritable);
     72    HRESULT rc = protectedInit (aMachine, aName, aHostPath);
    7473
    7574    /* Confirm a successful initialization when it's the case */
     
    101100
    102101    HRESULT rc = protectedInit (aMachine, aThat->mData.mName,
    103                                 aThat->mData.mHostPath, aThat->mData.mWritable);
     102                                aThat->mData.mHostPath);
    104103
    105104    /* Confirm a successful initialization when it's the case */
     
    116115 *  @param aName        logical name of the shared folder
    117116 *  @param aHostPath    full path to the shared folder on the host
    118  *  @param aWritable    writable if true, readonly otherwise
    119117 *
    120118 *  @return          COM result indicator
    121119 */
    122120HRESULT SharedFolder::init (Console *aConsole,
    123                             const BSTR aName, const BSTR aHostPath, bool aWritable)
     121                            const BSTR aName, const BSTR aHostPath)
    124122{
    125123    /* Enclose the state transition NotReady->InInit->Ready */
     
    129127    unconst (mConsole) = aConsole;
    130128
    131     HRESULT rc = protectedInit (aConsole, aName, aHostPath, aWritable);
     129    HRESULT rc = protectedInit (aConsole, aName, aHostPath);
    132130
    133131    /* Confirm a successful initialization when it's the case */
     
    144142 *  @param aName        logical name of the shared folder
    145143 *  @param aHostPath    full path to the shared folder on the host
    146  *  @param aWritable    writable if true, readonly otherwise
    147144 *
    148145 *  @return          COM result indicator
    149146 */
    150147HRESULT SharedFolder::init (VirtualBox *aVirtualBox,
    151                             const BSTR aName, const BSTR aHostPath, bool aWritable)
     148                            const BSTR aName, const BSTR aHostPath)
    152149{
    153150    /* Enclose the state transition NotReady->InInit->Ready */
     
    157154    unconst (mVirtualBox) = aVirtualBox;
    158155
    159     HRESULT rc = protectedInit (aVirtualBox, aName, aHostPath, aWritable);
     156    HRESULT rc = protectedInit (aVirtualBox, aName, aHostPath);
    160157
    161158    /* Confirm a successful initialization when it's the case */
     
    173170 */
    174171HRESULT 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));
    179175
    180176    ComAssertRet (aParent && aName && aHostPath, E_INVALIDARG);
     
    220216    unconst (mData.mName) = aName;
    221217    unconst (mData.mHostPath) = hostPath;
    222     mData.mWritable = aWritable;
    223218
    224219    return S_OK;
     
    312307}
    313308
    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  
    15751575
    15761576STDMETHODIMP
    1577 VirtualBox::CreateSharedFolder (INPTR BSTR aName, INPTR BSTR aHostPath, BOOL aWritable)
     1577VirtualBox::CreateSharedFolder (INPTR BSTR aName, INPTR BSTR aHostPath)
    15781578{
    15791579    if (!aName || !aHostPath)
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r6379 r6382  
    15731573        <desc>Full path to the shared folder in the host file system.</desc>
    15741574      </param>
    1575       <param name="writable" type="boolean" dir="in">
    1576         <desc>Whether the share is writable or readonly</desc>
    1577       </param>
    15781575    </method>
    15791576
     
    30493046        <desc>Full path to the shared folder in the host file system.</desc>
    30503047      </param>
    3051       <param name="writable" type="boolean" dir="in">
    3052         <desc>Whether the share is writable or readonly</desc>
    3053       </param>
    30543048    </method>
    30553049
     
    39073901      <param name="hostPath" type="wstring" dir="in">
    39083902        <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>
    39123903      </param>
    39133904    </method>
     
    90469037      </desc>
    90479038    </attribute>
    9048    
    9049     <attribute name="writable" type="boolean" readonly="yes">
    9050       <desc>
    9051         Whether the folder defined by the host path is writable or
    9052         not.
    9053       </desc>
    9054     </attribute>
    90559039
    90569040  </interface>
  • trunk/src/VBox/Main/include/ConsoleImpl.h

    r6379 r6382  
    134134    STDMETHOD(AttachUSBDevice) (INPTR GUIDPARAM aId);
    135135    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);
    137137    STDMETHOD(RemoveSharedFolder) (INPTR BSTR aName);
    138138    STDMETHOD(TakeSnapshot) (INPTR BSTR aName, INPTR BSTR aDescription,
     
    353353    typedef SafeVMPtrBase <true> SafeVMPtrQuiet;
    354354
    355     class SharedFolderData
    356     {
    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     };
    368355    typedef std::map <Bstr, ComObjPtr <SharedFolder> > SharedFolderMap;
    369     typedef std::map <Bstr, SharedFolderData> SharedFolderDataMap;
     356    typedef std::map <Bstr, Bstr> SharedFolderDataMap;
    370357
    371358private:
     
    399386                                SharedFolderDataMap::const_iterator &aIt);
    400387
    401     HRESULT createSharedFolder (INPTR BSTR aName, SharedFolderData aData);
     388    HRESULT createSharedFolder (INPTR BSTR aName, INPTR BSTR aHostPath);
    402389    HRESULT removeSharedFolder (INPTR BSTR aName);
    403390
  • trunk/src/VBox/Main/include/MachineImpl.h

    r6379 r6382  
    498498    STDMETHOD(FindSnapshot) (INPTR BSTR aName, ISnapshot **aSnapshot);
    499499    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);
    501501    STDMETHOD(RemoveSharedFolder) (INPTR BSTR aName);
    502502    STDMETHOD(CanShowConsoleWindow) (BOOL *aCanShow);
  • trunk/src/VBox/Main/include/SharedFolderImpl.h

    r6379 r6382  
    4141        const Bstr mName;
    4242        const Bstr mHostPath;
    43         bool       mWritable;
    4443    };
    4544
     
    6362
    6463    // 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);
    6665    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);
    6968    void uninit();
    7069
     
    7372    STDMETHOD(COMGETTER(HostPath)) (BSTR *aHostPath);
    7473    STDMETHOD(COMGETTER(Accessible)) (BOOL *aAccessible);
    75     STDMETHOD(COMGETTER(Writable)) (BOOL *aWritable);
    7674
    7775    // public methods for internal purposes only
     
    8381    const Bstr &name() const { return mData.mName; }
    8482    const Bstr &hostPath() const { return mData.mHostPath; }
    85     BOOL writable() const { return mData.mWritable; }
    8683
    8784    // for VirtualBoxSupportErrorInfoImpl
     
    9188
    9289    HRESULT protectedInit (VirtualBoxBaseWithChildrenNEXT *aParent,
    93                            const BSTR aName, const BSTR aHostPath, bool aWritable);
     90                           const BSTR aName, const BSTR aHostPath);
    9491
    9592private:
  • trunk/src/VBox/Main/include/VirtualBoxImpl.h

    r6379 r6382  
    161161
    162162    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);
    164164    STDMETHOD(RemoveSharedFolder) (INPTR BSTR aName);
    165165    STDMETHOD(GetNextExtraDataKey) (INPTR BSTR aKey, BSTR *aNextKey, BSTR *aNextValue);
  • trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd

    r6379 r6382  
    630630  <xsd:attribute name="name" type="TNonEmptyString" use="required"/>
    631631  <xsd:attribute name="hostPath" type="TLocalFile" use="required"/>
    632   <xsd:attribute name="writable" type="xsd:boolean" default="true"/>
    633632</xsd:complexType>
    634633
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette