Changeset 647
- Timestamp:
- 10/14/07 12:08:00 (15 years ago)
- Files:
-
- trunk/libffado/src/libcontrol/MatrixMixer.cpp (added)
- trunk/libffado/src/libcontrol/MatrixMixer.h (added)
- trunk/libffado/src/SConscript (modified) (1 diff)
- trunk/libffado/tests/control-interface.xml (modified) (1 diff)
- trunk/libffado/tests/controlserver.cpp (modified) (3 diffs)
- trunk/libffado/tests/controlserver.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/SConscript
r639 r647 70 70 libcontrol/Element.cpp \ 71 71 libcontrol/BasicElements.cpp \ 72 libcontrol/MatrixMixer.cpp \ 72 73 ' ) 73 74 trunk/libffado/tests/control-interface.xml
r644 r647 64 64 </method> 65 65 </interface> 66 66 67 <interface name="org.ffado.Control.Element.MatrixMixer"> 68 <method name="setValue"> 69 <arg type="i" name="row" direction="in"/> 70 <arg type="i" name="col" direction="in"/> 71 <arg type="d" name="value" direction="in"/> 72 <arg type="d" name="value" direction="out"/> 73 </method> 74 <method name="getValue"> 75 <arg type="i" name="row" direction="in"/> 76 <arg type="i" name="col" direction="in"/> 77 <arg type="d" name="value" direction="out"/> 78 </method> 79 <method name="canWrite"> 80 <arg type="i" name="row" direction="in"/> 81 <arg type="i" name="col" direction="in"/> 82 <arg type="i" name="value" direction="out"/> 83 </method> 84 <method name="getRowName"> 85 <arg type="i" name="row" direction="in"/> 86 <arg type="s" name="rowname" direction="out"/> 87 </method> 88 <method name="getColName"> 89 <arg type="i" name="col" direction="in"/> 90 <arg type="s" name="colname" direction="out"/> 91 </method> 92 <method name="getRowCount"> 93 <arg type="i" name="nbrows" direction="out"/> 94 </method> 95 <method name="getColCount"> 96 <arg type="i" name="nbrows" direction="out"/> 97 </method> 98 99 </interface> 100 67 101 </node> trunk/libffado/tests/controlserver.cpp
r644 r647 26 26 #include "libcontrol/Element.h" 27 27 #include "libcontrol/BasicElements.h" 28 #include "libcontrol/MatrixMixer.h" 28 29 29 30 namespace DBusControl { … … 146 147 } 147 148 149 if (dynamic_cast<Control::MatrixMixer *>(&e) != NULL) { 150 debugOutput( DEBUG_LEVEL_VERBOSE, "Source is a Control::MatrixMixer\n"); 151 152 return new MatrixMixer(conn(), std::string(path()+"/"+e.getName()), 153 *dynamic_cast<Control::MatrixMixer *>(&e)); 154 } 155 148 156 debugOutput( DEBUG_LEVEL_VERBOSE, "Source is a Control::Element\n"); 149 157 return new Element(conn(), std::string(path()+"/"+e.getName()), e); … … 249 257 } 250 258 259 // --- MatrixMixer 260 261 MatrixMixer::MatrixMixer( DBus::Connection& connection, std::string p, Control::MatrixMixer &slave) 262 : Element(connection, p, slave) 263 , m_Slave(slave) 264 { 265 debugOutput( DEBUG_LEVEL_VERBOSE, "Created MatrixMixer on '%s'\n", 266 path().c_str() ); 267 } 268 269 DBus::String 270 MatrixMixer::getRowName( const DBus::Int32& row) { 271 return m_Slave.getRowName(row); 272 } 273 274 DBus::String 275 MatrixMixer::getColName( const DBus::Int32& col) { 276 return m_Slave.getColName(col); 277 } 278 279 DBus::Int32 280 MatrixMixer::canWrite( const DBus::Int32& row, const DBus::Int32& col) { 281 return m_Slave.canWrite(row,col); 282 } 283 284 DBus::Double 285 MatrixMixer::setValue( const DBus::Int32& row, const DBus::Int32& col, const DBus::Double& val ) { 286 return m_Slave.setValue(row,col,val); 287 } 288 289 DBus::Double 290 MatrixMixer::getValue( const DBus::Int32& row, const DBus::Int32& col) { 291 return m_Slave.getValue(row,col); 292 } 293 294 DBus::Int32 295 MatrixMixer::getRowCount( ) { 296 return m_Slave.getRowCount(); 297 } 298 299 DBus::Int32 300 MatrixMixer::getColCount( ) { 301 return m_Slave.getColCount(); 302 } 303 251 304 } // end of namespace Control trunk/libffado/tests/controlserver.h
r644 r647 34 34 #include "libcontrol/BasicElements.h" 35 35 #include "libieee1394/configrom.h" 36 37 namespace Control { 38 class MatrixMixer; 39 }; 36 40 37 41 namespace DBusControl { … … 136 140 }; 137 141 142 class MatrixMixer 143 : public org::ffado::Control::Element::MatrixMixer 144 , public Element 145 { 146 public: 147 MatrixMixer( DBus::Connection& connection, 148 std::string p, 149 Control::MatrixMixer &slave ); 150 151 DBus::String getRowName( const DBus::Int32& ); 152 DBus::String getColName( const DBus::Int32& ); 153 DBus::Int32 canWrite( const DBus::Int32&, const DBus::Int32& ); 154 DBus::Double setValue( const DBus::Int32&, const DBus::Int32&, const DBus::Double& ); 155 DBus::Double getValue( const DBus::Int32&, const DBus::Int32& ); 156 DBus::Int32 getRowCount( ); 157 DBus::Int32 getColCount( ); 158 159 private: 160 Control::MatrixMixer &m_Slave; 161 }; 138 162 139 163 }