From bcb704366cb5e333a626c18c308c7e0448a8e69f Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: 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 --- kopete/protocols/sms/smsservice.h | 83 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 kopete/protocols/sms/smsservice.h (limited to 'kopete/protocols/sms/smsservice.h') diff --git a/kopete/protocols/sms/smsservice.h b/kopete/protocols/sms/smsservice.h new file mode 100644 index 00000000..f1c04470 --- /dev/null +++ b/kopete/protocols/sms/smsservice.h @@ -0,0 +1,83 @@ +/* ************************************************************************* + * copyright: (C) 2003 Richard Lärkäng * + * copyright: (C) 2003 Gav Wood * + ************************************************************************* +*/ + +/* ************************************************************************* + * * + * 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 SMSSERVICE_H +#define SMSSERVICE_H + +#include +#include +#include + +#include "kopetemessage.h" + +class SMSContact; +namespace Kopete { class Account; } +class QGridLayout; +class QWidget; + +class SMSService : public QObject +{ + Q_OBJECT +public: + SMSService(Kopete::Account* account = 0); + virtual ~SMSService(); + + /** + * Reimplement to do extra stuff when the account is dynamically changed + * (other than just changing m_account). + * + * Don't forget to call SMSService::setAccount(...) after you've finished. + */ + virtual void setAccount(Kopete::Account* account); + + /** + * Called when the settings widget has a place to be. @param parent is the + * settings widget's parent and @param layout is the 2xn grid layout it may + * use. + */ + virtual void setWidgetContainer(QWidget* parent, QGridLayout* layout) = 0; + + virtual void send(const Kopete::Message& msg) = 0; + virtual int maxSize() = 0; + virtual const QString& description() = 0; + +public slots: + virtual void savePreferences() = 0; + virtual void connect(); + virtual void disconnect(); + +signals: + void messageSent(const Kopete::Message &); + void messageNotSent(const Kopete::Message &, const QString &); + void connected(); + void disconnected(); + +protected: + Kopete::Account* m_account; + QGridLayout* m_layout; + QWidget* m_parent; +}; + +#endif //SMSSERVICE_H +/* + * 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: + -- cgit v1.2.1