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

0001 /*
0002  * This file is part of TelepathyLoggerQt
0003  *
0004  * Copyright (C) 2013 Dan Vrátil <dvratil@redhat.com>
0005  *
0006  * This library is free software; you can redistribute it and/or modify
0007  * it under the terms of the GNU Lesser General Public License as published
0008  * by the Free Software Foundation; either version 2.1 of the License, or
0009  * (at your option) any later version.
0010  *
0011  * This program is distributed in the hope that it will be useful,
0012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0014  * GNU General Public License for more details.
0015  *
0016  * You should have received a copy of the GNU Lesser General Public License
0017  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
0018  */
0019 
0020 #ifndef _TelepathyLoggerQt_pending_log_walker_operation_h_HEADER_GUARD_
0021 #define _TelepathyLoggerQt_pending_log_walker_operation_h_HEADER_GUARD_
0022 
0023 #include "pending-operation.h"
0024 #include "types.h"
0025 
0026 #include <TelepathyLoggerQt_export.h>
0027 
0028 namespace Tpl {
0029 
0030 /**
0031  * \internal
0032  * \brief Generic class for LogWalker operations
0033  */
0034 class TELEPATHY_LOGGER_QT_EXPORT PendingLogWalkerOperation : public Tpl::PendingOperation
0035 {
0036     Q_OBJECT
0037     Q_DISABLE_COPY(PendingLogWalkerOperation)
0038 
0039   public:
0040     enum OperationType {
0041         Rewind
0042     };
0043 
0044     ~PendingLogWalkerOperation();
0045 
0046   private Q_SLOTS:
0047     virtual void start();
0048 
0049   private:
0050     friend class LogWalker;
0051 
0052     PendingLogWalkerOperation(const LogWalkerPtr &logWalker, OperationType operation, uint numEvents);
0053 
0054     struct Private;
0055     friend class Private;
0056     Private *mPriv;
0057 };
0058 
0059 } // Tpl
0060 
0061 #endif