Diffstat (limited to 'qmake/include/private/qucom_p.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | qmake/include/private/qucom_p.h | 76 |
1 files changed, 20 insertions, 56 deletions
diff --git a/qmake/include/private/qucom_p.h b/qmake/include/private/qucom_p.h index d2ff48e..6b6ad40 100644 --- a/qmake/include/private/qucom_p.h +++ b/qmake/include/private/qucom_p.h | |||
@@ -32,19 +32,14 @@ | |||
32 | ** | 32 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 34 | ** not clear to you. |
35 | ** | 35 | ** |
36 | **********************************************************************/ | 36 | **********************************************************************/ |
37 | 37 | ||
38 | #ifndef QUCOM_H | 38 | #ifndef QUCOM_P_H |
39 | #define QUCOM_H | 39 | #define QUCOM_P_H |
40 | |||
41 | #ifndef QT_H | ||
42 | #include <qstring.h> | ||
43 | #include "quuid.h" | ||
44 | #endif // QT_H | ||
45 | 40 | ||
46 | // | 41 | // |
47 | // W A R N I N G | 42 | // W A R N I N G |
48 | // ------------- | 43 | // ------------- |
49 | // | 44 | // |
50 | // This file is not part of the Qt API. It exists for the convenience | 45 | // This file is not part of the Qt API. It exists for the convenience |
@@ -52,12 +47,17 @@ | |||
52 | // version to version without notice, or even be removed. | 47 | // version to version without notice, or even be removed. |
53 | // | 48 | // |
54 | // We mean it. | 49 | // We mean it. |
55 | // | 50 | // |
56 | // | 51 | // |
57 | 52 | ||
53 | #ifndef QT_H | ||
54 | #include <qstring.h> | ||
55 | #include "quuid.h" | ||
56 | #endif // QT_H | ||
57 | |||
58 | #ifdef check | 58 | #ifdef check |
59 | #undef check | 59 | #undef check |
60 | #endif | 60 | #endif |
61 | 61 | ||
62 | struct QUObject; | 62 | struct QUObject; |
63 | struct QUInterfaceDescription; | 63 | struct QUInterfaceDescription; |
@@ -126,58 +126,58 @@ public: // scary MSVC bug makes this necessary | |||
126 | QUType *type; | 126 | QUType *type; |
127 | 127 | ||
128 | // the unavoidable union | 128 | // the unavoidable union |
129 | union | 129 | union |
130 | { | 130 | { |
131 | bool b; | 131 | bool b; |
132 | 132 | ||
133 | char c; | 133 | char c; |
134 | short s; | 134 | short s; |
135 | int i; | 135 | int i; |
136 | long l; | 136 | long l; |
137 | 137 | ||
138 | unsigned char uc; | 138 | unsigned char uc; |
139 | unsigned short us; | 139 | unsigned short us; |
140 | unsigned int ui; | 140 | unsigned int ui; |
141 | unsigned long ul; | 141 | unsigned long ul; |
142 | 142 | ||
143 | float f; | 143 | float f; |
144 | double d; | 144 | double d; |
145 | 145 | ||
146 | char byte[16]; | 146 | char byte[16]; |
147 | 147 | ||
148 | struct { | 148 | struct { |
149 | char* data; | 149 | char* data; |
150 | unsigned long size; | 150 | unsigned long size; |
151 | } bytearray; | 151 | } bytearray; |
152 | 152 | ||
153 | void* ptr; | 153 | void* ptr; |
154 | 154 | ||
155 | struct { | 155 | struct { |
156 | void *ptr; | 156 | void *ptr; |
157 | bool owner; | 157 | bool owner; |
158 | } voidstar; | 158 | } voidstar; |
159 | 159 | ||
160 | struct { | 160 | struct { |
161 | char *ptr; | 161 | char *ptr; |
162 | bool owner; | 162 | bool owner; |
163 | } charstar; | 163 | } charstar; |
164 | 164 | ||
165 | struct { | 165 | struct { |
166 | char *ptr; | 166 | char *ptr; |
167 | bool owner; | 167 | bool owner; |
168 | } utf8; | 168 | } utf8; |
169 | 169 | ||
170 | struct { | 170 | struct { |
171 | char *ptr; | 171 | char *ptr; |
172 | bool owner; | 172 | bool owner; |
173 | } local8bit; | 173 | } local8bit; |
174 | 174 | ||
175 | QUnknownInterface* iface; | 175 | QUnknownInterface* iface; |
176 | QDispatchInterface* idisp; | 176 | QDispatchInterface* idisp; |
177 | 177 | ||
178 | } payload; | 178 | } payload; |
179 | 179 | ||
180 | }; | 180 | }; |
181 | 181 | ||
182 | 182 | ||
183 | // A parameter description describes one method parameters. A | 183 | // A parameter description describes one method parameters. A |
@@ -260,13 +260,13 @@ struct Q_EXPORT QUEnumItem // - a name/value pair | |||
260 | { | 260 | { |
261 | const char *key; | 261 | const char *key; |
262 | int value; | 262 | int value; |
263 | }; | 263 | }; |
264 | 264 | ||
265 | struct Q_EXPORT QUEnum | 265 | struct Q_EXPORT QUEnum |
266 | { | 266 | { |
267 | const char *name; // - enumerator name | 267 | const char *name; // - enumerator name |
268 | unsigned int count; // - number of values | 268 | unsigned int count; // - number of values |
269 | const QUEnumItem *items; // - the name/value pairs | 269 | const QUEnumItem *items; // - the name/value pairs |
270 | bool set; // whether enum has to be treated as a set | 270 | bool set; // whether enum has to be treated as a set |
271 | }; | 271 | }; |
272 | 272 | ||
@@ -393,30 +393,12 @@ struct Q_EXPORT QUType_int : public QUType | |||
393 | void clear( QUObject * ) {} | 393 | void clear( QUObject * ) {} |
394 | int serializeTo( QUObject *, QUBuffer * ); | 394 | int serializeTo( QUObject *, QUBuffer * ); |
395 | int serializeFrom( QUObject *, QUBuffer * ); | 395 | int serializeFrom( QUObject *, QUBuffer * ); |
396 | }; | 396 | }; |
397 | extern Q_EXPORT QUType_int static_QUType_int; | 397 | extern Q_EXPORT QUType_int static_QUType_int; |
398 | 398 | ||
399 | // {5938712A-C496-11D5-8CB2-00C0F03BC0F3} | ||
400 | extern Q_EXPORT const QUuid TID_QUType_uint; | ||
401 | struct Q_EXPORT QUType_uint : public QUType | ||
402 | { | ||
403 | const QUuid *uuid() const; | ||
404 | const char *desc() const; | ||
405 | |||
406 | void set( QUObject *, uint ); | ||
407 | uint &get( QUObject *o ) { return o->payload.ui; } | ||
408 | bool canConvertFrom( QUObject *, QUType * ); | ||
409 | bool canConvertTo( QUObject *, QUType * ); | ||
410 | bool convertFrom( QUObject *, QUType * ); | ||
411 | bool convertTo( QUObject *, QUType * ); | ||
412 | void clear( QUObject * ) {} | ||
413 | int serializeTo( QUObject *, QUBuffer * ); | ||
414 | int serializeFrom( QUObject *, QUBuffer * ); | ||
415 | }; | ||
416 | extern Q_EXPORT QUType_uint static_QUType_uint; | ||
417 | 399 | ||
418 | // {2D0974E5-0BA6-4ec2-8837-C198972CB48C} | 400 | // {2D0974E5-0BA6-4ec2-8837-C198972CB48C} |
419 | extern Q_EXPORT const QUuid TID_QUType_double; | 401 | extern Q_EXPORT const QUuid TID_QUType_double; |
420 | struct Q_EXPORT QUType_double : public QUType | 402 | struct Q_EXPORT QUType_double : public QUType |
421 | { | 403 | { |
422 | const QUuid *uuid() const; | 404 | const QUuid *uuid() const; |
@@ -431,30 +413,12 @@ struct Q_EXPORT QUType_double : public QUType | |||
431 | void clear( QUObject * ) {} | 413 | void clear( QUObject * ) {} |
432 | int serializeTo( QUObject *, QUBuffer * ); | 414 | int serializeTo( QUObject *, QUBuffer * ); |
433 | int serializeFrom( QUObject *, QUBuffer * ); | 415 | int serializeFrom( QUObject *, QUBuffer * ); |
434 | }; | 416 | }; |
435 | extern Q_EXPORT QUType_double static_QUType_double; | 417 | extern Q_EXPORT QUType_double static_QUType_double; |
436 | 418 | ||
437 | // {544C5175-6993-4486-B04D-CEC4D21BF4B9 } | ||
438 | extern Q_EXPORT const QUuid TID_QUType_float; | ||
439 | struct Q_EXPORT QUType_float : public QUType | ||
440 | { | ||
441 | const QUuid *uuid() const; | ||
442 | const char *desc() const; | ||
443 | |||
444 | void set( QUObject *, float ); | ||
445 | float &get( QUObject *o ) { return o->payload.f; } | ||
446 | bool canConvertFrom( QUObject *, QUType * ); | ||
447 | bool canConvertTo( QUObject *, QUType * ); | ||
448 | bool convertFrom( QUObject *, QUType * ); | ||
449 | bool convertTo( QUObject *, QUType * ); | ||
450 | void clear( QUObject * ) {} | ||
451 | int serializeTo( QUObject *, QUBuffer * ); | ||
452 | int serializeFrom( QUObject *, QUBuffer * ); | ||
453 | }; | ||
454 | extern Q_EXPORT QUType_float static_QUType_float; | ||
455 | 419 | ||
456 | // {EFCDD1D4-77A3-4b8e-8D46-DC14B8D393E9} | 420 | // {EFCDD1D4-77A3-4b8e-8D46-DC14B8D393E9} |
457 | extern Q_EXPORT const QUuid TID_QUType_charstar; | 421 | extern Q_EXPORT const QUuid TID_QUType_charstar; |
458 | struct Q_EXPORT QUType_charstar : public QUType | 422 | struct Q_EXPORT QUType_charstar : public QUType |
459 | { | 423 | { |
460 | const QUuid *uuid() const; | 424 | const QUuid *uuid() const; |
@@ -493,7 +457,7 @@ struct Q_EXPORT QUType_QString : public QUType | |||
493 | int serializeFrom( QUObject *, QUBuffer * ); | 457 | int serializeFrom( QUObject *, QUBuffer * ); |
494 | 458 | ||
495 | }; | 459 | }; |
496 | extern Q_EXPORT QUType_QString static_QUType_QString; | 460 | extern Q_EXPORT QUType_QString static_QUType_QString; |
497 | 461 | ||
498 | 462 | ||
499 | #endif // QUCOM_H | 463 | #endif // QUCOM_P_H |