summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/sms/serviceloader.cpp
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitbcb704366cb5e333a626c18c308c7e0448a8e69f (patch)
treef0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /kopete/protocols/sms/serviceloader.cpp
downloadtdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz
tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/sms/serviceloader.cpp')
-rw-r--r--kopete/protocols/sms/serviceloader.cpp74
1 files changed, 74 insertions, 0 deletions
diff --git a/kopete/protocols/sms/serviceloader.cpp b/kopete/protocols/sms/serviceloader.cpp
new file mode 100644
index 00000000..8a64a6c0
--- /dev/null
+++ b/kopete/protocols/sms/serviceloader.cpp
@@ -0,0 +1,74 @@
+/* *************************************************************************
+ * copyright: (C) 2003 Richard Lärkäng <nouseforaname@home.se> *
+ * copyright: (C) 2003 Gav Wood <gav@kde.org> *
+ *************************************************************************
+*/
+
+/* *************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ *************************************************************************
+*/
+
+#include "config.h"
+
+#include <kmessagebox.h>
+#include <klocale.h>
+#include <kdebug.h>
+
+#include "serviceloader.h"
+#include "smssend.h"
+#include "smsclient.h"
+#ifdef INCLUDE_SMSGSM
+# include "gsmlib.h"
+#endif
+#include "kopeteuiglobal.h"
+
+SMSService* ServiceLoader::loadService(const QString& name, Kopete::Account* account)
+{
+ kdWarning( 14160 ) << k_funcinfo << endl;
+
+ SMSService* s;
+ if (name == "SMSSend")
+ s = new SMSSend(account);
+ else if (name == "SMSClient")
+ s = new SMSClient(account);
+#ifdef INCLUDE_SMSGSM
+ else if (name == "GSMLib")
+ s = new GSMLib(account);
+#endif
+ else
+ {
+ KMessageBox::sorry(Kopete::UI::Global::mainWidget(), i18n("Could not load service %1.").arg(name),
+ i18n("Error Loading Service"));
+ s = 0L;
+ }
+
+ return s;
+}
+
+QStringList ServiceLoader::services()
+{
+ QStringList toReturn;
+ toReturn.append("SMSSend");
+ toReturn.append("SMSClient");
+#ifdef INCLUDE_SMSGSM
+ toReturn.append("GSMLib");
+#endif
+ return toReturn;
+}
+
+
+/*
+ * Local variables:
+ * c-indentation-style: k&r
+ * c-basic-offset: 8
+ * indent-tabs-mode: t
+ * End:
+ */
+// vim: set noet ts=4 sts=4 sw=4:
+