summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/yahoo/yahooprotocol.h
blob: cd42d61f417c94a80637cbe8148b6d0efdaa80ef (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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
/*
    yahooprotocol.h - Yahoo Plugin for Kopete

    Copyright (c) 2002 by Duncan Mac-Vicar Prett <duncan@kde.org>
    Copyright (c) 2003-2004 by Matt Rogers <mattrogers@sbcglobal.net

    Copyright (c) 2002-2004 by the Kopete developers  <kopete-devel@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 YAHOOPROTOCOL_H
#define YAHOOPROTOCOL_H

// Kopete Includes
#include "kopeteonlinestatus.h"

// QT Includes
#include <tqpixmap.h>
#include <tqmap.h>

// KDE Includes
#include "kopeteprotocol.h"
#include "kopetecontactproperty.h"

class YahooContact;
class TDEPopupMenu;
class TDEActionMenu;
class TDEAction;
namespace Kopete { class MetaContact; }
namespace Kopete { class Message; }
class YahooPreferences;
namespace Kopete { class OnlineStatus; }

class YahooProtocol : public Kopete::Protocol
{
	Q_OBJECT
  
public:
	YahooProtocol( TQObject *parent, const char *name, const TQStringList &args );
	~YahooProtocol();

	//Online Statuses
	const Kopete::OnlineStatus Offline;
	const Kopete::OnlineStatus Online;
	const Kopete::OnlineStatus BeRightBack;
	const Kopete::OnlineStatus Busy;
	const Kopete::OnlineStatus NotAtHome;
	const Kopete::OnlineStatus NotAtMyDesk;
	const Kopete::OnlineStatus NotInTheOffice;
	const Kopete::OnlineStatus OnThePhone;
	const Kopete::OnlineStatus OnVacation;
	const Kopete::OnlineStatus OutToLunch;
	const Kopete::OnlineStatus SteppedOut;
	const Kopete::OnlineStatus Invisible;
	const Kopete::OnlineStatus Custom;
	const Kopete::OnlineStatus Idle;
	const Kopete::OnlineStatus Connecting;

	const Kopete::ContactPropertyTmpl 	awayMessage;
	const Kopete::ContactPropertyTmpl 	iconCheckSum;
	const Kopete::ContactPropertyTmpl 	iconExpire;
	const Kopete::ContactPropertyTmpl 	iconRemoteUrl;

	// Personal
	const Kopete::ContactPropertyTmpl	propfirstName;
	const Kopete::ContactPropertyTmpl	propSecondName;
	const Kopete::ContactPropertyTmpl	propLastName;
	const Kopete::ContactPropertyTmpl	propNickName;
	const Kopete::ContactPropertyTmpl	propTitle;

	// Primary Information	
	const Kopete::ContactPropertyTmpl	propPhoneMobile;
	const Kopete::ContactPropertyTmpl	propEmail;
	const Kopete::ContactPropertyTmpl	propYABId;

	// Additional Information
	const Kopete::ContactPropertyTmpl	propPager;
	const Kopete::ContactPropertyTmpl	propFax;
	const Kopete::ContactPropertyTmpl	propAdditionalNumber;
	const Kopete::ContactPropertyTmpl	propAltEmail1;
	const Kopete::ContactPropertyTmpl	propAltEmail2;
	const Kopete::ContactPropertyTmpl	propImICQ;
	const Kopete::ContactPropertyTmpl	propImGoogleTalk;
	const Kopete::ContactPropertyTmpl	propImSkype;
	const Kopete::ContactPropertyTmpl	propImIRC;
	const Kopete::ContactPropertyTmpl	propImQQ;

	// Private Information
	const Kopete::ContactPropertyTmpl	propPrivateAddress;
	const Kopete::ContactPropertyTmpl	propPrivateCity;
	const Kopete::ContactPropertyTmpl	propPrivateState;
	const Kopete::ContactPropertyTmpl	propPrivateZIP;
	const Kopete::ContactPropertyTmpl	propPrivateCountry;
	const Kopete::ContactPropertyTmpl	propPrivatePhone;
	const Kopete::ContactPropertyTmpl	propPrivateURL;
		
	// Work Information
	const Kopete::ContactPropertyTmpl	propCorporation;
	const Kopete::ContactPropertyTmpl	propWorkAddress;
	const Kopete::ContactPropertyTmpl	propWorkCity;
	const Kopete::ContactPropertyTmpl	propWorkState;
	const Kopete::ContactPropertyTmpl	propWorkZIP;
	const Kopete::ContactPropertyTmpl	propWorkCountry;
	const Kopete::ContactPropertyTmpl	propWorkPhone;
	const Kopete::ContactPropertyTmpl	propWorkURL;

	// Miscellanous
	const Kopete::ContactPropertyTmpl	propBirthday;
	const Kopete::ContactPropertyTmpl	propAnniversary;
	const Kopete::ContactPropertyTmpl	propNotes;
	const Kopete::ContactPropertyTmpl	propAdditional1;
	const Kopete::ContactPropertyTmpl	propAdditional2;
	const Kopete::ContactPropertyTmpl	propAdditional3;
	const Kopete::ContactPropertyTmpl	propAdditional4;

	/** Protocol Accessor **/
	static YahooProtocol *protocol();

	virtual Kopete::Contact *deserializeContact( Kopete::MetaContact *metaContact,
					 const TQMap<TQString,TQString> &serializedData,
					 const TQMap<TQString, TQString> &addressBookData );

	Kopete::OnlineStatus statusFromYahoo( int status );

public slots:
	virtual AddContactPage *createAddContactWidget(TQWidget * parent, Kopete::Account* a);
	virtual KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, TQWidget *parent);
	virtual Kopete::Account *createNewAccount(const TQString &accountId);


private:
	static YahooProtocol* s_protocolStatic_;

};

#endif

// vim: set noet ts=4 sts=4 sw=4: