@girs/grlnet-0.2 0.2.0-3.3.0 → 0.2.0-4.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/grlnet-0.2)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for GrlNet-0.2, generated from library version 0.2.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.3.0.
8
+ GJS TypeScript type definitions for GrlNet-0.2, generated from library version 0.2.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.2.
9
9
 
10
10
 
11
11
  ## Install
@@ -1,7 +1,7 @@
1
1
 
2
2
  declare module 'gi://GrlNet?version=0.2' {
3
- import GrlNet02 from '@girs/grlnet-0.2';
4
- export default GrlNet02;
3
+ import GrlNet from '@girs/grlnet-0.2';
4
+ export default GrlNet;
5
5
  }
6
6
 
7
7
 
@@ -1,12 +1,2 @@
1
-
2
- import GrlNet02 from '@girs/grlnet-0.2';
3
-
4
- declare global {
5
- export interface GjsGiImports {
6
- GrlNet: typeof GrlNet02;
7
- }
8
- }
9
-
10
- export default GjsGiImports;
11
-
1
+ // Module import type definition not generated, otherwise this would cause a type conflict, this is because several GIR modules were generated with the same namespace: "GrlNet"
12
2
 
package/grlnet-0.2.d.ts CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  /*
3
2
  * Type Definitions for Gjs (https://gjs.guide/)
4
3
  *
@@ -7,7 +6,9 @@
7
6
  */
8
7
 
9
8
  import './grlnet-0.2-ambient.d.ts';
9
+
10
10
  import './grlnet-0.2-import.d.ts';
11
+
11
12
  /**
12
13
  * GrlNet-0.2
13
14
  */
@@ -16,255 +17,188 @@ import type Soup from '@girs/soup-2.4';
16
17
  import type Gio from '@girs/gio-2.0';
17
18
  import type GObject from '@girs/gobject-2.0';
18
19
  import type GLib from '@girs/glib-2.0';
20
+ import type GModule from '@girs/gmodule-2.0';
19
21
 
