File indexing completed on 2024-04-21 15:43:00
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 0022 #include "search-hit.h" 0023 #include "entity.h" 0024 0025 #include <TelepathyQt/Account> 0026 0027 #include <QDate> 0028 0029 using namespace Tpl; 0030 0031 struct TELEPATHY_LOGGER_QT_NO_EXPORT SearchHit::Private : public QSharedData 0032 { 0033 Tp::AccountPtr account; 0034 EntityPtr target; 0035 QDate date; 0036 }; 0037 0038 SearchHit::SearchHit(const Tp::AccountPtr &account, const Tpl::EntityPtr &target, const QDate &date) : 0039 mPriv(new Private()) 0040 { 0041 mPriv->account = account; 0042 mPriv->target = target; 0043 mPriv->date = date; 0044 } 0045 0046 SearchHit::SearchHit(const SearchHit &other) 0047 : mPriv(other.mPriv) 0048 { 0049 } 0050 0051 SearchHit & SearchHit::operator=(const SearchHit &other) 0052 { 0053 mPriv = other.mPriv; 0054 return *this; 0055 } 0056 0057 SearchHit::~SearchHit() 0058 { 0059 } 0060 0061 Tp::AccountPtr SearchHit::account() const 0062 { 0063 return mPriv->account; 0064 } 0065 0066 EntityPtr SearchHit::target() const 0067 { 0068 return mPriv->target; 0069 } 0070 0071 QDate SearchHit::date() const 0072 { 0073 return mPriv->date; 0074 } 0075 0076 0077