* qt/: Update to Subversion r548032.
[platform/upstream/dbus.git] / qt / src / qdbusmetaobject_p.h
1 /* 
2  *
3  * Copyright (C) 2006 Trolltech AS. All rights reserved.
4  *    Author: Thiago Macieira <thiago.macieira@trolltech.com>
5  *
6  * Licensed under the Academic Free License version 2.1
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software Foundation
20  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  *
22  */
23
24 //
25 //  W A R N I N G
26 //  -------------
27 //
28 // This file is not part of the public API.  This header file may
29 // change from version to version without notice, or even be
30 // removed.
31 //
32 // We mean it.
33 //
34 //
35
36 #ifndef QDBUSMETAOBJECTPRIVATE_H
37 #define QDBUSMETAOBJECTPRIVATE_H
38
39 #include <QtCore/qmetaobject.h>
40 #include "qdbusmacros.h"
41
42 class QDBusError;
43
44 struct QDBusMetaObjectPrivate;
45 struct QDBUS_EXPORT QDBusMetaObject: public QMetaObject
46 {
47     bool cached;
48
49     static QDBusMetaObject *createMetaObject(const QString &interface, const QString &xml,
50                                              QHash<QString, QDBusMetaObject *> &map,
51                                              QDBusError &error);
52     ~QDBusMetaObject()
53     {
54         delete [] d.stringdata;
55         delete [] d.data;
56     }
57
58     // methods (slots & signals):
59     const char *dbusNameForMethod(int id) const;
60     const char *inputSignatureForMethod(int id) const;
61     const char *outputSignatureForMethod(int id) const;
62     const int *inputTypesForMethod(int id) const;
63     const int *outputTypesForMethod(int id) const;
64
65     // properties:
66     int propertyMetaType(int id) const;
67
68     // helper function:
69     static void assign(void *, const QVariant &value);
70
71 private:
72     QDBusMetaObject();
73 };
74
75 struct QDBusMetaTypeId
76 {
77     static bool innerInitialize();
78     static bool initialized;
79     static inline void initialize()
80     {
81         if (initialized) return;
82         innerInitialize();
83     }
84     
85     static int variant;
86     static int boollist;
87     static int shortlist;
88     static int ushortlist;
89     static int intlist;
90     static int uintlist;
91     static int longlonglist;
92     static int ulonglonglist;
93     static int doublelist;
94 };
95
96 #endif