author | josef <josef> | 2002-10-13 16:42:36 (UTC) |
---|---|---|
committer | josef <josef> | 2002-10-13 16:42:36 (UTC) |
commit | 19cf7d4ff5a64aff90e31b29072ce30db6a046ec (patch) (unidiff) | |
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) (show 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, | |||
32 | } | 32 | } |
33 | void MetaFactory::addReceiveLayer( const QCString& name, | ||
34 | const QString& str, | ||
35 | receivelayer lay) { | ||
36 | m_strings.insert(str, name ); | ||
37 | m_receiveFact.insert( str, lay ); | ||
38 | } | ||
33 | void MetaFactory::addEmulationLayer( const QCString& name, | 39 | void MetaFactory::addEmulationLayer( const QCString& name, |
@@ -70,2 +76,10 @@ QStringList MetaFactory::fileTransferLayers()const { | |||
70 | } | 76 | } |
77 | QStringList MetaFactory::receiveLayers()const { | ||
78 | QStringList list; | ||
79 | QMap<QString, receivelayer>::ConstIterator it; | ||
80 | for ( it = m_receiveFact.begin(); it != m_receiveFact.end(); ++it ) { | ||
81 | list << it.key(); | ||
82 | } | ||
83 | return list; | ||
84 | } | ||
71 | QStringList MetaFactory::emulationLayers()const { | 85 | QStringList MetaFactory::emulationLayers()const { |
@@ -137,2 +151,11 @@ FileTransferLayer* MetaFactory::newFileTransfer(const QString& str, IOLayer* lay | |||
137 | } | 151 | } |
152 | ReceiveLayer* MetaFactory::newReceive(const QString& str, IOLayer* lay ) { | ||
153 | ReceiveLayer* file = 0l; | ||
154 | QMap<QString, receivelayer>::Iterator it; | ||
155 | it = m_receiveFact.find( str ); | ||
156 | if ( it != m_receiveFact.end() ) { | ||
157 | file = (*(it.data() ) )(lay); | ||
158 | } | ||
159 | return file; | ||
160 | } | ||
138 | QCString MetaFactory::internal( const QString& str )const { | 161 | QCString MetaFactory::internal( const QString& str )const { |