File indexing completed on 2024-04-21 15:42:59
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_pending_entities_h_HEADER_GUARD_ 0022 #define _TelepathyLoggerQt_pending_entities_h_HEADER_GUARD_ 0023 0024 #include "pending-operation.h" 0025 #include "types.h" 0026 0027 #include <TelepathyLoggerQt_export.h> 0028 0029 namespace Tpl 0030 { 0031 0032 /** 0033 * \headerfile pending-entities.h <TelepathyLoggerQt/PendingEntities> 0034 * \brief An operation for retrieving entities for which logs exist. 0035 */ 0036 class TELEPATHY_LOGGER_QT_EXPORT PendingEntities: public Tpl::PendingOperation 0037 { 0038 Q_OBJECT 0039 Q_DISABLE_COPY(PendingEntities); 0040 0041 public: 0042 /** 0043 * \brief Destructor. 0044 */ 0045 ~PendingEntities(); 0046 0047 /** 0048 * \brief Returns list of entities retrieved from logger store. 0049 * 0050 * It's an error to call this method before the finished() signal is emitted. 0051 */ 0052 EntityPtrList entities() const; 0053 0054 /** 0055 * \brief Returns account that has been queried. 0056 */ 0057 Tp::AccountPtr account() const; 0058 0059 private Q_SLOTS: 0060 virtual void start(); 0061 0062 private: 0063 friend class LogManager; 0064 0065 PendingEntities(const LogManagerPtr & manager, const Tp::AccountPtr & account); 0066 0067 struct Private; 0068 friend struct Private; 0069 Private *mPriv; 0070 }; 0071 0072 } // Tpl 0073 0074 #endif