HostHardwareLinux.h revision a0c1e203edd9781c6d0f7560e37dbc729fef5991
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync * Classes for handling hardware detection under Linux.
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync * Please feel free to expand these to work for other systems (Solaris!) or to
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync * add new ones for other systems.
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync * Copyright (C) 2008-2009 Oracle Corporation
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync * available from http://www.virtualbox.org. This file is free software;
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync * you can redistribute it and/or modify it under the terms of the GNU
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync * General Public License (GPL) as published by the Free Software
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync * Class for probing and returning information about host DVD and floppy
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync * drives. To use this class, create an instance, call one of the update
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync * methods to do the actual probing and use the iterator methods to get the
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync * result of the probe.
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync /** Structure describing a host drive */
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync /** The device node of the drive. */
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync /** A unique identifier for the device, if available. This should be
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync * kept consistant accross different probing methods of a given
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync * platform if at all possible. */
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync /** A textual description of the drive. */
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync /** Constructors */
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync /** List (resp vector) holding drive information */
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync * Search for host floppy drives and rebuild the list, which remains empty
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync * until the first time this method is called.
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync * @returns iprt status code
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync * Search for host DVD drives and rebuild the list, which remains empty
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync * until the first time this method is called.
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync * @returns iprt status code
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync /** Get the first element in the list of floppy drives. */
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync /** Get the last element in the list of floppy drives. */
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync /** Get the first element in the list of DVD drives. */
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync /** Get the last element in the list of DVD drives. */
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync /** The list of currently available floppy drives */
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync /** The list of currently available DVD drives */
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync/** Convenience typedef. */
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsynctypedef VBoxMainDriveInfo::DriveInfoList DriveInfoList;
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync/** Convenience typedef. */
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync/** Structure describing a host USB device */
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync /** The device node of the device. */
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync /** The system identifier of the device. Specific to the probing
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync * method. */
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync /** List of interfaces. Only one simulaneous traversal is possible. */
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync/** Destructor. */
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync/** Constructor - the strings will be duplicated. */
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsyncint USBDevInfoInit(USBDeviceInfo *pSelf, const char *aDevice,
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync const char *aSystemID);
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync * Return the first in a list of USB device interfaces (that is, its sysfs
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync * path), or NULL if there are none.
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsyncchar *USBDevInfoFirstInterface(struct USBInterfaceList *pInterfaces);
9fc464631dc4a68fbb5eb6419d61fbe91b6b16bdvboxsync * Return the next in a list of USB device interfaces (that is, its sysfs
#include "vector.h"
typedef struct VBoxMainUSBDeviceInfo
VBoxMainHotplugWaiterImpl(void) {}
VBoxMainHotplugWaiter (void);
~VBoxMainHotplugWaiter (void)
void Interrupt (void)
int getStatus(void)