VirtualBox

Changeset 42754 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Aug 10, 2012 12:31:10 PM (12 years ago)
Author:
vboxsync
Message:

Main: adjusted and documented IGuestSession::(File|Directory)CreateTemp APIs.

Location:
trunk/src/VBox/Main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r42748 r42754  
    95539553    <method name="directoryCreateTemp">
    95549554      <desc>
     9555        Create a temporary directory on the guest.
     9556
     9557        <result name="VBOX_E_NOT_SUPPORTED">
     9558          The operation is not possible as requested on this particular
     9559          guest type.
     9560        </result>
     9561        <result name="E_INVALIDARG">
     9562          Invalid argument.  This includes an incorrectly formatted template,
     9563          or a non-absolute path.
     9564        </result>
     9565        <result name="VBOX_E_IPRT_ERROR">
     9566          The temporary directory could not be created.  Possible reasons
     9567          include a non-existing path or an insecure path when the secure
     9568          option was requested.
     9569        </result>
     9570      </desc>
     9571      <param name="templateName" type="wstring" dir="in">
     9572        <desc>Template for the name of the directory to create.  This must
     9573          contain at least one 'X' character.  The first group of consecutive
     9574          'X' characters in the template will be replaced by a random
     9575          alphanumeric string to produce a unique name.</desc>
     9576      </param>
     9577      <param name="mode" type="unsigned long" dir="in">
     9578        <desc>The mode of the directory to create.  Use 0700 unless there are
     9579          reasons not to.  This parameter is ignored if "secure" is specified.
     9580          </desc>
     9581      </param>
     9582      <param name="path" type="wstring" dir="in">
     9583        <desc>The absolute path to create the temporary directory in.</desc>
     9584      </param>
     9585      <param name="secure" type="boolean" dir="in">
     9586        <desc>Whether to fail if the directory can not be securely created.
     9587          Currently this means that another unprivileged user cannot
     9588          manipulate the path specified or remove the temporary directory
     9589          after it has been created.  Also causes the mode specified to be
     9590          ignored.  May not be supported on all guest types.</desc>
     9591      </param>
     9592      <param name="directory" type="wstring" dir="return">
     9593        <desc>On success this will contain the name of the directory created
     9594          with full path.</desc>
     9595      </param>
     9596    </method>
     9597   
     9598    <method name="directoryExists">
     9599      <desc>
    95559600        TODO
    95569601
     
    95599604        </result>
    95609605      </desc>
    9561       <param name="templateName" type="wstring" dir="in">
    9562         <desc>TODO</desc>
    9563       </param>
    9564       <param name="mode" type="unsigned long" dir="in">
    9565         <desc>TODO</desc>
    9566       </param>
    95679606      <param name="path" type="wstring" dir="in">
    95689607        <desc>TODO</desc>
    95699608      </param>
     9609      <param name="exists" type="boolean" dir="return">
     9610        <desc>TODO</desc>
     9611      </param>
     9612    </method>
     9613   
     9614    <method name="directoryOpen">
     9615      <desc>
     9616        TODO
     9617
     9618        <result name="VBOX_E_NOT_SUPPORTED">
     9619          TODO
     9620        </result>
     9621      </desc>
     9622      <param name="path" type="wstring" dir="in">
     9623        <desc>TODO</desc>
     9624      </param>
     9625      <param name="filter" type="wstring" dir="in">
     9626        <desc>TODO</desc>
     9627      </param>
     9628      <param name="flags" type="DirectoryOpenFlag" dir="in" safearray="yes">
     9629        <desc>TODO</desc>
     9630      </param>
    95709631      <param name="directory" type="IGuestDirectory" dir="return">
    95719632        <desc>TODO</desc>
     
    95739634    </method>
    95749635   
    9575     <method name="directoryExists">
     9636    <method name="directoryQueryInfo">
    95769637      <desc>
    95779638        TODO
     
    95849645        <desc>TODO</desc>
    95859646      </param>
    9586       <param name="exists" type="boolean" dir="return">
     9647      <param name="info" type="IGuestFsObjInfo" dir="return">
    95879648        <desc>TODO</desc>
    95889649      </param>
    95899650    </method>
    95909651   
    9591     <method name="directoryOpen">
     9652    <method name="directoryRemove">
    95929653      <desc>
    95939654        TODO
     
    96009661        <desc>TODO</desc>
    96019662      </param>
    9602       <param name="filter" type="wstring" dir="in">
    9603         <desc>TODO</desc>
    9604       </param>
    9605       <param name="flags" type="DirectoryOpenFlag" dir="in" safearray="yes">
    9606         <desc>TODO</desc>
    9607       </param>
    9608       <param name="directory" type="IGuestDirectory" dir="return">
    9609         <desc>TODO</desc>
    9610       </param>
    96119663    </method>
    96129664   
    9613     <method name="directoryQueryInfo">
     9665    <method name="directoryRemoveRecursive">
    96149666      <desc>
    96159667        TODO
     
    96229674        <desc>TODO</desc>
    96239675      </param>
    9624       <param name="info" type="IGuestFsObjInfo" dir="return">
     9676      <param name="flags" type="DirectoryRemoveRecFlag" dir="in" safearray="yes">
    96259677        <desc>TODO</desc>
    96269678      </param>
     9679      <param name="progress" type="IProgress" dir="return">
     9680        <desc>TODO</desc>
     9681      </param>
    96279682    </method>
    96289683   
    9629     <method name="directoryRemove">
     9684    <method name="directoryRename">
    96309685      <desc>
    96319686        TODO
     
    96359690        </result>
    96369691      </desc>
     9692      <param name="source" type="wstring" dir="in">
     9693        <desc>TODO</desc>
     9694      </param>
     9695      <param name="dest" type="wstring" dir="in">
     9696        <desc>TODO</desc>
     9697      </param>
     9698      <param name="flags" type="PathRenameFlag" dir="in" safearray="yes">
     9699        <desc>TODO</desc>
     9700      </param>
     9701    </method>
     9702   
     9703    <method name="directorySetACL">
     9704      <desc>
     9705        TODO
     9706
     9707        <result name="VBOX_E_NOT_SUPPORTED">
     9708          TODO
     9709        </result>
     9710      </desc>
    96379711      <param name="path" type="wstring" dir="in">
    96389712        <desc>TODO</desc>
    96399713      </param>
     9714      <param name="acl" type="wstring" dir="in">
     9715        <desc>TODO</desc>
     9716      </param>
    96409717    </method>
    96419718   
    9642     <method name="directoryRemoveRecursive">
     9719    <method name="environmentClear">
    96439720      <desc>
    96449721        TODO
     
    96489725        </result>
    96499726      </desc>
    9650       <param name="path" type="wstring" dir="in">
    9651         <desc>TODO</desc>
    9652       </param>
    9653       <param name="flags" type="DirectoryRemoveRecFlag" dir="in" safearray="yes">
    9654         <desc>TODO</desc>
    9655       </param>
    9656       <param name="progress" type="IProgress" dir="return">
    9657         <desc>TODO</desc>
    9658       </param>
    96599727    </method>
    96609728   
    9661     <method name="directoryRename">
     9729    <method name="environmentGet">
    96629730      <desc>
    96639731        TODO
     
    96679735        </result>
    96689736      </desc>
    9669       <param name="source" type="wstring" dir="in">
     9737      <param name="name" type="wstring" dir="in">
    96709738        <desc>TODO</desc>
    96719739      </param>
    9672       <param name="dest" type="wstring" dir="in">
     9740      <param name="value" type="wstring" dir="return">
    96739741        <desc>TODO</desc>
    96749742      </param>
    9675       <param name="flags" type="PathRenameFlag" dir="in" safearray="yes">
    9676         <desc>TODO</desc>
    9677       </param>
    96789743    </method>
    96799744   
    9680     <method name="directorySetACL">
     9745    <method name="environmentSet">
    96819746      <desc>
    96829747        TODO
     
    96869751        </result>
    96879752      </desc>
    9688       <param name="path" type="wstring" dir="in">
     9753      <param name="name" type="wstring" dir="in">
    96899754        <desc>TODO</desc>
    96909755      </param>
    9691       <param name="acl" type="wstring" dir="in">
     9756      <param name="value" type="wstring" dir="in">
    96929757        <desc>TODO</desc>
    96939758      </param>
    96949759    </method>
    96959760   
    9696     <method name="environmentClear">
     9761    <method name="environmentUnset">
    96979762      <desc>
    96989763        TODO
     
    97029767        </result>
    97039768      </desc>
    9704     </method>
    9705    
    9706     <method name="environmentGet">
    9707       <desc>
    9708         TODO
    9709 
    9710         <result name="VBOX_E_NOT_SUPPORTED">
    9711           TODO
    9712         </result>
    9713       </desc>
    97149769      <param name="name" type="wstring" dir="in">
    97159770        <desc>TODO</desc>
    97169771      </param>
    9717       <param name="value" type="wstring" dir="return">
    9718         <desc>TODO</desc>
    9719       </param>
    9720     </method>
    9721    
    9722     <method name="environmentSet">
    9723       <desc>
    9724         TODO
    9725 
    9726         <result name="VBOX_E_NOT_SUPPORTED">
    9727           TODO
    9728         </result>
    9729       </desc>
    9730       <param name="name" type="wstring" dir="in">
    9731         <desc>TODO</desc>
    9732       </param>
    9733       <param name="value" type="wstring" dir="in">
    9734         <desc>TODO</desc>
    9735       </param>
    9736     </method>
    9737    
    9738     <method name="environmentUnset">
    9739       <desc>
    9740         TODO
    9741 
    9742         <result name="VBOX_E_NOT_SUPPORTED">
    9743           TODO
    9744         </result>
    9745       </desc>
    9746       <param name="name" type="wstring" dir="in">
    9747         <desc>TODO</desc>
    9748       </param>
    97499772    </method>
    97509773   
    97519774    <method name="fileCreateTemp">
    97529775      <desc>
    9753         TODO
     9776        Create a temporary file on the guest.
    97549777
    97559778        <result name="VBOX_E_NOT_SUPPORTED">
    9756           TODO
     9779          The operation is not possible as requested on this particular
     9780          guest type.
     9781        </result>
     9782        <result name="E_INVALIDARG">
     9783          Invalid argument.  This includes an incorrectly formatted template,
     9784          or a non-absolute path.
     9785        </result>
     9786        <result name="VBOX_E_IPRT_ERROR">
     9787          The temporary file could not be created.  Possible reasons include
     9788          a non-existing path or an insecure path when the secure
     9789          option was requested.
    97579790        </result>
    97589791      </desc>
    97599792      <param name="templateName" type="wstring" dir="in">
    9760         <desc>TODO</desc>
     9793        <desc>Template for the name of the file to create.  This must contain
     9794          at least one 'X' character.  The first group of consecutive 'X'
     9795          characters in the template will be replaced by a random
     9796          alphanumeric string to produce a unique name.
     9797         </desc>
    97619798      </param>
    97629799      <param name="mode" type="unsigned long" dir="in">
    9763         <desc>TODO</desc>
     9800        <desc>The mode of the file to create.  Use 0700 unless there are
     9801          reasons not to.  This parameter is ignored if "secure" is specified.
     9802         </desc>
    97649803      </param>
    97659804      <param name="path" type="wstring" dir="in">
    9766         <desc>TODO</desc>
     9805        <desc>The absolute path to create the temporary file in.</desc>
     9806      </param>
     9807      <param name="secure" type="boolean" dir="in">
     9808        <desc>Whether to fail if the file can not be securely created.
     9809          Currently this means that another unprivileged user cannot
     9810          manipulate the path specified or remove the temporary file after
     9811          it has been created.  Also causes the mode specified to be ignored.
     9812          May not be supported on all guest types.</desc>
    97679813      </param>
    97689814      <param name="file" type="IGuestFile" dir="return">
    9769         <desc>Optional.</desc>
     9815        <desc>On success this will contain an open file object for the new
     9816          temporary file.
     9817        </desc>
    97709818      </param>
    97719819    </method>
  • trunk/src/VBox/Main/include/GuestSessionImpl.h

    r42749 r42754  
    196196    STDMETHOD(CopyTo)(IN_BSTR aSource, IN_BSTR aDest, ComSafeArrayIn(CopyFileFlag_T, aFlags), IProgress **aProgress);
    197197    STDMETHOD(DirectoryCreate)(IN_BSTR aPath, ULONG aMode, ComSafeArrayIn(DirectoryCreateFlag_T, aFlags), IGuestDirectory **aDirectory);
    198     STDMETHOD(DirectoryCreateTemp)(IN_BSTR aTemplate, ULONG aMode, IN_BSTR aName, IGuestDirectory **aDirectory);
     198    STDMETHOD(DirectoryCreateTemp)(IN_BSTR aTemplate, ULONG aMode, IN_BSTR aName, BOOL aSecure, BSTR *aDirectory);
    199199    STDMETHOD(DirectoryExists)(IN_BSTR aPath, BOOL *aExists);
    200200    STDMETHOD(DirectoryOpen)(IN_BSTR aPath, IN_BSTR aFilter, ComSafeArrayIn(DirectoryOpenFlag_T, aFlags), IGuestDirectory **aDirectory);
     
    208208    STDMETHOD(EnvironmentSet)(IN_BSTR aName, IN_BSTR aValue);
    209209    STDMETHOD(EnvironmentUnset)(IN_BSTR aName);
    210     STDMETHOD(FileCreateTemp)(IN_BSTR aTemplate, ULONG aMode, IN_BSTR aName, IGuestFile **aFile);
     210    STDMETHOD(FileCreateTemp)(IN_BSTR aTemplate, ULONG aMode, IN_BSTR aPath, BOOL aSecure, IGuestFile **aFile);
    211211    STDMETHOD(FileExists)(IN_BSTR aPath, BOOL *aExists);
    212212    STDMETHOD(FileRemove)(IN_BSTR aPath);
  • trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp

    r42749 r42754  
    21962196}
    21972197
    2198 STDMETHODIMP GuestSession::DirectoryCreateTemp(IN_BSTR aTemplate, ULONG aMode, IN_BSTR aName, IGuestDirectory **aDirectory)
     2198STDMETHODIMP GuestSession::DirectoryCreateTemp(IN_BSTR aTemplate, ULONG aMode, IN_BSTR aName, BOOL aSecure, BSTR *aDirectory)
    21992199{
    22002200#ifndef VBOX_WITH_GUEST_CONTROL
     
    25522552}
    25532553
    2554 STDMETHODIMP GuestSession::FileCreateTemp(IN_BSTR aTemplate, ULONG aMode, IN_BSTR aName, IGuestFile **aFile)
     2554STDMETHODIMP GuestSession::FileCreateTemp(IN_BSTR aTemplate, ULONG aMode, IN_BSTR aPath, BOOL aSecure, IGuestFile **aFile)
    25552555{
    25562556#ifndef VBOX_WITH_GUEST_CONTROL
Note: See TracChangeset for help on using the changeset viewer.

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