1// Package glib was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package glib
3
4import (
5 "structs"
6 "unsafe"
7
8 "github.com/ebitengine/purego"
9
10 "github.com/bnema/puregotk/pkg/core"
11 "github.com/bnema/puregotk/v4/gobject/types"
12)
13
14// The `GUri` type and related functions can be used to parse URIs into
15// their components, and build valid URIs from individual components.
16//
17// Since `GUri` only represents absolute URIs, all `GUri`s will have a
18// URI scheme, so [method@GLib.Uri.get_scheme] will always return a non-`NULL`
19// answer. Likewise, by definition, all URIs have a path component, so
20// [method@GLib.Uri.get_path] will always return a non-`NULL` string (which may
21// be empty).
22//
23// If the URI string has an
24// [‘authority’ component](https://tools.ietf.org/html/rfc3986#section-3) (that
25// is, if the scheme is followed by `://` rather than just `:`), then the
26// `GUri` will contain a hostname, and possibly a port and ‘userinfo’.
27// Additionally, depending on how the `GUri` was constructed/parsed (for example,
28// using the `G_URI_FLAGS_HAS_PASSWORD` and `G_URI_FLAGS_HAS_AUTH_PARAMS` flags),
29// the userinfo may be split out into a username, password, and
30// additional authorization-related parameters.
31//
32// Normally, the components of a `GUri` will have all `%`-encoded
33// characters decoded. However, if you construct/parse a `GUri` with
34// `G_URI_FLAGS_ENCODED`, then the `%`-encoding will be preserved instead in
35// the userinfo, path, and query fields (and in the host field if also
36// created with `G_URI_FLAGS_NON_DNS`). In particular, this is necessary if
37// the URI may contain binary data or non-UTF-8 text, or if decoding
38// the components might change the interpretation of the URI.
39//
40// For example, with the encoded flag:
41//
42// ```c
43// g_autoptr(GUri) uri = g_uri_parse ("http://host/path?query=http%3A%2F%2Fhost%2Fpath%3Fparam%3Dvalue", G_URI_FLAGS_ENCODED, &err);
44// g_assert_cmpstr (g_uri_get_query (uri), ==, "query=http%3A%2F%2Fhost%2Fpath%3Fparam%3Dvalue");
45// ```
46//
47// While the default `%`-decoding behaviour would give:
48//
49// ```c
50// g_autoptr(GUri) uri = g_uri_parse ("http://host/path?query=http%3A%2F%2Fhost%2Fpath%3Fparam%3Dvalue", G_URI_FLAGS_NONE, &err);
51// g_assert_cmpstr (g_uri_get_query (uri), ==, "query=http://host/path?param=value");
52// ```
53//
54// During decoding, if an invalid UTF-8 string is encountered, parsing will fail
55// with an error indicating the bad string location:
56//
57// ```c
58// g_autoptr(GUri) uri = g_uri_parse ("http://host/path?query=http%3A%2F%2Fhost%2Fpath%3Fbad%3D%00alue", G_URI_FLAGS_NONE, &err);
59// g_assert_error (err, G_URI_ERROR, G_URI_ERROR_BAD_QUERY);
60// ```
61//
62// You should pass `G_URI_FLAGS_ENCODED` or `G_URI_FLAGS_ENCODED_QUERY` if you
63// need to handle that case manually. In particular, if the query string
64// contains `=` characters that are `%`-encoded, you should let
65// [func@GLib.Uri.parse_params] do the decoding once of the query.
66//
67// `GUri` is immutable once constructed, and can safely be accessed from
68// multiple threads. Its reference counting is atomic.
69//
70// Note that the scope of `GUri` is to help manipulate URIs in various applications,
71// following [RFC 3986](https://tools.ietf.org/html/rfc3986). In particular,
72// it doesn't intend to cover web browser needs, and doesn’t implement the
73// [WHATWG URL](https://url.spec.whatwg.org/) standard. No APIs are provided to
74// help prevent
75// [homograph attacks](https://en.wikipedia.org/wiki/IDN_homograph_attack), so
76// `GUri` is not suitable for formatting URIs for display to the user for making
77// security-sensitive decisions.
78//
79// ## Relative and absolute URIs
80//
81// As defined in [RFC 3986](https://tools.ietf.org/html/rfc3986#section-4), the
82// hierarchical nature of URIs means that they can either be ‘relative
83// references’ (sometimes referred to as ‘relative URIs’) or ‘URIs’ (for
84// clarity, ‘URIs’ are referred to in this documentation as
85// ‘absolute URIs’ — although
86// [in contrast to RFC 3986](https://tools.ietf.org/html/rfc3986#section-4.3),
87// fragment identifiers are always allowed).
88//
89// Relative references have one or more components of the URI missing. In
90// particular, they have no scheme. Any other component, such as hostname,
91// query, etc. may be missing, apart from a path, which has to be specified (but
92// may be empty). The path may be relative, starting with `./` rather than `/`.
93//
94// For example, a valid relative reference is `./path?query`,
95// `/?query#fragment` or `//example.com`.
96//
97// Absolute URIs have a scheme specified. Any other components of the URI which
98// are missing are specified as explicitly unset in the URI, rather than being
99// resolved relative to a base URI using [method@GLib.Uri.parse_relative].
100//
101// For example, a valid absolute URI is `file:///home/bob` or
102// `https://search.com?query=string`.
103//
104// A `GUri` instance is always an absolute URI. A string may be an absolute URI
105// or a relative reference; see the documentation for individual functions as to
106// what forms they accept.
107//
108// ## Parsing URIs
109//
110// The most minimalist APIs for parsing URIs are [func@GLib.Uri.split] and
111// [func@GLib.Uri.split_with_user]. These split a URI into its component
112// parts, and return the parts; the difference between the two is that
113// [func@GLib.Uri.split] treats the ‘userinfo’ component of the URI as a
114// single element, while [func@GLib.Uri.split_with_user] can (depending on the
115// [flags@GLib.UriFlags] you pass) treat it as containing a username, password,
116// and authentication parameters. Alternatively, [func@GLib.Uri.split_network]
117// can be used when you are only interested in the components that are
118// needed to initiate a network connection to the service (scheme,
119// host, and port).
120//
121// [func@GLib.Uri.parse] is similar to [func@GLib.Uri.split], but instead of
122// returning individual strings, it returns a `GUri` structure (and it requires
123// that the URI be an absolute URI).
124//
125// [func@GLib.Uri.resolve_relative] and [method@GLib.Uri.parse_relative] allow
126// you to resolve a relative URI relative to a base URI.
127// [func@GLib.Uri.resolve_relative] takes two strings and returns a string,
128// and [method@GLib.Uri.parse_relative] takes a `GUri` and a string and returns a
129// `GUri`.
130//
131// All of the parsing functions take a [flags@GLib.UriFlags] argument describing
132// exactly how to parse the URI; see the documentation for that type
133// for more details on the specific flags that you can pass. If you
134// need to choose different flags based on the type of URI, you can
135// use [func@GLib.Uri.peek_scheme] on the URI string to check the scheme
136// first, and use that to decide what flags to parse it with.
137//
138// For example, you might want to use `G_URI_PARAMS_WWW_FORM` when parsing the
139// params for a web URI, so compare the result of [func@GLib.Uri.peek_scheme]
140// against `http` and `https`.
141//
142// ## Building URIs
143//
144// [func@GLib.Uri.join] and [func@GLib.Uri.join_with_user] can be used to construct
145// valid URI strings from a set of component strings. They are the
146// inverse of [func@GLib.Uri.split] and [func@GLib.Uri.split_with_user].
147//
148// Similarly, [func@GLib.Uri.build] and [func@GLib.Uri.build_with_user] can be
149// used to construct a `GUri` from a set of component strings.
150//
151// As with the parsing functions, the building functions take a
152// [flags@GLib.UriFlags] argument. In particular, it is important to keep in mind
153// whether the URI components you are using are already `%`-encoded. If so,
154// you must pass the `G_URI_FLAGS_ENCODED` flag.
155//
156// ## `file://` URIs
157//
158// Note that Windows and Unix both define special rules for parsing
159// `file://` URIs (involving non-UTF-8 character sets on Unix, and the
160// interpretation of path separators on Windows). `GUri` does not
161// implement these rules. Use [func@GLib.filename_from_uri] and
162// [func@GLib.filename_to_uri] if you want to properly convert between
163// `file://` URIs and local filenames.
164//
165// ## URI Equality
166//
167// Note that there is no `g_uri_equal ()` function, because comparing
168// URIs usefully requires scheme-specific knowledge that `GUri` does
169// not have. `GUri` can help with normalization if you use the various
170// encoded [flags@GLib.UriFlags] as well as `G_URI_FLAGS_SCHEME_NORMALIZE`
171// however it is not comprehensive.
172// For example, `data:,foo` and `data:;base64,Zm9v` resolve to the same
173// thing according to the `data:` URI specification which GLib does not
174// handle.
175type Uri struct {
176 _ structs.HostLayout
177}
178
179var xUriGLibType func() types.GType
180
181func UriGLibType() types.GType {
182 return xUriGLibType()
183}
184
185func (x *Uri) GoPointer() uintptr {
186 return uintptr(unsafe.Pointer(x))
187}
188
189var xUriGetAuthParams func(uintptr) string
190
191// Gets @uri's authentication parameters, which may contain
192// `%`-encoding, depending on the flags with which @uri was created.
193// (If @uri was not created with %G_URI_FLAGS_HAS_AUTH_PARAMS then this will
194// be %NULL.)
195//
196// Depending on the URI scheme, g_uri_parse_params() may be useful for
197// further parsing this information.
198func (x *Uri) GetAuthParams() string {
199
200 cret := xUriGetAuthParams(x.GoPointer())
201 return cret
202}
203
204var xUriGetFlags func(uintptr) UriFlags
205
206// Gets @uri's flags set upon construction.
207func (x *Uri) GetFlags() UriFlags {
208
209 cret := xUriGetFlags(x.GoPointer())
210 return cret
211}
212
213var xUriGetFragment func(uintptr) string
214
215// Gets @uri's fragment, which may contain `%`-encoding, depending on
216// the flags with which @uri was created.
217func (x *Uri) GetFragment() string {
218
219 cret := xUriGetFragment(x.GoPointer())
220 return cret
221}
222
223var xUriGetHost func(uintptr) string
224
225// Gets @uri's host. This will never have `%`-encoded characters,
226// unless it is non-UTF-8 (which can only be the case if @uri was
227// created with %G_URI_FLAGS_NON_DNS).
228//
229// If @uri contained an IPv6 address literal, this value will be just
230// that address, without the brackets around it that are necessary in
231// the string form of the URI. Note that in this case there may also
232// be a scope ID attached to the address. Eg, `fe80::1234%“em1` (or
233// `fe80::1234%“25em1` if the string is still encoded).
234func (x *Uri) GetHost() string {
235
236 cret := xUriGetHost(x.GoPointer())
237 return cret
238}
239
240var xUriGetPassword func(uintptr) string
241
242// Gets @uri's password, which may contain `%`-encoding, depending on
243// the flags with which @uri was created. (If @uri was not created
244// with %G_URI_FLAGS_HAS_PASSWORD then this will be %NULL.)
245func (x *Uri) GetPassword() string {
246
247 cret := xUriGetPassword(x.GoPointer())
248 return cret
249}
250
251var xUriGetPath func(uintptr) string
252
253// Gets @uri's path, which may contain `%`-encoding, depending on the
254// flags with which @uri was created.
255func (x *Uri) GetPath() string {
256
257 cret := xUriGetPath(x.GoPointer())
258 return cret
259}
260
261var xUriGetPort func(uintptr) int
262
263// Gets @uri's port.
264func (x *Uri) GetPort() int {
265
266 cret := xUriGetPort(x.GoPointer())
267 return cret
268}
269
270var xUriGetQuery func(uintptr) string
271
272// Gets @uri's query, which may contain `%`-encoding, depending on the
273// flags with which @uri was created.
274//
275// For queries consisting of a series of `name=value` parameters,
276// #GUriParamsIter or g_uri_parse_params() may be useful.
277func (x *Uri) GetQuery() string {
278
279 cret := xUriGetQuery(x.GoPointer())
280 return cret
281}
282
283var xUriGetScheme func(uintptr) string
284
285// Gets @uri's scheme. Note that this will always be all-lowercase,
286// regardless of the string or strings that @uri was created from.
287func (x *Uri) GetScheme() string {
288
289 cret := xUriGetScheme(x.GoPointer())
290 return cret
291}
292
293var xUriGetUser func(uintptr) string
294
295// Gets the ‘username’ component of @uri's userinfo, which may contain
296// `%`-encoding, depending on the flags with which @uri was created.
297// If @uri was not created with %G_URI_FLAGS_HAS_PASSWORD or
298// %G_URI_FLAGS_HAS_AUTH_PARAMS, this is the same as g_uri_get_userinfo().
299func (x *Uri) GetUser() string {
300
301 cret := xUriGetUser(x.GoPointer())
302 return cret
303}
304
305var xUriGetUserinfo func(uintptr) string
306
307// Gets @uri's userinfo, which may contain `%`-encoding, depending on
308// the flags with which @uri was created.
309func (x *Uri) GetUserinfo() string {
310
311 cret := xUriGetUserinfo(x.GoPointer())
312 return cret
313}
314
315var xUriParseRelative func(uintptr, string, UriFlags, **Error) *Uri
316
317// Parses @uri_ref according to @flags and, if it is a
318// [relative URI](#relative-and-absolute-uris), resolves it relative to @base_uri.
319// If the result is not a valid absolute URI, it will be discarded, and an error
320// returned.
321func (x *Uri) ParseRelative(UriRefVar string, FlagsVar UriFlags) (*Uri, error) {
322 var cerr *Error
323
324 cret := xUriParseRelative(x.GoPointer(), UriRefVar, FlagsVar, &cerr)
325 if cerr == nil {
326 return cret, nil
327 }
328 return cret, cerr
329
330}
331
332var xUriRef func(uintptr) *Uri
333
334// Increments the reference count of @uri by one.
335func (x *Uri) Ref() *Uri {
336
337 cret := xUriRef(x.GoPointer())
338 return cret
339}
340
341var xUriToString func(uintptr) string
342
343// Returns a string representing @uri.
344//
345// This is not guaranteed to return a string which is identical to the
346// string that @uri was parsed from. However, if the source URI was
347// syntactically correct (according to RFC 3986), and it was parsed
348// with %G_URI_FLAGS_ENCODED, then g_uri_to_string() is guaranteed to return
349// a string which is at least semantically equivalent to the source
350// URI (according to RFC 3986).
351//
352// If @uri might contain sensitive details, such as authentication parameters,
353// or private data in its query string, and the returned string is going to be
354// logged, then consider using g_uri_to_string_partial() to redact parts.
355func (x *Uri) ToString() string {
356
357 cret := xUriToString(x.GoPointer())
358 return cret
359}
360
361var xUriToStringPartial func(uintptr, UriHideFlags) string
362
363// Returns a string representing @uri, subject to the options in
364// @flags. See g_uri_to_string() and #GUriHideFlags for more details.
365func (x *Uri) ToStringPartial(FlagsVar UriHideFlags) string {
366
367 cret := xUriToStringPartial(x.GoPointer(), FlagsVar)
368 return cret
369}
370
371var xUriUnref func(uintptr)
372
373// Atomically decrements the reference count of @uri by one.
374//
375// When the reference count reaches zero, the resources allocated by
376// @uri are freed
377func (x *Uri) Unref() {
378
379 xUriUnref(x.GoPointer())
380
381}
382
383// Many URI schemes include one or more attribute/value pairs as part of the URI
384// value. For example `scheme://server/path?query=string&is=there` has two
385// attributes – `query=string` and `is=there` – in its query part.
386//
387// A #GUriParamsIter structure represents an iterator that can be used to
388// iterate over the attribute/value pairs of a URI query string. #GUriParamsIter
389// structures are typically allocated on the stack and then initialized with
390// g_uri_params_iter_init(). See the documentation for g_uri_params_iter_init()
391// for a usage example.
392type UriParamsIter struct {
393 _ structs.HostLayout
394
395 Dummy0 int32
396
397 Dummy1 uintptr
398
399 Dummy2 uintptr
400
401 Dummy3 [256]byte
402}
403
404func (x *UriParamsIter) GoPointer() uintptr {
405 return uintptr(unsafe.Pointer(x))
406}
407
408var xUriParamsIterInit func(uintptr, string, int, string, UriParamsFlags)
409
410// Initializes an attribute/value pair iterator.
411//
412// The iterator keeps pointers to the @params and @separators arguments, those
413// variables must thus outlive the iterator and not be modified during the
414// iteration.
415//
416// If %G_URI_PARAMS_WWW_FORM is passed in @flags, `+` characters in the param
417// string will be replaced with spaces in the output. For example, `foo=bar+baz`
418// will give attribute `foo` with value `bar baz`. This is commonly used on the
419// web (the `https` and `http` schemes only), but is deprecated in favour of
420// the equivalent of encoding spaces as `%20`.
421//
422// Unlike with g_uri_parse_params(), %G_URI_PARAMS_CASE_INSENSITIVE has no
423// effect if passed to @flags for g_uri_params_iter_init(). The caller is
424// responsible for doing their own case-insensitive comparisons.
425//
426// |[<!-- language="C" -->
427// GUriParamsIter iter;
428// GError *error = NULL;
429// gchar *unowned_attr, *unowned_value;
430//
431// g_uri_params_iter_init (&iter, "foo=bar&baz=bar&Foo=frob&baz=bar2", -1, "&", G_URI_PARAMS_NONE);
432// while (g_uri_params_iter_next (&iter, &unowned_attr, &unowned_value, &error))
433//
434// {
435// g_autofree gchar *attr = g_steal_pointer (&unowned_attr);
436// g_autofree gchar *value = g_steal_pointer (&unowned_value);
437// // do something with attr and value; this code will be called 4 times
438// // for the params string in this example: once with attr=foo and value=bar,
439// // then with baz/bar, then Foo/frob, then baz/bar2.
440// }
441//
442// if (error)
443//
444// // handle parsing error
445//
446// ]|
447func (x *UriParamsIter) Init(ParamsVar string, LengthVar int, SeparatorsVar string, FlagsVar UriParamsFlags) {
448
449 xUriParamsIterInit(x.GoPointer(), ParamsVar, LengthVar, SeparatorsVar, FlagsVar)
450
451}
452
453var xUriParamsIterNext func(uintptr, *string, *string, **Error) bool
454
455// Advances @iter and retrieves the next attribute/value. %FALSE is returned if
456// an error has occurred (in which case @error is set), or if the end of the
457// iteration is reached (in which case @attribute and @value are set to %NULL
458// and the iterator becomes invalid). If %TRUE is returned,
459// g_uri_params_iter_next() may be called again to receive another
460// attribute/value pair.
461//
462// Note that the same @attribute may be returned multiple times, since URIs
463// allow repeated attributes.
464func (x *UriParamsIter) Next(AttributeVar *string, ValueVar *string) (bool, error) {
465 var cerr *Error
466
467 cret := xUriParamsIterNext(x.GoPointer(), AttributeVar, ValueVar, &cerr)
468 if cerr == nil {
469 return cret, nil
470 }
471 return cret, cerr
472
473}
474
475const (
476 // Generic delimiters characters as defined in
477 // [RFC 3986](https://tools.ietf.org/html/rfc3986). Includes `:/?#[]@`.
478 URI_RESERVED_CHARS_GENERIC_DELIMITERS string = ":/?#[]@"
479 // Subcomponent delimiter characters as defined in
480 // [RFC 3986](https://tools.ietf.org/html/rfc3986). Includes `!$&'()*+,;=`.
481 URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS string = "!$&'()*+,;="
482)
483
484// Flags that describe a URI.
485//
486// When parsing a URI, if you need to choose different flags based on
487// the type of URI, you can use g_uri_peek_scheme() on the URI string
488// to check the scheme first, and use that to decide what flags to
489// parse it with.
490type UriFlags int
491
492const (
493
494 // No flags set.
495 GUriFlagsNoneValue UriFlags = 0
496 // Parse the URI more relaxedly than the
497 // [RFC 3986](https://tools.ietf.org/html/rfc3986) grammar specifies,
498 // fixing up or ignoring common mistakes in URIs coming from external
499 // sources. This is also needed for some obscure URI schemes where `;`
500 // separates the host from the path. Don’t use this flag unless you need to.
501 GUriFlagsParseRelaxedValue UriFlags = 1
502 // The userinfo field may contain a password,
503 // which will be separated from the username by `:`.
504 GUriFlagsHasPasswordValue UriFlags = 2
505 // The userinfo may contain additional
506 // authentication-related parameters, which will be separated from
507 // the username and/or password by `;`.
508 GUriFlagsHasAuthParamsValue UriFlags = 4
509 // When parsing a URI, this indicates that `%`-encoded
510 // characters in the userinfo, path, query, and fragment fields
511 // should not be decoded. (And likewise the host field if
512 // %G_URI_FLAGS_NON_DNS is also set.) When building a URI, it indicates
513 // that you have already `%`-encoded the components, and so #GUri
514 // should not do any encoding itself.
515 GUriFlagsEncodedValue UriFlags = 8
516 // The host component should not be assumed to be a
517 // DNS hostname or IP address (for example, for `smb` URIs with NetBIOS
518 // hostnames).
519 GUriFlagsNonDnsValue UriFlags = 16
520 // Same as %G_URI_FLAGS_ENCODED, for the query
521 // field only.
522 GUriFlagsEncodedQueryValue UriFlags = 32
523 // Same as %G_URI_FLAGS_ENCODED, for the path only.
524 GUriFlagsEncodedPathValue UriFlags = 64
525 // Same as %G_URI_FLAGS_ENCODED, for the
526 // fragment only.
527 GUriFlagsEncodedFragmentValue UriFlags = 128
528 // A scheme-based normalization will be applied.
529 // For example, when parsing an HTTP URI changing omitted path to `/` and
530 // omitted port to `80`; and when building a URI, changing empty path to `/`
531 // and default port `80`). This only supports a subset of known schemes. (Since: 2.68)
532 GUriFlagsSchemeNormalizeValue UriFlags = 256
533)
534
535// Flags describing what parts of the URI to hide in
536// g_uri_to_string_partial(). Note that %G_URI_HIDE_PASSWORD and
537// %G_URI_HIDE_AUTH_PARAMS will only work if the #GUri was parsed with
538// the corresponding flags.
539type UriHideFlags int
540
541const (
542
543 // No flags set.
544 GUriHideNoneValue UriHideFlags = 0
545 // Hide the userinfo.
546 GUriHideUserinfoValue UriHideFlags = 1
547 // Hide the password.
548 GUriHidePasswordValue UriHideFlags = 2
549 // Hide the auth_params.
550 GUriHideAuthParamsValue UriHideFlags = 4
551 // Hide the query.
552 GUriHideQueryValue UriHideFlags = 8
553 // Hide the fragment.
554 GUriHideFragmentValue UriHideFlags = 16
555)
556
557// Flags modifying the way parameters are handled by g_uri_parse_params() and
558// #GUriParamsIter.
559type UriParamsFlags int
560
561const (
562
563 // No flags set.
564 GUriParamsNoneValue UriParamsFlags = 0
565 // Parameter names are case insensitive.
566 GUriParamsCaseInsensitiveValue UriParamsFlags = 1
567 // Replace `+` with space character. Only useful for
568 // URLs on the web, using the `https` or `http` schemas.
569 GUriParamsWwwFormValue UriParamsFlags = 2
570 // See %G_URI_FLAGS_PARSE_RELAXED.
571 GUriParamsParseRelaxedValue UriParamsFlags = 4
572)
573
574// Error codes returned by #GUri methods.
575type UriError int
576
577const (
578
579 // Generic error if no more specific error is available.
580 // See the error message for details.
581 GUriErrorFailedValue UriError = 0
582 // The scheme of a URI could not be parsed.
583 GUriErrorBadSchemeValue UriError = 1
584 // The user/userinfo of a URI could not be parsed.
585 GUriErrorBadUserValue UriError = 2
586 // The password of a URI could not be parsed.
587 GUriErrorBadPasswordValue UriError = 3
588 // The authentication parameters of a URI could not be parsed.
589 GUriErrorBadAuthParamsValue UriError = 4
590 // The host of a URI could not be parsed.
591 GUriErrorBadHostValue UriError = 5
592 // The port of a URI could not be parsed.
593 GUriErrorBadPortValue UriError = 6
594 // The path of a URI could not be parsed.
595 GUriErrorBadPathValue UriError = 7
596 // The query of a URI could not be parsed.
597 GUriErrorBadQueryValue UriError = 8
598 // The fragment of a URI could not be parsed.
599 GUriErrorBadFragmentValue UriError = 9
600)
601
602var xUriBuild func(UriFlags, string, uintptr, uintptr, int, string, uintptr, uintptr) *Uri
603
604// Creates a new #GUri from the given components according to @flags.
605//
606// See also g_uri_build_with_user(), which allows specifying the
607// components of the "userinfo" separately.
608func UriBuild(FlagsVar UriFlags, SchemeVar string, UserinfoVar *string, HostVar *string, PortVar int, PathVar string, QueryVar *string, FragmentVar *string) *Uri {
609
610 UserinfoVarPtr := core.GStrdupNullable(UserinfoVar)
611 defer core.GFreeNullable(UserinfoVarPtr)
612
613 HostVarPtr := core.GStrdupNullable(HostVar)
614 defer core.GFreeNullable(HostVarPtr)
615
616 QueryVarPtr := core.GStrdupNullable(QueryVar)
617 defer core.GFreeNullable(QueryVarPtr)
618
619 FragmentVarPtr := core.GStrdupNullable(FragmentVar)
620 defer core.GFreeNullable(FragmentVarPtr)
621
622 cret := xUriBuild(FlagsVar, SchemeVar, UserinfoVarPtr, HostVarPtr, PortVar, PathVar, QueryVarPtr, FragmentVarPtr)
623
624 return cret
625}
626
627var xUriBuildWithUser func(UriFlags, string, uintptr, uintptr, uintptr, uintptr, int, string, uintptr, uintptr) *Uri
628
629// Creates a new #GUri from the given components according to @flags
630// (%G_URI_FLAGS_HAS_PASSWORD is added unconditionally). The @flags must be
631// coherent with the passed values, in particular use `%`-encoded values with
632// %G_URI_FLAGS_ENCODED.
633//
634// In contrast to g_uri_build(), this allows specifying the components
635// of the ‘userinfo’ field separately. Note that @user must be non-%NULL
636// if either @password or @auth_params is non-%NULL.
637func UriBuildWithUser(FlagsVar UriFlags, SchemeVar string, UserVar *string, PasswordVar *string, AuthParamsVar *string, HostVar *string, PortVar int, PathVar string, QueryVar *string, FragmentVar *string) *Uri {
638
639 UserVarPtr := core.GStrdupNullable(UserVar)
640 defer core.GFreeNullable(UserVarPtr)
641
642 PasswordVarPtr := core.GStrdupNullable(PasswordVar)
643 defer core.GFreeNullable(PasswordVarPtr)
644
645 AuthParamsVarPtr := core.GStrdupNullable(AuthParamsVar)
646 defer core.GFreeNullable(AuthParamsVarPtr)
647
648 HostVarPtr := core.GStrdupNullable(HostVar)
649 defer core.GFreeNullable(HostVarPtr)
650
651 QueryVarPtr := core.GStrdupNullable(QueryVar)
652 defer core.GFreeNullable(QueryVarPtr)
653
654 FragmentVarPtr := core.GStrdupNullable(FragmentVar)
655 defer core.GFreeNullable(FragmentVarPtr)
656
657 cret := xUriBuildWithUser(FlagsVar, SchemeVar, UserVarPtr, PasswordVarPtr, AuthParamsVarPtr, HostVarPtr, PortVar, PathVar, QueryVarPtr, FragmentVarPtr)
658
659 return cret
660}
661
662var xUriEscapeBytes func([]byte, uint, uintptr) string
663
664// Escapes arbitrary data for use in a URI.
665//
666// Normally all characters that are not ‘unreserved’ (i.e. ASCII
667// alphanumerical characters plus dash, dot, underscore and tilde) are
668// escaped. But if you specify characters in @reserved_chars_allowed
669// they are not escaped. This is useful for the ‘reserved’ characters
670// in the URI specification, since those are allowed unescaped in some
671// portions of a URI.
672//
673// Though technically incorrect, this will also allow escaping nul
674// bytes as `%“00`.
675func UriEscapeBytes(UnescapedVar []byte, LengthVar uint, ReservedCharsAllowedVar *string) string {
676
677 ReservedCharsAllowedVarPtr := core.GStrdupNullable(ReservedCharsAllowedVar)
678 defer core.GFreeNullable(ReservedCharsAllowedVarPtr)
679
680 cret := xUriEscapeBytes(UnescapedVar, LengthVar, ReservedCharsAllowedVarPtr)
681
682 return cret
683}
684
685var xUriEscapeString func(string, uintptr, bool) string
686
687// Escapes a string for use in a URI.
688//
689// Normally all characters that are not "unreserved" (i.e. ASCII
690// alphanumerical characters plus dash, dot, underscore and tilde) are
691// escaped. But if you specify characters in @reserved_chars_allowed
692// they are not escaped. This is useful for the "reserved" characters
693// in the URI specification, since those are allowed unescaped in some
694// portions of a URI.
695func UriEscapeString(UnescapedVar string, ReservedCharsAllowedVar *string, AllowUtf8Var bool) string {
696
697 ReservedCharsAllowedVarPtr := core.GStrdupNullable(ReservedCharsAllowedVar)
698 defer core.GFreeNullable(ReservedCharsAllowedVarPtr)
699
700 cret := xUriEscapeString(UnescapedVar, ReservedCharsAllowedVarPtr, AllowUtf8Var)
701
702 return cret
703}
704
705var xUriIsValid func(string, UriFlags, **Error) bool
706
707// Parses @uri_string according to @flags, to determine whether it is a valid
708// [absolute URI](#relative-and-absolute-uris), i.e. it does not need to be resolved
709// relative to another URI using g_uri_parse_relative().
710//
711// If it’s not a valid URI, an error is returned explaining how it’s invalid.
712//
713// See g_uri_split(), and the definition of #GUriFlags, for more
714// information on the effect of @flags.
715func UriIsValid(UriStringVar string, FlagsVar UriFlags) (bool, error) {
716 var cerr *Error
717
718 cret := xUriIsValid(UriStringVar, FlagsVar, &cerr)
719
720 if cerr == nil {
721 return cret, nil
722 }
723 return cret, cerr
724
725}
726
727var xUriJoin func(UriFlags, uintptr, uintptr, uintptr, int, string, uintptr, uintptr) string
728
729// Joins the given components together according to @flags to create
730// an absolute URI string. @path may not be %NULL (though it may be the empty
731// string).
732//
733// When @host is present, @path must either be empty or begin with a slash (`/`)
734// character. When @host is not present, @path cannot begin with two slash
735// characters (`//`). See
736// [RFC 3986, section 3](https://tools.ietf.org/html/rfc3986#section-3).
737//
738// See also g_uri_join_with_user(), which allows specifying the
739// components of the ‘userinfo’ separately.
740//
741// %G_URI_FLAGS_HAS_PASSWORD and %G_URI_FLAGS_HAS_AUTH_PARAMS are ignored if set
742// in @flags.
743func UriJoin(FlagsVar UriFlags, SchemeVar *string, UserinfoVar *string, HostVar *string, PortVar int, PathVar string, QueryVar *string, FragmentVar *string) string {
744
745 SchemeVarPtr := core.GStrdupNullable(SchemeVar)
746 defer core.GFreeNullable(SchemeVarPtr)
747
748 UserinfoVarPtr := core.GStrdupNullable(UserinfoVar)
749 defer core.GFreeNullable(UserinfoVarPtr)
750
751 HostVarPtr := core.GStrdupNullable(HostVar)
752 defer core.GFreeNullable(HostVarPtr)
753
754 QueryVarPtr := core.GStrdupNullable(QueryVar)
755 defer core.GFreeNullable(QueryVarPtr)
756
757 FragmentVarPtr := core.GStrdupNullable(FragmentVar)
758 defer core.GFreeNullable(FragmentVarPtr)
759
760 cret := xUriJoin(FlagsVar, SchemeVarPtr, UserinfoVarPtr, HostVarPtr, PortVar, PathVar, QueryVarPtr, FragmentVarPtr)
761
762 return cret
763}
764
765var xUriJoinWithUser func(UriFlags, uintptr, uintptr, uintptr, uintptr, uintptr, int, string, uintptr, uintptr) string
766
767// Joins the given components together according to @flags to create
768// an absolute URI string. @path may not be %NULL (though it may be the empty
769// string).
770//
771// In contrast to g_uri_join(), this allows specifying the components
772// of the ‘userinfo’ separately. It otherwise behaves the same.
773//
774// %G_URI_FLAGS_HAS_PASSWORD and %G_URI_FLAGS_HAS_AUTH_PARAMS are ignored if set
775// in @flags.
776func UriJoinWithUser(FlagsVar UriFlags, SchemeVar *string, UserVar *string, PasswordVar *string, AuthParamsVar *string, HostVar *string, PortVar int, PathVar string, QueryVar *string, FragmentVar *string) string {
777
778 SchemeVarPtr := core.GStrdupNullable(SchemeVar)
779 defer core.GFreeNullable(SchemeVarPtr)
780
781 UserVarPtr := core.GStrdupNullable(UserVar)
782 defer core.GFreeNullable(UserVarPtr)
783
784 PasswordVarPtr := core.GStrdupNullable(PasswordVar)
785 defer core.GFreeNullable(PasswordVarPtr)
786
787 AuthParamsVarPtr := core.GStrdupNullable(AuthParamsVar)
788 defer core.GFreeNullable(AuthParamsVarPtr)
789
790 HostVarPtr := core.GStrdupNullable(HostVar)
791 defer core.GFreeNullable(HostVarPtr)
792
793 QueryVarPtr := core.GStrdupNullable(QueryVar)
794 defer core.GFreeNullable(QueryVarPtr)
795
796 FragmentVarPtr := core.GStrdupNullable(FragmentVar)
797 defer core.GFreeNullable(FragmentVarPtr)
798
799 cret := xUriJoinWithUser(FlagsVar, SchemeVarPtr, UserVarPtr, PasswordVarPtr, AuthParamsVarPtr, HostVarPtr, PortVar, PathVar, QueryVarPtr, FragmentVarPtr)
800
801 return cret
802}
803
804var xUriParse func(string, UriFlags, **Error) *Uri
805
806// Parses @uri_string according to @flags. If the result is not a
807// valid [absolute URI](#relative-and-absolute-uris), it will be discarded, and an
808// error returned.
809func UriParse(UriStringVar string, FlagsVar UriFlags) (*Uri, error) {
810 var cerr *Error
811
812 cret := xUriParse(UriStringVar, FlagsVar, &cerr)
813
814 if cerr == nil {
815 return cret, nil
816 }
817 return cret, cerr
818
819}
820
821var xUriParseParams func(string, int, string, UriParamsFlags, **Error) *HashTable
822
823// Many URI schemes include one or more attribute/value pairs as part of the URI
824// value. This method can be used to parse them into a hash table. When an
825// attribute has multiple occurrences, the last value is the final returned
826// value. If you need to handle repeated attributes differently, use
827// #GUriParamsIter.
828//
829// The @params string is assumed to still be `%`-encoded, but the returned
830// values will be fully decoded. (Thus it is possible that the returned values
831// may contain `=` or @separators, if the value was encoded in the input.)
832// Invalid `%`-encoding is treated as with the %G_URI_FLAGS_PARSE_RELAXED
833// rules for g_uri_parse(). (However, if @params is the path or query string
834// from a #GUri that was parsed without %G_URI_FLAGS_PARSE_RELAXED and
835// %G_URI_FLAGS_ENCODED, then you already know that it does not contain any
836// invalid encoding.)
837//
838// %G_URI_PARAMS_WWW_FORM is handled as documented for g_uri_params_iter_init().
839//
840// If %G_URI_PARAMS_CASE_INSENSITIVE is passed to @flags, attributes will be
841// compared case-insensitively, so a params string `attr=123&Attr=456` will only
842// return a single attribute–value pair, `Attr=456`. Case will be preserved in
843// the returned attributes.
844//
845// If @params cannot be parsed (for example, it contains two @separators
846// characters in a row), then @error is set and %NULL is returned.
847func UriParseParams(ParamsVar string, LengthVar int, SeparatorsVar string, FlagsVar UriParamsFlags) (*HashTable, error) {
848 var cerr *Error
849
850 cret := xUriParseParams(ParamsVar, LengthVar, SeparatorsVar, FlagsVar, &cerr)
851
852 if cerr == nil {
853 return cret, nil
854 }
855 return cret, cerr
856
857}
858
859var xUriParseScheme func(string) string
860
861// Gets the scheme portion of a URI string.
862// [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3) decodes the scheme
863// as:
864// |[
865// URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
866// ]|
867// Common schemes include `file`, `https`, `svn+ssh`, etc.
868func UriParseScheme(UriVar string) string {
869
870 cret := xUriParseScheme(UriVar)
871
872 return cret
873}
874
875var xUriPeekScheme func(string) string
876
877// Gets the scheme portion of a URI string.
878// [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3) decodes the scheme
879// as:
880// |[
881// URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
882// ]|
883// Common schemes include `file`, `https`, `svn+ssh`, etc.
884//
885// Unlike g_uri_parse_scheme(), the returned scheme is normalized to
886// all-lowercase and does not need to be freed.
887func UriPeekScheme(UriVar string) string {
888
889 cret := xUriPeekScheme(UriVar)
890
891 return cret
892}
893
894var xUriResolveRelative func(uintptr, string, UriFlags, **Error) string
895
896// Parses @uri_ref according to @flags and, if it is a
897// [relative URI](#relative-and-absolute-uris), resolves it relative to
898// @base_uri_string. If the result is not a valid absolute URI, it will be
899// discarded, and an error returned.
900//
901// (If @base_uri_string is %NULL, this just returns @uri_ref, or
902// %NULL if @uri_ref is invalid or not absolute.)
903func UriResolveRelative(BaseUriStringVar *string, UriRefVar string, FlagsVar UriFlags) (string, error) {
904 var cerr *Error
905
906 BaseUriStringVarPtr := core.GStrdupNullable(BaseUriStringVar)
907 defer core.GFreeNullable(BaseUriStringVarPtr)
908
909 cret := xUriResolveRelative(BaseUriStringVarPtr, UriRefVar, FlagsVar, &cerr)
910
911 if cerr == nil {
912 return cret, nil
913 }
914 return cret, cerr
915
916}
917
918var xUriSplit func(string, UriFlags, *string, *string, *string, *int, *string, *string, *string, **Error) bool
919
920// Parses @uri_ref (which can be an
921// [absolute or relative URI](#relative-and-absolute-uris)) according to @flags, and
922// returns the pieces. Any component that doesn't appear in @uri_ref will be
923// returned as %NULL (but note that all URIs always have a path component,
924// though it may be the empty string).
925//
926// If @flags contains %G_URI_FLAGS_ENCODED, then `%`-encoded characters in
927// @uri_ref will remain encoded in the output strings. (If not,
928// then all such characters will be decoded.) Note that decoding will
929// only work if the URI components are ASCII or UTF-8, so you will
930// need to use %G_URI_FLAGS_ENCODED if they are not.
931//
932// Note that the %G_URI_FLAGS_HAS_PASSWORD and
933// %G_URI_FLAGS_HAS_AUTH_PARAMS @flags are ignored by g_uri_split(),
934// since it always returns only the full userinfo; use
935// g_uri_split_with_user() if you want it split up.
936func UriSplit(UriRefVar string, FlagsVar UriFlags, SchemeVar *string, UserinfoVar *string, HostVar *string, PortVar *int, PathVar *string, QueryVar *string, FragmentVar *string) (bool, error) {
937 var cerr *Error
938
939 cret := xUriSplit(UriRefVar, FlagsVar, SchemeVar, UserinfoVar, HostVar, PortVar, PathVar, QueryVar, FragmentVar, &cerr)
940
941 if cerr == nil {
942 return cret, nil
943 }
944 return cret, cerr
945
946}
947
948var xUriSplitNetwork func(string, UriFlags, *string, *string, *int, **Error) bool
949
950// Parses @uri_string (which must be an [absolute URI](#relative-and-absolute-uris))
951// according to @flags, and returns the pieces relevant to connecting to a host.
952// See the documentation for g_uri_split() for more details; this is
953// mostly a wrapper around that function with simpler arguments.
954// However, it will return an error if @uri_string is a relative URI,
955// or does not contain a hostname component.
956func UriSplitNetwork(UriStringVar string, FlagsVar UriFlags, SchemeVar *string, HostVar *string, PortVar *int) (bool, error) {
957 var cerr *Error
958
959 cret := xUriSplitNetwork(UriStringVar, FlagsVar, SchemeVar, HostVar, PortVar, &cerr)
960
961 if cerr == nil {
962 return cret, nil
963 }
964 return cret, cerr
965
966}
967
968var xUriSplitWithUser func(string, UriFlags, *string, *string, *string, *string, *string, *int, *string, *string, *string, **Error) bool
969
970// Parses @uri_ref (which can be an
971// [absolute or relative URI](#relative-and-absolute-uris)) according to @flags, and
972// returns the pieces. Any component that doesn't appear in @uri_ref will be
973// returned as %NULL (but note that all URIs always have a path component,
974// though it may be the empty string).
975//
976// See g_uri_split(), and the definition of #GUriFlags, for more
977// information on the effect of @flags. Note that @password will only
978// be parsed out if @flags contains %G_URI_FLAGS_HAS_PASSWORD, and
979// @auth_params will only be parsed out if @flags contains
980// %G_URI_FLAGS_HAS_AUTH_PARAMS.
981func UriSplitWithUser(UriRefVar string, FlagsVar UriFlags, SchemeVar *string, UserVar *string, PasswordVar *string, AuthParamsVar *string, HostVar *string, PortVar *int, PathVar *string, QueryVar *string, FragmentVar *string) (bool, error) {
982 var cerr *Error
983
984 cret := xUriSplitWithUser(UriRefVar, FlagsVar, SchemeVar, UserVar, PasswordVar, AuthParamsVar, HostVar, PortVar, PathVar, QueryVar, FragmentVar, &cerr)
985
986 if cerr == nil {
987 return cret, nil
988 }
989 return cret, cerr
990
991}
992
993var xUriUnescapeBytes func(string, int, uintptr, **Error) *Bytes
994
995// Unescapes a segment of an escaped string as binary data.
996//
997// Note that in contrast to g_uri_unescape_string(), this does allow
998// nul bytes to appear in the output.
999//
1000// If any of the characters in @illegal_characters appears as an escaped
1001// character in @escaped_string, then that is an error and %NULL will be
1002// returned. This is useful if you want to avoid for instance having a slash
1003// being expanded in an escaped path element, which might confuse pathname
1004// handling.
1005func UriUnescapeBytes(EscapedStringVar string, LengthVar int, IllegalCharactersVar *string) (*Bytes, error) {
1006 var cerr *Error
1007
1008 IllegalCharactersVarPtr := core.GStrdupNullable(IllegalCharactersVar)
1009 defer core.GFreeNullable(IllegalCharactersVarPtr)
1010
1011 cret := xUriUnescapeBytes(EscapedStringVar, LengthVar, IllegalCharactersVarPtr, &cerr)
1012
1013 if cerr == nil {
1014 return cret, nil
1015 }
1016 return cret, cerr
1017
1018}
1019
1020var xUriUnescapeSegment func(uintptr, uintptr, uintptr) string
1021
1022// Unescapes a segment of an escaped string.
1023//
1024// If any of the characters in @illegal_characters or the NUL
1025// character appears as an escaped character in @escaped_string, then
1026// that is an error and %NULL will be returned. This is useful if you
1027// want to avoid for instance having a slash being expanded in an
1028// escaped path element, which might confuse pathname handling.
1029//
1030// Note: `NUL` byte is not accepted in the output, in contrast to
1031// g_uri_unescape_bytes().
1032func UriUnescapeSegment(EscapedStringVar *string, EscapedStringEndVar *string, IllegalCharactersVar *string) string {
1033
1034 EscapedStringVarPtr := core.GStrdupNullable(EscapedStringVar)
1035 defer core.GFreeNullable(EscapedStringVarPtr)
1036
1037 EscapedStringEndVarPtr := core.GStrdupNullable(EscapedStringEndVar)
1038 defer core.GFreeNullable(EscapedStringEndVarPtr)
1039
1040 IllegalCharactersVarPtr := core.GStrdupNullable(IllegalCharactersVar)
1041 defer core.GFreeNullable(IllegalCharactersVarPtr)
1042
1043 cret := xUriUnescapeSegment(EscapedStringVarPtr, EscapedStringEndVarPtr, IllegalCharactersVarPtr)
1044
1045 return cret
1046}
1047
1048var xUriUnescapeString func(string, uintptr) string
1049
1050// Unescapes a whole escaped string.
1051//
1052// If any of the characters in @illegal_characters or the NUL
1053// character appears as an escaped character in @escaped_string, then
1054// that is an error and %NULL will be returned. This is useful if you
1055// want to avoid for instance having a slash being expanded in an
1056// escaped path element, which might confuse pathname handling.
1057func UriUnescapeString(EscapedStringVar string, IllegalCharactersVar *string) string {
1058
1059 IllegalCharactersVarPtr := core.GStrdupNullable(IllegalCharactersVar)
1060 defer core.GFreeNullable(IllegalCharactersVarPtr)
1061
1062 cret := xUriUnescapeString(EscapedStringVar, IllegalCharactersVarPtr)
1063
1064 return cret
1065}
1066
1067func init() {
1068 core.SetPackageName("GLIB", "glib-2.0")
1069 core.SetSharedLibraries("GLIB", []string{"libgobject-2.0.so.0", "libglib-2.0.so.0"})
1070 var libs []uintptr
1071 for _, libPath := range core.GetPaths("GLIB") {
1072 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
1073 if err != nil {
1074 panic(err)
1075 }
1076 libs = append(libs, lib)
1077 }
1078
1079 core.PuregoSafeRegister(&xUriBuild, libs, "g_uri_build")
1080 core.PuregoSafeRegister(&xUriBuildWithUser, libs, "g_uri_build_with_user")
1081 core.PuregoSafeRegister(&xUriEscapeBytes, libs, "g_uri_escape_bytes")
1082 core.PuregoSafeRegister(&xUriEscapeString, libs, "g_uri_escape_string")
1083 core.PuregoSafeRegister(&xUriIsValid, libs, "g_uri_is_valid")
1084 core.PuregoSafeRegister(&xUriJoin, libs, "g_uri_join")
1085 core.PuregoSafeRegister(&xUriJoinWithUser, libs, "g_uri_join_with_user")
1086 core.PuregoSafeRegister(&xUriParse, libs, "g_uri_parse")
1087 core.PuregoSafeRegister(&xUriParseParams, libs, "g_uri_parse_params")
1088 core.PuregoSafeRegister(&xUriParseScheme, libs, "g_uri_parse_scheme")
1089 core.PuregoSafeRegister(&xUriPeekScheme, libs, "g_uri_peek_scheme")
1090 core.PuregoSafeRegister(&xUriResolveRelative, libs, "g_uri_resolve_relative")
1091 core.PuregoSafeRegister(&xUriSplit, libs, "g_uri_split")
1092 core.PuregoSafeRegister(&xUriSplitNetwork, libs, "g_uri_split_network")
1093 core.PuregoSafeRegister(&xUriSplitWithUser, libs, "g_uri_split_with_user")
1094 core.PuregoSafeRegister(&xUriUnescapeBytes, libs, "g_uri_unescape_bytes")
1095 core.PuregoSafeRegister(&xUriUnescapeSegment, libs, "g_uri_unescape_segment")
1096 core.PuregoSafeRegister(&xUriUnescapeString, libs, "g_uri_unescape_string")
1097
1098 core.PuregoSafeRegister(&xUriGLibType, libs, "g_uri_get_type")
1099
1100 core.PuregoSafeRegister(&xUriGetAuthParams, libs, "g_uri_get_auth_params")
1101 core.PuregoSafeRegister(&xUriGetFlags, libs, "g_uri_get_flags")
1102 core.PuregoSafeRegister(&xUriGetFragment, libs, "g_uri_get_fragment")
1103 core.PuregoSafeRegister(&xUriGetHost, libs, "g_uri_get_host")
1104 core.PuregoSafeRegister(&xUriGetPassword, libs, "g_uri_get_password")
1105 core.PuregoSafeRegister(&xUriGetPath, libs, "g_uri_get_path")
1106 core.PuregoSafeRegister(&xUriGetPort, libs, "g_uri_get_port")
1107 core.PuregoSafeRegister(&xUriGetQuery, libs, "g_uri_get_query")
1108 core.PuregoSafeRegister(&xUriGetScheme, libs, "g_uri_get_scheme")
1109 core.PuregoSafeRegister(&xUriGetUser, libs, "g_uri_get_user")
1110 core.PuregoSafeRegister(&xUriGetUserinfo, libs, "g_uri_get_userinfo")
1111 core.PuregoSafeRegister(&xUriParseRelative, libs, "g_uri_parse_relative")
1112 core.PuregoSafeRegister(&xUriRef, libs, "g_uri_ref")
1113 core.PuregoSafeRegister(&xUriToString, libs, "g_uri_to_string")
1114 core.PuregoSafeRegister(&xUriToStringPartial, libs, "g_uri_to_string_partial")
1115 core.PuregoSafeRegister(&xUriUnref, libs, "g_uri_unref")
1116
1117 core.PuregoSafeRegister(&xUriParamsIterInit, libs, "g_uri_params_iter_init")
1118 core.PuregoSafeRegister(&xUriParamsIterNext, libs, "g_uri_params_iter_next")
1119
1120}