コード例 #1
0
/** Build a list of the usable USB devices currently connected to the client
 * system using the VRDP wire protocol.  The structure returned must be freed
 * using free(3) when it is no longer needed; returns NULL and sets *pLen to
 * zero on failure. */
static void *build_device_list (int *pLen)
{
    void *pvDeviceList;

    Log(("RDPUSB build_device_list"));
    *pLen = 0;
    if (g_pUsbDevices)
        deviceListFree(&g_pUsbDevices);
    g_pUsbDevices = USBProxyLinuxGetDevices(g_pcszDevicesRoot, g_fUseSysfs);
    if (!g_pUsbDevices)
        return NULL;
    pvDeviceList = buildWireListFromDevices(g_pUsbDevices, pLen);
    return pvDeviceList;
}
コード例 #2
0
PUSBDEVICE USBProxyBackendLinux::getDevices(void)
{
    return USBProxyLinuxGetDevices(mDevicesRoot.c_str(), !mUsingUsbfsDevices);
}