Initial revision
[silc.git] / apps / silcer / src / silcerapp.hh
1 /*
2
3   silcerapp.hh 
4
5   Author: Pekka Riikonen <priikone@silcnet.org>
6
7   Copyright (C) 2001 Pekka Riikonen
8
9   This program is free software; you can redistribute it and/or modify
10   it under the terms of the GNU General Public License as published by
11   the Free Software Foundation; version 2 of the License.
12
13   This program is distributed in the hope that it will be useful,
14   but WITHOUT ANY WARRANTY; without even the implied warranty of
15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16   GNU General Public License for more details.
17
18 */
19
20 #ifndef SILCERAPP_HH
21 #define SILCERAPP_HH
22
23 #include "SilcerMainDlg.hh"
24 #include "silcer_gladehelper.hh"
25
26 extern "C" {
27 #define CXX
28 #include "silcincludes.h"
29 #include "clientlibincludes.h"
30 }
31
32 #include <fstream>
33 #include <glade/glade-xml.h>
34 #include <sigc++/object_slot.h>
35 #include <gnome--/client.h>
36 #include <gnome--/main.h>
37
38 // Forward declarations
39 class SilcerApp;
40
41 // Global pointer for the application
42 extern SilcerApp *Silcer_App;
43
44 // Global pointer to the SILC Client Library object
45 extern SilcClient silc_client;
46 extern SilcClientConnection silc_client_conn;
47
48 // Silcer class
49 class SilcerApp : public SigC::Object
50 {
51 public:
52   SilcerApp(int argc, char **argv);
53   ~SilcerApp();
54
55   SilcerMainDlg *_MainDialog;
56
57   void run();
58   void quit();
59   GladeXML* load_resource(const char *name);
60   GladeXML* load_resource(const char *name, const char *filename);
61
62 protected:
63   gint silc_scheduler();
64
65 private:
66   Gnome::Main _GnomeApp;
67   Gnome::Client *_gclient;
68   string _SourceDir;
69   string _pix_path;
70 };
71
72 #endif /* SILCERAPP_HH */