Changeset 762
- Timestamp:
- 12/18/07 04:19:29 (15 years ago)
- Files:
-
- trunk/libffado/src/libavc/general/avc_plug.cpp (modified) (3 diffs)
- trunk/libffado/src/libavc/general/avc_plug.h (modified) (2 diffs)
- trunk/libffado/src/libavc/general/avc_unit.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/libavc/general/avc_plug.cpp
r742 r762 1671 1671 1672 1672 bool 1673 Plug::deserialize Update( Glib::ustring basePath,1674 Util::IODeserialize& deser )1673 Plug::deserializeConnections( Glib::ustring basePath, 1674 Util::IODeserialize& deser ) 1675 1675 { 1676 1676 bool result; 1677 1677 1678 result = deserializePlugVector( basePath + " m_inputConnections", deser,1678 result = deserializePlugVector( basePath + "/m_inputConnections", deser, 1679 1679 m_unit->getPlugManager(), m_inputConnections ); 1680 result &= deserializePlugVector( basePath + " m_outputConnections", deser,1680 result &= deserializePlugVector( basePath + "/m_outputConnections", deser, 1681 1681 m_unit->getPlugManager(), m_outputConnections ); 1682 1683 1682 return result; 1684 1683 } … … 2184 2183 2185 2184 bool 2186 PlugManager::deserializeUpdate() 2185 PlugManager::deserializeUpdate( Glib::ustring basePath, 2186 Util::IODeserialize& deser) 2187 2187 { 2188 2188 bool result = true; … … 2192 2192 ++it ) 2193 2193 { 2194 2194 2195 Plug* pPlug = *it; 2195 2196 2197 std::ostringstream strstrm; 2198 strstrm << basePath << "Plug" << pPlug->getGlobalId(); 2199 2200 result &= pPlug->deserializeConnections( strstrm.str(), deser ); 2196 2201 result &= pPlug->deserializeUpdateSubunit(); 2197 2202 } trunk/libffado/src/libavc/general/avc_plug.h
r742 r762 160 160 Unit& avDevice, 161 161 PlugManager& plugManager ); 162 163 bool deserializeUpdate( Glib::ustring basePath, 164 Util::IODeserialize& deser ); 162 bool deserializeConnections( Glib::ustring basePath, 163 Util::IODeserialize& deser ); 165 164 bool deserializeUpdateSubunit(); 166 165 … … 344 343 bool tidyPlugConnections(PlugConnectionVector&); 345 344 346 bool deserializeUpdate(); 345 bool deserializeUpdate( Glib::ustring basePath, 346 Util::IODeserialize& deser ); 347 347 348 348 private: trunk/libffado/src/libavc/general/avc_unit.cpp
r742 r762 951 951 } 952 952 953 static bool954 deserializePlugUpdateConnections( Glib::ustring path,955 Util::IODeserialize& deser,956 PlugVector& vec )957 {958 bool result = true;959 for ( PlugVector::iterator it = vec.begin();960 it != vec.end();961 ++it )962 {963 Plug* pPlug = *it;964 result &= pPlug->deserializeUpdate( path, deser );965 }966 return result;967 }968 969 953 bool 970 954 Unit::serialize( Glib::ustring basePath, … … 1006 990 delete m_pPlugManager; 1007 991 992 // load all plugs 1008 993 m_pPlugManager = PlugManager::deserialize( basePath + "Plug", deser, *this ); 1009 994 … … 1011 996 return false; 1012 997 1013 result &= deserializePlugVector( basePath + "PcrPlug", deser, getPlugManager(), m_pcrPlugs ); 1014 result &= deserializePlugVector( basePath + "ExternalPlug", deser, getPlugManager(), m_externalPlugs ); 1015 result &= deserializeVector<PlugConnection>( basePath + "PlugConnnection", deser, *this, m_plugConnections ); 998 // load path /PcrPlug0/global_id 999 result &= deserializePlugVector( basePath + "PcrPlug", deser, 1000 getPlugManager(), m_pcrPlugs ); 1001 // load path /ExternalPlug0/global_id 1002 result &= deserializePlugVector( basePath + "ExternalPlug", deser, 1003 getPlugManager(), m_externalPlugs ); 1004 result &= deserializeVector<PlugConnection>( basePath + "PlugConnnection", deser, 1005 *this, m_plugConnections ); 1016 1006 result &= deserializeVector<Subunit>( basePath + "Subunit", deser, *this, m_subunits ); 1017 1007 result &= deserializeSyncInfoVector( basePath + "SyncInfo", deser, m_syncInfos ); 1018 1008 1019 result &= deserializePlugUpdateConnections( basePath + "PcrPlug", deser, m_pcrPlugs );1020 result &= deserializePlugUpdateConnections( basePath + "ExternalPlug", deser, m_externalPlugs );1021 m_pPlugManager->deserializeUpdate( );1009 // update connectsion between plugs (plug.m_inputConnections 1010 // and plug.m_outputConnnections list) 1011 m_pPlugManager->deserializeUpdate( basePath, deser ); 1022 1012 1023 1013 unsigned int i;