HEAD: an extra unit test for wvbase64 that I forgot to check in a while ago.
[wvapps.git] / evolution / guinotification.h
blobb5086fd2367b0c2d08a1ab28ab73efe6a659a746
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * Author : Hubert Figuiere <hub@nit.ca>
5 * Copyright 2004, Net Integration Technologies, Inc.
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of version 2 of the GNU General Public
9 * License as published by the Free Software Foundation.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19 * USA
22 #ifndef __GUINOTIFICATION_H__
23 #define __GUINOTIFICATION_H__
26 #include "wvstream.h"
27 #include "wvstring.h"
29 class WvExcConnManager;
33 class GUINotification
34 : public WvStream
36 public:
37 typedef enum NotificationKind {
38 PASSWORD,
39 ERROR
42 GUINotification (WvExcConnManager *_manager, NotificationKind _kind,
43 int _param, int _rearm = -1);
44 GUINotification (WvExcConnManager *_manager, NotificationKind _kind,
45 const WvString &_msg, int _rearm = -1);
47 NotificationKind kind()
48 { return notification_kind; }
49 const WvString & message()
50 { return msg; }
51 int param(void)
52 { return parameter; }
54 private:
55 WvExcConnManager *manager;
57 NotificationKind notification_kind;
58 WvString msg;
59 int parameter;
60 int rearm;
61 WvLog log;
62 /** tells that the notification is processed or being processed.*/
63 bool processed;
65 void ask_a_password(WvString & password);
67 public:
68 virtual bool isok() const;
69 virtual bool pre_select(SelectInfo &si);
70 virtual bool post_select(SelectInfo &si);
71 virtual void execute();
74 #endif