20
22
  export namespace GrlNet {
21
-
22
- /**
23
- * These constants identify all the available errors managed by
24
- * the web client.
25
- */
26
- enum WcError {
27
- /**
28
- * TBD
29
- */
30
- UNAVAILABLE,
31
- /**
32
- * Invalid URI or header
33
- */
34
- PROTOCOL_ERROR,
35
- /**
36
- * Required authentication
37
- */
38
- AUTHENTICATION_REQUIRED,
39
23
  /**
40
- * Request resource not found
41
- */
42
- NOT_FOUND,
43
- /**
44
- * The entry has been modified since is was
45
- * downloaded
46
- */
47
- CONFLICT,
48
- /**
49
- * TBD
50
- */
51
- FORBIDDEN,
52
- /**
53
- * Cannot connect to the server
54
- */
55
- NETWORK_ERROR,
56
- /**
57
- * Cannot connect to the proxy server
58
- */
59
- PROXY_ERROR,
60
- /**
61
- * The operation has been cancelled (see #GCancellable)
62
- */
63
- CANCELLED,
64
- }
65
- module Wc {
66
-
67
- // Constructor properties interface
68
-
69
- interface ConstructorProperties extends GObject.Object.ConstructorProperties {
70
-
71
- // Own constructor properties of GrlNet-0.2.GrlNet.Wc
72
-
73
- cache?: boolean | null
74
- cacheSize?: number | null
75
- loglevel?: number | null
76
- throttling?: number | null
77
- userAgent?: string | null
24
+ * These constants identify all the available errors managed by
25
+ * the web client.
26
+ */
27
+ enum WcError {
28
+ /**
29
+ * TBD
30
+ */
31
+ UNAVAILABLE,
32
+ /**
33
+ * Invalid URI or header
34
+ */
35
+ PROTOCOL_ERROR,
36
+ /**
37
+ * Required authentication
38
+ */
39
+ AUTHENTICATION_REQUIRED,
40
+ /**
41
+ * Request resource not found
42
+ */
43
+ NOT_FOUND,
44
+ /**
45
+ * The entry has been modified since is was
46
+ * downloaded
47
+ */
48
+ CONFLICT,
49
+ /**
50
+ * TBD
51
+ */
52
+ FORBIDDEN,
53
+ /**
54
+ * Cannot connect to the server
55
+ */
56
+ NETWORK_ERROR,
57
+ /**
58
+ * Cannot connect to the proxy server
59
+ */
60
+ PROXY_ERROR,
61
+ /**
62
+ * The operation has been cancelled (see #GCancellable)
63
+ */
64
+ CANCELLED,
65
+ }
66
+ module Wc {
67
+ // Constructor properties interface
68
+
69
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
70
+ cache: boolean;
71
+ cache_size: number;
72
+ cacheSize: number;
73
+ loglevel: number;
74
+ throttling: number;
75
+ user_agent: string;
76
+ userAgent: string;
77
+ }
78
78
  }
79
79
 
80
- }
81
-
82
- interface Wc {
83
-
84
- // Own properties of GrlNet-0.2.GrlNet.Wc
85
-
86
- cache: boolean
87
- cacheSize: number
88
- loglevel: number
89
- throttling: number
90
- userAgent: string | null
91
-
92
- // Own fields of GrlNet-0.2.GrlNet.Wc
93
-
94
- /**
95
- * the parent object struct
96
- * @field
97
- */
98
- parent: GObject.Object
99
-
100
- // Owm methods of GrlNet-0.2.GrlNet.Wc
101
-
102
- /**
103
- * This method will flush all the pending request in the queue.
104
- */
105
- flush_delayed_requests(): void
106
- /**
107
- * Request the fetching of a web resource given the `uri`. This request is
108
- * asynchronous, thus the result will be returned within the `callback`.
109
- * @param uri The URI of the resource to request
110
- * @param cancellable a #GCancellable instance or %NULL to ignore
111
- * @param callback The callback when the result is ready
112
- */
113
- request_async(uri: string, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
114
-
115
- // Overloads of request_async
116
-
117
- /**
118
- * Promisified version of {@link request_async}
119
- *
120
- * Request the fetching of a web resource given the `uri`. This request is
121
- * asynchronous, thus the result will be returned within the `callback`.
122
- * @param uri The URI of the resource to request
123
- * @param cancellable a #GCancellable instance or %NULL to ignore
124
- * @returns A Promise of: %TRUE if the request was successfull. If %FALSE an error occurred.
125
- */
126
- request_async(uri: string, cancellable: Gio.Cancellable | null): globalThis.Promise<[ /* content */ string, /* length */ number ]>
127
- /**
128
- * Finishes an asynchronous load of the file's contents.
129
- * The contents are placed in contents, and length is set to the size of the
130
- * contents string.
131
- *
132
- * The content address will be invalidated at the next request. So if you
133
- * want to keep it, please copy it into another address.
134
- * @param result The result of the request
135
- * @returns %TRUE if the request was successfull. If %FALSE an error occurred.
136
- */
137
- request_finish(result: Gio.AsyncResult): [ /* returnType */ boolean, /* content */ string, /* length */ number ]
138
- /**
139
- * Request the fetching of a web resource given the `uri`. This request is
140
- * asynchronous, thus the result will be returned within the `callback`.
141
- * @param uri The URI of the resource to request
142
- * @param headers a set of additional HTTP headers for this request or %NULL to ignore
143
- * @param cancellable a #GCancellable instance or %NULL to ignore
144
- * @param callback The callback when the result is ready
145
- */
146
- request_with_headers_async(uri: string, headers: GLib.HashTable | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
147
- /**
148
- * Sets if cache must be used. Note that this will only work if caching is
149
- * supporting. If sets %TRUE, a new cache will be created. If sets to %FALSE,
150
- * current cache is clean and removed.
151
- * @param use_cache if cache must be used or not
152
- */
153
- set_cache(use_cache: boolean): void
154
- /**
155
- * Sets the new maximum size of cache, in Megabytes. Default value is 10. Using
156
- * 0 means no cache will be done.
157
- * @param cache_size size of cache (in Mb)
158
- */
159
- set_cache_size(cache_size: number): void
160
- /**
161
- * Setting the log level the logger feature is added into
162
- * the libsoup session.
163
- * @param log_level the libsoup log level to set [0,3]
164
- */
165
- set_log_level(log_level: number): void
166
- /**
167
- * Setting this property, the #GrlNetWc will queue all the requests and
168
- * will dispatch them with a pause between them of this value.
169
- * @param throttling the number of seconds to wait between requests
170
- */
171
- set_throttling(throttling: number): void
172
-
173
- // Class property signals of GrlNet-0.2.GrlNet.Wc
174
-
175
- connect(sigName: "notify::cache", callback: (($obj: Wc, pspec: GObject.ParamSpec) => void)): number
176
- connect_after(sigName: "notify::cache", callback: (($obj: Wc, pspec: GObject.ParamSpec) => void)): number
177
- emit(sigName: "notify::cache", ...args: any[]): void
178
- connect(sigName: "notify::cache-size", callback: (($obj: Wc, pspec: GObject.ParamSpec) => void)): number
179
- connect_after(sigName: "notify::cache-size", callback: (($obj: Wc, pspec: GObject.ParamSpec) => void)): number
180
- emit(sigName: "notify::cache-size", ...args: any[]): void
181
- connect(sigName: "notify::loglevel", callback: (($obj: Wc, pspec: GObject.ParamSpec) => void)): number
182
- connect_after(sigName: "notify::loglevel", callback: (($obj: Wc, pspec: GObject.ParamSpec) => void)): number
183
- emit(sigName: "notify::loglevel", ...args: any[]): void
184
- connect(sigName: "notify::throttling", callback: (($obj: Wc, pspec: GObject.ParamSpec) => void)): number
185
- connect_after(sigName: "notify::throttling", callback: (($obj: Wc, pspec: GObject.ParamSpec) => void)): number
186
- emit(sigName: "notify::throttling", ...args: any[]): void
187
- connect(sigName: "notify::user-agent", callback: (($obj: Wc, pspec: GObject.ParamSpec) => void)): number
188
- connect_after(sigName: "notify::user-agent", callback: (($obj: Wc, pspec: GObject.ParamSpec) => void)): number
189
- emit(sigName: "notify::user-agent", ...args: any[]): void
190
- connect(sigName: string, callback: (...args: any[]) => void): number
191
- connect_after(sigName: string, callback: (...args: any[]) => void): number
192
- emit(sigName: string, ...args: any[]): void
193
- disconnect(id: number): void
194
- }
195
-
196
- class Wc extends GObject.Object {
80
+ class Wc extends GObject.Object {
81
+ static $gtype: GObject.GType<Wc>;
82
+
83
+ // Own properties of GrlNet.Wc
84
+
85
+ get cache(): boolean;
86
+ set cache(val: boolean);
87
+ get cache_size(): number;
88
+ set cache_size(val: number);
89
+ get cacheSize(): number;
90
+ set cacheSize(val: number);
91
+ get loglevel(): number;
92
+ set loglevel(val: number);
93
+ get throttling(): number;
94
+ set throttling(val: number);
95
+ get user_agent(): string;
96
+ set user_agent(val: string);
97
+ get userAgent(): string;
98
+ set userAgent(val: string);
99
+
100
+ // Constructors of GrlNet.Wc
101
+
102
+ constructor(properties?: Partial<Wc.ConstructorProps>, ...args: any[]);
103
+
104
+ _init(...args: any[]): void;
105
+
106
+ static ['new'](): Wc;
107
+
108
+ // Own static methods of GrlNet.Wc
109
+
110
+ static error_quark(): GLib.Quark;
111
+
112
+ // Own methods of GrlNet.Wc
113
+
114
+ /**
115
+ * This method will flush all the pending request in the queue.
116
+ */
117
+ flush_delayed_requests(): void;
118
+ /**
119
+ * Request the fetching of a web resource given the `uri`. This request is
120
+ * asynchronous, thus the result will be returned within the `callback`.
121
+ * @param uri The URI of the resource to request
122
+ * @param cancellable a #GCancellable instance or %NULL to ignore
123
+ * @param callback The callback when the result is ready
124
+ */
125
+ request_async(
126
+ uri: string,
127
+ cancellable?: Gio.Cancellable | null,
128
+ callback?: Gio.AsyncReadyCallback<this> | null,
129
+ ): void;
130
+ /**
131
+ * Finishes an asynchronous load of the file's contents.
132
+ * The contents are placed in contents, and length is set to the size of the
133
+ * contents string.
134
+ *
135
+ * The content address will be invalidated at the next request. So if you
136
+ * want to keep it, please copy it into another address.
137
+ * @param result The result of the request
138
+ * @returns %TRUE if the request was successfull. If %FALSE an error occurred.
139
+ */
140
+ request_finish(result: Gio.AsyncResult): [boolean, string, number];
141
+ /**
142
+ * Request the fetching of a web resource given the `uri`. This request is
143
+ * asynchronous, thus the result will be returned within the `callback`.
144
+ * @param uri The URI of the resource to request
145
+ * @param headers a set of additional HTTP headers for this request or %NULL to ignore
146
+ * @param cancellable a #GCancellable instance or %NULL to ignore
147
+ * @param callback The callback when the result is ready
148
+ */
149
+ request_with_headers_async(
150
+ uri: string,
151
+ headers?: GLib.HashTable<string, string> | null,
152
+ cancellable?: Gio.Cancellable | null,
153
+ callback?: Gio.AsyncReadyCallback<this> | null,
154
+ ): void;
155
+ /**
156
+ * Sets if cache must be used. Note that this will only work if caching is
157
+ * supporting. If sets %TRUE, a new cache will be created. If sets to %FALSE,
158
+ * current cache is clean and removed.
159
+ * @param use_cache if cache must be used or not
160
+ */
161
+ set_cache(use_cache: boolean): void;
162
+ /**
163
+ * Sets the new maximum size of cache, in Megabytes. Default value is 10. Using
164
+ * 0 means no cache will be done.
165
+ * @param cache_size size of cache (in Mb)
166
+ */
167
+ set_cache_size(cache_size: number): void;
168
+ /**
169
+ * Setting the log level the logger feature is added into
170
+ * the libsoup session.
171
+ * @param log_level the libsoup log level to set [0,3]
172
+ */
173
+ set_log_level(log_level: number): void;
174
+ /**
175
+ * Setting this property, the #GrlNetWc will queue all the requests and
176
+ * will dispatch them with a pause between them of this value.
177
+ * @param throttling the number of seconds to wait between requests
178
+ */
179
+ set_throttling(throttling: number): void;
180
+ }
197
181
 
198
- // Own properties of GrlNet-0.2.GrlNet.Wc
182
+ type WcClass = typeof Wc;
183
+ abstract class WcPrivate {
184
+ static $gtype: GObject.GType<WcPrivate>;
199
185
 
200
- static name: string
201
- static $gtype: GObject.GType<Wc>
186
+ // Constructors of GrlNet.WcPrivate
202
187
 
203
- // Constructors of GrlNet-0.2.GrlNet.Wc
188
+ _init(...args: any[]): void;
189
+ }
204
190
 
205
- constructor(config?: Wc.ConstructorProperties)
206
- /**
207
- * Creates a new #GrlNetWc.
208
- * @constructor
209
- * @returns a new allocated instance of #GrlNetWc. Do g_object_unref() after use it.
210
- */
211
- constructor()
212
191
  /**
213
- * Creates a new #GrlNetWc.
214
- * @constructor
215
- * @returns a new allocated instance of #GrlNetWc. Do g_object_unref() after use it.
192
+ * Name of the imported GIR library
193
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
216
194
  */
217
- static new(): Wc
218
- _init(config?: Wc.ConstructorProperties): void
219
- static error_quark(): GLib.Quark
220
- }
221
-
222
- interface WcClass {
223
-
224
- // Own fields of GrlNet-0.2.GrlNet.WcClass
225
-
195
+ const __name__: string;
226
196
  /**
227
- * the parent class structure
228
- * @field
197
+ * Version of the imported GIR library
198
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
229
199
  */
230
- parent_class: GObject.ObjectClass
231
- }
232
-
233
- /**
234
- * Grilo web client helper class.
235
- *
236
- * It's a simple and thin web client to be used by the sources to download
237
- * content from Internet.
238
- * @record
239
- */
240
- abstract class WcClass {
241
-
242
- // Own properties of GrlNet-0.2.GrlNet.WcClass
243
-
244
- static name: string
245
- }
246
-
247
- interface WcPrivate {
248
- }
249
-
250
- class WcPrivate {
251
-
252
- // Own properties of GrlNet-0.2.GrlNet.WcPrivate
253
-
254
- static name: string
255
- }
256
-
257
- /**
258
- * Name of the imported GIR library
259
- * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
260
- */
261
- const __name__: string
262
- /**
263
- * Version of the imported GIR library
264
- * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
265
- */
266
- const __version__: string
200
+ const __version__: string;
267
201
  }
268
202
 
269
203
  export default GrlNet;
270
- // END
204
+ // END
package/grlnet-0.2.js CHANGED
@@ -1,10 +1,6 @@
1
1
 
2
-
3
2
  // @ts-expect-error
4
3
  import GrlNet from 'gi://GrlNet?version=0.2';
5
4
  export { GrlNet };
6
5
  export default GrlNet;
7
6
 
8
-
9
-
10
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/grlnet-0.2",
3
- "version": "0.2.0-3.3.0",
3
+ "version": "0.2.0-4.0.0-beta.2",
4
4
  "description": "GJS TypeScript type definitions for GrlNet-0.2, generated from library version 0.2.0",
5
5
  "type": "module",
6
6
  "module": "grlnet-0.2.js",
@@ -8,34 +8,30 @@
8
8
  "exports": {
9
9
  "./ambient": {
10
10
  "types": "./grlnet-0.2-ambient.d.ts",
11
+ "import": "./grlnet-0.2-ambient.js",
11
12
  "default": "./grlnet-0.2-ambient.js"
12
13
  },
13
14
  "./import": {
14
15
  "types": "./grlnet-0.2-import.d.ts",
16
+ "import": "./grlnet-0.2-import.js",
15
17
  "default": "./grlnet-0.2-import.js"
16
18
  },
17
19
  ".": {
18
- "import": {
19
- "types": "./grlnet-0.2.d.ts",
20
- "default": "./grlnet-0.2.js"
21
- },
22
- "require": {
23
- "types": "./grlnet-0.2.d.cts",
24
- "default": "./grlnet-0.2.cjs"
25
- }
20
+ "types": "./grlnet-0.2.d.ts",
21
+ "import": "./grlnet-0.2.js",
22
+ "default": "./grlnet-0.2.js"
26
23
  }
27
24
  },
28
25
  "scripts": {
29
- "test": "yarn test:esm && yarn test:cjs",
30
- "test:esm": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit grlnet-0.2.d.ts",
31
- "test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit grlnet-0.2.d.cts"
26
+ "test": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit grlnet-0.2.d.ts"
32
27
  },
33
28
  "dependencies": {
34
- "@girs/gio-2.0": "^2.78.0-3.3.0",
35
- "@girs/gjs": "^3.3.0",
36
- "@girs/glib-2.0": "^2.78.0-3.3.0",
37
- "@girs/gobject-2.0": "^2.78.0-3.3.0",
38
- "@girs/soup-2.4": "^2.74.3-3.3.0"
29
+ "@girs/gio-2.0": "^2.80.0-4.0.0-beta.2",
30
+ "@girs/gjs": "^4.0.0-beta.2",
31
+ "@girs/glib-2.0": "^2.80.0-4.0.0-beta.2",
32
+ "@girs/gmodule-2.0": "^2.0.0-4.0.0-beta.2",
33
+ "@girs/gobject-2.0": "^2.80.0-4.0.0-beta.2",
34
+ "@girs/soup-2.4": "^2.74.3-4.0.0-beta.2"
39
35
  },
40
36
  "devDependencies": {
41
37
  "typescript": "*"
package/grlnet-0.2.cjs DELETED
@@ -1,11 +0,0 @@
1
-
2
-
3
- imports.gi.versions.GrlNet = '0.2'
4
- const GrlNet = imports.gi.GrlNet;
5
-
6
- module.exports = GrlNet;
7
-
8
-
9
-
10
-
11
-
package/grlnet-0.2.d.cts DELETED
@@ -1,265 +0,0 @@
1
-
2
- /*
3
- * Type Definitions for Gjs (https://gjs.guide/)
4
- *
5
- * These type definitions are automatically generated, do not edit them by hand.
6
- * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
7
- */
8
-
9
- import './grlnet-0.2-ambient.d.ts';
10
- import './grlnet-0.2-import.d.ts';
11
- /**
12
- * GrlNet-0.2
13
- */
14
-
15
- import type Soup from '@girs/soup-2.4';
16
- import type Gio from '@girs/gio-2.0';
17
- import type GObject from '@girs/gobject-2.0';
18
- import type GLib from '@girs/glib-2.0';
19
-
20
- /**
21
- * These constants identify all the available errors managed by
22
- * the web client.
23
- */
24
- export enum WcError {
25
- /**
26
- * TBD
27
- */
28
- UNAVAILABLE,
29
- /**
30
- * Invalid URI or header
31
- */
32
- PROTOCOL_ERROR,
33
- /**
34
- * Required authentication
35
- */
36
- AUTHENTICATION_REQUIRED,
37
- /**
38
- * Request resource not found
39
- */
40
- NOT_FOUND,
41
- /**
42
- * The entry has been modified since is was
43
- * downloaded
44
- */
45
- CONFLICT,
46
- /**
47
- * TBD
48
- */
49
- FORBIDDEN,
50
- /**
51
- * Cannot connect to the server
52
- */
53
- NETWORK_ERROR,
54
- /**
55
- * Cannot connect to the proxy server
56
- */
57
- PROXY_ERROR,
58
- /**
59
- * The operation has been cancelled (see #GCancellable)
60
- */
61
- CANCELLED,
62
- }
63
- export module Wc {
64
-
65
- // Constructor properties interface
66
-
67
- export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
68
-
69
- // Own constructor properties of GrlNet-0.2.GrlNet.Wc
70
-
71
- cache?: boolean | null
72
- cacheSize?: number | null
73
- loglevel?: number | null
74
- throttling?: number | null
75
- userAgent?: string | null
76
- }
77
-
78
- }
79
-
80
- export interface Wc {
81
-
82
- // Own properties of GrlNet-0.2.GrlNet.Wc
83
-
84
- cache: boolean
85
- cacheSize: number
86
- loglevel: number
87
- throttling: number
88
- userAgent: string | null
89
-
90
- // Own fields of GrlNet-0.2.GrlNet.Wc
91
-
92
- /**
93
- * the parent object struct
94
- * @field
95
- */
96
- parent: GObject.Object
97
-
98
- // Owm methods of GrlNet-0.2.GrlNet.Wc
99
-
100
- /**
101
- * This method will flush all the pending request in the queue.
102
- */
103
- flush_delayed_requests(): void
104
- /**
105
- * Request the fetching of a web resource given the `uri`. This request is
106
- * asynchronous, thus the result will be returned within the `callback`.
107
- * @param uri The URI of the resource to request
108
- * @param cancellable a #GCancellable instance or %NULL to ignore
109
- * @param callback The callback when the result is ready
110
- */
111
- request_async(uri: string, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
112
-
113
- // Overloads of request_async
114
-
115
- /**
116
- * Promisified version of {@link request_async}
117
- *
118
- * Request the fetching of a web resource given the `uri`. This request is
119
- * asynchronous, thus the result will be returned within the `callback`.
120
- * @param uri The URI of the resource to request
121
- * @param cancellable a #GCancellable instance or %NULL to ignore
122
- * @returns A Promise of: %TRUE if the request was successfull. If %FALSE an error occurred.
123
- */
124
- request_async(uri: string, cancellable: Gio.Cancellable | null): globalThis.Promise<[ /* content */ string, /* length */ number ]>
125
- /**
126
- * Finishes an asynchronous load of the file's contents.
127
- * The contents are placed in contents, and length is set to the size of the
128
- * contents string.
129
- *
130
- * The content address will be invalidated at the next request. So if you
131
- * want to keep it, please copy it into another address.
132
- * @param result The result of the request
133
- * @returns %TRUE if the request was successfull. If %FALSE an error occurred.
134
- */
135
- request_finish(result: Gio.AsyncResult): [ /* returnType */ boolean, /* content */ string, /* length */ number ]
136
- /**
137
- * Request the fetching of a web resource given the `uri`. This request is
138
- * asynchronous, thus the result will be returned within the `callback`.
139
- * @param uri The URI of the resource to request
140
- * @param headers a set of additional HTTP headers for this request or %NULL to ignore
141
- * @param cancellable a #GCancellable instance or %NULL to ignore
142
- * @param callback The callback when the result is ready
143
- */
144
- request_with_headers_async(uri: string, headers: GLib.HashTable | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
145
- /**
146
- * Sets if cache must be used. Note that this will only work if caching is
147
- * supporting. If sets %TRUE, a new cache will be created. If sets to %FALSE,
148
- * current cache is clean and removed.
149
- * @param use_cache if cache must be used or not
150
- */
151
- set_cache(use_cache: boolean): void
152
- /**
153
- * Sets the new maximum size of cache, in Megabytes. Default value is 10. Using
154
- * 0 means no cache will be done.
155
- * @param cache_size size of cache (in Mb)
156
- */
157
- set_cache_size(cache_size: number): void
158
- /**
159
- * Setting the log level the logger feature is added into
160
- * the libsoup session.
161
- * @param log_level the libsoup log level to set [0,3]
162
- */
163
- set_log_level(log_level: number): void
164
- /**
165
- * Setting this property, the #GrlNetWc will queue all the requests and
166
- * will dispatch them with a pause between them of this value.
167
- * @param throttling the number of seconds to wait between requests
168
- */
169
- set_throttling(throttling: number): void
170
-
171
- // Class property signals of GrlNet-0.2.GrlNet.Wc
172
-
173
- connect(sigName: "notify::cache", callback: (($obj: Wc, pspec: GObject.ParamSpec) => void)): number
174
- connect_after(sigName: "notify::cache", callback: (($obj: Wc, pspec: GObject.ParamSpec) => void)): number
175
- emit(sigName: "notify::cache", ...args: any[]): void
176
- connect(sigName: "notify::cache-size", callback: (($obj: Wc, pspec: GObject.ParamSpec) => void)): number
177
- connect_after(sigName: "notify::cache-size", callback: (($obj: Wc, pspec: GObject.ParamSpec) => void)): number
178
- emit(sigName: "notify::cache-size", ...args: any[]): void
179
- connect(sigName: "notify::loglevel", callback: (($obj: Wc, pspec: GObject.ParamSpec) => void)): number
180
- connect_after(sigName: "notify::loglevel", callback: (($obj: Wc, pspec: GObject.ParamSpec) => void)): number
181
- emit(sigName: "notify::loglevel", ...args: any[]): void
182
- connect(sigName: "notify::throttling", callback: (($obj: Wc, pspec: GObject.ParamSpec) => void)): number
183
- connect_after(sigName: "notify::throttling", callback: (($obj: Wc, pspec: GObject.ParamSpec) => void)): number
184
- emit(sigName: "notify::throttling", ...args: any[]): void
185
- connect(sigName: "notify::user-agent", callback: (($obj: Wc, pspec: GObject.ParamSpec) => void)): number
186
- connect_after(sigName: "notify::user-agent", callback: (($obj: Wc, pspec: GObject.ParamSpec) => void)): number
187
- emit(sigName: "notify::user-agent", ...args: any[]): void
188
- connect(sigName: string, callback: (...args: any[]) => void): number
189
- connect_after(sigName: string, callback: (...args: any[]) => void): number
190
- emit(sigName: string, ...args: any[]): void
191
- disconnect(id: number): void
192
- }
193
-
194
- export class Wc extends GObject.Object {
195
-
196
- // Own properties of GrlNet-0.2.GrlNet.Wc
197
-
198
- static name: string
199
- static $gtype: GObject.GType<Wc>
200
-
201
- // Constructors of GrlNet-0.2.GrlNet.Wc
202
-
203
- constructor(config?: Wc.ConstructorProperties)
204
- /**
205
- * Creates a new #GrlNetWc.
206
- * @constructor
207
- * @returns a new allocated instance of #GrlNetWc. Do g_object_unref() after use it.
208
- */
209
- constructor()
210
- /**
211
- * Creates a new #GrlNetWc.
212
- * @constructor
213
- * @returns a new allocated instance of #GrlNetWc. Do g_object_unref() after use it.
214
- */
215
- static new(): Wc
216
- _init(config?: Wc.ConstructorProperties): void
217
- static error_quark(): GLib.Quark
218
- }
219
-
220
- export interface WcClass {
221
-
222
- // Own fields of GrlNet-0.2.GrlNet.WcClass
223
-
224
- /**
225
- * the parent class structure
226
- * @field
227
- */
228
- parent_class: GObject.ObjectClass
229
- }
230
-
231
- /**
232
- * Grilo web client helper class.
233
- *
234
- * It's a simple and thin web client to be used by the sources to download
235
- * content from Internet.
236
- * @record
237
- */
238
- export abstract class WcClass {
239
-
240
- // Own properties of GrlNet-0.2.GrlNet.WcClass
241
-
242
- static name: string
243
- }
244
-
245
- export interface WcPrivate {
246
- }
247
-
248
- export class WcPrivate {
249
-
250
- // Own properties of GrlNet-0.2.GrlNet.WcPrivate
251
-
252
- static name: string
253
- }
254
-
255
- /**
256
- * Name of the imported GIR library
257
- * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
258
- */
259
- export const __name__: string
260
- /**
261
- * Version of the imported GIR library
262
- * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
263
- */
264
- export const __version__: string
265
- // END