Show
Ignore:
Timestamp:
08/29/07 02:19:04 (16 years ago)
Author:
ppalmers
Message:

- Clean up the FFADODevice constructor to remove the nodeid that

can be retrieved from the configrom.

- Implement new method of creating devices: a device is supposed

to implement the createDevice static method that should return
an instance of itself or a subclass of itself. This should ease
support for manufacturer specific customizations since we don't
have to put them into the device manager class.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/genericavc/avc_avdevice.cpp

    r560 r583  
    5656}; 
    5757 
    58 AvDevice::AvDevice( std::auto_ptr< ConfigRom >( configRom ), 
    59                     Ieee1394Service& ieee1394service, 
    60                     int nodeId ) 
    61     :  FFADODevice( configRom, ieee1394service, nodeId ) 
     58AvDevice::AvDevice( Ieee1394Service& ieee1394Service, 
     59                    std::auto_ptr<ConfigRom>( configRom )) 
     60    : FFADODevice( ieee1394Service, configRom ) 
    6261    , m_model( NULL ) 
    6362 
    6463{ 
    6564    debugOutput( DEBUG_LEVEL_VERBOSE, "Created GenericAVC::AvDevice (NodeID %d)\n", 
    66                  nodeId ); 
     65                 configRom->getNodeId() ); 
    6766    addOption(Util::OptionContainer::Option("snoopMode",false)); 
    6867} 
     
    9291 
    9392    return false; 
     93} 
     94 
     95FFADODevice * 
     96AvDevice::createDevice( Ieee1394Service& ieee1394Service, 
     97                        std::auto_ptr<ConfigRom>( configRom )) 
     98{ 
     99    return new AvDevice(ieee1394Service, configRom ); 
    94100} 
    95101