source: psi/vendor/affinix/current/src/psigrowlnotifier.h@ 2

Last change on this file since 2 was 2, checked in by dmik, 19 years ago

Imported original Psi 0.10 sources from Affinix

File size: 1.8 KB
Line 
1/*
2 * psigrowlnotifier.h: Psi's interface to Growl
3 * Copyright (C) 2005 Remko Troncon
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * You can also redistribute and/or modify this program under the
11 * terms of the Psi License, specified in the accompanied COPYING
12 * file, as published by the Psi Project; either dated January 1st,
13 * 2005, or (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this library; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 *
24 */
25
26#ifndef PSIGROWLNOTIFIER_H
27#define PSIGROWLNOTIFIER_H
28
29#include "psipopup.h"
30
31class GrowlNotifier;
32class PsiAccount;
33
34/*!
35 * An interface for Psi to Growl.
36 * This class uses GrowlNotifier to interface with Growl.
37 * There is at most 1 PsiGrowlNotifier per Psi session (Singleton). This
38 * notifier can be retrieved using instance().
39 *
40 * \see GrowlNotifier
41 */
42class PsiGrowlNotifier : public QObject
43{
44 Q_OBJECT
45
46public:
47 static PsiGrowlNotifier* instance();
48 void popup(PsiAccount* account, PsiPopup::PopupType type, const Jid& j, const Resource& r, const UserListItem* = 0, PsiEvent* = 0);
49
50public slots:
51 void notificationClicked(void*);
52 void notificationTimedOut(void*);
53
54private:
55 PsiGrowlNotifier();
56
57 static PsiGrowlNotifier* instance_;
58 GrowlNotifier* gn_;
59};
60
61#endif
Note: See TracBrowser for help on using the repository browser.