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 @@ -32,2 +32,8 @@ void MetaFactory::addFileTransferLayer( const QCString& name, } +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, @@ -70,2 +76,10 @@ QStringList MetaFactory::fileTransferLayers()const { } +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 { @@ -137,2 +151,11 @@ FileTransferLayer* MetaFactory::newFileTransfer(const QString& str, IOLayer* lay } +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 { |