(no commit message)
[quassel.git] / main / main_mono.cpp
1 /***************************************************************************
2  *   Copyright (C) 2005 by The Quassel Team                                *
3  *   devel@quassel-irc.org                                                 *
4  *                                                                          *
5  *   This program is free software; you can redistribute it and/or modify  *
6  *   it under the terms of the GNU General Public License as published by  *
7  *   the Free Software Foundation; either version 2 of the License, or     *
8  *   (at your option) any later version.                                   *
9  *                                                                         *
10  *   This program is distributed in the hope that it will be useful,       *
11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13  *   GNU General Public License for more details.                          *
14  *                                                                         *
15  *   You should have received a copy of the GNU General Public License     *
16  *   along with this program; if not, write to the                         *
17  *   Free Software Foundation, Inc.,                                       *
18  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19  ***************************************************************************/
20
21 #include <iostream>
22
23 #include <QApplication>
24
25 #include "core.h"
26 #include "quassel.h"
27 #include "logger.h"
28 #include "proxy.h"
29
30 #include "mainwin.h"
31 #include "messages.h"
32
33 int main(int argc, char **argv) {
34
35   Quassel::init();
36   Logger *logger = new Logger();
37   Quassel::setLogger(logger);
38
39   Message *m = new Message("admin");
40   //m->*(m->getCmdHandler())(QStringList(""));
41   (m->*(m->getCmdHandler()))(QStringList());
42   exit(0);
43   
44   QApplication app(argc, argv);
45
46   QApplication::setOrganizationDomain("quassel-irc.org");
47   QApplication::setApplicationName("Quassel IRC");
48   QApplication::setOrganizationName("The Quassel Team");
49
50   Core::init();
51
52   MainWin mainWin;
53   mainWin.show();
54   return app.exec();
55 }
56
57 QVariant proxyConnect(uint func, QVariant arg) {
58   using namespace Proxy;
59
60   switch(func) {
61     case LOAD_IDENTITIES: return (QVariant) CoreProxy::loadIdentities();
62     case STORE_IDENTITIES: CoreProxy::storeIdentities(arg.toMap()); return 0;
63
64   }
65   return 0;
66 }