+ /** @param Channel index.
+ * @return Ports associated with this channel.
+ */
+ PortList const & channel_ports (uint32_t) const;
+
+ void add_channel (std::string const &, DataType);
+ void add_channel (std::string const &, DataType, std::string const &);
+ void add_channel (std::string const &, DataType, PortList);
+ std::string channel_name (uint32_t) const;
+ DataType channel_type (uint32_t) const;
+ void set_channel_name (uint32_t, std::string const &);
+ void add_port_to_channel (uint32_t, std::string);
+ void set_port (uint32_t, std::string);
+ void remove_port_from_channel (uint32_t, std::string);
+ void remove_ports_from_channel (uint32_t);
+ void remove_ports_from_channels ();
+ bool port_attached_to_channel (uint32_t, std::string);
+ bool offers_port (std::string) const;
+ bool offers_port_alone (std::string) const;
+ void remove_channel (uint32_t);
+ void remove_channels ();
+ void add_channels_from_bundle (boost::shared_ptr<Bundle>);
+ void connect (boost::shared_ptr<Bundle>, AudioEngine &);
+ void disconnect (boost::shared_ptr<Bundle>, AudioEngine &);
+ bool connected_to (boost::shared_ptr<Bundle>, AudioEngine &);
+ bool connected_to_anything (AudioEngine &);
+ bool has_same_ports (boost::shared_ptr<Bundle>) const;
+ uint32_t type_channel_to_overall (DataType, uint32_t) const;
+ uint32_t overall_channel_to_type (DataType, uint32_t) const;
+
+ void set_name (std::string const &);
+
+ /** @return Bundle name */
+ std::string name () const { return _name; }
+
+ void set_ports_are_inputs ();
+ void set_ports_are_outputs ();
+ bool ports_are_inputs () const { return _ports_are_inputs; }
+ bool ports_are_outputs () const { return !_ports_are_inputs; }
+
+ void suspend_signals ();
+ void resume_signals ();
+
+ bool operator== (Bundle const & other);
+
+ /** Things that might change about this bundle */
+ enum Change {
+ NameChanged = 0x1, ///< the bundle name or a channel name has changed
+ ConfigurationChanged = 0x2, ///< the number of channels has changed
+ PortsChanged = 0x4, ///< the port list associated with one of our channels has changed
+ TypeChanged = 0x8, ///< the data type has changed
+ DirectionChanged = 0x10 ///< the direction (whether ports are inputs or outputs) has changed
+ };
+
+ PBD::Signal1<void,Change> Changed;