File indexing completed on 2026-05-06 08:41:20
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #ifndef __G_VARIANT_TYPE_H__
0024 #define __G_VARIANT_TYPE_H__
0025
0026 #if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
0027 #error "Only <glib.h> can be included directly."
0028 #endif
0029
0030 #include <glib/gtypes.h>
0031
0032 G_BEGIN_DECLS
0033
0034 typedef struct _GVariantType GVariantType;
0035
0036
0037
0038
0039
0040
0041 #define G_VARIANT_TYPE_BOOLEAN ((const GVariantType *) "b")
0042
0043
0044
0045
0046
0047
0048 #define G_VARIANT_TYPE_BYTE ((const GVariantType *) "y")
0049
0050
0051
0052
0053
0054
0055 #define G_VARIANT_TYPE_INT16 ((const GVariantType *) "n")
0056
0057
0058
0059
0060
0061
0062
0063
0064 #define G_VARIANT_TYPE_UINT16 ((const GVariantType *) "q")
0065
0066
0067
0068
0069
0070
0071
0072 #define G_VARIANT_TYPE_INT32 ((const GVariantType *) "i")
0073
0074
0075
0076
0077
0078
0079
0080
0081 #define G_VARIANT_TYPE_UINT32 ((const GVariantType *) "u")
0082
0083
0084
0085
0086
0087
0088
0089 #define G_VARIANT_TYPE_INT64 ((const GVariantType *) "x")
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100 #define G_VARIANT_TYPE_UINT64 ((const GVariantType *) "t")
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113 #define G_VARIANT_TYPE_DOUBLE ((const GVariantType *) "d")
0114
0115
0116
0117
0118
0119
0120
0121
0122 #define G_VARIANT_TYPE_STRING ((const GVariantType *) "s")
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137 #define G_VARIANT_TYPE_OBJECT_PATH ((const GVariantType *) "o")
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148
0149
0150
0151
0152 #define G_VARIANT_TYPE_SIGNATURE ((const GVariantType *) "g")
0153
0154
0155
0156
0157
0158
0159
0160 #define G_VARIANT_TYPE_VARIANT ((const GVariantType *) "v")
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170
0171
0172 #define G_VARIANT_TYPE_HANDLE ((const GVariantType *) "h")
0173
0174
0175
0176
0177
0178
0179
0180
0181 #define G_VARIANT_TYPE_UNIT ((const GVariantType *) "()")
0182
0183
0184
0185
0186
0187
0188
0189 #define G_VARIANT_TYPE_ANY ((const GVariantType *) "*")
0190
0191
0192
0193
0194
0195
0196
0197 #define G_VARIANT_TYPE_BASIC ((const GVariantType *) "?")
0198
0199
0200
0201
0202
0203
0204 #define G_VARIANT_TYPE_MAYBE ((const GVariantType *) "m*")
0205
0206
0207
0208
0209
0210
0211 #define G_VARIANT_TYPE_ARRAY ((const GVariantType *) "a*")
0212
0213
0214
0215
0216
0217
0218
0219 #define G_VARIANT_TYPE_TUPLE ((const GVariantType *) "r")
0220
0221
0222
0223
0224
0225
0226
0227 #define G_VARIANT_TYPE_DICT_ENTRY ((const GVariantType *) "{?*}")
0228
0229
0230
0231
0232
0233
0234
0235
0236 #define G_VARIANT_TYPE_DICTIONARY ((const GVariantType *) "a{?*}")
0237
0238
0239
0240
0241
0242
0243 #define G_VARIANT_TYPE_STRING_ARRAY ((const GVariantType *) "as")
0244
0245
0246
0247
0248
0249
0250 #define G_VARIANT_TYPE_OBJECT_PATH_ARRAY ((const GVariantType *) "ao")
0251
0252
0253
0254
0255
0256
0257
0258
0259
0260
0261
0262 #define G_VARIANT_TYPE_BYTESTRING ((const GVariantType *) "ay")
0263
0264
0265
0266
0267
0268
0269 #define G_VARIANT_TYPE_BYTESTRING_ARRAY ((const GVariantType *) "aay")
0270
0271
0272
0273
0274
0275
0276
0277
0278
0279 #define G_VARIANT_TYPE_VARDICT ((const GVariantType *) "a{sv}")
0280
0281
0282
0283
0284
0285
0286
0287
0288
0289
0290
0291
0292
0293
0294
0295
0296
0297 #ifndef G_DISABLE_CAST_CHECKS
0298 # define G_VARIANT_TYPE(type_string) (g_variant_type_checked_ ((type_string)))
0299 #else
0300 # define G_VARIANT_TYPE(type_string) ((const GVariantType *) (type_string))
0301 #endif
0302
0303
0304 GLIB_AVAILABLE_IN_ALL
0305 gboolean g_variant_type_string_is_valid (const gchar *type_string) G_GNUC_CONST;
0306 GLIB_AVAILABLE_IN_ALL
0307 gboolean g_variant_type_string_scan (const gchar *string,
0308 const gchar *limit,
0309 const gchar **endptr);
0310
0311
0312 GLIB_AVAILABLE_IN_ALL
0313 void g_variant_type_free (GVariantType *type);
0314 GLIB_AVAILABLE_IN_ALL
0315 GVariantType * g_variant_type_copy (const GVariantType *type);
0316 GLIB_AVAILABLE_IN_ALL
0317 GVariantType * g_variant_type_new (const gchar *type_string);
0318
0319
0320 GLIB_AVAILABLE_IN_ALL
0321 gsize g_variant_type_get_string_length (const GVariantType *type);
0322 GLIB_AVAILABLE_IN_ALL
0323 const gchar * g_variant_type_peek_string (const GVariantType *type);
0324 GLIB_AVAILABLE_IN_ALL
0325 gchar * g_variant_type_dup_string (const GVariantType *type);
0326
0327
0328 GLIB_AVAILABLE_IN_ALL
0329 gboolean g_variant_type_is_definite (const GVariantType *type) G_GNUC_CONST;
0330 GLIB_AVAILABLE_IN_ALL
0331 gboolean g_variant_type_is_container (const GVariantType *type) G_GNUC_CONST;
0332 GLIB_AVAILABLE_IN_ALL
0333 gboolean g_variant_type_is_basic (const GVariantType *type) G_GNUC_CONST;
0334 GLIB_AVAILABLE_IN_ALL
0335 gboolean g_variant_type_is_maybe (const GVariantType *type) G_GNUC_CONST;
0336 GLIB_AVAILABLE_IN_ALL
0337 gboolean g_variant_type_is_array (const GVariantType *type) G_GNUC_CONST;
0338 GLIB_AVAILABLE_IN_ALL
0339 gboolean g_variant_type_is_tuple (const GVariantType *type) G_GNUC_CONST;
0340 GLIB_AVAILABLE_IN_ALL
0341 gboolean g_variant_type_is_dict_entry (const GVariantType *type) G_GNUC_CONST;
0342 GLIB_AVAILABLE_IN_ALL
0343 gboolean g_variant_type_is_variant (const GVariantType *type) G_GNUC_CONST;
0344
0345
0346 GLIB_AVAILABLE_IN_ALL
0347 guint g_variant_type_hash (gconstpointer type);
0348 GLIB_AVAILABLE_IN_ALL
0349 gboolean g_variant_type_equal (gconstpointer type1,
0350 gconstpointer type2);
0351
0352
0353 GLIB_AVAILABLE_IN_ALL
0354 gboolean g_variant_type_is_subtype_of (const GVariantType *type,
0355 const GVariantType *supertype) G_GNUC_CONST;
0356
0357
0358 GLIB_AVAILABLE_IN_ALL
0359 const GVariantType * g_variant_type_element (const GVariantType *type) G_GNUC_CONST;
0360 GLIB_AVAILABLE_IN_ALL
0361 const GVariantType * g_variant_type_first (const GVariantType *type) G_GNUC_CONST;
0362 GLIB_AVAILABLE_IN_ALL
0363 const GVariantType * g_variant_type_next (const GVariantType *type) G_GNUC_CONST;
0364 GLIB_AVAILABLE_IN_ALL
0365 gsize g_variant_type_n_items (const GVariantType *type) G_GNUC_CONST;
0366 GLIB_AVAILABLE_IN_ALL
0367 const GVariantType * g_variant_type_key (const GVariantType *type) G_GNUC_CONST;
0368 GLIB_AVAILABLE_IN_ALL
0369 const GVariantType * g_variant_type_value (const GVariantType *type) G_GNUC_CONST;
0370
0371
0372 GLIB_AVAILABLE_IN_ALL
0373 GVariantType * g_variant_type_new_array (const GVariantType *element);
0374 GLIB_AVAILABLE_IN_ALL
0375 GVariantType * g_variant_type_new_maybe (const GVariantType *element);
0376 GLIB_AVAILABLE_IN_ALL
0377 GVariantType * g_variant_type_new_tuple (const GVariantType * const *items,
0378 gint length);
0379 GLIB_AVAILABLE_IN_ALL
0380 GVariantType * g_variant_type_new_dict_entry (const GVariantType *key,
0381 const GVariantType *value);
0382
0383
0384 GLIB_AVAILABLE_IN_ALL
0385 const GVariantType * g_variant_type_checked_ (const gchar *type_string);
0386 GLIB_AVAILABLE_IN_2_60
0387 gsize g_variant_type_string_get_depth_ (const gchar *type_string);
0388
0389 G_END_DECLS
0390
0391 #endif