+ int subtract = 0;
+
+ /* the monitor bus remote ID is in a different
+ * "namespace" than regular routes. its existence doesn't
+ * affect normal (low) numbered routes.
+ */
+
+ if (_monitor_out) {
+ subtract++;
+ }
+
+ return nroutes() - subtract;
+}
+
+void
+Session::notify_remote_id_change ()
+{
+ if (deletion_in_progress()) {
+ return;
+ }
+
+ switch (Config->get_remote_model()) {
+ case MixerSort:
+ case EditorSort:
+ Route::RemoteControlIDChange (); /* EMIT SIGNAL */
+ break;
+ default:
+ break;
+ }
+}
+
+void
+Session::sync_order_keys (RouteSortOrderKey sort_key_changed)
+{
+ if (deletion_in_progress()) {
+ return;
+ }
+
+ /* tell everyone that something has happened to the sort keys
+ and let them sync up with the change(s)
+ this will give objects that manage the sort order keys the
+ opportunity to keep them in sync if they wish to.
+ */
+
+ DEBUG_TRACE (DEBUG::OrderKeys, string_compose ("Sync Order Keys, based on %1\n", enum_2_string (sort_key_changed)));
+
+ Route::SyncOrderKeys (sort_key_changed); /* EMIT SIGNAL */
+
+ DEBUG_TRACE (DEBUG::OrderKeys, "\tsync done\n");
+}
+
+bool
+Session::operation_in_progress (GQuark op) const
+{
+ return (find (_current_trans_quarks.begin(), _current_trans_quarks.end(), op) != _current_trans_quarks.end());
+}
+
+boost::shared_ptr<Port>
+Session::ltc_input_port () const
+{
+ return _ltc_input->nth (0);
+}
+
+boost::shared_ptr<Port>
+Session::ltc_output_port () const
+{
+ return _ltc_output->nth (0);
+}
+
+void
+Session::reconnect_ltc_input ()
+{
+ if (_ltc_input) {
+
+ string src = Config->get_ltc_source_port();
+
+ _ltc_input->disconnect (this);
+
+ if (src != _("None") && !src.empty()) {
+ _ltc_input->nth (0)->connect (src);
+ }
+ }
+}
+
+void
+Session::reconnect_ltc_output ()
+{
+ if (_ltc_output) {
+
+#if 0
+ string src = Config->get_ltc_sink_port();
+
+ _ltc_output->disconnect (this);
+
+ if (src != _("None") && !src.empty()) {
+ _ltc_output->nth (0)->connect (src);
+ }
+#endif
+ }