File indexing completed on 2024-04-14 15:05:40

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_text_event_h_HEADER_GUARD_
0021 #define _TelepathyLoggerQt_text_event_h_HEADER_GUARD_
0022 
0023 #include "event.h"
0024 
0025 #include <TelepathyLoggerQt_export.h>
0026 
0027 #include <TelepathyQt/Constants>
0028 
0029 namespace Tpl
0030 {
0031 
0032 /*!
0033  * \headerfile text-event.h <TelepathyLoggerQt/TextEvent>
0034  * \brief A subclass of Event representing a text log event.
0035  */
0036 class TELEPATHY_LOGGER_QT_EXPORT TextEvent : public Event
0037 {
0038 public:
0039 
0040     /*!
0041      * \brief Returns the type of the message.
0042      */
0043     Tp::ChannelTextMessageType messageType() const;
0044 
0045     /*!
0046      * \brief Returns content of the message.
0047      */
0048     QString message() const;
0049 
0050     /*!
0051      * \brief Returns token of the message.
0052      */
0053     QString messageToken() const;
0054 
0055     /*!
0056      * \brief Returns timestamp when the message was sent or delivered.
0057      */
0058     QDateTime editTimestamp() const;
0059 
0060     /*!
0061      * \brief Returns token of a message this message supersedes.
0062      */
0063     QString supersedesToken() const;
0064 
0065     /*!
0066      * \brief Returns a list of messages this messages supersedes.
0067      */
0068     QList<TextEventPtr> supersedes() const;
0069 
0070 private:
0071     QTELEPATHYLOGGERQT_WRAPPER(TextEvent, Event)
0072 };
0073 
0074 } //namespace
0075 
0076 #endif