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 @@ -30,6 +30,12 @@ void MetaFactory::addFileTransferLayer( const QCString& name, 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) { @@ -68,6 +74,14 @@ QStringList MetaFactory::fileTransferLayers()const { } 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; @@ -135,6 +149,15 @@ FileTransferLayer* MetaFactory::newFileTransfer(const QString& str, IOLayer* 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]; } |