1 /*
2  Kopete Oscar Protocol
3  profiletask.h - Update the user's profile on the server
4 
5  Copyright (c) 2004 Matt Rogers <mattr@kde.org>
6 
7  Kopete (c) 2002-2004 by the Kopete developers <kopete-devel@kde.org>
8 
9  *************************************************************************
10  *                                                                       *
11  * This library is free software; you can redistribute it and/or         *
12  * modify it under the terms of the GNU Lesser General Public            *
13  * License as published by the Free Software Foundation; either          *
14  * version 2 of the License, or (at your option) any later version.      *
15  *                                                                       *
16  *************************************************************************
17 */
18 #ifndef PROFILETASK_H
19 #define PROFILETASK_H
20 
21 #include "task.h"
22 
23 /**
24 Task that sets the profile and away message on the server (AIM only).
25 Also takes care of updating the capabilities supported by the client (AIM and ICQ).
26 
27 The profile will be updated only if the profile text has been set non-null.
28 The away message will be set only if the away message has been set non-null.
29 
30 @author Matt Rogers
31 */
32 class ProfileTask : public Task
33 {
34 public:
35 	ProfileTask( Task* parent );
36 	~ProfileTask();
37 
38 	bool forMe( const Transfer* transfer ) const Q_DECL_OVERRIDE;
39 	bool take( Transfer* transfer ) Q_DECL_OVERRIDE;
40 	void onGo() Q_DECL_OVERRIDE;
41 
42 	void setProfileText( const QString& text );
43 	void setAwayMessage( const QString& text );
44 	void setXtrazStatus( int xtrazStatus );
45 	void setCapabilities( bool value );
46 
47 private:
48 
49 	void sendProfileUpdate();
50 
51 private:
52 	QString m_profileText;
53 	QString m_awayMessage;
54 	int m_xtrazStatus;
55 	bool m_sendCaps;
56 };
57 
58 #endif
59 
60