Changeset 1742
- Timestamp:
- 12/01/09 14:54:27 (13 years ago)
- Files:
-
- trunk/libffado/src/bebob/focusrite/focusrite_generic.h (modified) (1 diff)
- trunk/libffado/src/dice/dice_avdevice.h (modified) (1 diff)
- trunk/libffado/src/dice/dice_eap.cpp (modified) (1 diff)
- trunk/libffado/src/fireworks/fireworks_control.h (modified) (2 diffs)
- trunk/libffado/src/libcontrol/MatrixMixer.cpp (modified) (1 diff)
- trunk/libffado/src/libcontrol/MatrixMixer.h (modified) (1 diff)
- trunk/libffado/src/motu/motu_controls.h (modified) (1 diff)
- trunk/libffado/src/rme/fireface_settings_ctrls.h (modified) (1 diff)
- trunk/libffado/support/dbus/control-interface.xml (modified) (2 diffs)
- trunk/libffado/support/dbus/controlserver.cpp (modified) (2 diffs)
- trunk/libffado/support/dbus/controlserver.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/bebob/focusrite/focusrite_generic.h
r1630 r1742 180 180 virtual void show(); 181 181 182 virtual std::string getRowName( const int ); 183 virtual std::string getColName( const int ); 182 virtual int getRowCount( ); 183 virtual int getColCount( ); 184 184 185 virtual int canWrite( const int, const int ); 185 186 virtual double setValue( const int, const int, const double ); 186 187 virtual double getValue( const int, const int ); 187 virtual int getRowCount( );188 virtual int getColCount( );189 188 190 189 // full map updates are unsupported 191 190 virtual bool getCoefficientMap(int &) {return false;}; 192 191 virtual bool storeCoefficientMap(int &) {return false;}; 192 193 bool hasNames() const { return true; } 194 virtual std::string getRowName( const int ); 195 virtual std::string getColName( const int ); 196 197 bool canConnect() const { return false; } 193 198 194 199 protected: trunk/libffado/src/dice/dice_avdevice.h
r1733 r1742 243 243 bool storeCoefficients(); 244 244 245 virtual std::string getRowName( const int ); 246 virtual std::string getColName( const int ); 245 virtual int getRowCount( ); 246 virtual int getColCount( ); 247 247 248 virtual int canWrite( const int, const int ); 248 249 virtual double setValue( const int, const int, const double ); 249 250 virtual double getValue( const int, const int ); 250 virtual int getRowCount( ); 251 virtual int getColCount( ); 252 251 252 bool hasNames() const { return false; } 253 254 // TODO: implement connections. 255 bool canConnect() const { return false; } 256 253 257 // full map updates are unsupported 254 258 virtual bool getCoefficientMap(int &); trunk/libffado/src/dice/dice_eap.cpp
r1725 r1742 926 926 } 927 927 928 // The control interface to the mixer929 std::string930 Device::EAP::Mixer::getRowName( const int row )931 {932 return "FIXME";933 }934 935 std::string936 Device::EAP::Mixer::getColName( const int col )937 {938 return "FIXME";939 }940 941 928 int 942 929 Device::EAP::Mixer::canWrite( const int row, const int col) trunk/libffado/src/fireworks/fireworks_control.h
r1630 r1742 61 61 virtual void show(); 62 62 63 bool hasNames() const { return true; } 63 64 virtual std::string getRowName( const int ); 64 65 virtual std::string getColName( const int ); … … 68 69 virtual int getRowCount( ); 69 70 virtual int getColCount( ); 71 72 bool canConnect() const { return false; } 70 73 71 74 // full map updates are unsupported trunk/libffado/src/libcontrol/MatrixMixer.cpp
r1158 r1742 25 25 26 26 namespace Control { 27 // no implementation 27 28 std::string MatrixMixer::getRowName(const int) { 29 return ""; 30 } 31 std::string MatrixMixer::getColName(const int) { 32 return ""; 33 } 34 bool MatrixMixer::setRowName(const int, const std::string&) { 35 return false; 36 } 37 bool MatrixMixer::setColName(const int, const std::string&) { 38 return false; 39 } 40 41 std::vector<std::string> MatrixMixer::availableConnectionsForRow(const int) { 42 return std::vector<std::string>(); 43 } 44 std::vector<std::string> MatrixMixer::availableConnectionsForCol(const int) { 45 return std::vector<std::string>(); 46 } 47 bool MatrixMixer::connectRowTo(const int, const std::string&) { 48 return false; 49 } 50 bool MatrixMixer::connectColTo(const int, const std::string&) { 51 return false; 52 } 53 28 54 } // namespace Control trunk/libffado/src/libcontrol/MatrixMixer.h
r1630 r1742 47 47 virtual void show() = 0; 48 48 49 // per-coefficient access 50 virtual std::string getRowName(const int) = 0; 51 virtual std::string getColName(const int) = 0; 49 /*! 50 @{ 51 @brief general dimensions 52 */ 53 virtual int getRowCount() = 0; 54 virtual int getColCount() = 0; 55 // @} 56 57 /*! 58 @{ 59 @brief per-coefficient access 60 */ 52 61 virtual int canWrite(const int, const int) = 0; 53 62 virtual double setValue(const int, const int, const double) = 0; 54 63 virtual double getValue(const int, const int) = 0; 55 virtual int getRowCount() = 0; 56 virtual int getColCount() = 0; 64 // @} 57 65 58 // functions to access the entire coefficient map at once 66 /*! 67 @{ 68 @brief functions to access the entire coefficient map at once 69 */ 59 70 virtual bool getCoefficientMap(int &) = 0; 60 71 virtual bool storeCoefficientMap(int &) = 0; 72 // @} 73 74 /*! 75 @{ 76 @brief names for the channels 77 78 If named channels are not supported, just implement hasNames() to return false 79 80 The default implementations do nothing 81 */ 82 virtual bool hasNames() const = 0; 83 virtual std::string getRowName(const int); 84 virtual std::string getColName(const int); 85 virtual bool setRowName(const int row, const std::string& name); 86 virtual bool setColName(const int col, const std::string& name); 87 // @} 88 89 /*! 90 @{ 91 @brief connections for channels 92 93 If connections are not supported, implement canConnect() to return false. 94 95 The default implementations do nothing. 96 */ 97 virtual bool canConnect() const = 0; 98 virtual std::vector<std::string> availableConnectionsForRow(const int); 99 virtual std::vector<std::string> availableConnectionsForCol(const int); 100 virtual bool connectRowTo(const int row, const std::string& target); 101 virtual bool connectColTo(const int col, const std::string& target); 102 // @} 61 103 62 104 protected: trunk/libffado/src/motu/motu_controls.h
r1630 r1742 184 184 virtual void show(); 185 185 186 bool hasNames() const { return true; } 187 bool canConnect() const { return false; } 188 186 189 virtual std::string getRowName(const int row); 187 190 virtual std::string getColName(const int col); trunk/libffado/src/rme/fireface_settings_ctrls.h
r1630 r1742 90 90 virtual void show(); 91 91 92 bool hasNames() const { return true; } 93 bool canConnect() const { return false; } 94 92 95 virtual std::string getRowName(const int row); 93 96 virtual std::string getColName(const int col); trunk/libffado/support/dbus/control-interface.xml
r1724 r1742 189 189 <arg type="i" name="value" direction="out"/> 190 190 </method> 191 <method name="getRowName">192 <arg type="i" name="row" direction="in"/>193 <arg type="s" name="rowname" direction="out"/>194 </method>195 <method name="getColName">196 <arg type="i" name="col" direction="in"/>197 <arg type="s" name="colname" direction="out"/>198 </method>199 191 <method name="getRowCount"> 200 192 <arg type="i" name="nbrows" direction="out"/> … … 202 194 <method name="getColCount"> 203 195 <arg type="i" name="nbrows" direction="out"/> 196 </method> 197 <method name="hasNames"> 198 <arg type="b" name="value" direction="out"/> 199 </method> 200 <method name="getRowName"> 201 <arg type="i" name="row" direction="in"/> 202 <arg type="s" name="rowname" direction="out"/> 203 </method> 204 <method name="getColName"> 205 <arg type="i" name="col" direction="in"/> 206 <arg type="s" name="colname" direction="out"/> 207 </method> 208 <method name="setRowName"> 209 <arg type="i" name="row" direction="in"/> 210 <arg type="s" name="rowname" direction="in"/> 211 <arg type="b" name="value" direction="out"/> 212 </method> 213 <method name="setColName"> 214 <arg type="i" name="col" direction="in"/> 215 <arg type="s" name="colname" direction="in"/> 216 <arg type="b" name="value" direction="out"/> 217 </method> 218 <method name="canConnect"> 219 <arg type="b" name="value" direction="out"/> 220 </method> 221 <method name="availableConnectionsForRow"> 222 <arg type="i" name="row" direction="in"/> 223 <arg type="as" name="value" direction="out"/> 224 </method> 225 <method name="availableConnectionsForCol"> 226 <arg type="i" name="col" direction="in"/> 227 <arg type="as" name="value" direction="out"/> 228 </method> 229 <method name="connectRowTo"> 230 <arg type="i" name="row" direction="in"/> 231 <arg type="s" name="target" direction="in"/> 232 <arg type="b" name="value" direction="out"/> 233 </method> 234 <method name="connectColTo"> 235 <arg type="i" name="col" direction="in"/> 236 <arg type="s" name="target" direction="in"/> 237 <arg type="b" name="value" direction="out"/> 204 238 </method> 205 239 </interface> trunk/libffado/support/dbus/controlserver.cpp
r1724 r1742 791 791 } 792 792 793 DBus:: String794 MatrixMixer::getRow Name( const DBus::Int32& row) {795 return m_Slave.getRow Name(row);796 } 797 798 DBus:: String799 MatrixMixer::getCol Name( const DBus::Int32& col) {800 return m_Slave.getCol Name(col);793 DBus::Int32 794 MatrixMixer::getRowCount( ) { 795 return m_Slave.getRowCount(); 796 } 797 798 DBus::Int32 799 MatrixMixer::getColCount( ) { 800 return m_Slave.getColCount(); 801 801 } 802 802 … … 816 816 } 817 817 818 DBus::Int32 819 MatrixMixer::getRowCount( ) { 820 return m_Slave.getRowCount(); 821 } 822 823 DBus::Int32 824 MatrixMixer::getColCount( ) { 825 return m_Slave.getColCount(); 818 DBus::Bool 819 MatrixMixer::hasNames() { 820 return m_Slave.hasNames(); 821 } 822 DBus::String 823 MatrixMixer::getRowName( const DBus::Int32& row) { 824 return m_Slave.getRowName(row); 825 } 826 DBus::String 827 MatrixMixer::getColName( const DBus::Int32& col) { 828 return m_Slave.getColName(col); 829 } 830 DBus::Bool 831 MatrixMixer::setRowName( const DBus::Int32& row, const DBus::String& name) { 832 return m_Slave.setRowName(row, name); 833 } 834 DBus::Bool 835 MatrixMixer::setColName( const DBus::Int32& col, const DBus::String& name) { 836 return m_Slave.setColName(col, name); 837 } 838 839 DBus::Bool 840 MatrixMixer::canConnect() { 841 return m_Slave.canConnect(); 842 } 843 std::vector<DBus::String> 844 MatrixMixer::availableConnectionsForRow( const DBus::Int32& row) { 845 return m_Slave.availableConnectionsForRow(row); 846 } 847 std::vector<DBus::String> 848 MatrixMixer::availableConnectionsForCol( const DBus::Int32& col) { 849 return m_Slave.availableConnectionsForCol(col); 850 } 851 DBus::Bool 852 MatrixMixer::connectRowTo( const DBus::Int32& row, const DBus::String& target) { 853 return m_Slave.connectRowTo(row, target); 854 } 855 DBus::Bool 856 MatrixMixer::connectColTo( const DBus::Int32& col, const DBus::String& target) { 857 return m_Slave.connectColTo(col, target); 826 858 } 827 859 trunk/libffado/support/dbus/controlserver.h
r1724 r1742 307 307 Control::MatrixMixer &slave ); 308 308 309 DBus::String getRowName( const DBus::Int32& ); 310 DBus::String getColName( const DBus::Int32& ); 309 DBus::Int32 getRowCount( ); 310 DBus::Int32 getColCount( ); 311 311 312 DBus::Int32 canWrite( const DBus::Int32&, const DBus::Int32& ); 312 313 DBus::Double setValue( const DBus::Int32&, const DBus::Int32&, const DBus::Double& ); 313 314 DBus::Double getValue( const DBus::Int32&, const DBus::Int32& ); 314 DBus::Int32 getRowCount( ); 315 DBus::Int32 getColCount( ); 315 316 DBus::Bool hasNames(); 317 DBus::String getRowName( const DBus::Int32& ); 318 DBus::String getColName( const DBus::Int32& ); 319 DBus::Bool setRowName( const DBus::Int32&, const DBus::String& ); 320 DBus::Bool setColName( const DBus::Int32&, const DBus::String& ); 321 322 DBus::Bool canConnect(); 323 std::vector<DBus::String> availableConnectionsForRow( const DBus::Int32& ); 324 std::vector<DBus::String> availableConnectionsForCol( const DBus::Int32& ); 325 DBus::Bool connectRowTo( const DBus::Int32&, const DBus::String& ); 326 DBus::Bool connectColTo( const DBus::Int32&, const DBus::String& ); 316 327 317 328 private: