File indexing completed on 2024-04-21 15:42:59
0001 /* 0002 * This file is part of TelepathyLoggerQt 0003 * 0004 * Copyright (C) 2011 Stefano Sanfilippo <stefano.k.sanfilippo@gmail.com> 0005 * Copyright (C) 2011 Collabora Ltd. <http://www.collabora.co.uk/> 0006 * 0007 * This library is free software; you can redistribute it and/or modify 0008 * it under the terms of the GNU Lesser General Public License as published 0009 * by the Free Software Foundation; either version 2.1 of the License, or 0010 * (at your option) any later version. 0011 * 0012 * This program is distributed in the hope that it will be useful, 0013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0015 * GNU General Public License for more details. 0016 * 0017 * You should have received a copy of the GNU Lesser General Public License 0018 * along with this program. If not, see <http://www.gnu.org/licenses/>. 0019 */ 0020 #ifndef _TelepathyLoggerQt_event_h_HEADER_GUARD_ 0021 #define _TelepathyLoggerQt_event_h_HEADER_GUARD_ 0022 0023 #include "object.h" 0024 #include "types.h" 0025 0026 #include <TelepathyLoggerQt_export.h> 0027 0028 namespace Tpl 0029 { 0030 0031 /*! 0032 * \headerfile event.h <TelepathyLoggerQt/Event> 0033 * \brief The TPLogger log event represents a generic log event, which will be 0034 * specialized by subclasses. 0035 */ 0036 class TELEPATHY_LOGGER_QT_EXPORT Event : public Tpl::Object 0037 { 0038 public: 0039 0040 /*! 0041 * \brief Returns a timestamp when the event has been logged. 0042 */ 0043 QDateTime timestamp() const; 0044 0045 /*! 0046 *\brief Returns account path of the account the event is associated to. 0047 */ 0048 QString accountPath() const; 0049 0050 /*! 0051 * \brief Returns the account the event is associated to. 0052 */ 0053 Tp::AccountPtr account() const; 0054 0055 /*! 0056 * \brief Returns the entity that originated the log event. 0057 */ 0058 EntityPtr sender() const; 0059 0060 /*! 0061 * \brief Returns the entity thas was destination for the log event. 0062 */ 0063 EntityPtr receiver() const; 0064 0065 /*! 0066 * \brief Equivalent to operator==(). 0067 */ 0068 bool equalTo(const EventPtr & rhs) const; 0069 0070 /*! 0071 * \brief Comparison operator. 0072 */ 0073 bool operator==(const EventPtr & rhs ) const; 0074 0075 private: 0076 QTELEPATHYLOGGERQT_WRAPPER(Event) 0077 }; 0078 0079 } //namespace 0080 0081 #endif