VirtualBox

Changeset 17684 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
Mar 11, 2009 12:15:33 PM (16 years ago)
Author:
vboxsync
Message:

#3551: “Main: Replace remaining collections with safe arrays”
Replaced HostUSBDeviceCollection. Reviewed/Okayed by dmik, sunlover.

Location:
trunk/src/VBox/Main/include
Files:
1 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/ConsoleImpl.h

    r17669 r17684  
    116116    STDMETHOD(COMGETTER(Debugger)) (IMachineDebugger **aDebugger);
    117117    STDMETHOD(COMGETTER(USBDevices)) (ComSafeArrayOut (IUSBDevice *, aUSBDevices));
    118     STDMETHOD(COMGETTER(RemoteUSBDevices)) (IHostUSBDeviceCollection **aRemoteUSBDevices);
     118    STDMETHOD(COMGETTER(RemoteUSBDevices)) (ComSafeArrayOut (IHostUSBDevice *, aRemoteUSBDevices));
    119119    STDMETHOD(COMGETTER(RemoteDisplayInfo)) (IRemoteDisplayInfo **aRemoteDisplayInfo);
    120120    STDMETHOD(COMGETTER(SharedFolders)) (ComSafeArrayOut (ISharedFolder *, aSharedFolders));
  • trunk/src/VBox/Main/include/GuestOSTypeImpl.h

    r16971 r17684  
    2424
    2525#include "VirtualBoxBase.h"
    26 #include "Collection.h"
    2726#include "Global.h"
    2827
  • trunk/src/VBox/Main/include/HostImpl.h

    r17679 r17684  
    7979    STDMETHOD(COMGETTER(DVDDrives))(ComSafeArrayOut (IHostDVDDrive*, drives));
    8080    STDMETHOD(COMGETTER(FloppyDrives))(ComSafeArrayOut (IHostFloppyDrive*, drives));
    81     STDMETHOD(COMGETTER(USBDevices))(IHostUSBDeviceCollection **aUSBDevices);
     81    STDMETHOD(COMGETTER(USBDevices))(ComSafeArrayOut (IHostUSBDevice *, aUSBDevices));
    8282    STDMETHOD(COMGETTER(USBDeviceFilters))(ComSafeArrayOut (IHostUSBDeviceFilter *, aUSBDeviceFilters));
    8383    STDMETHOD(COMGETTER(NetworkInterfaces))(ComSafeArrayOut (IHostNetworkInterface *, aNetworkInterfaces));
     
    111111    STDMETHOD(FindHostNetworkInterfaceById) (IN_GUID id, IHostNetworkInterface **networkInterface);
    112112    STDMETHOD(FindHostNetworkInterfacesOfType) (HostNetworkInterfaceType_T type, ComSafeArrayOut (IHostNetworkInterface *, aNetworkInterfaces));
     113    STDMETHOD(FindUSBDeviceByAddress) (IN_BSTR aAddress, IHostUSBDevice **aDevice);
     114    STDMETHOD(FindUSBDeviceById) (IN_GUID aId, IHostUSBDevice **aDevice);
    113115
    114116    // public methods only for internal purposes
  • trunk/src/VBox/Main/include/HostNetworkInterfaceImpl.h

    r17613 r17684  
    77
    88/*
    9  * Copyright (C) 2006-2008 Sun Microsystems, Inc.
     9 * Copyright (C) 2006-2009 Sun Microsystems, Inc.
    1010 *
    1111 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2626
    2727#include "VirtualBoxBase.h"
    28 #include "Collection.h"
    2928#include "VirtualBoxImpl.h"
    3029
  • trunk/src/VBox/Main/include/MachineImpl.h

    r17673 r17684  
    77
    88/*
    9  * Copyright (C) 2006-2007 Sun Microsystems, Inc.
     9 * Copyright (C) 2006-2009 Sun Microsystems, Inc.
    1010 *
    1111 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    3232#include "FloppyDriveImpl.h"
    3333#include "HardDiskAttachmentImpl.h"
    34 #include "Collection.h"
    3534#include "NetworkAdapterImpl.h"
    3635#include "AudioAdapterImpl.h"
  • trunk/src/VBox/Main/include/NetworkAdapterImpl.h

    r17387 r17684  
    77
    88/*
    9  * Copyright (C) 2006-2007 Sun Microsystems, Inc.
     9 * Copyright (C) 2006-2009 Sun Microsystems, Inc.
    1010 *
    1111 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2626
    2727#include "VirtualBoxBase.h"
    28 #include "Collection.h"
    2928
    3029class Machine;
  • trunk/src/VBox/Main/include/ProgressImpl.h

    r16707 r17684  
    66
    77/*
    8  * Copyright (C) 2006-2008 Sun Microsystems, Inc.
     8 * Copyright (C) 2006-2009 Sun Microsystems, Inc.
    99 *
    1010 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2525
    2626#include "VirtualBoxBase.h"
    27 #include "Collection.h"
    2827
    2928#include <VBox/com/SupportErrorInfo.h>
  • trunk/src/VBox/Main/include/RemoteUSBDeviceImpl.h

    r15051 r17684  
    88
    99/*
    10  * Copyright (C) 2006-2008 Sun Microsystems, Inc.
     10 * Copyright (C) 2006-2009 Sun Microsystems, Inc.
    1111 *
    1212 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2727
    2828#include "VirtualBoxBase.h"
    29 #include "Collection.h"
    3029
    3130struct _VRDPUSBDEVICEDESC;
     
    138137};
    139138
    140 COM_DECL_READONLY_ENUM_AND_COLLECTION_EX_BEGIN (ComObjPtr <RemoteUSBDevice>, IHostUSBDevice, RemoteUSBDevice)
    141 
    142     STDMETHOD(FindById) (IN_GUID aId, IHostUSBDevice **aDevice)
    143     {
    144         Guid idToFind = aId;
    145         if (idToFind.isEmpty())
    146             return E_INVALIDARG;
    147         if (!aDevice)
    148             return E_POINTER;
    149 
    150         *aDevice = NULL;
    151         Vector::value_type found;
    152         Vector::iterator it = vec.begin();
    153         while (!found && it != vec.end())
    154         {
    155             Guid id;
    156             (*it)->COMGETTER(Id) (id.asOutParam());
    157             if (id == idToFind)
    158                 found = *it;
    159             ++ it;
    160         }
    161 
    162         if (!found)
    163             return setError (E_INVALIDARG, RemoteUSBDeviceCollection::tr (
    164                 "Could not find a USB device with UUID {%s}"),
    165                 idToFind.toString().raw());
    166 
    167         return found.queryInterfaceTo (aDevice);
    168     }
    169 
    170     STDMETHOD(FindByAddress) (IN_BSTR aAddress, IHostUSBDevice **aDevice)
    171     {
    172         if (!aAddress)
    173             return E_INVALIDARG;
    174         if (!aDevice)
    175             return E_POINTER;
    176 
    177         *aDevice = NULL;
    178         Vector::value_type found;
    179         Vector::iterator it = vec.begin();
    180         while (!found && it != vec.end())
    181         {
    182             Bstr address;
    183             (*it)->COMGETTER(Address) (address.asOutParam());
    184             if (address == aAddress)
    185                 found = *it;
    186             ++ it;
    187         }
    188 
    189         if (!found)
    190             return setError (E_INVALIDARG, RemoteUSBDeviceCollection::tr (
    191                 "Could not find a USB device with address '%ls'"),
    192                 aAddress);
    193 
    194         return found.queryInterfaceTo (aDevice);
    195     }
    196 
    197 COM_DECL_READONLY_ENUM_AND_COLLECTION_EX_END (ComObjPtr <RemoteUSBDevice>, IHostUSBDevice, RemoteUSBDevice)
    198 
    199 
    200139#endif // ____H_REMOTEUSBDEVICEIMPL
    201140/* vi: set tabstop=4 shiftwidth=4 expandtab: */
  • trunk/src/VBox/Main/include/SharedFolderImpl.h

    r16966 r17684  
    55
    66/*
    7  * Copyright (C) 2006-2007 Sun Microsystems, Inc.
     7 * Copyright (C) 2006-2009 Sun Microsystems, Inc.
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2424
    2525#include "VirtualBoxBase.h"
    26 #include "Collection.h"
    2726#include <VBox/shflsvc.h>
    2827
  • trunk/src/VBox/Main/include/SnapshotImpl.h

    r17260 r17684  
    55
    66/*
    7  * Copyright (C) 2006-2007 Sun Microsystems, Inc.
     7 * Copyright (C) 2006-2009 Sun Microsystems, Inc.
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2424
    2525#include "VirtualBoxBase.h"
    26 #include "Collection.h"
    2726
    2827#include <iprt/time.h>
Note: See TracChangeset for help on using the changeset viewer.

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