SOUP Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
enum wsdl_typecode_kind_t; struct wsdl_typecode; #define ALIGN_ADDRESS (this, boundary) extern const wsdl_typecode WSDL_TC_glib_null_struct; extern const wsdl_typecode WSDL_TC_glib_void_struct; extern const wsdl_typecode WSDL_TC_glib_boolean_struct; extern const wsdl_typecode WSDL_TC_glib_char_struct; extern const wsdl_typecode WSDL_TC_glib_uchar_struct; extern const wsdl_typecode WSDL_TC_glib_int_struct; extern const wsdl_typecode WSDL_TC_glib_uint_struct; extern const wsdl_typecode WSDL_TC_glib_short_struct; extern const wsdl_typecode WSDL_TC_glib_ushort_struct; extern const wsdl_typecode WSDL_TC_glib_long_struct; extern const wsdl_typecode WSDL_TC_glib_ulong_struct; extern const wsdl_typecode WSDL_TC_glib_int8_struct; extern const wsdl_typecode WSDL_TC_glib_uint8_struct; extern const wsdl_typecode WSDL_TC_glib_int16_struct; extern const wsdl_typecode WSDL_TC_glib_uint16_struct; extern const wsdl_typecode WSDL_TC_glib_int32_struct; extern const wsdl_typecode WSDL_TC_glib_uint32_struct; extern const wsdl_typecode WSDL_TC_glib_float_struct; extern const wsdl_typecode WSDL_TC_glib_double_struct; extern const wsdl_typecode WSDL_TC_glib_string_struct; wsdl_typecode_kind_t wsdl_typecode_kind (const wsdl_typecode *const tc); wsdl_typecode_kind_t wsdl_typecode_element_kind (const wsdl_typecode *const tc); gboolean wsdl_typecode_is_simple (const wsdl_typecode *const tc); guint wsdl_typecode_member_count (const wsdl_typecode *const tc); const guchar* wsdl_typecode_member_name (const wsdl_typecode *const tc, guint member); const wsdl_typecode* wsdl_typecode_member_type (const wsdl_typecode *const tc, guint member); const wsdl_typecode* wsdl_typecode_content_type (const wsdl_typecode *const tc); const guchar* wsdl_typecode_name (const wsdl_typecode *const tc); const guchar* wsdl_typecode_ns (const wsdl_typecode *const tc); const guchar* wsdl_typecode_nsuri (const wsdl_typecode *const tc); guchar* wsdl_typecode_type (const wsdl_typecode *const tc); guchar* wsdl_typecode_param_type (const wsdl_typecode *const tc); void wsdl_typecode_print (const wsdl_typecode *const tc, guint ind); const wsdl_typecode* wsdl_typecode_lookup (const guchar *name, const guchar *nsuri); void wsdl_typecode_register (const wsdl_typecode *const tc); void wsdl_typecode_unregister (const guchar *name, const guchar *nsuri); void wsdl_typecode_free (wsdl_typecode *tc); void wsdl_typecode_free_all (void); void wsdl_typecode_foreach (gboolean predefined, WsdlTypecodeForeachFn callback, gpointer user_data); gpointer wsdl_typecode_alloc (const wsdl_typecode *const tc); guint wsdl_typecode_find_alignment (const wsdl_typecode *const tc); guint wsdl_typecode_size (const wsdl_typecode *const tc); const wsdl_typecode* wsdl_typecode_offset (const wsdl_typecode *const tc, const guchar *name, guint *offset); |
typedef enum { WSDL_TK_GLIB_NULL=0, WSDL_TK_GLIB_VOID, WSDL_TK_GLIB_BOOLEAN, WSDL_TK_GLIB_CHAR, WSDL_TK_GLIB_UCHAR, WSDL_TK_GLIB_INT, WSDL_TK_GLIB_UINT, WSDL_TK_GLIB_SHORT, WSDL_TK_GLIB_USHORT, WSDL_TK_GLIB_LONG, WSDL_TK_GLIB_ULONG, WSDL_TK_GLIB_INT8, WSDL_TK_GLIB_UINT8, WSDL_TK_GLIB_INT16, WSDL_TK_GLIB_UINT16, WSDL_TK_GLIB_INT32, WSDL_TK_GLIB_UINT32, WSDL_TK_GLIB_FLOAT, WSDL_TK_GLIB_DOUBLE, WSDL_TK_GLIB_STRING, WSDL_TK_GLIB_ELEMENT, WSDL_TK_GLIB_STRUCT, WSDL_TK_GLIB_LIST, WSDL_TK_GLIB_MAX } wsdl_typecode_kind_t; |
struct wsdl_typecode { wsdl_typecode_kind_t kind; const guchar *name; const guchar *ns; /* used in the typecode struct name */ const guchar *nsuri; /* used when looking up ns-qualified codes */ gboolean dynamic; gulong sub_parts; const guchar **subnames; /* for struct */ const wsdl_typecode **subtypes; /* for struct, list, element */ WsdlTypecodeFreeFn free_func; }; |
#define ALIGN_ADDRESS(this, boundary) |
Finds a pointer to the next memory location after this that can accept an alignment of boundary.
this : | a pointer to anything |
boundary : | an integer containing the requested alignment |
extern const wsdl_typecode WSDL_TC_glib_null_struct; |
The typecode for the NULL glib type. (Not used anywhere, sort of an error condition)
extern const wsdl_typecode WSDL_TC_glib_void_struct; |
The typecode for the void glib type. (Not currently used anywhere)
extern const wsdl_typecode WSDL_TC_glib_boolean_struct; |
The typecode for the gboolean glib type.
extern const wsdl_typecode WSDL_TC_glib_char_struct; |
The typecode for the gchar glib type.
extern const wsdl_typecode WSDL_TC_glib_uchar_struct; |
The typecode for the guchar glib type.
extern const wsdl_typecode WSDL_TC_glib_int_struct; |
The typecode for the gint glib type.
extern const wsdl_typecode WSDL_TC_glib_uint_struct; |
The typecode for the guint glib type.
extern const wsdl_typecode WSDL_TC_glib_short_struct; |
The typecode for the gshort glib type.
extern const wsdl_typecode WSDL_TC_glib_ushort_struct; |
The typecode for the gushort glib type.
extern const wsdl_typecode WSDL_TC_glib_long_struct; |
The typecode for the glong glib type.
extern const wsdl_typecode WSDL_TC_glib_ulong_struct; |
The typecode for the gulong glib type.
extern const wsdl_typecode WSDL_TC_glib_int8_struct; |
The typecode for the gint8 glib type.
extern const wsdl_typecode WSDL_TC_glib_uint8_struct; |
The typecode for the guint8 glib type.
extern const wsdl_typecode WSDL_TC_glib_int16_struct; |
The typecode for the gint16 glib type.
extern const wsdl_typecode WSDL_TC_glib_uint16_struct; |
The typecode for the guint16 glib type.
extern const wsdl_typecode WSDL_TC_glib_int32_struct; |
The typecode for the gint32 glib type.
extern const wsdl_typecode WSDL_TC_glib_uint32_struct; |
The typecode for the guint32 glib type.
extern const wsdl_typecode WSDL_TC_glib_float_struct; |
The typecode for the gfloat glib type.
extern const wsdl_typecode WSDL_TC_glib_double_struct; |
The typecode for the gdouble glib type.
extern const wsdl_typecode WSDL_TC_glib_string_struct; |
The typecode for the guchar * glib type.
wsdl_typecode_kind_t wsdl_typecode_kind (const wsdl_typecode *const tc); |
Finds the typecode kind of tc.
tc : | a typecode pointer |
Returns : | the typecode kind of tc |
wsdl_typecode_kind_t wsdl_typecode_element_kind (const wsdl_typecode *const tc); |
Finds the typecode kind of tc, recursing through WSDL_TK_GLIB_ELEMENT typecodes.
tc : | a typecode pointer |
Returns : | the typecode kind of tc, recursing through WSDL_TK_GLIB_ELEMENT typecodes. |
gboolean wsdl_typecode_is_simple (const wsdl_typecode *const tc); |
Checks the kind of tc, recursing through WSDL_TK_GLIB_ELEMENT typecodes.
tc : | a typecode pointer |
Returns : | TRUE if the typecode is for a predefined type, or FALSE otherwise. |
guint wsdl_typecode_member_count (const wsdl_typecode *const tc); |
Counts the members in a WSDL_TK_GLIB_STRUCT typecode.
tc : | a typecode pointer |
Returns : | the number of members, or 0 if tc isn't a WSDL_TK_GLIB_STRUCT kind. |
const guchar* wsdl_typecode_member_name (const wsdl_typecode *const tc, guint member); |
Looks up the name of the member of tc at index position member.
tc : | a typecode pointer |
member : | an integer index, starting from 0 |
Returns : | the name of the member of tc, or NULL if tc isn't a WSDL_TK_GLIB_STRUCT kind. |
const wsdl_typecode* wsdl_typecode_member_type (const wsdl_typecode *const tc, guint member); |
Looks up the type of the member of tc at index position member.
tc : | a typecode pointer |
member : | an integer index, starting from 0 |
Returns : | the name of the member of tc, or NULL if tc isn't a WSDL_TK_GLIB_STRUCT kind. |
const wsdl_typecode* wsdl_typecode_content_type (const wsdl_typecode *const tc); |
Looks up the typecode that is either the aliased type of a WSDL_TK_GLIB_ELEMENT kind or the content of a WSDL_TK_GLIB_LIST kind.
tc : | a typecode pointer |
Returns : | the typecode, or NULL if tc isn't a WSDL_TK_GLIB_ELEMENT or WSDL_TK_GLIB_LIST kind. |
const guchar* wsdl_typecode_name (const wsdl_typecode *const tc); |
Finds the name of the typecode tc.
tc : | a typecode pointer |
Returns : | the name of the typecode tc. |
const guchar* wsdl_typecode_ns (const wsdl_typecode *const tc); |
Finds the namespace prefix of the typecode tc.
tc : | a typecode pointer |
Returns : | the namespace prefix of the typecode tc. |
const guchar* wsdl_typecode_nsuri (const wsdl_typecode *const tc); |
Finds the namespace URI of the typecode tc.
tc : | a typecode pointer |
Returns : | the namespace URI of the typecode tc. |
guchar* wsdl_typecode_type (const wsdl_typecode *const tc); |
Constructs a string containing the C mapping of the type represented by typecode tc.
tc : | a typecode pointer |
Returns : | a string containing the C mapping of the type represented by typecode tc. This string should be freed by the caller. |
guchar* wsdl_typecode_param_type (const wsdl_typecode *const tc); |
Constructs a string containing the C mapping of the type represented by typecode tc, in a form suitable for function parameter types. The difference with wsdl_typecode_type() is that '*' is appended to C types that represent WSDL_TK_GLIB_STRUCT typecodes.
tc : | a typecode pointer |
Returns : | a string containing the C mapping of the type represented by typecode tc, in a form suitable for function parameter types. The difference with wsdl_typecode_type() is that '*' is appended to C types that represent WSDL_TK_GLIB_STRUCT typecodes. This string should be freed by the caller. |
void wsdl_typecode_print (const wsdl_typecode *const tc, guint ind); |
Produces a printable representation of typecode tc on standard output.
tc : | a typecode pointer |
ind : | an integer specifying the indent level to use |
const wsdl_typecode* wsdl_typecode_lookup (const guchar *name, const guchar *nsuri); |
Looks up a typecode by comparing the name with any prefix removed with the known typecode names. If nsuri is not NULL, the typecode namespace URI must also match nsuri.
name : | a string containing typecode name, which may have an optional namespace prefix delimited by a ':' |
nsuri : | a string containing a namespace URI, which may be NULL. |
Returns : | a typecode pointer, or NULL if a matching typecode could not be found. |
void wsdl_typecode_register (const wsdl_typecode *const tc); |
Stores the typecode pointer tc in the internal list of known typecodes.
tc : | a typecode pointer |
void wsdl_typecode_unregister (const guchar *name, const guchar *nsuri); |
Finds a typecode by calling wsdl_typecode_lookup(), removes it from the list of known typecodes and then passes it to wsdl_typecode_free().
name : | a string containing typecode name, which may have an optional namespace prefix delimited by a ':' |
nsuri : | a string containing a namespace URI, which may be NULL. |
void wsdl_typecode_free (wsdl_typecode *tc); |
Recursively frees all memory used by a typecode.
tc : | a typecode pointer |
void wsdl_typecode_free_all (void); |
Unregisters all known typecodes, freeing any memory used.
void wsdl_typecode_foreach (gboolean predefined, WsdlTypecodeForeachFn callback, gpointer user_data); |
For each typecode known (including predefined ones if predefined is TRUE), callback is called with arguments of the typecode, and user_data.
predefined : | a boolean, selecting whether to include predefined typecodes |
callback : | a function to call for each typecode |
user_data : | a generic pointer to anything |
gpointer wsdl_typecode_alloc (const wsdl_typecode *const tc); |
Allocated memory for the C representation of the typecode tc.
tc : | a typecode pointer |
Returns : | allocated memory, which must be freed by the caller. |
guint wsdl_typecode_find_alignment (const wsdl_typecode *const tc); |
Works out the C type alignment required for typecode tc, using data supplied by configure.
tc : | a typecode pointer |
Returns : | the alignment |
guint wsdl_typecode_size (const wsdl_typecode *const tc); |
Works out the size in bytes needed for the C representation of a typecode, taking alignment into account.
tc : | a typecode pointer |
Returns : | the size in bytes |
const wsdl_typecode* wsdl_typecode_offset (const wsdl_typecode *const tc, const guchar *name, guint *offset); |
If tc is a typecode of kind WSDL_TK_GLIB_STRUCT, finds the member named name and works out the offset to this member from the start of the C representation of this typecode. The offset is stored in the integer pointed to by offset.
tc : | a typecode pointer |
name : | a string containing a typecode member name |
offset : | a pointer to an integer |
Returns : | the typecode of the member name, or NULL if the member isn't found or if the typecode tc isn't of kind WSDL_TK_GLIB_STRUCT. |