diff --git a/spectrum/src/frontends/slack/SlackFrontend.cpp b/spectrum/src/frontends/slack/SlackFrontend.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e8dd5f0f50ee16c0ad6e2cb45713742a8e960c64 --- /dev/null +++ b/spectrum/src/frontends/slack/SlackFrontend.cpp @@ -0,0 +1,111 @@ +/** + * Spectrum 2 Slack Frontend + * + * Copyright (C) 2015, Jan Kaluza + * + * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA + */ + +#include "SlackFrontend.h" +#include "SlackRosterManager.h" +#include "SlackUser.h" +#include "SlackUserManager.h" + +#include "transport/StorageBackend.h" +#include "transport/Factory.h" +#include "transport/UserRegistry.h" +#include "transport/Logging.h" +#include "transport/Config.h" +#include "transport/Transport.h" + +#include +#include +#include + +using namespace boost; + +namespace Transport { + +DEFINE_LOGGER(logger, "SlackFrontend"); + +SlackFrontend::SlackFrontend() { +} + +void SlackFrontend::init(Component *transport, Swift::EventLoop *loop, Swift::NetworkFactories *factories, Config *config, Transport::UserRegistry *userRegistry) { + m_transport = transport; + m_config = transport->getConfig(); + m_jid = Swift::JID(CONFIG_STRING(m_config, "service.jid")); + + +} + +SlackFrontend::~SlackFrontend() { + +} + +void SlackFrontend::clearRoomList() { + +} + +void SlackFrontend::addRoomToRoomList(const std::string &handle, const std::string &name) { + +} + +void SlackFrontend::sendPresence(Swift::Presence::ref presence) { + +} + +void SlackFrontend::sendVCard(Swift::VCard::ref vcard, Swift::JID to) { +} + +void SlackFrontend::sendRosterRequest(Swift::RosterPayload::ref payload, Swift::JID to) { +} + +void SlackFrontend::sendMessage(boost::shared_ptr message) { +} + +void SlackFrontend::sendIQ(boost::shared_ptr iq) { +} + +boost::shared_ptr SlackFrontend::sendCapabilitiesRequest(Swift::JID to) { + + return Swift::DiscoInfo::ref(); +} + +void SlackFrontend::reconnectUser(const std::string &user) { + +} + +RosterManager *SlackFrontend::createRosterManager(User *user, Component *component) { + return new SlackRosterManager(user, component); +} + +User *SlackFrontend::createUser(const Swift::JID &jid, UserInfo &userInfo, Component *component, UserManager *userManager) { + return new SlackUser(jid, userInfo, component, userManager); +} + +UserManager *SlackFrontend::createUserManager(Component *component, UserRegistry *userRegistry, StorageBackend *storageBackend) { + return new SlackUserManager(component, userRegistry, storageBackend); +} + + +void SlackFrontend::connectToServer() { +} + +void SlackFrontend::disconnectFromServer() { + +} + +}