File indexing completed on 2025-01-05 03:54:00
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2007-12-23 0007 * Description : Core database DBus interface description 0008 * 0009 * SPDX-FileCopyrightText: 2007-2008 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de> 0010 * 0011 * SPDX-License-Identifier: GPL-2.0-or-later 0012 * 0013 * ============================================================ */ 0014 0015 #ifndef DIGIKAM_CORE_DB_WATCH_ADAPTOR_H 0016 #define DIGIKAM_CORE_DB_WATCH_ADAPTOR_H 0017 0018 // Qt includes 0019 0020 #include <QObject> 0021 #include <QDBusVariant> 0022 #include <QDBusAbstractAdaptor> 0023 0024 // Local includes 0025 0026 #include "coredbwatch.h" 0027 0028 // qdbuscpp2xml -S -M databasewatchadaptor.h -o org.kde.digikam.DatabaseChangesetRelay.xml 0029 0030 class CoreDbWatchAdaptor : public QDBusAbstractAdaptor 0031 { 0032 Q_OBJECT 0033 Q_CLASSINFO("D-Bus Interface", "org.kde.digikam.DatabaseChangesetRelay") 0034 0035 public: 0036 0037 explicit CoreDbWatchAdaptor(Digikam::CoreDbWatch* const watch); 0038 0039 Q_SIGNALS: 0040 0041 // These signals are the same as declared in CoreDbWatch, setAutoRelaySignals will 0042 // automatically connect the CoreDbWatch signals to these, which are then sent over DBus. 0043 0044 // NOTE: the full qualification with "Digikam::" for the changeset types in the following 0045 // signals and slots are required to make moc pick them up. 0046 // If moc does not get the namespace in its literal, DBus connections will silently break. 0047 0048 void signalImageChangeDBus(const QString& databaseIdentifier, 0049 const QString& applicationIdentifier, 0050 const Digikam::ImageChangeset& changeset); 0051 0052 void signalImageTagChangeDBus(const QString& databaseIdentifier, 0053 const QString& applicationIdentifier, 0054 const Digikam::ImageTagChangeset& changeset); 0055 0056 void signalCollectionImageChangeDBus(const QString& databaseIdentifier, 0057 const QString& applicationIdentifier, 0058 const Digikam::CollectionImageChangeset& changeset); 0059 0060 void signalAlbumChangeDBus(const QString& databaseIdentifier, 0061 const QString& applicationIdentifier, 0062 const Digikam::AlbumChangeset& changeset); 0063 0064 void signalTagChangeDBus(const QString& databaseIdentifier, 0065 const QString& applicationIdentifier, 0066 const Digikam::TagChangeset& changeset); 0067 0068 void signalAlbumRootChangeDBus(const QString& databaseIdentifier, 0069 const QString& applicationIdentifier, 0070 const Digikam::AlbumRootChangeset& changeset); 0071 0072 void signalSearchChangeDBus(const QString& databaseIdentifier, 0073 const QString& applicationIdentifier, 0074 const Digikam::SearchChangeset& changeset); 0075 }; 0076 0077 #endif // DIGIKAM_CORE_DB_WATCH_ADAPTOR_H