VirtualBox

Changeset 82872 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jan 27, 2020 12:43:24 PM (5 years ago)
Author:
vboxsync
Message:

Shared Clipboard/HostServices: Resolved more todos (removed READ_ACTIVE + WRITE_ACTIVE flag handling, too buggy for now).

Location:
trunk/src/VBox/HostServices/SharedClipboard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-internal.h

    r82852 r82872  
    9191/** No Shared Clipboard client flags defined. */
    9292#define SHCLCLIENTSTATE_FLAGS_NONE              0
    93 /** Client has a guest read operation active. */
     93/** Client has a guest read operation active. Currently unused. */
    9494#define SHCLCLIENTSTATE_FLAGS_READ_ACTIVE       RT_BIT(0)
    95 /** Client has a guest write operation active. */
     95/** Client has a guest write operation active. Currently unused. */
    9696#define SHCLCLIENTSTATE_FLAGS_WRITE_ACTIVE      RT_BIT(1)
    9797/** @} */
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp

    r82853 r82872  
    13421342#endif
    13431343        {
    1344             pClient->State.fFlags |= SHCLCLIENTSTATE_FLAGS_READ_ACTIVE;
    13451344            rc = VINF_SUCCESS;
    13461345        }
     
    14311430                rc = ShClSvcImplFormatAnnounce(pClient, &CmdCtx, &FormatData);
    14321431            }
    1433 
    1434             /** @todo r=bird: I'm not sure if the guest should be automatically allowed
    1435              *        to write the host clipboard now.  It would make more sense to disallow
    1436              *        host clipboard reads until the host reports formats.
    1437              *
    1438              *        The writes should only really be allowed upon request from the host,
    1439              *        shouldn't they? (Though, I'm not sure, maybe there are situations
    1440              *        where the guest side will just want to push the content over
    1441              *        immediately while it's still available, I don't quite recall now...
    1442              */
    1443             if (RT_SUCCESS(rc))
    1444                 pClient->State.fFlags |= SHCLCLIENTSTATE_FLAGS_WRITE_ACTIVE;
    14451432        }
    14461433    }
     
    14671454        return VERR_ACCESS_DENIED;
    14681455
    1469     /// @todo r=bird: The management of the SHCLCLIENTSTATE_FLAGS_READ_ACTIVE
    1470     /// makes it impossible for the guest to retrieve more than one format from
    1471     /// the clipboard.  I.e. it can either get the TEXT or the HTML rendering,
    1472     /// but not both.  So, I've disable the check. */
    1473     //ASSERT_GUEST_RETURN(pClient->State.fFlags & SHCLCLIENTSTATE_FLAGS_READ_ACTIVE, VERR_WRONG_ORDER);
    1474 
    14751456    /*
    14761457     * Digest parameters.
     
    15311512        if (pClient->State.POD.uFormat == VBOX_SHCL_FMT_NONE)
    15321513            pClient->State.POD.uFormat = dataBlock.uFormat;
    1533         /// @todo r=bird: This actively breaks copying different types of data into the
    1534         /// guest (first copy a text snippet, then you cannot copy any bitmaps), so I've
    1535         /// disabled it.
    1536         //ASSERT_GUEST_MSG_RETURN(pClient->State.POD.uFormat == dataBlock.uFormat,
    1537         //                        ("Requested %#x, POD.uFormat=%#x\n", dataBlock.uFormat, pClient->State.POD.uFormat),
    1538         //                        VERR_BAD_EXE_FORMAT /*VERR_INTERNAL_ERROR*/);
    15391514    }
    15401515
     
    15951570        if (cbActual >= dataBlock.cbData)
    15961571            rc = VINF_BUFFER_OVERFLOW;
    1597 
    1598         if (rc == VINF_SUCCESS)
    1599         {
    1600             /* Only remove "read active" flag after successful read again. */
    1601             /** @todo r=bird: This doesn't make any effing sense.  What if the guest
    1602              *        wants to read another format???  */
    1603             pClient->State.fFlags &= ~SHCLCLIENTSTATE_FLAGS_READ_ACTIVE;
    1604         }
    16051572    }
    16061573
     
    16231590    else
    16241591        return VERR_ACCESS_DENIED;
    1625 
    1626     /** @todo r=bird: This whole active flag stuff is broken, so disabling for now. */
    1627     //if (pClient->State.fFlags & SHCLCLIENTSTATE_FLAGS_WRITE_ACTIVE)
    1628     //{ /* likely */ }
    1629     //else
    1630     //    return VERR_WRONG_ORDER;
    16311592
    16321593    /*
     
    16891650        if (pClient->State.POD.uFormat == VBOX_SHCL_FMT_NONE)
    16901651            pClient->State.POD.uFormat = dataBlock.uFormat;
    1691         /** @todo r=bird: this must be buggy to, I've disabled it without testing
    1692          *        though. */
    1693         //ASSERT_GUEST_MSG_RETURN(pClient->State.POD.uFormat == dataBlock.uFormat,
    1694         //                        ("Requested %#x, POD.uFormat=%#x\n", dataBlock.uFormat, pClient->State.POD.uFormat),
    1695         //                        VERR_BAD_EXE_FORMAT /*VERR_INTERNAL_ERROR*/);
    16961652    }
    16971653
     
    17131669    else
    17141670        rc = ShClSvcImplWriteData(pClient, &cmdCtx, &dataBlock);
    1715     if (RT_SUCCESS(rc))
    1716     {
    1717         /* Remove "write active" flag after successful read again. */
    1718         /** @todo r=bird: This doesn't make any effing sense.  What if the host
    1719          *         wants to have the guest write it another format???  */
    1720         pClient->State.fFlags &= ~SHCLCLIENTSTATE_FLAGS_WRITE_ACTIVE;
    1721     }
    17221671
    17231672    LogFlowFuncLeaveRC(rc);
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