File indexing completed on 2024-11-10 04:40:39

0001 /*
0002     SPDX-FileCopyrightText: 2010 KDAB
0003     SPDX-FileContributor: Tobias Koenig <tokoe@kde.org>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 #pragma once
0009 
0010 namespace Akonadi
0011 {
0012 class AbstractDifferencesReporter;
0013 class Item;
0014 
0015 /**
0016  * @short An interface to find out differences between two Akonadi objects.
0017  *
0018  * @author Tobias Koenig <tokoe@kde.org>
0019  * @since 4.6
0020  */
0021 class DifferencesAlgorithmInterface
0022 {
0023 public:
0024     /**
0025      * Destroys the differences algorithm interface.
0026      */
0027     virtual ~DifferencesAlgorithmInterface()
0028     {
0029     }
0030 
0031     /**
0032      * Calculates the differences between two Akonadi objects and reports
0033      * them to a reporter object.
0034      *
0035      * @param reporter The reporter object that will be used for reporting the differences.
0036      * @param leftItem The left-hand side item that will be compared.
0037      * @param rightItem The right-hand side item that will be compared.
0038      */
0039     virtual void compare(AbstractDifferencesReporter *reporter, const Akonadi::Item &leftItem, const Akonadi::Item &rightItem) = 0;
0040 };
0041 
0042 }
0043 
0044 Q_DECLARE_INTERFACE(Akonadi::DifferencesAlgorithmInterface, "org.freedesktop.Akonadi.DifferencesAlgorithmInterface/1.0")