VirtualBox

Changeset 80469 in vbox for trunk/src/VBox/HostServices


Ignore:
Timestamp:
Aug 28, 2019 10:50:23 AM (5 years ago)
Author:
vboxsync
Message:

Shared Clipboard/URI: Docs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp

    r80468 r80469  
    6767 *                                      platform-specific backend
    6868 *
    69  * This section may be written in the future :)
    70  *
    71  * @section sec_uri_intro               Transferring files.
     69 * The initial protocol implementation (called protocol v0) was very simple,
     70 * and could only handle simple data (like copied text and so on).
     71 *
     72 * Since VBox 6.0 a newer protocol (v1) has been established to also support
     73 * file transfers. This protocol does not rely on the old ReportMsg() / ReturnMsg()
     74 * mechanism anymore and uses a (per-client) message queue instead
     75 * (see VBOX_SHARED_CLIPBOARD_GUEST_FN_GET_HOST_MSG_OLD vs. VBOX_SHARED_CLIPBOARD_GUEST_FN_GET_HOST_MSG).
     76 *
     77 * The protocol also support out-of-order messages by using so-called "context IDs",
     78 * which are generated by the host. A context ID consists of a so-called "source event ID"
     79 * and a so-called "event ID". Each HGCM client has an own, random, source event ID and
     80 * generates non-deterministic event IDs so that the guest side does not known what
     81 * comes next; the guest side has to reply with the same conext ID which was sent by
     82 * the host request.
     83 *
     84 * @section sec_uri_intro               Transferring files
    7285 *
    7386 * Since VBox x.x.x transferring files via Shared Clipboard is supported.
    7487 * See the VBOX_WITH_SHARED_CLIPBOARD_URI_LIST define for supported / enabled
    75  * platforms.
     88 * platforms. This is called "URI transfers".
    7689 *
    7790 * Copying files / directories from guest A to guest B requires the host
     
    111124 *       host's file system directly?
    112125 *
    113  * @section sec_uri_structure           URI handling structure.
     126 * @section sec_uri_structure           URI handling structure
    114127 *
    115128 * All structures / classes are designed for running on both, on the guest
     
    133146 * no references are held to it  anymore, or if VBoxSVC goes down.
    134147 *
    135  * @section sec_uri_providers           URI providers.
     148 * @section sec_uri_providers           URI providers
    136149 *
    137150 * For certain implementations (for example on Windows guests / hosts, using
     
    141154 * the rest of the code stays the same.
    142155 *
    143  * @section sec_uri_protocol            URI protocol.
     156 * @section sec_uri_protocol            URI protocol
    144157 *
    145158 * The host service issues commands which the guest has to respond with an own
     
    147160 * directories and open/close/read/write file system objects.
    148161 *
    149  * The protocol does not rely on the old ReportMsg() / ReturnMsg() mechanism anymore
    150  * and uses a (per-client) message queue instead (see VBOX_SHARED_CLIPBOARD_GUEST_FN_GET_HOST_MSG_OLD
    151  * vs. VBOX_SHARED_CLIPBOARD_GUEST_FN_GET_HOST_MSG).
    152  *
    153162 * Note that this is different from the DnD approach, as Shared Clipboard transfers
    154163 * need to be deeper integrated within the host / guest OS (i.e. for progress UI),
    155164 * and this might require non-monolithic / random access APIs to achieve.
    156  *
    157  * One transfer always is handled by an own (HGCM) client, so for multiple transfers
    158  * at the same time, multiple clients (client IDs) are being used. How this transfer
    159  * is implemented on the guest (and / or host) side depends upon the actual
    160  * implementation, e.g. via an own thread per transfer (see ClipboardStreamImpl-win.cpp
    161  * for example).
    162165 *
    163166 * As there can be multiple file system objects (fs objects) selected for transfer,
     
    167170 * provider provides appropriate interface for this, even if not all implementations
    168171 * might need this mechanism.
     172 *
     173 * An URI transfer has three stages:
     174 *  - 1. Announcement: An URI transfer-compatible format (currently only one format available)
     175 *          has been announced, the destination side creates a transfer object, which then,
     176 *          depending on the actual implementation, can be used to tell the OS that
     177 *          there is URI (file) data available.
     178 *          At this point this just acts as a (kind-of) promise to the OS that we
     179 *          can provide (file) data at some later point in time.
     180 *
     181 *  - 2. Initialization: As soon as the OS requests the (file) data, mostly triggered
     182 *          by the user starting a paste operation (CTRL + V), the transfer get initialized
     183 *          on the destination side, which in turn lets the source know that a transfer
     184 *          is going to happen.
     185 *
     186 *  - 3. Transfer: At this stage the actual transfer from source to the destination takes
     187 *          place. How the actual transfer is structurized (e.g. which files / directories
     188 *          are transferred in which order) depends on the destination implementation. This
     189 *          is necessary in order to fulfill requirements on the destination side with
     190 *          regards to ETA calculation or other dependencies.
     191 *          Both sides can abort or cancel the transfer at any time.
    169192 */
    170193
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