Bool HgfsServerManager_Register(HgfsServerMgrData *data) // IN: RpcIn channel { ASSERT(data); ASSERT(data->appName); Debug("%s: Register %s.\n", __FUNCTION__, data->appName); /* * Passing NULL here is safe because the shares maintained by the guest * policy server never change, invalidating the need for an invalidate * function. * XXX - retrieve the enum of shares routines and will need to pass this * down through the channel guest into the HGFS server directly. */ if (!HgfsServerPolicy_Init(NULL, &gHgfsServerManagerGuestData.enumResources)) { return FALSE; } if (!HgfsChannelGuest_Init(data, &gHgfsServerManagerGuestData)) { HgfsServerPolicy_Cleanup(); return FALSE; } return TRUE; }
void HgfsServerManager_Unregister(HgfsServerMgrData *data) // IN: RpcIn channel { ASSERT(data); ASSERT(data->appName != NULL); HgfsChannelGuest_Exit(data); HgfsServerPolicy_Cleanup(); memset(&gHgfsServerManagerGuestData, 0, sizeof gHgfsServerManagerGuestData); }