summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/sms/smsaccount.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/protocols/sms/smsaccount.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/protocols/sms/smsaccount.h')
-rw-r--r--kopete/protocols/sms/smsaccount.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/kopete/protocols/sms/smsaccount.h b/kopete/protocols/sms/smsaccount.h
new file mode 100644
index 00000000..2547fe6c
--- /dev/null
+++ b/kopete/protocols/sms/smsaccount.h
@@ -0,0 +1,79 @@
+/* *************************************************************************
+ * copyright: (C) 2003 Richard L�rk�ng <[email protected]> *
+ * copyright: (C) 2003 Gav Wood <[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; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ *************************************************************************
+*/
+
+#ifndef SMSACCOUNT_H
+#define SMSACCOUNT_H
+
+#include "kopeteaccount.h"
+
+class KActionMenu;
+class SMSProtocol;
+class SMSContact;
+class SMSService;
+class KProcess;
+
+enum SMSMsgAction { ACT_ASK = 0, ACT_CANCEL, ACT_SPLIT };
+
+class SMSAccount : public Kopete::Account
+{
+ Q_OBJECT
+
+public:
+ SMSAccount( SMSProtocol *parent, const QString &accountID, const char *name = 0L );
+ ~SMSAccount();
+
+ virtual KActionMenu* actionMenu(); // Per-protocol actions for the systray and the status bar
+
+ virtual void setAway( bool away, const QString & );
+
+ void translateNumber(QString &theNumber);
+
+ /**
+ * Checks to see if the message should be split or not, in case it is too long.
+ *
+ * Only ever call in case of message being too long - may result in user interaction.
+ */
+ const bool splitNowMsgTooLong(int msgLength);
+
+ SMSService* service();
+
+public slots:
+ void loadConfig();
+ void setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason = QString::null);
+
+public slots:
+ virtual void connect(const Kopete::OnlineStatus& initial= Kopete::OnlineStatus());
+ virtual void disconnect();
+ virtual void slotSendMessage(Kopete::Message &msg);
+
+protected slots:
+ virtual void slotSendingSuccess(const Kopete::Message &msg);
+ virtual void slotSendingFailure(const Kopete::Message &msg, const QString &error);
+ virtual void slotConnected();
+ virtual void slotDisconnected();
+
+
+protected:
+ bool createContact(const QString &contactId, Kopete::MetaContact *parentContact);
+
+private:
+ bool theSubEnable;
+ QString theSubCode;
+ SMSMsgAction theLongMsgAction;
+ SMSService* theService;
+};
+
+#endif