X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fclientproxy.cpp;fp=src%2Fclient%2Fclientproxy.cpp;h=5b6177fc2e58f4fde2d19b6f69e2f131633978ee;hp=0000000000000000000000000000000000000000;hb=130ccf5033c21ca3ad0e0357a82953b5727bd0e9;hpb=077d44f36d2f5c730283ef6be839aea7dd073d56 diff --git a/src/client/clientproxy.cpp b/src/client/clientproxy.cpp new file mode 100644 index 00000000..5b6177fc --- /dev/null +++ b/src/client/clientproxy.cpp @@ -0,0 +1,71 @@ +/*************************************************************************** + * Copyright (C) 2005/06 by The Quassel Team * + * devel@quassel-irc.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include + +#include "guiproxy.h" +#include "util.h" +#include "message.h" + +ClientProxy *ClientProxy::instanceptr = 0; + +ClientProxy *ClientProxy::instance() { + if(instanceptr) return instanceptr; + else return instanceptr = new ClientProxy(); +} + +void ClientProxy::destroy() { + delete instanceptr; + instanceptr = 0; +} + +ClientProxy::ClientProxy() { + + +} + +void ClientProxy::recv(CoreSignal sig, QVariant arg1, QVariant arg2, QVariant arg3) { + //qDebug() << "[GUI] Received signal:" << sig <()); break; + case CS_DISPLAY_STATUS_MSG: emit csDisplayStatusMsg(arg1.toString(), arg2.toString()); break; + case CS_MODE_SET: emit csModeSet(arg1.toString(), arg2.toString(), arg3.toString()); break; + case CS_TOPIC_SET: emit csTopicSet(arg1.toString(), arg2.toString(), arg3.toString()); break; + case CS_NICK_ADDED: emit csNickAdded(arg1.toString(), arg2.toString(), arg3.toMap()); break; + case CS_NICK_REMOVED: emit csNickRemoved(arg1.toString(), arg2.toString()); break; + case CS_NICK_RENAMED: emit csNickRenamed(arg1.toString(), arg2.toString(), arg3.toString()); break; + case CS_NICK_UPDATED: emit csNickUpdated(arg1.toString(), arg2.toString(), arg3.toMap()); break; + case CS_OWN_NICK_SET: emit csOwnNickSet(arg1.toString(), arg2.toString()); break; + case CS_QUERY_REQUESTED: emit csQueryRequested(arg1.toString(), arg2.toString()); break; + case CS_BACKLOG_DATA: emit csBacklogData(arg1.value(), arg2.toList(), arg3.toBool()); break; + case CS_UPDATE_BUFFERID: emit csUpdateBufferId(arg1.value()); break; + + //default: qWarning() << "Unknown signal in ClientProxy::recv: " << sig; + default: emit csGeneric(sig, arg1, arg2, arg3); + } +} + +//ClientProxy *guiProxy;