digiKam
dbenginedbusutils.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2008-09-09
7  * Description : Database engine hint data containers for Dbus
8  *
9  * Copyright (C) 2008 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option)
15  * any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_DB_ENGINE_DBUS_UTILS_H
25 #define DIGIKAM_DB_ENGINE_DBUS_UTILS_H
26 
27 class QDBusArgument;
28 
29 #define DECLARE_METATYPE_FOR_DBUS(x) \
30 Q_DECLARE_METATYPE(x) \
31  \
32 inline QDBusArgument& operator<<(QDBusArgument& argument, const x& changeset) \
33 { \
34  changeset >> argument; \
35  return argument; \
36 } \
37  \
38 inline const QDBusArgument& operator>>(const QDBusArgument& argument, x& changeset) \
39 { \
40  changeset << argument; \
41  return argument; \
42 }
43 
44 #endif // DIGIKAM_DB_ENGINE_DBUS_UTILS_H