]> git.sesse.net Git - nageru/blobdiff - alsa_input.h
Rename “name” to “display name”.
[nageru] / alsa_input.h
index 4638e4bb802ff875dea5e48a59cb285fda852ff1..bac13beca366a3884a63fe2c1e32263f46aba17e 100644 (file)
@@ -119,6 +119,8 @@ public:
                // at any given time as a result of an error or hotplug event;
                // a card that is held will go to the DEAD state instead.
                bool held = false;
+
+               std::string display_name() const { return name + " (" + info + ")"; }
        };
 
        void init();
@@ -150,9 +152,6 @@ public:
        // EMPTY or DEAD state. Only for ALSAInput and for internal use.
        void free_card(unsigned index);
 
-       // TODO: Add accessors and/or callbacks about changed state, so that
-       // the UI actually stands a chance in using that information.
-
 private:
        mutable std::mutex mu;
        std::vector<Device> devices;  // Under mu.
@@ -182,6 +181,8 @@ private:
        };
        ProbeResult probe_device_once(unsigned card_index, unsigned dev_index);
 
+       void unplug_device(unsigned card_index, unsigned dev_index);
+
        // Must be called with <mu> held. Will allocate a new entry if needed.
        // The returned entry will be set to READY state.
        unsigned find_free_device_index(const std::string &name,