Ticket #290: ffado-external-libs-rev3.patch
File ffado-external-libs-rev3.patch, 33.4 kB (added by oget, 14 years ago) |
---|
-
libffado/admin/dbus.py
old new 27 27 # 28 28 29 29 def dbusxx_xml2cpp_emitter(target, source, env): 30 env.Depends(target, "#/external/dbus/dbusxx-xml2cpp" )30 #env.Depends(target, "#/external/dbus/dbusxx-xml2cpp" ) 31 31 return (target, source) 32 32 33 33 def dbusxx_xml2cpp_adaptor_action( target, source, env ): 34 env.Execute( " ./external/dbus/dbusxx-xml2cpp %s --adaptor=%s" % ( source[0], target[0] ) )34 env.Execute( "dbusxx-xml2cpp %s --adaptor=%s" % ( source[0], target[0] ) ) 35 35 return 0 36 36 37 37 def dbusxx_xml2cpp_proxy_action( target, source, env ): 38 env.Execute( " ./external/dbus/dbusxx-xml2cpp %s --proxy=%s" % ( source[0], target[0] ) )38 env.Execute( "dbusxx-xml2cpp %s --proxy=%s" % ( source[0], target[0] ) ) 39 39 return 0 40 40 41 41 def generate( env, **kw ): -
libffado/README
old new 97 97 libraw1394 (>= 1.3.0), http://www.linux1394.org 98 98 libiec61883 (>= 1.1.0), http://www.linux1394.org 99 99 dbus-1 (>= 1.0), http://dbus.freedesktop.org 100 100 dbus-c++ (>= 0), http://sourceforge.net/apps/mediawiki/dbus-cplusplus/ 101 libconfig (>= 0), http://www.hyperrealm.com/libconfig/ 101 102 Currently only the jackd audio server is supported. 102 103 103 104 jackd (>= 0.109.12), http://jackaudio.org -
libffado/SConstruct
old new 198 198 # The following checks are for headers and libs and packages we need. 199 199 # 200 200 allpresent = 1; 201 # for DBUS C++ bindings and cache-serialization. 202 allpresent &= conf.CheckHeader( "expat.h" ) 203 allpresent &= conf.CheckLib( 'expat', 'XML_ExpatVersion', '#include <expat.h>' ) 201 # for cache-serialization. 202 if env['SERIALIZE_USE_EXPAT']: 203 allpresent &= conf.CheckHeader( "expat.h" ) 204 allpresent &= conf.CheckLib( 'expat', 'XML_ExpatVersion', '#include <expat.h>' ) 204 205 205 206 pkgs = { 206 207 'libraw1394' : '1.3.0', 207 208 'libiec61883' : '1.1.0', 209 'libconfig++' : '0' 208 210 } 209 211 210 212 if env['REQUIRE_LIBAVC']: … … 287 289 pkgs = { 288 290 'alsa': '0', 289 291 'dbus-1': '1.0', 292 'dbus-c++-1' : '0', 290 293 } 291 294 for pkg in pkgs: 292 295 name2 = pkg.replace("+","").replace(".","").replace("-","").upper() 293 296 env['%s_FLAGS' % name2] = conf.GetPKGFlags( pkg, pkgs[pkg] ) 294 297 295 # 296 # Get the directory where dbus stores the service-files 297 # 298 if env['DBUS1_FLAGS']: 298 dbus_checkfail = False 299 300 if not env['DBUS1_FLAGS']: 301 dbus_checkfail = True 302 print """ 303 The dbus headers were not found.""" 304 305 if not env['DBUSC1_FLAGS']: 306 dbus_checkfail = True 307 print """ 308 The dbus-c++ headers were not found.""" 309 310 if not conf.CheckForApp( 'which dbusxx-xml2cpp' ): 311 dbus_checkfail = True 312 print """ 313 The program dbusxx-xml2cpp could not be found.""" 314 315 if dbus_checkfail: 316 env['DBUS1_FLAGS'] = "" 317 env['DBUSC1_FLAGS'] = "" 318 print """The dbus-server for ffado will therefore not be built. 319 """ 320 else: 321 # Get the directory where dbus stores the service-files 299 322 env['dbus_service_dir'] = conf.GetPKGVariable( 'dbus-1', 'session_bus_services_dir' ).strip() 300 323 # this is required to indicate that the DBUS version we use has support 301 324 # for platform dependent threading init functions 302 325 # this is true for DBUS >= 0.96 or so. Since we require >= 1.0 it is 303 326 # always true 304 327 env.MergeFlags( "-DDBUS_HAS_THREADS_INIT_DEFAULT" ) 305 else: 306 print """ 307 The dbus-headers where not found. The dbus-server for ffado will therefor not be built. 308 """ 328 309 329 310 330 config_guess = conf.ConfigGuess() 311 331 … … 550 570 551 571 env.Install( env['sharedir'], 'configuration' ) 552 572 553 subdirs=[' external','src','libffado','support','doc']573 subdirs=['src','libffado','support','doc'] 554 574 if env['BUILD_TESTS']: 555 575 subdirs.append('tests') 556 576 -
libffado/src/libutil/Configuration.h
old new 25 25 #define _FFADO_UTIL_CONFIGURATION_ 26 26 27 27 #include "debugmodule/debugmodule.h" 28 #include " external/libconfig/libconfigpp.h"28 #include "libconfig.h++" 29 29 30 30 #include <vector> 31 31 -
libffado/src/SConscript
old new 272 272 libenv.MergeFlags( "-lrt -lpthread" ) 273 273 libenv.MergeFlags( env['LIBRAW1394_FLAGS'] ) 274 274 libenv.MergeFlags( env['LIBIEC61883_FLAGS'] ) 275 libenv.MergeFlags( env['LIBCONFIG_FLAGS'] ) 275 276 if not env['SERIALIZE_USE_EXPAT']: 276 277 libenv.MergeFlags( env['LIBXML26_FLAGS'] ) 277 278 else: … … 279 280 if env['REQUIRE_LIBAVC']: 280 281 libenv.MergeFlags( env['LIBAVC1394_FLAGS'] ) 281 282 282 # add the libconfig283 libenv.MergeFlags( "-I#/external/libconfig" )284 libenv.MergeFlags( "-L"+env['build_base']+"external/libconfig" )285 libenv.MergeFlags( "-lconfigpp" )286 287 283 libname_versioned = "libffado.so.%s" % libenv['VERSION'] 288 284 libname_versioned_short = "libffado.so.%s" % libenv['VERSION'].split('.')[0] 289 285 -
libffado/support/dbus/controlclient.h
old new 34 34 35 35 // simple fader element 36 36 class ContinuousClient 37 : public org::ffado::Control::Element::Continuous ,37 : public org::ffado::Control::Element::Continuous_proxy, 38 38 public DBus::IntrospectableProxy, 39 39 public DBus::ObjectProxy 40 40 { -
libffado/support/dbus/controlserver.cpp
old new 52 52 setVerboseLevel(m_Slave.getVerboseLevel()); 53 53 } 54 54 55 void Element::setVerboseLevel( const DBus::Int32&i)55 void Element::setVerboseLevel( const int32_t &i) 56 56 { 57 57 setDebugLevel(i); 58 58 m_Slave.setVerboseLevel(i); 59 59 if(m_UpdateLock) m_UpdateLock->setVerboseLevel(i); 60 60 } 61 61 62 DBus::Int32Element::getVerboseLevel()62 int32_t Element::getVerboseLevel() 63 63 { 64 64 return getDebugLevel(); 65 65 } 66 66 67 DBus::Bool67 bool 68 68 Element::canChangeValue() 69 69 { 70 70 return m_Slave.canChangeValue(); … … 110 110 } 111 111 } 112 112 113 DBus::UInt64 113 uint64_t 114 114 Element::getId( ) 115 115 { 116 116 return m_Slave.getId(); 117 117 } 118 118 119 DBus::String119 std::string 120 120 Element::getName( ) 121 121 { 122 return DBus::String(m_Slave.getName());122 return std::string(m_Slave.getName()); 123 123 } 124 124 125 DBus::String125 std::string 126 126 Element::getLabel( ) 127 127 { 128 return DBus::String(m_Slave.getLabel());128 return std::string(m_Slave.getLabel()); 129 129 } 130 130 131 DBus::String131 std::string 132 132 Element::getDescription( ) 133 133 { 134 return DBus::String(m_Slave.getDescription());134 return std::string(m_Slave.getDescription()); 135 135 } 136 136 137 137 // --- Container … … 183 183 } 184 184 185 185 void 186 Container::setVerboseLevel( const DBus::Int32& i)186 Container::setVerboseLevel( const int32_t & i) 187 187 { 188 188 Element::setVerboseLevel(i); 189 189 for ( ElementVectorIterator it = m_Children.begin(); … … 194 194 } 195 195 } 196 196 197 DBus::Int32 197 int32_t 198 198 Container::getNbElements( ) { 199 199 return m_Slave.countElements(); 200 200 } 201 201 202 DBus::String203 Container::getElementName( const DBus::Int32& i ) {202 std::string 203 Container::getElementName( const int32_t& i ) { 204 204 int nbElements=m_Slave.countElements(); 205 205 if (i<nbElements) { 206 206 m_Slave.lockControl(); … … 461 461 path().c_str() ); 462 462 } 463 463 464 DBus::Double465 Continuous::setValue( const DBus::Double& value )464 double 465 Continuous::setValue( const double& value ) 466 466 { 467 467 m_Slave.setValue(value); 468 468 /* … … 474 474 return value; 475 475 } 476 476 477 DBus::Double477 double 478 478 Continuous::getValue( ) 479 479 { 480 480 double val = m_Slave.getValue(); … … 482 482 return val; 483 483 } 484 484 485 DBus::Double486 Continuous::setValueIdx( const DBus::Int32 & idx, const DBus::Double& value )485 double 486 Continuous::setValueIdx( const int32_t & idx, const double& value ) 487 487 { 488 488 m_Slave.setValue(idx, value); 489 489 /* … … 495 495 return value; 496 496 } 497 497 498 DBus::Double499 Continuous::getValueIdx( const DBus::Int32& idx )498 double 499 Continuous::getValueIdx( const int32_t & idx ) 500 500 { 501 501 double val = m_Slave.getValue(idx); 502 502 debugOutput( DEBUG_LEVEL_VERBOSE, "getValue(%d) => %lf\n", idx, val ); 503 503 return val; 504 504 } 505 505 506 DBus::Double506 double 507 507 Continuous::getMinimum() 508 508 { 509 509 double val = m_Slave.getMinimum(); … … 511 511 return val; 512 512 } 513 513 514 DBus::Double514 double 515 515 Continuous::getMaximum() 516 516 { 517 517 double val = m_Slave.getMaximum(); … … 529 529 path().c_str() ); 530 530 } 531 531 532 DBus::Int32 533 Discrete::setValue( const DBus::Int32& value )532 int32_t 533 Discrete::setValue( const int32_t& value ) 534 534 { 535 535 m_Slave.setValue(value); 536 536 … … 541 541 return value; 542 542 } 543 543 544 DBus::Int32 544 int32_t 545 545 Discrete::getValue() 546 546 { 547 547 int32_t val = m_Slave.getValue(); … … 549 549 return val; 550 550 } 551 551 552 DBus::Int32 553 Discrete::setValueIdx( const DBus::Int32& idx, const DBus::Int32& value )552 int32_t 553 Discrete::setValueIdx( const int32_t& idx, const int32_t& value ) 554 554 { 555 555 m_Slave.setValue(idx, value); 556 556 … … 561 561 return value; 562 562 } 563 563 564 DBus::Int32 565 Discrete::getValueIdx( const DBus::Int32& idx )564 int32_t 565 Discrete::getValueIdx( const int32_t& idx ) 566 566 { 567 567 int32_t val = m_Slave.getValue(idx); 568 568 debugOutput( DEBUG_LEVEL_VERBOSE, "getValue(%d) => %d\n", idx, val ); … … 579 579 path().c_str() ); 580 580 } 581 581 582 DBus::String583 Text::setValue( const DBus::String& value )582 std::string 583 Text::setValue( const std::string& value ) 584 584 { 585 585 m_Slave.setValue(value); 586 586 … … 591 591 return value; 592 592 } 593 593 594 DBus::String594 std::string 595 595 Text::getValue() 596 596 { 597 597 std::string val = m_Slave.getValue(); … … 609 609 path().c_str() ); 610 610 } 611 611 612 DBus::UInt64 613 Register::setValue( const DBus::UInt64& addr, const DBus::UInt64& value )612 uint64_t 613 Register::setValue( const uint64_t& addr, const uint64_t& value ) 614 614 { 615 615 m_Slave.setValue(addr, value); 616 616 … … 621 621 return value; 622 622 } 623 623 624 DBus::UInt64 625 Register::getValue( const DBus::UInt64& addr )624 uint64_t 625 Register::getValue( const uint64_t& addr ) 626 626 { 627 DBus::UInt64val = m_Slave.getValue(addr);627 uint64_t val = m_Slave.getValue(addr); 628 628 debugOutput( DEBUG_LEVEL_VERBOSE, "getValue(%lld) => %lld\n", addr, val ); 629 629 return val; 630 630 } … … 639 639 path().c_str() ); 640 640 } 641 641 642 DBus::Int32 643 Enum::select( const DBus::Int32& idx )642 int32_t 643 Enum::select( const int32_t& idx ) 644 644 { 645 645 debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "select(%d)\n", idx ); 646 646 return m_Slave.select(idx); 647 647 } 648 648 649 DBus::Int32 649 int32_t 650 650 Enum::selected() 651 651 { 652 652 int retval = m_Slave.selected(); … … 654 654 return retval; 655 655 } 656 656 657 DBus::Int32 657 int32_t 658 658 Enum::count() 659 659 { 660 660 int retval = m_Slave.count(); … … 662 662 return retval; 663 663 } 664 664 665 DBus::String666 Enum::getEnumLabel( const DBus::Int32& idx )665 std::string 666 Enum::getEnumLabel( const int32_t & idx ) 667 667 { 668 668 std::string retval = m_Slave.getEnumLabel(idx); 669 669 debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "getEnumLabel(%d) => %s\n", idx, retval.c_str() ); … … 679 679 path().c_str() ); 680 680 } 681 681 682 DBus::Int32 683 AttributeEnum::select( const DBus::Int32& idx )682 int32_t 683 AttributeEnum::select( const int32_t& idx ) 684 684 { 685 685 debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "select(%d)\n", idx ); 686 686 return m_Slave.select(idx); 687 687 } 688 688 689 DBus::Int32 689 int32_t 690 690 AttributeEnum::selected() 691 691 { 692 692 int retval = m_Slave.selected(); … … 694 694 return retval; 695 695 } 696 696 697 DBus::Int32 697 int32_t 698 698 AttributeEnum::count() 699 699 { 700 700 int retval = m_Slave.count(); … … 702 702 return retval; 703 703 } 704 704 705 DBus::Int32 705 int32_t 706 706 AttributeEnum::attributeCount() 707 707 { 708 708 int retval = m_Slave.attributeCount(); … … 710 710 return retval; 711 711 } 712 712 713 DBus::String714 AttributeEnum::getEnumLabel( const DBus::Int32& idx )713 std::string 714 AttributeEnum::getEnumLabel( const int32_t & idx ) 715 715 { 716 716 std::string retval = m_Slave.getEnumLabel(idx); 717 717 debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "getEnumLabel(%d) => %s\n", idx, retval.c_str() ); 718 718 return retval; 719 719 } 720 720 721 DBus::String722 AttributeEnum::getAttributeValue( const DBus::Int32& idx )721 std::string 722 AttributeEnum::getAttributeValue( const int32_t & idx ) 723 723 { 724 724 std::string retval = m_Slave.getAttributeValue(idx); 725 725 debugOutput( DEBUG_LEVEL_VERBOSE, "getAttributeValue(%d) => %s\n", idx, retval.c_str() ); 726 726 return retval; 727 727 } 728 728 729 DBus::String730 AttributeEnum::getAttributeName( const DBus::Int32& idx )729 std::string 730 AttributeEnum::getAttributeName( const int32_t & idx ) 731 731 { 732 732 std::string retval = m_Slave.getAttributeName(idx); 733 733 debugOutput( DEBUG_LEVEL_VERBOSE, "getAttributeName(%d) => %s\n", idx, retval.c_str() ); … … 744 744 path().c_str() ); 745 745 } 746 746 747 DBus::String747 std::string 748 748 ConfigRomX::getGUID( ) 749 749 { 750 750 return m_Slave.getGuidString(); 751 751 } 752 752 753 DBus::String753 std::string 754 754 ConfigRomX::getVendorName( ) 755 755 { 756 756 return m_Slave.getVendorName(); 757 757 } 758 758 759 DBus::String759 std::string 760 760 ConfigRomX::getModelName( ) 761 761 { 762 762 return m_Slave.getModelName(); 763 763 } 764 764 765 DBus::Int32 765 int32_t 766 766 ConfigRomX::getVendorId( ) 767 767 { 768 768 return m_Slave.getNodeVendorId(); 769 769 } 770 770 771 DBus::Int32 771 int32_t 772 772 ConfigRomX::getModelId( ) 773 773 { 774 774 return m_Slave.getModelId(); 775 775 } 776 776 777 DBus::Int32 777 int32_t 778 778 ConfigRomX::getUnitVersion( ) 779 779 { 780 780 return m_Slave.getUnitVersion(); … … 790 790 path().c_str() ); 791 791 } 792 792 793 DBus::Int32 793 int32_t 794 794 MatrixMixer::getRowCount( ) { 795 795 return m_Slave.getRowCount(); 796 796 } 797 797 798 DBus::Int32 798 int32_t 799 799 MatrixMixer::getColCount( ) { 800 800 return m_Slave.getColCount(); 801 801 } 802 802 803 DBus::Int32 804 MatrixMixer::canWrite( const DBus::Int32& row, const DBus::Int32& col) {803 int32_t 804 MatrixMixer::canWrite( const int32_t& row, const int32_t& col) { 805 805 return m_Slave.canWrite(row,col); 806 806 } 807 807 808 DBus::Double809 MatrixMixer::setValue( const DBus::Int32& row, const DBus::Int32& col, const DBus::Double& val ) {808 double 809 MatrixMixer::setValue( const int32_t& row, const int32_t& col, const double& val ) { 810 810 return m_Slave.setValue(row,col,val); 811 811 } 812 812 813 DBus::Double814 MatrixMixer::getValue( const DBus::Int32& row, const DBus::Int32& col) {813 double 814 MatrixMixer::getValue( const int32_t& row, const int32_t& col) { 815 815 return m_Slave.getValue(row,col); 816 816 } 817 817 818 DBus::Bool818 bool 819 819 MatrixMixer::hasNames() { 820 820 return m_Slave.hasNames(); 821 821 } 822 DBus::String823 MatrixMixer::getRowName( const DBus::Int32& row) {822 std::string 823 MatrixMixer::getRowName( const int32_t& row) { 824 824 return m_Slave.getRowName(row); 825 825 } 826 DBus::String827 MatrixMixer::getColName( const DBus::Int32& col) {826 std::string 827 MatrixMixer::getColName( const int32_t& col) { 828 828 return m_Slave.getColName(col); 829 829 } 830 DBus::Bool831 MatrixMixer::setRowName( const DBus::Int32& row, const DBus::String& name) {830 bool 831 MatrixMixer::setRowName( const int32_t& row, const std::string& name) { 832 832 return m_Slave.setRowName(row, name); 833 833 } 834 DBus::Bool835 MatrixMixer::setColName( const DBus::Int32& col, const DBus::String& name) {834 bool 835 MatrixMixer::setColName( const int32_t& col, const std::string& name) { 836 836 return m_Slave.setColName(col, name); 837 837 } 838 838 839 DBus::Bool839 bool 840 840 MatrixMixer::canConnect() { 841 841 return m_Slave.canConnect(); 842 842 } 843 std::vector< DBus::String>844 MatrixMixer::availableConnectionsForRow( const DBus::Int32& row) {843 std::vector<std::string> 844 MatrixMixer::availableConnectionsForRow( const int32_t& row) { 845 845 return m_Slave.availableConnectionsForRow(row); 846 846 } 847 std::vector< DBus::String>848 MatrixMixer::availableConnectionsForCol( const DBus::Int32& col) {847 std::vector<std::string> 848 MatrixMixer::availableConnectionsForCol( const int32_t& col) { 849 849 return m_Slave.availableConnectionsForCol(col); 850 850 } 851 DBus::Bool852 MatrixMixer::connectRowTo( const DBus::Int32& row, const DBus::String& target) {851 bool 852 MatrixMixer::connectRowTo( const int32_t& row, const std::string& target) { 853 853 return m_Slave.connectRowTo(row, target); 854 854 } 855 DBus::Bool856 MatrixMixer::connectColTo( const DBus::Int32& col, const DBus::String& target) {855 bool 856 MatrixMixer::connectColTo( const int32_t& col, const std::string& target) { 857 857 return m_Slave.connectColTo(col, target); 858 858 } 859 859 … … 867 867 path().c_str() ); 868 868 } 869 869 870 /* DBus::Int32871 CrossbarRouter::getSourceIndex(const DBus::String &name)870 /*int32_t 871 CrossbarRouter::getSourceIndex(const std::string &name) 872 872 { 873 873 return m_Slave.getSourceIndex(name); 874 874 } 875 875 876 DBus::Int32 877 CrossbarRouter::getDestinationIndex(const DBus::String &name)876 int32_t 877 CrossbarRouter::getDestinationIndex(const std::string &name) 878 878 { 879 879 return m_Slave.getDestinationIndex(name); 880 880 }*/ 881 881 882 std::vector< DBus::String >882 std::vector< std::string > 883 883 CrossbarRouter::getSourceNames() 884 884 { 885 885 return m_Slave.getSourceNames(); 886 886 } 887 887 888 std::vector< DBus::String >888 std::vector< std::string > 889 889 CrossbarRouter::getDestinationNames() 890 890 { 891 891 return m_Slave.getDestinationNames(); 892 892 } 893 893 894 std::vector< DBus::String >895 CrossbarRouter::getDestinationsForSource(const DBus::String &idx)894 std::vector< std::string > 895 CrossbarRouter::getDestinationsForSource(const std::string &idx) 896 896 { 897 897 return m_Slave.getDestinationsForSource(idx); 898 898 } 899 899 900 DBus::String901 CrossbarRouter::getSourceForDestination(const DBus::String &idx)900 std::string 901 CrossbarRouter::getSourceForDestination(const std::string &idx) 902 902 { 903 903 return m_Slave.getSourceForDestination(idx); 904 904 } 905 905 906 DBus::Bool907 CrossbarRouter::canConnect(const DBus::String &source, const DBus::String &dest)906 bool 907 CrossbarRouter::canConnect(const std::string &source, const std::string &dest) 908 908 { 909 909 return m_Slave.canConnect(source, dest); 910 910 } 911 911 912 DBus::Bool913 CrossbarRouter::setConnectionState(const DBus::String &source, const DBus::String &dest, const DBus::Bool &enable)912 bool 913 CrossbarRouter::setConnectionState(const std::string &source, const std::string &dest, const bool &enable) 914 914 { 915 915 return m_Slave.setConnectionState(source, dest, enable); 916 916 } 917 917 918 DBus::Bool919 CrossbarRouter::getConnectionState(const DBus::String &source, const DBus::String &dest)918 bool 919 CrossbarRouter::getConnectionState(const std::string &source, const std::string &dest) 920 920 { 921 921 return m_Slave.getConnectionState(source, dest); 922 922 } 923 923 924 DBus::Bool924 bool 925 925 CrossbarRouter::clearAllConnections() 926 926 { 927 927 return m_Slave.clearAllConnections(); 928 928 } 929 929 930 DBus::Bool930 bool 931 931 CrossbarRouter::hasPeakMetering() 932 932 { 933 933 return m_Slave.hasPeakMetering(); 934 934 } 935 935 936 DBus::Double937 CrossbarRouter::getPeakValue(const DBus::String &dest)936 double 937 CrossbarRouter::getPeakValue(const std::string &dest) 938 938 { 939 939 return m_Slave.getPeakValue(dest); 940 940 } 941 std::vector< DBus::Struct< DBus::String, double> >941 std::vector< DBus::Struct<std::string, double> > 942 942 CrossbarRouter::getPeakValues() 943 943 { 944 944 std::map<std::string, double> peakvalues = m_Slave.getPeakValues(); 945 std::vector< DBus::Struct< DBus::String, double> > ret;945 std::vector< DBus::Struct<std::string, double> > ret; 946 946 for (std::map<std::string, double>::iterator it=peakvalues.begin(); it!=peakvalues.end(); ++it) { 947 DBus::Struct< DBus::String, double> tmp;947 DBus::Struct<std::string, double> tmp; 948 948 tmp._1 = it->first; 949 949 tmp._2 = it->second; 950 950 ret.push_back(tmp); … … 971 971 path().c_str() ); 972 972 } 973 973 974 DBus::Bool975 Boolean::select( const DBus::Bool& value )974 bool 975 Boolean::select( const bool& value ) 976 976 { 977 977 debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "select(%d)\n", value ); 978 978 return m_Slave.select(value); 979 979 } 980 980 981 DBus::Bool981 bool 982 982 Boolean::selected() 983 983 { 984 984 bool retval = m_Slave.selected(); … … 986 986 return retval; 987 987 } 988 988 989 DBus::String990 Boolean::getBooleanLabel( const DBus::Bool& value )989 std::string 990 Boolean::getBooleanLabel( const bool& value ) 991 991 { 992 992 std::string retval = m_Slave.getBooleanLabel(value); 993 993 debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "getBooleanLabel(%d) => %s\n", value, retval.c_str() ); -
libffado/support/dbus/controlserver.h
old new 98 98 }; 99 99 100 100 class Element 101 : public org::ffado::Control::Element::Element 101 : public org::ffado::Control::Element::Element_adaptor 102 102 , public DBus::IntrospectableAdaptor 103 103 , public DBus::ObjectAdaptor 104 104 { … … 109 109 std::string p, Element *, 110 110 Control::Element &slave ); 111 111 112 DBus::UInt64getId( );113 DBus::String getName( );114 DBus::String getLabel( );115 DBus::String getDescription( );112 uint64_t getId( ); 113 std::string getName( ); 114 std::string getLabel( ); 115 std::string getDescription( ); 116 116 117 DBus::Bool canChangeValue( );117 bool canChangeValue( ); 118 118 119 void setVerboseLevel( const DBus::Int32&);120 DBus::Int32getVerboseLevel();119 void setVerboseLevel( const int32_t &); 120 int32_t getVerboseLevel(); 121 121 122 122 protected: 123 123 void Lock(); … … 137 137 typedef std::vector<Element *>::const_iterator ConstElementVectorIterator; 138 138 139 139 class Container 140 : public org::ffado::Control::Element::Container 140 : public org::ffado::Control::Element::Container_adaptor 141 141 , public DBusControl::Element 142 142 { 143 143 public: … … 146 146 Control::Container &slave ); 147 147 virtual ~Container(); 148 148 149 DBus::Int32getNbElements( );150 DBus::String getElementName( const DBus::Int32& );149 int32_t getNbElements( ); 150 std::string getElementName( const int32_t& ); 151 151 152 152 void updated(int new_nb_elements); 153 153 void destroyed(); 154 154 155 void setVerboseLevel( const DBus::Int32&);155 void setVerboseLevel( const int32_t &); 156 156 private: 157 157 Element *createHandler(Element *, Control::Element& e); 158 158 void updateTree(); … … 165 165 }; 166 166 167 167 class Continuous 168 : public org::ffado::Control::Element::Continuous 168 : public org::ffado::Control::Element::Continuous_adaptor 169 169 , public Element 170 170 { 171 171 public: … … 173 173 std::string p, Element *, 174 174 Control::Continuous &slave ); 175 175 176 DBus::Double setValue( const DBus::Double & value );177 DBus::Double getValue( );178 DBus::Double getMinimum( );179 DBus::Double getMaximum( );180 DBus::Double setValueIdx( const DBus::Int32& idx,181 const DBus::Double & value );182 DBus::Double getValueIdx( const DBus::Int32& idx );176 double setValue( const double & value ); 177 double getValue( ); 178 double getMinimum( ); 179 double getMaximum( ); 180 double setValueIdx( const int32_t & idx, 181 const double & value ); 182 double getValueIdx( const int32_t & idx ); 183 183 184 184 private: 185 185 Control::Continuous &m_Slave; 186 186 }; 187 187 188 188 class Discrete 189 : public org::ffado::Control::Element::Discrete 189 : public org::ffado::Control::Element::Discrete_adaptor 190 190 , public Element 191 191 { 192 192 public: … … 194 194 std::string p, Element *, 195 195 Control::Discrete &slave ); 196 196 197 DBus::Int32 setValue( const DBus::Int32& value );198 DBus::Int32getValue( );199 DBus::Int32 setValueIdx( const DBus::Int32& idx,200 const DBus::Int32& value );201 DBus::Int32 getValueIdx( const DBus::Int32& idx );197 int32_t setValue( const int32_t & value ); 198 int32_t getValue( ); 199 int32_t setValueIdx( const int32_t & idx, 200 const int32_t & value ); 201 int32_t getValueIdx( const int32_t & idx ); 202 202 203 203 private: 204 204 Control::Discrete &m_Slave; 205 205 }; 206 206 207 207 class Text 208 : public org::ffado::Control::Element::Text 208 : public org::ffado::Control::Element::Text_adaptor 209 209 , public Element 210 210 { 211 211 public: … … 213 213 std::string p, Element *, 214 214 Control::Text &slave ); 215 215 216 DBus::String setValue( const DBus::String & value );217 DBus::String getValue( );216 std::string setValue( const std::string & value ); 217 std::string getValue( ); 218 218 219 219 private: 220 220 Control::Text &m_Slave; 221 221 }; 222 222 223 223 class Register 224 : public org::ffado::Control::Element::Register 224 : public org::ffado::Control::Element::Register_adaptor 225 225 , public Element 226 226 { 227 227 public: … … 229 229 std::string p, Element *, 230 230 Control::Register &slave ); 231 231 232 DBus::UInt64 setValue( const DBus::UInt64 & addr, const DBus::UInt64& value );233 DBus::UInt64 getValue( const DBus::UInt64& addr );232 uint64_t setValue( const uint64_t & addr, const uint64_t & value ); 233 uint64_t getValue( const uint64_t & addr ); 234 234 235 235 private: 236 236 Control::Register &m_Slave; 237 237 }; 238 238 239 239 class Enum 240 : public org::ffado::Control::Element::Enum 240 : public org::ffado::Control::Element::Enum_adaptor 241 241 , public Element 242 242 { 243 243 public: … … 245 245 std::string p, Element *, 246 246 Control::Enum &slave ); 247 247 248 DBus::Int32 select( const DBus::Int32& idx );249 DBus::Int32selected( );250 DBus::Int32count( );251 DBus::String getEnumLabel( const DBus::Int32& idx );248 int32_t select( const int32_t & idx ); 249 int32_t selected( ); 250 int32_t count( ); 251 std::string getEnumLabel( const int32_t & idx ); 252 252 253 253 private: 254 254 Control::Enum &m_Slave; 255 255 }; 256 256 257 257 class AttributeEnum 258 : public org::ffado::Control::Element::AttributeEnum 258 : public org::ffado::Control::Element::AttributeEnum_adaptor 259 259 , public Element 260 260 { 261 261 public: … … 263 263 std::string p, Element *, 264 264 Control::AttributeEnum &slave ); 265 265 266 DBus::Int32 select( const DBus::Int32& idx );267 DBus::Int32selected( );268 DBus::Int32count( );269 DBus::Int32attributeCount();270 DBus::String getEnumLabel( const DBus::Int32& idx );271 DBus::String getAttributeValue( const DBus::Int32& idx );272 DBus::String getAttributeName( const DBus::Int32& idx );266 int32_t select( const int32_t & idx ); 267 int32_t selected( ); 268 int32_t count( ); 269 int32_t attributeCount(); 270 std::string getEnumLabel( const int32_t & idx ); 271 std::string getAttributeValue( const int32_t & idx ); 272 std::string getAttributeName( const int32_t & idx ); 273 273 274 274 private: 275 275 Control::AttributeEnum &m_Slave; … … 278 278 // FIXME: to change this to a normal ConfigRom class name we have to 279 279 // put the 1394 config rom class into a separate namespace. 280 280 class ConfigRomX 281 : public org::ffado::Control::Element::ConfigRomX 281 : public org::ffado::Control::Element::ConfigRomX_adaptor 282 282 , public Element 283 283 { 284 284 public: … … 286 286 std::string p, Element *, 287 287 ConfigRom &slave ); 288 288 289 DBus::String getGUID( );290 DBus::String getVendorName( );291 DBus::String getModelName( );292 DBus::Int32getVendorId( );293 DBus::Int32getModelId( );294 DBus::Int32getUnitVersion( );289 std::string getGUID( ); 290 std::string getVendorName( ); 291 std::string getModelName( ); 292 int32_t getVendorId( ); 293 int32_t getModelId( ); 294 int32_t getUnitVersion( ); 295 295 296 296 private: 297 297 ConfigRom &m_Slave; 298 298 }; 299 299 300 300 class MatrixMixer 301 : public org::ffado::Control::Element::MatrixMixer 301 : public org::ffado::Control::Element::MatrixMixer_adaptor 302 302 , public Element 303 303 { 304 304 public: … … 306 306 std::string p, Element *, 307 307 Control::MatrixMixer &slave ); 308 308 309 DBus::Int32getRowCount( );310 DBus::Int32getColCount( );309 int32_t getRowCount( ); 310 int32_t getColCount( ); 311 311 312 DBus::Int32 canWrite( const DBus::Int32&, const DBus::Int32& );313 DBus::Double setValue( const DBus::Int32&, const DBus::Int32&, const DBus::Double& );314 DBus::Double getValue( const DBus::Int32&, const DBus::Int32& );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& );312 int32_t canWrite( const int32_t&, const int32_t& ); 313 double setValue( const int32_t&, const int32_t&, const double& ); 314 double getValue( const int32_t&, const int32_t& ); 315 316 bool hasNames(); 317 std::string getRowName( const int32_t& ); 318 std::string getColName( const int32_t& ); 319 bool setRowName( const int32_t&, const std::string& ); 320 bool setColName( const int32_t&, const std::string& ); 321 322 bool canConnect(); 323 std::vector<std::string> availableConnectionsForRow( const int32_t& ); 324 std::vector<std::string> availableConnectionsForCol( const int32_t& ); 325 bool connectRowTo( const int32_t&, const std::string& ); 326 bool connectColTo( const int32_t&, const std::string& ); 327 327 328 328 private: 329 329 Control::MatrixMixer &m_Slave; 330 330 }; 331 331 332 332 class CrossbarRouter 333 : public org::ffado::Control::Element::CrossbarRouter 333 : public org::ffado::Control::Element::CrossbarRouter_adaptor 334 334 , public Element 335 335 { 336 336 public: … … 338 338 std::string p, Element *, 339 339 Control::CrossbarRouter &slave ); 340 340 341 std::vector< DBus::String > getSourceNames();342 std::vector< DBus::String > getDestinationNames();341 std::vector< std::string > getSourceNames(); 342 std::vector< std::string > getDestinationNames(); 343 343 344 std::vector< DBus::String > getDestinationsForSource(const DBus::String &);345 DBus::String getSourceForDestination(const DBus::String &);344 std::vector< std::string > getDestinationsForSource(const std::string &); 345 std::string getSourceForDestination(const std::string &); 346 346 347 DBus::Bool canConnect(const DBus::String &source, const DBus::String &dest);348 DBus::Bool setConnectionState(const DBus::String &source, const DBus::String &dest, const DBus::Bool &enable);349 DBus::Bool getConnectionState(const DBus::String &source, const DBus::String &dest);347 bool canConnect(const std::string &source, const std::string &dest); 348 bool setConnectionState(const std::string &source, const std::string &dest, const bool &enable); 349 bool getConnectionState(const std::string &source, const std::string &dest); 350 350 351 DBus::Bool clearAllConnections();351 bool clearAllConnections(); 352 352 353 DBus::Bool hasPeakMetering();354 DBus::Double getPeakValue(const DBus::String &dest);355 std::vector< DBus::Struct< DBus::String, double> > getPeakValues();353 bool hasPeakMetering(); 354 double getPeakValue(const std::string &dest); 355 std::vector< DBus::Struct<std::string, double> > getPeakValues(); 356 356 357 357 private: 358 358 Control::CrossbarRouter &m_Slave; 359 359 }; 360 360 361 361 class Boolean 362 : public org::ffado::Control::Element::Boolean 362 : public org::ffado::Control::Element::Boolean_adaptor 363 363 , public Element 364 364 { 365 365 public: … … 367 367 std::string p, Element *, 368 368 Control::Boolean &slave ); 369 369 370 DBus::Bool select( const DBus::Bool& value );371 DBus::Bool selected();372 DBus::String getBooleanLabel( const DBus::Bool& value );370 bool select( const bool& value ); 371 bool selected(); 372 std::string getBooleanLabel( const bool& value ); 373 373 374 374 private: 375 375 Control::Boolean &m_Slave; -
libffado/support/dbus/SConscript
old new 32 32 # For the debugging apps 33 33 # 34 34 35 env.AppendUnique( CPPPATH=["#/", "#/src" , "#/external/dbus/include"] )36 env.PrependUnique( LIBPATH=[env['build_base']+"src" , env['build_base']+"external/dbus"] )37 env.PrependUnique( LIBS=["ffado" , "dbus-c++"] )35 env.AppendUnique( CPPPATH=["#/", "#/src"] ) 36 env.PrependUnique( LIBPATH=[env['build_base']+"src"] ) 37 env.PrependUnique( LIBS=["ffado"] ) 38 38 39 39 if not env.GetOption( "clean" ): 40 40 env.MergeFlags( env["DBUS1_FLAGS"] ) 41 env.MergeFlags( env["DBUSC1_FLAGS"] ) 41 42 env.MergeFlags( env['LIBRAW1394_FLAGS'] ) 42 43 if not env['SERIALIZE_USE_EXPAT']: 43 44 env.MergeFlags( env['LIBXML26_FLAGS'] )