VirtualBox

Changeset 82481 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 7, 2019 1:05:01 AM (5 years ago)
Author:
vboxsync
Message:

VBoxClipboardSvc: Moved the saved state version defines from the public service header and into the service implementation where it ough to be. Also, s/_SSM_/_SAVED_STATE_/ so the things make sense (the saved state manage doesn't have a version, only an $Id$ at the top of the file), and s/_VER_LATEST/_VER_CURRENT to conform with the rest of VBox. Explained why bit 31 is set in the version number as the code related to this was apparently jettisoned recently. bugref:9437

File:
1 edited

Legend:

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

    r82462 r82481  
    237237
    238238using namespace HGCM;
     239
     240
     241/*********************************************************************************************************************************
     242*   Defined Constants And Macros                                                                                                 *
     243*********************************************************************************************************************************/
     244/** @name The saved state versions for the shared clipboard service.
     245 *
     246 * @note We set bit 31 because prior to version 0x80000002 there would be a
     247 *       structure size rather than a version number.  Setting bit 31 dispells
     248 *       any possible ambiguity.
     249 *
     250 * @{ */
     251/** The current saved state version. */
     252#define VBOX_SHCL_SAVED_STATE_VER_CURRENT   VBOX_SHCL_SAVED_STATE_VER_6_1RC1
     253/** Adds the client's POD state and client state flags.
     254 * @since 6.1 RC1 */
     255#define VBOX_SHCL_SAVED_STATE_VER_6_1RC1    UINT32_C(0x80000004)
     256/** First attempt saving state during @bugref{9437} development.
     257 * @since 6.1 BETA 2   */
     258#define VBOX_SHCL_SAVED_STATE_VER_6_1B2     UINT32_C(0x80000003)
     259/** First structured version.
     260 * @since 3.1 / r53668 */
     261#define VBOX_SHCL_SAVED_STATE_VER_3_1       UINT32_C(0x80000002)
     262/** This was just a state memory dump, including pointers and everything.
     263 * @note This is not supported any more. Sorry.  */
     264#define VBOX_SHCL_SAVED_STATE_VER_NOT_SUPP  (ARCH_BITS == 64 ? UINT32_C(72) : UINT32_C(48))
     265/** @} */
    239266
    240267
     
    21392166
    21402167    /* Write Shared Clipboard saved state version. */
    2141     SSMR3PutU32(pSSM, VBOX_SHCL_SSM_VER_LATEST);
     2168    SSMR3PutU32(pSSM, VBOX_SHCL_SAVED_STATE_VER_CURRENT);
    21422169
    21432170    int rc = SSMR3PutStructEx(pSSM, &pClient->State, sizeof(pClient->State), 0 /*fFlags*/, &s_aShClSSMClientState[0], NULL);
     
    22312258    LogFunc(("u32ClientID=%RU32, lenOrVer=%#RX64\n", u32ClientID, lenOrVer));
    22322259
    2233     if (lenOrVer == VBOX_SHCL_SSM_VER_0)
    2234     {
     2260    if (lenOrVer == VBOX_SHCL_SAVED_STATE_VER_3_1)
    22352261        return svcLoadStateV0(u32ClientID, pvClient, pSSM, uVersion);
    2236     }
    2237     else if (lenOrVer >= VBOX_SHCL_SSM_VER_1)
    2238     {
    2239         if (lenOrVer >= VBOX_SHCL_SSM_VER_2)
     2262
     2263    if (lenOrVer >= VBOX_SHCL_SAVED_STATE_VER_6_1B2)
     2264    {
     2265        if (lenOrVer >= VBOX_SHCL_SAVED_STATE_VER_6_1RC1)
    22402266        {
    22412267            rc = SSMR3GetStructEx(pSSM, &pClient->State, sizeof(pClient->State), 0 /* fFlags */,
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