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 | |||
@@ -31,4 +31,10 @@ void MetaFactory::addFileTransferLayer( const QCString& name, | |||
31 | m_fileFact.insert( str, lay ); | 31 | m_fileFact.insert( str, lay ); |
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, |
34 | const QString& str, | 40 | const QString& str, |
@@ -69,4 +75,12 @@ QStringList MetaFactory::fileTransferLayers()const { | |||
69 | return list; | 75 | return list; |
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 { |
72 | QStringList list; | 86 | QStringList list; |
@@ -136,4 +150,13 @@ FileTransferLayer* MetaFactory::newFileTransfer(const QString& str, IOLayer* lay | |||
136 | return file; | 150 | return file; |
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 { |
139 | return m_strings[str]; | 162 | return m_strings[str]; |