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>
29 #include "clientproxy.h"
30 #include "coreproxy.h"
32 #include "chatwidget.h"
34 int main(int argc, char **argv) {
35 QApplication app(argc, argv);
36 QCoreApplication::setOrganizationDomain("quassel-irc.org");
37 QCoreApplication::setApplicationName("Quassel IRC");
38 QCoreApplication::setOrganizationName("Quassel IRC Development Team");
40 Global::runMode = Global::Monolithic;
41 Global::quasselDir = QDir::homePath() + "/.quassel";
43 //settings = new Settings();
44 //global = new Global();
45 //guiProxy = new GUIProxy();
46 //coreProxy = new CoreProxy();
47 QObject::connect(Core::localSession(), SIGNAL(proxySignal(CoreSignal, QVariant, QVariant, QVariant)), ClientProxy::instance(), SLOT(recv(CoreSignal, QVariant, QVariant, QVariant)));
48 QObject::connect(ClientProxy::instance(), SIGNAL(send(ClientSignal, QVariant, QVariant, QVariant)), Core::localSession(), SLOT(processSignal(ClientSignal, QVariant, QVariant, QVariant)));
53 //MainWin *mainWin = new MainWin();
57 int exitCode = app.exec();
69 void Client::syncToCore() {
70 //Q_ASSERT(Global::data("CoreReady").toBool());
71 coreBuffers = Core::localSession()->buffers();
72 // NOTE: We don't need to request server states, because in the monolithic version there can't be
73 // any servers connected at this stage...
77 void CoreProxy::sendToGUI(CoreSignal sig, QVariant arg1, QVariant arg2, QVariant arg3) {
78 guiProxy->recv(sig, arg1, arg2, arg3);
83 GUIProxy::GUIProxy() {
84 if(guiProxy) qFatal("Trying to instantiate more than one GUIProxy object!");
88 void GUIProxy::send(GUISignal sig, QVariant arg1, QVariant arg2, QVariant arg3) {
89 coreProxy->recv(sig, arg1, arg2, arg3);
93 // Dummy function definitions
94 // These are not needed, since we don't have a network connection to the core.
96 void GUIProxy::serverHasData() {}
97 void GUIProxy::connectToCore(QString, quint16) {}
98 void GUIProxy::disconnectFromCore() {}
99 void GUIProxy::updateCoreData(QString) {}
100 void GUIProxy::serverError(QAbstractSocket::SocketError) {}