summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/smpppdcs/smpppdcsplugin.h
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/plugins/smpppdcs/smpppdcsplugin.h
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/plugins/smpppdcs/smpppdcsplugin.h')
-rw-r--r--kopete/plugins/smpppdcs/smpppdcsplugin.h109
1 files changed, 109 insertions, 0 deletions
diff --git a/kopete/plugins/smpppdcs/smpppdcsplugin.h b/kopete/plugins/smpppdcs/smpppdcsplugin.h
new file mode 100644
index 00000000..789d9c41
--- /dev/null
+++ b/kopete/plugins/smpppdcs/smpppdcsplugin.h
@@ -0,0 +1,109 @@
+/*
+ smpppdcsplugin.h
+
+ Copyright (c) 2002-2003 by Chris Howells <[email protected]>
+ Copyright (c) 2003 by Martijn Klingens <[email protected]>
+ Copyright (c) 2004-2006 by Heiko Schaefer <[email protected]>
+
+ Kopete (c) 2002-2006 by the Kopete developers <[email protected]>
+
+ *************************************************************************
+ * *
+ * 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; version 2 of the License. *
+ * *
+ *************************************************************************
+*/
+
+#ifndef SMPPPDCSPLUGIN_H
+#define SMPPPDCSPLUGIN_H
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "detector.h"
+#include "iconnector.h"
+#include "smpppdcsiface.h"
+
+#include "kopeteplugin.h"
+#include "kopeteaccount.h"
+
+class QTimer;
+class Detector;
+class OnlineInquiry;
+
+/**
+ * @brief Plugin for the detection of an internet connection
+ *
+ * This plugin inquires either the smpppd or netstat
+ * for an existing internet connection and depending
+ * on that connects or disconnects all accounts.
+ *
+ * Therefore it should be enabled on dial up network
+ * connections.
+ *
+ * @author Chris Howells <[email protected]>, Heiko Sch&auml;fer <[email protected]>
+ */
+class SMPPPDCSPlugin : public Kopete::Plugin, public IConnector, virtual public SMPPPDCSIFace {
+ Q_OBJECT
+ SMPPPDCSPlugin(const SMPPPDCSPlugin&);
+ SMPPPDCSPlugin& operator=(const SMPPPDCSPlugin&);
+
+public:
+ /**
+ * @brief Creates an <code>SMPPPDCSPlugin</code> instance
+ */
+ SMPPPDCSPlugin( QObject *parent, const char *name, const QStringList &args );
+
+ /**
+ * @brief Destroys an <code>SMPPPDCSPlugin</code> instance
+ */
+ virtual ~SMPPPDCSPlugin();
+
+ // Implementation of DCOP iface
+ /**
+ * @brief Checks if we are online.
+ * @note This method is reserved for future use. Do not use at the moment!
+ * @return <code>TRUE</code> if online, otherwise <code>FALSE</code>
+ */
+ virtual bool isOnline() const;
+
+ /**
+ * @brief Sets the status in all allowed accounts.
+ * Allowed accounts are set in the config dialog of the plugin.
+ *
+ * @see SMPPPDCSPrefs
+ */
+ virtual void setConnectedStatus( bool newStatus );
+
+ virtual QString detectionMethod() const;
+
+ virtual void aboutToUnload();
+
+public slots:
+ void smpppdServerChanged(const QString& server);
+
+private slots:
+ void slotCheckStatus();
+ void allPluginsLoaded();
+
+private:
+
+ void connectAllowed();
+ void disconnectAllowed();
+
+private:
+
+ Detector * m_detectorSMPPPD;
+ Detector * m_detectorNetstat;
+ Detector * m_detectorNetworkStatus;
+ bool m_pluginConnected;
+ QTimer * m_timer;
+ OnlineInquiry * m_onlineInquiry;
+};
+
+#endif /* SMPPPDCSPLUGIN_H */
+
+// vim: set noet ts=4 sts=4 sw=4: