summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/sms/smscontact.h
blob: 98d56c05072f45ed43546fcd2515880be59c8abf (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
/*  *************************************************************************
    *   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 SMSCONTACT_H
#define SMSCONTACT_H

#include "kopetecontact.h"
#include "kopetemessage.h"

#include <tqstring.h>

class SMSAccount;
namespace Kopete { class ChatSession; }
namespace Kopete { class MetaContact; }

class TDEActionCollection;
class TDEAction;

class SMSContact : public Kopete::Contact
{
	Q_OBJECT
  
public:
	SMSContact( Kopete::Account* _account, const TQString &phoneNumber,
		const TQString &displayName, Kopete::MetaContact *parent );

	TQPtrList<TDEAction>* customContextMenuActions();

	const TQString &phoneNumber();
	void setPhoneNumber( const TQString phoneNumber );
	const TQString qualifiedNumber();

	/**
	 * Serialize contact
	 */
	virtual void serialize( TQMap<TQString, TQString> &serializedData,
		TQMap<TQString, TQString> &addressBookData );

	Kopete::ChatSession* manager( Kopete::Contact::CanCreateFlags canCreate = Kopete::Contact::CanCreate );

public slots:
	virtual void slotUserInfo();
	virtual void deleteContact();
	void slotSendingSuccess(const Kopete::Message &msg);
	void slotSendingFailure(const Kopete::Message &msg, const TQString &error);

private slots:
	void userPrefs();
	void slotChatSessionDestroyed();

private:
	TDEAction* m_actionPrefs;

	TQString m_phoneNumber;

	Kopete::ChatSession* m_msgManager;
};

#endif