00001 /* 00002 00003 This file is part of la Marmite. 00004 Copyright (C) 2005 Nicolas Falquet. 00005 00006 La Marmite is free software ; you can redistribute it and/or 00007 modify it under the terms of the GNU General Public License as 00008 published by the Free Software Foundation ; either version 2 of 00009 the License, or (at your option) any later version. 00010 00011 La Marmite is distributed in the hope that it will be useful, but 00012 WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with la Marmite ; if not, write to the Free Software 00018 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 00019 02111-1307 USA 00020 00021 */ 00022 00023 #ifndef M_PLUGIN_PORT_DESCRIPTOR_H 00024 #define M_PLUGIN_PORT_DESCRIPTOR_H 00025 00026 #include <ladspa.h> 00027 00028 #include "MPluginDescriptor.h" 00029 00039 class MPluginPortDescriptor 00040 { 00041 00042 public : 00043 00044 // function 00045 00049 virtual MPluginDescriptor * PluginDescriptor ( ) const; 00050 00054 virtual const LADSPA_PortDescriptor PortDescriptor ( ) const; 00055 00059 virtual string Name ( ) const; 00060 00067 virtual string FullName ( ) const; 00068 00072 virtual bool IsAudio ( ) const; 00073 00077 virtual bool IsControl ( ) const; 00078 00082 virtual bool IsInput ( ) const; 00083 00087 virtual bool IsOutput ( ) const; 00088 00092 virtual unsigned long PortNumber ( ) const; 00093 00094 // virtual MPluginPortRangeHint * RangeHint ( ) const; 00095 00096 protected : 00097 00102 MPluginPortDescriptor ( MPluginDescriptor * pluginDescriptor, unsigned long portNumber ); 00103 00104 friend void MPluginDescriptor::createAudioInput ( const unsigned long portNumber ); 00105 friend void MPluginDescriptor::createAudioOutput ( const unsigned long portNumber ); 00106 friend void MPluginDescriptor::createControlInput ( const unsigned long portNumber ); 00107 friend void MPluginDescriptor::createControlOutput ( const unsigned long portNumber ); 00108 00109 // attributes 00110 00112 MPluginDescriptor * _pluginDescriptor; 00113 00115 unsigned long _portNumber; 00116 00117 // MPluginPortRangeHint * _rangeHint; 00118 00119 }; 00120 00121 #endif // M_PLUGIN_PORT_DESCRIPTOR_H