/** * libtransport -- C++ library for easy XMPP Transports development * * Copyright (C) 2011, Jan Kaluza <hanzz.k@gmail.com> * * 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 */#pragma once#include<string>#include<map>#include"Swiften/Swiften.h"namespaceTransport{structUserInfo;classUser;classUserManager;classComponent;classStorageBackend;classUserRegistration;classRosterManager;classBuddy;/// Basic logging class which logs various data into std::out (standard output).classLogger{public:/// Creates new Logger class instance./// \param component component instanceLogger(Component*component);/// Logger destructor.~Logger();/// Starts logging data related to StorageBackend class./// \param storage storage classvoidsetStorageBackend(StorageBackend*storage);/// Starts logging data related to UserRegistration class./// \param userRegistration userRegistration classvoidsetUserRegistration(UserRegistration*userRegistration);/// Starts logging data related to UserManager class./// \param userManager userManager classvoidsetUserManager(UserManager*userManager);/// Starts logging data related to RosterManager class./// \param rosterManager rosterManager classvoidsetRosterManager(RosterManager*rosterManager);private:// ComponentvoidhandleConnected();voidhandleConnectionError(constSwift::ComponentError&error);voidhandleXMLIn(conststd::string&data);voidhandleXMLOut(conststd::string&data);// StorageBackendvoidhandleStorageError(conststd::string&statement,conststd::string&error);// UserRegistrationvoidhandleUserRegistered(constUserInfo&user);voidhandleUserUnregistered(constUserInfo&user);voidhandleUserUpdated(constUserInfo&user);// UserManagervoidhandleUserCreated(User*user);voidhandleUserDestroyed(User*user);// RosterManagervoidhandleBuddySet(Buddy*buddy);voidhandleBuddyUnset(Buddy*buddy);};}