summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/sms/smsservice.h
blob: 616529ca8422f6972764e6d22287cbe6004f36ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*  *************************************************************************
    *   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.                                   *
    *                                                                       *
    *************************************************************************
*/

#ifndef SMSSERVICE_H
#define SMSSERVICE_H

#include <tqstring.h>
#include <tqwidget.h>
#include <tqobject.h>

#include "kopetemessage.h"

class SMSContact;
namespace Kopete { class Account; }
class TQGridLayout;
class TQWidget;

class SMSService : public TQObject
{
	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(TQWidget* parent, TQGridLayout* layout) = 0;

	virtual void send(const Kopete::Message& msg) = 0;
	virtual int maxSize() = 0;
	virtual const TQString& 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 TQString &);
	void connected();
	void disconnected();

protected:
	Kopete::Account* m_account;
	TQGridLayout* m_layout;
	TQWidget* 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: