Changeset 80469 in vbox for trunk/src/VBox/HostServices
- Timestamp:
- Aug 28, 2019 10:50:23 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp
r80468 r80469 67 67 * platform-specific backend 68 68 * 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 72 85 * 73 86 * Since VBox x.x.x transferring files via Shared Clipboard is supported. 74 87 * See the VBOX_WITH_SHARED_CLIPBOARD_URI_LIST define for supported / enabled 75 * platforms. 88 * platforms. This is called "URI transfers". 76 89 * 77 90 * Copying files / directories from guest A to guest B requires the host … … 111 124 * host's file system directly? 112 125 * 113 * @section sec_uri_structure URI handling structure .126 * @section sec_uri_structure URI handling structure 114 127 * 115 128 * All structures / classes are designed for running on both, on the guest … … 133 146 * no references are held to it anymore, or if VBoxSVC goes down. 134 147 * 135 * @section sec_uri_providers URI providers .148 * @section sec_uri_providers URI providers 136 149 * 137 150 * For certain implementations (for example on Windows guests / hosts, using … … 141 154 * the rest of the code stays the same. 142 155 * 143 * @section sec_uri_protocol URI protocol .156 * @section sec_uri_protocol URI protocol 144 157 * 145 158 * The host service issues commands which the guest has to respond with an own … … 147 160 * directories and open/close/read/write file system objects. 148 161 * 149 * The protocol does not rely on the old ReportMsg() / ReturnMsg() mechanism anymore150 * and uses a (per-client) message queue instead (see VBOX_SHARED_CLIPBOARD_GUEST_FN_GET_HOST_MSG_OLD151 * vs. VBOX_SHARED_CLIPBOARD_GUEST_FN_GET_HOST_MSG).152 *153 162 * Note that this is different from the DnD approach, as Shared Clipboard transfers 154 163 * need to be deeper integrated within the host / guest OS (i.e. for progress UI), 155 164 * 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 transfers158 * at the same time, multiple clients (client IDs) are being used. How this transfer159 * is implemented on the guest (and / or host) side depends upon the actual160 * implementation, e.g. via an own thread per transfer (see ClipboardStreamImpl-win.cpp161 * for example).162 165 * 163 166 * As there can be multiple file system objects (fs objects) selected for transfer, … … 167 170 * provider provides appropriate interface for this, even if not all implementations 168 171 * 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. 169 192 */ 170 193
Note:
See TracChangeset
for help on using the changeset viewer.