CARDS 2.3.99
Package manager for the NuTyX GNU/Linux distribution
cards_event_handler.h
1 /*
2  * cards_event_handler.h
3  *
4  * Copyright 2017 Gianni Peschiutta <artemia@nutyx.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
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.
15  *
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., 51 Franklin Street, Fifth Floor, Boston,
19  * MA 02110-1301, USA.
20  *
21  *
22  */
23 
24 #ifndef CARDS_EVENT_HANDLER_H
25 #define CARDS_EVENT_HANDLER_H
26 
27 #include <cstddef>
28 #include <string>
29 #include <set>
30 
31 using namespace std;
32 
33 enum CEH_RC
34 {
35  OK=0,
36  NO_ROOT,
37  PKG_NOT_EXIST,
38  EXCEPTION
39 };
40 
41 // Define Cards_wrapper singleton for friendship
42 class Cards_wrapper;
43 
52 {
53  friend Cards_wrapper;
54 protected:
55 
56  virtual void OnLogMessage (const string& Message){}
57  virtual void OnSyncFinished (const CEH_RC rc){}
58  virtual void OnDoJobListFinished (const CEH_RC rc){}
59  virtual void OnRefreshPackageFinished (const CEH_RC rc){}
60  virtual void OnJobListChange (const CEH_RC rc){}
61 public:
62 static const string getReasonCodeString(const CEH_RC rc);
63 };
64 
65 #endif
GUI interfacing wrapper for CARDS.
Definition: cards_wrapper.h:47
Abstract class to handle event from cards_wrapper.
Definition: cards_event_handler.h:51