VirtualBox

source: vbox/trunk/src/VBox/Main/testcase/tstUSBLinux.h@ 15473

最後變更 在這個檔案從15473是 14991,由 vboxsync 提交於 16 年 前

Main: rework the Linux host drive code to use libdbus-1 directly instead of libhal

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id Revision
檔案大小: 1.2 KB
 
1/* $Id $ */
2/** @file
3 * VirtualBox USB Proxy Service class, test version for Linux hosts.
4 */
5
6/*
7 * Copyright (C) 2008 Sun Microsystems, Inc.
8 *
9 * Sun Microsystems, Inc. confidential
10 * All rights reserved
11 */
12
13
14#ifndef ____H_TSTUSBLINUX
15#define ____H_TSTUSBLINUX
16
17typedef int HRESULT;
18enum { S_OK = 0, E_NOTIMPL = 1 };
19
20#include <VBox/usb.h>
21#include <VBox/usbfilter.h>
22
23#include <VBox/err.h>
24
25#ifdef VBOX_USB_WITH_SYSFS
26# include <libhal.h>
27#endif
28
29#include <stdio.h>
30/**
31 * The Linux hosted USB Proxy Service.
32 */
33class USBProxyServiceLinux
34{
35public:
36 USBProxyServiceLinux() : mLastError(VINF_SUCCESS) {}
37 HRESULT initSysfs(void);
38 PUSBDEVICE getDevicesFromSysfs(void);
39 int getLastError(void) { return mLastError; }
40
41private:
42 int start(void) { return VINF_SUCCESS; }
43 static void freeDevice(PUSBDEVICE) {} /* We don't care about leaks in a test. */
44 int usbProbeInterfacesFromLibhal(const char *pszHalUuid, PUSBDEVICE pDev);
45 int mLastError;
46# ifdef VBOX_USB_WITH_SYSFS
47 /** Our connection to DBus for getting information from hal. This will be
48 * NULL if the initialisation failed. */
49 DBusConnection *mDBusConnection;
50 /** Handle to libhal. */
51 LibHalContext *mLibHalContext;
52# endif
53};
54
55#endif /* !____H_TSTUSBLINUX */
56
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette