File indexing completed on 2024-04-28 12:45:41
0001 /* 0002 * This file is part of TelepathyLoggerQt 0003 * 0004 * Copyright (C) 2011 Collabora Ltd. <http://www.collabora.co.uk/> 0005 * Copyright (C) 2012 David Edmundson <kde@davidedmundson.co.uk> 0006 * 0007 * This library is free software; you can redistribute it and/or 0008 * modify it under the terms of the GNU Lesser General Public 0009 * License as published by the Free Software Foundation; either 0010 * version 2.1 of the License, or (at your option) any later version. 0011 * 0012 * This library 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 GNU 0015 * Lesser General Public License for more details. 0016 * 0017 * You should have received a copy of the GNU Lesser General Public 0018 * License along with this library; if not, write to the Free Software 0019 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 0020 */ 0021 #ifndef _TelepathyLoggerQt_search_hit_h_HEADER_GUARD_ 0022 #define _TelepathyLoggerQt_search_hit_h_HEADER_GUARD_ 0023 0024 #include "entity.h" 0025 0026 #include <TelepathyLoggerQt_export.h> 0027 0028 #include <TelepathyQt/Types> 0029 0030 #include <QSharedDataPointer> 0031 0032 namespace Tpl 0033 { 0034 0035 0036 /** 0037 * \headerfile search-hit.h <TelepathyLoggerQt/SearchHit> 0038 * \brief A single search match. 0039 */ 0040 class TELEPATHY_LOGGER_QT_EXPORT SearchHit 0041 { 0042 public: 0043 /** 0044 * \brief Constructs a new search hit 0045 * \param account 0046 * \param target 0047 * \param date 0048 */ 0049 SearchHit(const Tp::AccountPtr &account, const EntityPtr &target, const QDate &date); 0050 0051 /** 0052 * \brief Copy constructor. 0053 * \param other 0054 */ 0055 SearchHit(const SearchHit &other); 0056 0057 /** 0058 * \brief Assignment operator. 0059 */ 0060 SearchHit & operator=(const SearchHit &other); 0061 0062 /** 0063 * \brief Destructor. 0064 */ 0065 ~SearchHit(); 0066 0067 /** 0068 * \brief Returns an account that the matching event is associated with. 0069 */ 0070 Tp::AccountPtr account() const; 0071 0072 /** 0073 * \brief Returns an entity that the matching event is associated with. 0074 */ 0075 EntityPtr target() const; 0076 0077 /** 0078 * \brief Returns an entity that the matching event is associated with. 0079 */ 0080 QDate date() const; 0081 0082 private: 0083 struct Private; 0084 QSharedDataPointer<Private> mPriv; 0085 }; 0086 0087 } // Tpl 0088 0089 #endif