VirtualBox

Changeset 74761 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 11, 2018 11:26:32 AM (6 years ago)
Author:
vboxsync
Message:

Main/MediumIO: add stub for a method to convert a medium to a data stream with a given medium format

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

Legend:

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

    r74734 r74761  
    444444    <desc>
    445445      Guest Control reported an error from the guest side.
     446    </desc>
     447  </result>
     448
     449  <result name="VBOX_E_TIMEOUT" value="0x80BB0010">
     450    <desc>
     451      The operation ran into an explicitly requested timeout.
    446452    </desc>
    447453  </result>
     
    26212627      </param>
    26222628      <param name="forceNewUuid" type="boolean" dir="in">
    2623          <desc>Allows the caller to request a completely new medium UUID for
    2624            the image which is to be opened. Useful if one intends to open an exact
    2625            copy of a previously opened image, as this would normally fail due to
    2626            the duplicate UUID.</desc>
    2627          </param>
     2629        <desc>Allows the caller to request a completely new medium UUID for
     2630          the image which is to be opened. Useful if one intends to open an exact
     2631          copy of a previously opened image, as this would normally fail due to
     2632          the duplicate UUID.</desc>
     2633        </param>
    26282634      <param name="medium" type="IMedium" dir="return">
    26292635        <desc>Opened medium object.</desc>
     
    28842890    </method>
    28852891
    2886      <!--
     2892    <!--
    28872893          Returns the NATNetwork by name, e.g. for adding port forward rule or deletion.
    2888       -->
    2889      <method name="findNATNetworkByName">
     2894    -->
     2895    <method name="findNATNetworkByName">
    28902896      <param name="networkName" type="wstring" dir="in"/>
    28912897      <param name="network" type="INATNetwork" dir="return"/>
     
    28932899    <!--
    28942900        Deletes given NAT network.
    2895      -->
     2901    -->
    28962902    <method name="removeNATNetwork">
    2897        <param name="network" type="INATNetwork" dir="in"/>
     2903      <param name="network" type="INATNetwork" dir="in"/>
    28982904    </method>
    28992905
     
    54645470        set by one of <link to="#takeSnapshot" />, <link to="#deleteSnapshot" />
    54655471        or <link to="#restoreSnapshot" />, depending on which was called last.
    5466        See <link to="ISnapshot"/> for details.
     5472        See <link to="ISnapshot"/> for details.
    54675473      </desc>
    54685474    </attribute>
     
    65116517      </result>
    65126518
    6513        </desc>
     6519      </desc>
    65146520      <param name="name" type="wstring" dir="in">
    65156521      <desc>Name of the storage controller.</desc>
     
    1025010256    <attribute name="proxyURL" type="wstring" readonly="no">
    1025110257      <desc>
    10252        Proxy server URL for the <link to="ProxyMode::Manual" /> proxy mode.
    10253 
    10254        The format is: [{type}"://"][{userid}[@{password}]:]{server}[":"{port}]
    10255 
    10256        Valid types are: http (default), https, socks4, socks4a, socks5, socks5h and direct.
    10257        Please note that these are proxy types defining how the proxy operates rather than
    10258        how to proxy any similarly named protocol (i.e. don't confuse a http-proxy with
    10259        proxying the http protocol, as a http-proxy usually can proxy https and other protocols too).
    10260 
    10261        The port number defaults to 80 for http, 443 for https and 1080 for the socks ones.
    10262 
    10263        <note>The password is currently stored as plain text!  Use the <link to="ProxyMode::System" />
    10264        mode if you consider the proxy password to be sensitive.</note>
    10265 
    10266        An empty string will cause the behavior to be identical to <link to="ProxyMode::System" />.
    10267        For compatibility with libproxy, an URL starting with "direct://" will cause
    10268        <link to="ProxyMode::NoProxy" /> behavior.
     10258        Proxy server URL for the <link to="ProxyMode::Manual" /> proxy mode.
     10259
     10260        The format is: [{type}"://"][{userid}[@{password}]:]{server}[":"{port}]
     10261
     10262        Valid types are: http (default), https, socks4, socks4a, socks5, socks5h and direct.
     10263        Please note that these are proxy types defining how the proxy operates rather than
     10264        how to proxy any similarly named protocol (i.e. don't confuse a http-proxy with
     10265        proxying the http protocol, as a http-proxy usually can proxy https and other protocols too).
     10266
     10267        The port number defaults to 80 for http, 443 for https and 1080 for the socks ones.
     10268
     10269        <note>The password is currently stored as plain text!  Use the <link to="ProxyMode::System" />
     10270        mode if you consider the proxy password to be sensitive.</note>
     10271
     10272        An empty string will cause the behavior to be identical to <link to="ProxyMode::System" />.
     10273        For compatibility with libproxy, an URL starting with "direct://" will cause
     10274        <link to="ProxyMode::NoProxy" /> behavior.
    1026910275      </desc>
    1027010276    </attribute>
     
    1137811384      <desc>Process terminated abnormally.</desc>
    1137911385    </const>
    11380      <const name="TimedOutKilled"       value="512">
     11386    <const name="TimedOutKilled"       value="512">
    1138111387      <desc>Process timed out and was killed.</desc>
    1138211388    </const>
     
    1168011686    <attribute name="protocolVersion" type="unsigned long" readonly="yes">
    1168111687      <desc>Returns the protocol version which is used to communicate
    11682        with the guest.</desc>
     11688        with the guest.</desc>
    1168311689    </attribute>
    1168411690
     
    1217412180              <td>Update</td>
    1217512181              <td>Only copy when the source file is newer than the destination
    12176                file or when the destination file is missing.</td>
     12182                file or when the destination file is missing.</td>
    1217712183            </tr>
    1217812184          </table>
     
    1222912235              <td>Update</td>
    1223012236              <td>Only copy when the source file is newer than the destination
    12231                file or when the destination file is missing.</td>
     12237                file or when the destination file is missing.</td>
    1223212238            </tr>
    1223312239          </table>
     
    1240612412          If @c false, a symbolic link in the final component will make the
    1240712413          method return @c false (because a symlink isn't a directory).
    12408          </desc>
     12414        </desc>
    1240912415      </param>
    1241012416      <param name="exists" type="boolean" dir="return">
     
    1248312489        <desc>Zero or more <link to="DirectoryRemoveRecFlag"/> flags.
    1248412490          <note>WARNING! SPECIFYING <link to="DirectoryRemoveRecFlag_ContentAndDir"/> IS
    12485              MANDATORY AT THE MOMENT!!</note>
     12491            MANDATORY AT THE MOMENT!!</note>
    1248612492        </desc>
    1248712493      </param>
     
    1267012676          characters in the template will be replaced by a random
    1267112677          alphanumeric string to produce a unique name.
    12672          </desc>
     12678        </desc>
    1267312679      </param>
    1267412680      <param name="mode" type="unsigned long" dir="in">
     
    1271812724          If @c false, a symbolic link in the final component will make the
    1271912725          method return @c false (because a symlink isn't a regular file).
    12720          </desc>
     12726        </desc>
    1272112727      </param>
    1272212728      <param name="exists" type="boolean" dir="return">
     
    1282712833      <param name="followSymlinks" type="boolean" dir="in">
    1282812834        <desc>
    12829            It @c true, symbolic links in the final path component will be
    12830            followed to their target, and the size of the target is returned.
    12831            If @c false, symbolic links in the final path component will make
    12832            the method call fail (symblink is not a regular file).
    12833          </desc>
     12835          It @c true, symbolic links in the final path component will be
     12836          followed to their target, and the size of the target is returned.
     12837          If @c false, symbolic links in the final path component will make
     12838          the method call fail (symblink is not a regular file).
     12839        </desc>
    1283412840      </param>
    1283512841      <param name="size" type="long long" dir="return">
     
    1285512861      <param name="followSymlinks" type="boolean" dir="in">
    1285612862        <desc>
    12857            If @c true, symbolic links in the final component will be followed
    12858            and the method will instead check if the target exists.
    12859            If @c false, symbolic links in the final component will satisfy the
    12860            method and it will return @c true in @a exists.
    12861          </desc>
     12863          If @c true, symbolic links in the final component will be followed
     12864          and the method will instead check if the target exists.
     12865          If @c false, symbolic links in the final component will satisfy the
     12866          method and it will return @c true in @a exists.
     12867        </desc>
    1286212868      </param>
    1286312869      <param name="exists" type="boolean" dir="return">
     
    1288412890      <param name="followSymlinks" type="boolean" dir="in">
    1288512891        <desc>
    12886            Information about symbolic links is returned if @c false.  Otherwise,
    12887            symbolic links are followed and the returned information concerns
    12888            itself with the symlink target if @c true.
    12889          </desc>
     12892          Information about symbolic links is returned if @c false.  Otherwise,
     12893          symbolic links are followed and the returned information concerns
     12894          itself with the symlink target if @c true.
     12895        </desc>
    1289012896      </param>
    1289112897      <param name="info" type="IGuestFsObjInfo" dir="return">
     
    1298712993          otherwise, if @c false, the method will work directly on a symbolic
    1298812994          link in the final component.
    12989          </desc>
     12995        </desc>
    1299012996      </param>
    1299112997      <param name="acl" type="wstring" dir="in">
     
    1639416400      </desc>
    1639516401      <param name="writable" type="boolean" dir="in">
    16396        <desc>Set this to open the medium for both reading and writing.  When
    16397              not set the medium is opened readonly.</desc>
     16402      <desc>Set this to open the medium for both reading and writing.  When
     16403        not set the medium is opened readonly.</desc>
    1639816404      </param>
    1639916405      <param name="password" type="wstring" dir="in">
     
    1663916645
    1664016646  <!--
     16647  // IDataStream
     16648  /////////////////////////////////////////////////////////////////////////
     16649  -->
     16650
     16651  <interface
     16652    name="IDataStream" extends="$unknown"
     16653    uuid="a338ed20-58d9-43ae-8b03-c1fd7088ef15"
     16654    wsmap="managed"
     16655    reservedMethods="4" reservedAttributes="8"
     16656    >
     16657    <desc>
     16658      The IDataStream interface is used to retrieve a data stream. It is
     16659      returned by <link to="IMedium::convertToStream"/>.
     16660    </desc>
     16661
     16662    <attribute name="readSize" type="unsigned long" readonly="yes">
     16663      <desc>Recommended size of a read. Requesting a larger read may be
     16664        possible in certain situations, but it is not guaranteed.</desc>
     16665    </attribute>
     16666
     16667    <method name="read">
     16668      <desc>
     16669        Read data from the stream.
     16670        <result name="VBOX_E_TIMEOUT">
     16671          Waiting time has expired.
     16672        </result>
     16673      </desc>
     16674      <param name="size" type="unsigned long" dir="in">
     16675        <desc>How many bytes to try read.</desc>
     16676      </param>
     16677      <param name="timeoutMS" type="unsigned long" dir="in">
     16678        <desc>
     16679          Timeout (in ms) for limiting the wait time for data to be available.
     16680          Pass 0 for an infinite timeout.
     16681        </desc>
     16682      </param>
     16683      <param name="data" type="octet" dir="return" safearray="yes">
     16684        <desc>Array of data read. This may be shorter than the specified size.
     16685          Returning a zero-sized array indicates the end of the stream, if the
     16686          status is successful.</desc>
     16687      </param>
     16688    </method>
     16689
     16690  </interface>
     16691
     16692  <!--
    1664116693  // IMediumIO
    1664216694  /////////////////////////////////////////////////////////////////////////
     
    1665816710  <interface
    1665916711    name="IMediumIO" extends="$unknown"
    16660     uuid="43b03a91-ea1a-4bdb-506f-8c418b72d6a3"
     16712    uuid="e4b301a9-5f86-4d65-ad1b-87ca284fb1c8"
    1666116713    wsmap="managed"
    1666216714    reservedMethods="4" reservedAttributes="8"
     
    1674916801      <param name="wholeDiskInOneEntry" type="boolean" dir="in">
    1675016802        <desc>
    16751            When @c true a partition table entry for the whole disk is created.
    16752            Otherwise the partition table is empty.
    16753         </desc>
     16803          When @c true a partition table entry for the whole disk is created.
     16804          Otherwise the partition table is empty.
     16805        </desc>
     16806      </param>
     16807    </method>
     16808
     16809    <method name="convertToStream">
     16810      <desc>
     16811        Converts the currently opened image into a stream of the specified
     16812        image type/variant. It is sufficient to open the image in read-only
     16813        mode. Only few types and variants are supported due to the inherent
     16814        restrictions of the output style.
     16815        <result name="VBOX_E_NOT_SUPPORTED">
     16816          The requested format/variant combination cannot handle stream output.
     16817        </result>
     16818        <result name="VBOX_E_FILE_ERROR">
     16819          An error occurred during the conversion.
     16820        </result>
     16821      </desc>
     16822      <param name="format" type="wstring" dir="in">
     16823        <desc>Identifier of the storage format to use for output.</desc>
     16824      </param>
     16825      <param name="variant" type="MediumVariant" safearray="yes" dir="in">
     16826        <desc>The partition table format.</desc>
     16827      </param>
     16828      <param name="bufferSize" type="unsigned long" dir="in">
     16829        <desc>
     16830          Requested buffer size (in bytes) for efficient conversion. Sizes
     16831          which are too small or too large are silently truncated to suitable
     16832          values. Tens to hundreds of Megabytes are a good choice.
     16833        </desc>
     16834      </param>
     16835      <param name="stream" type="IDataStream" dir="out">
     16836        <desc>Data stream object for reading the target image.</desc>
     16837      </param>
     16838      <param name="progress" type="IProgress" dir="return">
     16839        <desc>Progress object to track the operation completion.</desc>
    1675416840      </param>
    1675516841    </method>
     
    1802018106    <method name="querySourceBitmap" wsmap="suppress">
    1802118107      <desc>
    18022          Obtains the guest screen bitmap parameters.
     18108        Obtains the guest screen bitmap parameters.
    1802318109      </desc>
    1802418110      <param name="screenId" type="unsigned long" dir="in"/>
     
    1802818114    <method name="notifyScaleFactorChange">
    1802918115      <desc>
    18030          Notify OpenGL HGCM host service about graphics content scaling factor change.
     18116        Notify OpenGL HGCM host service about graphics content scaling factor change.
    1803118117      </desc>
    1803218118      <param name="screenId" type="unsigned long" dir="in"/>
     
    1803718123    <method name="notifyHiDPIOutputPolicyChange">
    1803818124      <desc>
    18039          Notify OpenGL HGCM host service about HiDPI monitor scaling policy change.
     18125        Notify OpenGL HGCM host service about HiDPI monitor scaling policy change.
    1804018126      </desc>
    1804118127      <param name="fUnscaledHiDPI" type="boolean" dir="in"/>
     
    1853918625        PortMode_HostPipe, the host serial device name when
    1854018626        <link to="ISerialPort::hostMode"/> is PortMode_HostDevice or the TCP
    18541        <b>port</b> (server) or <b>hostname:port</b> (client) when
     18627        <b>port</b> (server) or <b>hostname:port</b> (client) when
    1854218628        <link to="ISerialPort::hostMode"/> is PortMode_TCP.
    1854318629        For those cases, setting a @c null or empty string as the attribute's
     
    2220222288  -->
    2220322289  <enum
    22204      name="BandwidthGroupType"
    22205      uuid="1d92b67d-dc69-4be9-ad4c-93a01e1e0c8e">
     22290    name="BandwidthGroupType"
     22291    uuid="1d92b67d-dc69-4be9-ad4c-93a01e1e0c8e">
    2220622292
    2220722293    <desc>
  • trunk/src/VBox/Main/include/MediumIOImpl.h

    r72948 r74761  
    5252    HRESULT formatFAT(BOOL a_fQuick);
    5353    HRESULT initializePartitionTable(PartitionTableType_T a_enmFormat, BOOL a_fWholeDiskInOneEntry);
     54    HRESULT convertToStream(const com::Utf8Str &aFormat,
     55                            const std::vector<MediumVariant_T> &aVariant,
     56                            ULONG aBufferSize,
     57                            ComPtr<IDataStream> &aStream,
     58                            ComPtr<IProgress> &aProgress);
    5459    HRESULT close();
    5560    /** @} */
  • trunk/src/VBox/Main/src-server/MediumIOImpl.cpp

    r73505 r74761  
    394394}
    395395
     396HRESULT MediumIO::convertToStream(const com::Utf8Str &aFormat,
     397                                  const std::vector<MediumVariant_T> &aVariant,
     398                                  ULONG aBufferSize,
     399                                  ComPtr<IDataStream> &aStream,
     400                                  ComPtr<IProgress> &aProgress)
     401{
     402    return E_NOTIMPL;
     403}
     404
    396405HRESULT MediumIO::close()
    397406{
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