Tidy.
[ardour.git] / libs / ardour / ardour / port.h
index 7539aac9d56ed8f594590c9d46b462954201663f..c63faa162d8bd78568d6945ccda82dc027ddaa5a 100644 (file)
 #ifndef __ardour_port_h__
 #define __ardour_port_h__
 
-#include "ardour/data_type.h"
-#include "ardour/types.h"
-#include <sigc++/trackable.h>
-#include <jack/jack.h>
-#include <string>
 #include <set>
+#include <string>
 #include <vector>
+#include <jack/jack.h>
+#include <sigc++/trackable.h>
+#include "ardour/data_type.h"
+#include "ardour/types.h"
 
 namespace ARDOUR {
 
@@ -65,11 +65,6 @@ public:
                return _flags & IsOutput;
        }
 
-       /* @return true if this port is visible outside Ardour (via JACK) */
-       bool external () const {
-               return _jack_port != 0;
-       }
-
        bool connected () const;
        int disconnect_all ();
        int get_connections (std::vector<std::string> &) const;
@@ -81,7 +76,7 @@ public:
 
        /* connection by Port* */
        bool connected_to (Port *) const;
-       int connect (Port *);
+       virtual int connect (Port *);
        int disconnect (Port *);
 
        void ensure_monitor_input (bool);
@@ -89,9 +84,8 @@ public:
        nframes_t total_latency () const;
        int reestablish ();
        int reconnect ();
-       void set_latency (nframes_t);
        void request_monitor_input (bool);
-       void make_external ();
+       void set_latency (nframes_t);
 
        virtual void reset ();
 
@@ -107,29 +101,26 @@ public:
 
 protected:
        
-       Port (std::string const &, DataType, Flags, bool);
+       Port (std::string const &, DataType, Flags);
 
-       jack_port_t* _jack_port; ///< JACK port, or 0 if we don't have one
-       std::set<Port*> _connections; ///< internal Ports that we are connected to
+       jack_port_t* _jack_port; ///< JACK port
 
        static AudioEngine* _engine; ///< the AudioEngine
-       
+
 private:
        friend class AudioEngine;
 
        void recompute_total_latency () const;
-       void do_make_external (DataType);
        
        /* XXX */
        bool _last_monitor;
-       nframes_t _latency;
 
        std::string _name; ///< port short name
        Flags _flags; ///< flags
 
-       /// list of JACK ports that we are connected to; we only keep this around
-       /// so that we can implement ::reconnect ()
-       std::set<std::string> _named_connections;
+       /** ports that we are connected to, kept so that we can
+           reconnect to JACK when required */
+       std::set<std::string> _connections;
 };
 
 }