Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members

HostApi.hxx

Go to the documentation of this file.
00001 #ifndef INCLUDED_PORTAUDIO_HOSTAPI_HXX
00002 #define INCLUDED_PORTAUDIO_HOSTAPI_HXX
00003 
00004 // ---------------------------------------------------------------------------------------
00005 
00006 #include "pa_common/portaudio.h"
00007 
00008 #include "portaudiocpp/System.hxx"
00009 
00010 // ---------------------------------------------------------------------------------------
00011 
00012 // Forward declaration(s):
00013 namespace portaudio
00014 {
00015     class Device;
00016 }
00017 
00018 // ---------------------------------------------------------------------------------------
00019 
00020 // Declaration(s):
00021 namespace portaudio
00022 {
00023 
00024 
00033     class HostApi
00034     {
00035     public:
00036         typedef System::DeviceIterator DeviceIterator;
00037 
00038         // query info: id, name, numDevices
00039         PaHostApiTypeId typeId() const;
00040         PaHostApiIndex index() const;
00041         const char *name() const;
00042         int deviceCount() const;
00043 
00044         // iterate devices
00045         DeviceIterator devicesBegin();
00046         DeviceIterator devicesEnd();
00047 
00048         // default devices
00049         Device &defaultInputDevice() const;
00050         Device &defaultOutputDevice() const;
00051 
00052         // comparison operators
00053         bool operator==(const HostApi &rhs) const;
00054         bool operator!=(const HostApi &rhs) const;
00055 
00056     private:
00057         const PaHostApiInfo *info_;
00058         Device **devices_;
00059 
00060     private:
00061         friend class System;
00062 
00063         explicit HostApi(PaHostApiIndex index);
00064         ~HostApi();
00065 
00066         HostApi(const HostApi &); // non-copyable
00067         HostApi &operator=(const HostApi &); // non-copyable
00068     };
00069 
00070 
00071 }
00072 
00073 // ---------------------------------------------------------------------------------------
00074 
00075 #endif // INCLUDED_PORTAUDIO_HOSTAPI_HXX
00076 

Generated on Fri Apr 2 20:22:15 2004 for PortAudioCpp by doxygen 1.3.6