}
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * UnityPluginPosix::GetCapabilities --
+ *
+ * Called by the service core when the host requests the capabilities
+ * supported by the guest tools.
+ *
+ * Results:
+ * A list of capabilities to be sent to the host.
+ *
+ * Side effects:
+ * None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+std::vector<ToolsAppCapability>
+UnityPluginPosix::GetCapabilities(gboolean set) // IN
+{
+ std::vector<ToolsAppCapability> caps = UnityPlugin::GetCapabilities(set);
+#define ADDCAP(capName) caps.push_back(ToolsAppCapabilityNewEntry(capName, set))
+ ADDCAP(UNITY_CAP_WORK_AREA);
+ ADDCAP(UNITY_CAP_START_MENU);
+ ADDCAP(UNITY_CAP_MULTI_MON);
+ ADDCAP(UNITY_CAP_VIRTUAL_DESK);
+ ADDCAP(UNITY_CAP_STICKY_WINDOWS);
+#undef ADDCAP
+ return caps;
+}
+
+
/*
*-----------------------------------------------------------------------------
*
Bool wantSticky);
static UnitySpecialWindow *MakeCompositeOverlaysObject(UnityPlatform *up);
-static const GuestCapabilities platformUnityCaps[] = {
- UNITY_CAP_WORK_AREA,
- UNITY_CAP_START_MENU,
- UNITY_CAP_MULTI_MON,
- UNITY_CAP_VIRTUAL_DESK,
- UNITY_CAP_STICKY_WINDOWS,
-};
-
/*
* Has to be global for UnityPlatformXErrorHandler
*/
}
-/*
- *----------------------------------------------------------------------------
- *
- * UnityPlatformRegisterCaps --
- *
- * Register guest platform specific capabilities with the VMX.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------------
- */
-
-void
-UnityPlatformRegisterCaps(UnityPlatform *up) // IN
-{
- ASSERT(up);
-
- if (!RpcOut_sendOne(NULL, NULL, UNITY_RPC_SHOW_TASKBAR_CAP " %d",
- Unity_IsSupported() ? 1 : 0)) {
- Debug("Could not set unity show taskbar cap\n");
- }
-
- AppUtil_SendGuestCaps(platformUnityCaps, ARRAYSIZE(platformUnityCaps), TRUE);
-}
-
-
-/*
- *----------------------------------------------------------------------------
- *
- * UnityPlatformUnregisterCaps --
- *
- * Unregister guest platform specific capabilities with the VMX.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------------
- */
-
-void
-UnityPlatformUnregisterCaps(UnityPlatform *up) // IN
-{
- /*
- * This function may potentially be called during UnityPlatform destruction.
- */
- if (!up) {
- return;
- }
-
- AppUtil_SendGuestCaps(platformUnityCaps, ARRAYSIZE(platformUnityCaps), FALSE);
-
- if (!RpcOut_sendOne(NULL, NULL, UNITY_RPC_SHOW_TASKBAR_CAP " 0")) {
- Debug("Failed to unregister Unity taskbar capability\n");
- }
-}
-
-
/*****************************************************************************
* Unity main loop and event handling *
*****************************************************************************/