1 /* This file is part of the dbusmenu-qt library
2 Copyright 2009 Canonical
3 Author: Aurelien Gateau <aurelien.gateau@canonical.com>
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License (LGPL) as published by the Free Software Foundation;
8 either version 2 of the License, or (at your option) any later
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
21 #ifndef DBUSMENUTYPES_P_H
22 #define DBUSMENUTYPES_P_H
25 #include <QtCore/QList>
26 #include <QtCore/QStringList>
27 #include <QtCore/QVariant>
28 #include <QtDBus/QDBusArgument>
31 #include <dbusmenu_export.h>
35 * Internal struct used to communicate on DBus
37 struct DBUSMENU_EXPORT DBusMenuItem
40 QVariantMap properties;
43 Q_DECLARE_METATYPE(DBusMenuItem)
45 DBUSMENU_EXPORT QDBusArgument &operator<<(QDBusArgument &argument, const DBusMenuItem &item);
46 DBUSMENU_EXPORT const QDBusArgument &operator>>(const QDBusArgument &argument, DBusMenuItem &item);
48 typedef QList<DBusMenuItem> DBusMenuItemList;
50 Q_DECLARE_METATYPE(DBusMenuItemList)
55 * Represents a list of keys for a menu item
57 struct DBUSMENU_EXPORT DBusMenuItemKeys
60 QStringList properties;
63 Q_DECLARE_METATYPE(DBusMenuItemKeys)
65 DBUSMENU_EXPORT QDBusArgument &operator<<(QDBusArgument &argument, const DBusMenuItemKeys &);
66 DBUSMENU_EXPORT const QDBusArgument &operator>>(const QDBusArgument &argument, DBusMenuItemKeys &);
68 typedef QList<DBusMenuItemKeys> DBusMenuItemKeysList;
70 Q_DECLARE_METATYPE(DBusMenuItemKeysList)
72 //// DBusMenuLayoutItem
74 * Represents an item with its children. GetLayout() returns a
75 * DBusMenuLayoutItemList.
77 struct DBusMenuLayoutItem;
78 struct DBUSMENU_EXPORT DBusMenuLayoutItem
81 QVariantMap properties;
82 QList<DBusMenuLayoutItem> children;
85 Q_DECLARE_METATYPE(DBusMenuLayoutItem)
87 DBUSMENU_EXPORT QDBusArgument &operator<<(QDBusArgument &argument, const DBusMenuLayoutItem &);
88 DBUSMENU_EXPORT const QDBusArgument &operator>>(const QDBusArgument &argument, DBusMenuLayoutItem &);
90 typedef QList<DBusMenuLayoutItem> DBusMenuLayoutItemList;
92 Q_DECLARE_METATYPE(DBusMenuLayoutItemList)
94 void DBusMenuTypes_register();
95 #endif /* DBUSMENUTYPES_P_H */