author | josef <josef> | 2002-10-13 16:42:36 (UTC) |
---|---|---|
committer | josef <josef> | 2002-10-13 16:42:36 (UTC) |
commit | 19cf7d4ff5a64aff90e31b29072ce30db6a046ec (patch) (side-by-side diff) | |
tree | 9935de353676391f237ebd4e0c0b16d967dee513 /noncore/apps/opie-console/metafactory.cpp | |
parent | 40e7d87b58e6146944da4613c04bfafc90dbb379 (diff) | |
download | opie-19cf7d4ff5a64aff90e31b29072ce30db6a046ec.zip opie-19cf7d4ff5a64aff90e31b29072ce30db6a046ec.tar.gz opie-19cf7d4ff5a64aff90e31b29072ce30db6a046ec.tar.bz2 |
- let metafactory manage new ReceiveLayer objects
- include Receive::SX, ::SY, ::SZ into default.cpp
- use metafactory in transferdialog for receive operations too
Diffstat (limited to 'noncore/apps/opie-console/metafactory.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/metafactory.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/metafactory.cpp b/noncore/apps/opie-console/metafactory.cpp index 901f29f..09ba586 100644 --- a/noncore/apps/opie-console/metafactory.cpp +++ b/noncore/apps/opie-console/metafactory.cpp @@ -27,12 +27,18 @@ void MetaFactory::addIOLayerFactory( const QCString& name, void MetaFactory::addFileTransferLayer( const QCString& name, const QString& str, filelayer lay) { m_strings.insert(str, name ); m_fileFact.insert( str, lay ); } +void MetaFactory::addReceiveLayer( const QCString& name, + const QString& str, + receivelayer lay) { + m_strings.insert(str, name ); + m_receiveFact.insert( str, lay ); +} void MetaFactory::addEmulationLayer( const QCString& name, const QString& str, emulationLayer em) { m_strings.insert(str, name ); m_emu.insert( str, em ); } @@ -65,12 +71,20 @@ QStringList MetaFactory::fileTransferLayers()const { QMap<QString, filelayer>::ConstIterator it; for ( it = m_fileFact.begin(); it != m_fileFact.end(); ++it ) { list << it.key(); } return list; } +QStringList MetaFactory::receiveLayers()const { + QStringList list; + QMap<QString, receivelayer>::ConstIterator it; + for ( it = m_receiveFact.begin(); it != m_receiveFact.end(); ++it ) { + list << it.key(); + } + return list; +} QStringList MetaFactory::emulationLayers()const { QStringList list; QMap<QString, emulationLayer>::ConstIterator it; for ( it = m_emu.begin(); it != m_emu.end(); ++it ) { list << it.key(); } @@ -132,12 +146,21 @@ FileTransferLayer* MetaFactory::newFileTransfer(const QString& str, IOLayer* lay it = m_fileFact.find( str ); if ( it != m_fileFact.end() ) { file = (*(it.data() ) )(lay); } return file; } +ReceiveLayer* MetaFactory::newReceive(const QString& str, IOLayer* lay ) { + ReceiveLayer* file = 0l; + QMap<QString, receivelayer>::Iterator it; + it = m_receiveFact.find( str ); + if ( it != m_receiveFact.end() ) { + file = (*(it.data() ) )(lay); + } + return file; +} QCString MetaFactory::internal( const QString& str )const { return m_strings[str]; } QString MetaFactory::external( const QCString& str )const { QMap<QString, QCString>::ConstIterator it; for ( it = m_strings.begin(); it != m_strings.end(); ++it ) { |