1 /***************************************************************************
2 * Copyright (C) 2005-07 by The Quassel IRC Development Team *
3 * devel@quassel-irc.org *
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. *
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. *
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 ***************************************************************************/
23 #include <QApplication>
30 #include "coreproxy.h"
32 #include "chatwidget.h"
36 int main(int argc, char **argv) {
37 QApplication app(argc, argv);
38 QCoreApplication::setOrganizationDomain("quassel-irc.org");
39 QCoreApplication::setApplicationName("Quassel IRC");
40 QCoreApplication::setOrganizationName("Quassel IRC Development Team");
42 Global::runMode = Global::Monolithic;
43 Global::quasselDir = QDir::homePath() + "/.quassel";
45 //settings = new Settings();
46 //global = new Global();
47 //guiProxy = new GUIProxy();
48 //coreProxy = new CoreProxy();
49 QObject::connect(Core::localSession(), SIGNAL(proxySignal(CoreSignal, QVariant, QVariant, QVariant)), ClientProxy::instance(), SLOT(recv(CoreSignal, QVariant, QVariant, QVariant)));
50 QObject::connect(ClientProxy::instance(), SIGNAL(send(ClientSignal, QVariant, QVariant, QVariant)), Core::localSession(), SLOT(processSignal(ClientSignal, QVariant, QVariant, QVariant)));
55 //MainWin *mainWin = new MainWin();
59 int exitCode = app.exec();
71 void Client::syncToCore() {
72 //Q_ASSERT(Global::data("CoreReady").toBool());
73 coreBuffers = Core::localSession()->buffers();
74 // NOTE: We don't need to request server states, because in the monolithic version there can't be
75 // any servers connected at this stage...
79 void CoreProxy::sendToGUI(CoreSignal sig, QVariant arg1, QVariant arg2, QVariant arg3) {
80 guiProxy->recv(sig, arg1, arg2, arg3);
85 GUIProxy::GUIProxy() {
86 if(guiProxy) qFatal("Trying to instantiate more than one GUIProxy object!");
90 void GUIProxy::send(GUISignal sig, QVariant arg1, QVariant arg2, QVariant arg3) {
91 coreProxy->recv(sig, arg1, arg2, arg3);
95 // Dummy function definitions
96 // These are not needed, since we don't have a network connection to the core.
98 void GUIProxy::serverHasData() {}
99 void GUIProxy::connectToCore(QString, quint16) {}
100 void GUIProxy::disconnectFromCore() {}
101 void GUIProxy::updateCoreData(QString) {}
102 void GUIProxy::serverError(QAbstractSocket::SocketError) {}