1 /*
2 	Kopete Oscar Protocol
3 	onlinenotifiertask.h - handles all the status notifications
4 
5 	Copyright (c) 2004 by Matt Rogers <mattr@kde.org>
6 
7 	Based on code Copyright (c) 2004 SuSE Linux AG <http://www.suse.com>
8 	Based on Iris, Copyright (C) 2003  Justin Karneges <justin@affinix.com>
9 
10 	Kopete (c) 2002-2004 by the Kopete developers <kopete-devel@kde.org>
11 
12 	*************************************************************************
13 	*                                                                       *
14 	* This library is free software; you can redistribute it and/or         *
15 	* modify it under the terms of the GNU Lesser General Public            *
16 	* License as published by the Free Software Foundation; either          *
17 	* version 2 of the License, or (at your option) any later version.      *
18 	*                                                                       *
19 	*************************************************************************
20 */
21 #ifndef ONLINENOTIFIERTASK_H
22 #define ONLINENOTIFIERTASK_H
23 
24 #include <task.h>
25 #include "userdetails.h"
26 
27 class Transfer;
28 class QString;
29 /**
30 Tracks status notifications (online, offline, etc.) for contacts
31 Implements SNACS (0x03, 0x11) and (0x03, 0x12)
32 
33 @author Matt Rogers
34 */
35 class OnlineNotifierTask : public Task
36 {
37 Q_OBJECT
38 public:
39 	OnlineNotifierTask( Task* parent );
40 
41 	~OnlineNotifierTask();
42 
43 	bool take( Transfer* transfer ) Q_DECL_OVERRIDE;
44 
45 protected:
46 	bool forMe( const Transfer* transfer ) const Q_DECL_OVERRIDE;
47 
48 Q_SIGNALS:
49 	void userIsOnline( const QString& user, const UserDetails& ud );
50 	void userIsOffline( const QString& user, const UserDetails& ud );
51 
52 private:
53 	void userOnline();
54 	void userOffline();
55 
56 };
57 
58 #endif
59 
60