@girs/avahi-0.6 0.6.0-4.0.0

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 ADDED
@@ -0,0 +1,104 @@
1
+
2
+ # Avahi-0.6
3
+
4
+ ![version](https://img.shields.io/npm/v/@girs/avahi-0.6)
5
+ ![downloads/week](https://img.shields.io/npm/dw/@girs/avahi-0.6)
6
+
7
+
8
+ GJS TypeScript type definitions for Avahi-0.6, generated from library version 0.6.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0.
9
+
10
+
11
+ ## Install
12
+
13
+ To use this type definitions, install them with NPM:
14
+ ```bash
15
+ npm install @girs/avahi-0.6
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ You can import this package into your project like this:
21
+ ```ts
22
+ import Avahi from '@girs/avahi-0.6';
23
+ ```
24
+
25
+ Or if you prefer CommonJS, you can also use this:
26
+ ```ts
27
+ const Avahi = require('@girs/avahi-0.6');
28
+ ```
29
+
30
+ ### Ambient Modules
31
+
32
+ You can also use [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) to import this module like you would do this in JavaScript.
33
+ For this you need to include `@girs/avahi-0.6` or `@girs/avahi-0.6/ambient` in your `tsconfig` or entry point Typescript file:
34
+
35
+ `index.ts`:
36
+ ```ts
37
+ import '@girs/avahi-0.6'
38
+ ```
39
+
40
+ `tsconfig.json`:
41
+ ```json
42
+ {
43
+ "compilerOptions": {
44
+ ...
45
+ },
46
+ "include": ["@girs/avahi-0.6"],
47
+ ...
48
+ }
49
+ ```
50
+
51
+ Now you can import the ambient module with TypeScript support:
52
+
53
+ ```ts
54
+ import Avahi from 'gi://Avahi?version=0.6';
55
+ ```
56
+
57
+ ### Global import
58
+
59
+ You can also import the module with Typescript support using the global `imports.gi` object of GJS.
60
+ For this you need to include `@girs/avahi-0.6` or `@girs/avahi-0.6/import` in your `tsconfig` or entry point Typescript file:
61
+
62
+ `index.ts`:
63
+ ```ts
64
+ import '@girs/avahi-0.6'
65
+ ```
66
+
67
+ `tsconfig.json`:
68
+ ```json
69
+ {
70
+ "compilerOptions": {
71
+ ...
72
+ },
73
+ "include": ["@girs/avahi-0.6"],
74
+ ...
75
+ }
76
+ ```
77
+
78
+ Now you have also type support for this, too:
79
+
80
+ ```ts
81
+ const Avahi = imports.gi.Avahi;
82
+ ```
83
+
84
+
85
+ ### ESM vs. CommonJS
86
+
87
+ GJS supports two different import syntaxes. The new modern ESM syntax and the old global imports syntax.
88
+
89
+ In TypeScript projects for GJS and GNOME Shell extensions, you have the flexibility to use `ESM` syntax and then decide the import syntax for your bundled file. If your bundler is configured to use `CommonJS`, it will convert to the GJS-specific global imports syntax, like `const moduleName = imports.gi[moduleName]`. This is different from the traditional `require` syntax seen in Node.js. The global imports syntax is chosen because it aligns with the CommonJS format supported by NPM, which is used for the generated type definitions and this package.
90
+
91
+ On the other hand, if you configure your bundler to use ESM, it will retain the ESM import syntax. It's crucial to ensure that your bundler is set up to correctly translate and bundle these imports into either CommonJS or ESM format, depending on your project's requirements.
92
+
93
+ This approach is particularly important due to the `@girs` types, which include both `*.cjs `files, using the GJS global imports syntax, and `*.js` files, which utilize the ESM syntax. By appropriately setting up your bundler, you can control which syntax—CommonJS or ESM—is used in your project. The choice of CommonJS in this context is also due to the similarity between the GJS-specific global imports and CommonJS syntax, allowing for easier management and bundling in these specific types of projects.
94
+
95
+ Since GNOME Shell 45, you should only use ESM, even for GNOME Shell extensions. Before that, extensions had to use the global import syntax, unlike normal GJS applications, where ESM has been available for some time.
96
+
97
+ ### Bundle
98
+
99
+ Depending on your project configuration, it is recommended to use a bundler like [esbuild](https://esbuild.github.io/). You can find examples using different bundlers [here](https://github.com/gjsify/ts-for-gir/tree/main/examples).
100
+
101
+ ## Other packages
102
+
103
+ All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
104
+
@@ -0,0 +1,12 @@
1
+
2
+ declare module 'gi://Avahi?version=0.6' {
3
+ import Avahi from '@girs/avahi-0.6';
4
+ export default Avahi;
5
+ }
6
+
7
+ declare module 'gi://Avahi' {
8
+ import Avahi06 from 'gi://Avahi?version=0.6';
9
+ export default Avahi06;
10
+ }
11
+
12
+
@@ -0,0 +1,2 @@
1
+ export {}
2
+
@@ -0,0 +1,12 @@
1
+
2
+ import Avahi06 from '@girs/avahi-0.6';
3
+
4
+ declare global {
5
+ export interface GjsGiImports {
6
+ Avahi: typeof Avahi06;
7
+ }
8
+ }
9
+
10
+ export default GjsGiImports;
11
+
12
+
@@ -0,0 +1,3 @@
1
+ const gi = globalThis.imports?.gi || {};
2
+ export default gi;
3
+
package/avahi-0.6.d.ts ADDED
@@ -0,0 +1,695 @@
1
+ /*
2
+ * Type Definitions for Gjs (https://gjs.guide/)
3
+ *
4
+ * These type definitions are automatically generated, do not edit them by hand.
5
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
6
+ */
7
+
8
+ import './avahi-0.6-ambient.d.ts';
9
+
10
+ /**
11
+ * Avahi-0.6
12
+ */
13
+
14
+ import type GObject from '@girs/gobject-2.0';
15
+ import type GLib from '@girs/glib-2.0';
16
+ import type AvahiCore from '@girs/avahicore-0.6';
17
+
18
+ export namespace Avahi {
19
+ enum BrowserEvent {
20
+ GA_BROWSER_NEW,
21
+ GA_BROWSER_REMOVE,
22
+ GA_BROWSER_CACHE_EXHAUSTED,
23
+ GA_BROWSER_ALL_FOR_NOW,
24
+ GA_BROWSER_FAILURE,
25
+ }
26
+ enum ClientFlags {
27
+ GA_CLIENT_FLAG_NO_FLAGS,
28
+ GA_CLIENT_FLAG_IGNORE_USER_CONFIG,
29
+ GA_CLIENT_FLAG_NO_FAIL,
30
+ }
31
+ enum ClientState {
32
+ GA_CLIENT_STATE_NOT_STARTED,
33
+ GA_CLIENT_STATE_S_REGISTERING,
34
+ GA_CLIENT_STATE_S_RUNNING,
35
+ GA_CLIENT_STATE_S_COLLISION,
36
+ GA_CLIENT_STATE_FAILURE,
37
+ GA_CLIENT_STATE_CONNECTING,
38
+ }
39
+ enum EntryGroupState {
40
+ GA_ENTRY_GROUP_STATE_UNCOMMITED,
41
+ GA_ENTRY_GROUP_STATE_REGISTERING,
42
+ GA_ENTRY_GROUP_STATE_ESTABLISHED,
43
+ GA_ENTRY_GROUP_STATE_COLLISION,
44
+ GA_ENTRY_GROUP_STATE_FAILURE,
45
+ }
46
+ enum LookupFlags {
47
+ GA_LOOKUP_NO_FLAGS,
48
+ GA_LOOKUP_USE_WIDE_AREA,
49
+ GA_LOOKUP_USE_MULTICAST,
50
+ GA_LOOKUP_NO_TXT,
51
+ GA_LOOKUP_NO_ADDRESS,
52
+ }
53
+ enum LookupResultFlags {
54
+ GA_LOOKUP_RESULT_CACHED,
55
+ GA_LOOKUP_RESULT_WIDE_AREA,
56
+ GA_LOOKUP_RESULT_MULTICAST,
57
+ GA_LOOKUP_RESULT_LOCAL,
58
+ GA_LOOKUP_RESULT_OUR_OWN,
59
+ GA_LOOKUP_RESULT_STATIC,
60
+ }
61
+ enum Protocol {
62
+ GA_PROTOCOL_INET,
63
+ GA_PROTOCOL_INET6,
64
+ GA_PROTOCOL_UNSPEC,
65
+ }
66
+ enum ResolverEvent {
67
+ GA_RESOLVER_FOUND,
68
+ GA_RESOLVER_FAILURE,
69
+ }
70
+ function error_quark(): GLib.Quark;
71
+ module Client {
72
+ // Signal callback interfaces
73
+
74
+ interface StateChanged {
75
+ (object: ClientState): void;
76
+ }
77
+
78
+ // Constructor properties interface
79
+
80
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
81
+ flags: ClientFlags;
82
+ state: ClientState;
83
+ }
84
+ }
85
+
86
+ class Client extends GObject.Object {
87
+ static $gtype: GObject.GType<Client>;
88
+
89
+ // Own properties of Avahi.Client
90
+
91
+ get flags(): ClientFlags;
92
+ get state(): ClientState;
93
+
94
+ // Constructors of Avahi.Client
95
+
96
+ constructor(properties?: Partial<Client.ConstructorProps>, ...args: any[]);
97
+
98
+ _init(...args: any[]): void;
99
+
100
+ static ['new'](flags: ClientFlags): Client;
101
+
102
+ // Own signals of Avahi.Client
103
+
104
+ connect(id: string, callback: (...args: any[]) => any): number;
105
+ connect_after(id: string, callback: (...args: any[]) => any): number;
106
+ emit(id: string, ...args: any[]): void;
107
+ connect(signal: 'state-changed', callback: (_source: this, object: ClientState) => void): number;
108
+ connect_after(signal: 'state-changed', callback: (_source: this, object: ClientState) => void): number;
109
+ emit(signal: 'state-changed', object: ClientState): void;
110
+
111
+ // Own methods of Avahi.Client
112
+
113
+ start(): boolean;
114
+ start_in_context(context: GLib.MainContext): boolean;
115
+ }
116
+
117
+ module EntryGroup {
118
+ // Signal callback interfaces
119
+
120
+ interface StateChanged {
121
+ (object: EntryGroupState): void;
122
+ }
123
+
124
+ // Constructor properties interface
125
+
126
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
127
+ state: EntryGroupState;
128
+ }
129
+ }
130
+
131
+ class EntryGroup extends GObject.Object {
132
+ static $gtype: GObject.GType<EntryGroup>;
133
+
134
+ // Own properties of Avahi.EntryGroup
135
+
136
+ get state(): EntryGroupState;
137
+
138
+ // Constructors of Avahi.EntryGroup
139
+
140
+ constructor(properties?: Partial<EntryGroup.ConstructorProps>, ...args: any[]);
141
+
142
+ _init(...args: any[]): void;
143
+
144
+ static ['new'](): EntryGroup;
145
+
146
+ // Own signals of Avahi.EntryGroup
147
+
148
+ connect(id: string, callback: (...args: any[]) => any): number;
149
+ connect_after(id: string, callback: (...args: any[]) => any): number;
150
+ emit(id: string, ...args: any[]): void;
151
+ connect(signal: 'state-changed', callback: (_source: this, object: EntryGroupState) => void): number;
152
+ connect_after(signal: 'state-changed', callback: (_source: this, object: EntryGroupState) => void): number;
153
+ emit(signal: 'state-changed', object: EntryGroupState): void;
154
+
155
+ // Own methods of Avahi.EntryGroup
156
+
157
+ add_record(
158
+ flags: AvahiCore.PublishFlags,
159
+ name: string,
160
+ type: number,
161
+ ttl: number,
162
+ rdata: any | null,
163
+ size: number,
164
+ ): boolean;
165
+ add_record_full(
166
+ _interface: AvahiCore.IfIndex,
167
+ protocol: AvahiCore.Protocol,
168
+ flags: AvahiCore.PublishFlags,
169
+ name: string,
170
+ clazz: number,
171
+ type: number,
172
+ ttl: number,
173
+ rdata: any | null,
174
+ size: number,
175
+ ): boolean;
176
+ attach(client: Client): boolean;
177
+ commit(): boolean;
178
+ reset(): boolean;
179
+ }
180
+
181
+ module RecordBrowser {
182
+ // Signal callback interfaces
183
+
184
+ interface AllForNow {
185
+ (): void;
186
+ }
187
+
188
+ interface CacheExhausted {
189
+ (): void;
190
+ }
191
+
192
+ interface Failure {
193
+ (object?: any | null): void;
194
+ }
195
+
196
+ interface NewRecord {
197
+ (
198
+ object: number,
199
+ p0: Protocol,
200
+ p1: string,
201
+ p2: number,
202
+ p3: number,
203
+ p4: any | null,
204
+ p5: number,
205
+ p6: LookupResultFlags,
206
+ ): void;
207
+ }
208
+
209
+ interface RemovedRecord {
210
+ (
211
+ object: number,
212
+ p0: Protocol,
213
+ p1: string,
214
+ p2: number,
215
+ p3: number,
216
+ p4: any | null,
217
+ p5: number,
218
+ p6: LookupResultFlags,
219
+ ): void;
220
+ }
221
+
222
+ // Constructor properties interface
223
+
224
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
225
+ class: number;
226
+ flags: LookupFlags;
227
+ interface: number;
228
+ name: string;
229
+ protocol: Protocol;
230
+ type: number;
231
+ }
232
+ }
233
+
234
+ class RecordBrowser extends GObject.Object {
235
+ static $gtype: GObject.GType<RecordBrowser>;
236
+
237
+ // Own properties of Avahi.RecordBrowser
238
+
239
+ get class(): number;
240
+ set class(val: number);
241
+ get flags(): LookupFlags;
242
+ set flags(val: LookupFlags);
243
+ get interface(): number;
244
+ set interface(val: number);
245
+ get name(): string;
246
+ set name(val: string);
247
+ get protocol(): Protocol;
248
+ set protocol(val: Protocol);
249
+ get type(): number;
250
+ set type(val: number);
251
+
252
+ // Constructors of Avahi.RecordBrowser
253
+
254
+ constructor(properties?: Partial<RecordBrowser.ConstructorProps>, ...args: any[]);
255
+
256
+ _init(...args: any[]): void;
257
+
258
+ static ['new'](name: string, type: number): RecordBrowser;
259
+
260
+ static new_full(
261
+ _interface: AvahiCore.IfIndex,
262
+ protocol: AvahiCore.Protocol,
263
+ name: string,
264
+ clazz: number,
265
+ type: number,
266
+ flags: LookupFlags,
267
+ ): RecordBrowser;
268
+
269
+ // Own signals of Avahi.RecordBrowser
270
+
271
+ connect(id: string, callback: (...args: any[]) => any): number;
272
+ connect_after(id: string, callback: (...args: any[]) => any): number;
273
+ emit(id: string, ...args: any[]): void;
274
+ connect(signal: 'all-for-now', callback: (_source: this) => void): number;
275
+ connect_after(signal: 'all-for-now', callback: (_source: this) => void): number;
276
+ emit(signal: 'all-for-now'): void;
277
+ connect(signal: 'cache-exhausted', callback: (_source: this) => void): number;
278
+ connect_after(signal: 'cache-exhausted', callback: (_source: this) => void): number;
279
+ emit(signal: 'cache-exhausted'): void;
280
+ connect(signal: 'failure', callback: (_source: this, object: any | null) => void): number;
281
+ connect_after(signal: 'failure', callback: (_source: this, object: any | null) => void): number;
282
+ emit(signal: 'failure', object?: any | null): void;
283
+ connect(
284
+ signal: 'new-record',
285
+ callback: (
286
+ _source: this,
287
+ object: number,
288
+ p0: Protocol,
289
+ p1: string,
290
+ p2: number,
291
+ p3: number,
292
+ p4: any | null,
293
+ p5: number,
294
+ p6: LookupResultFlags,
295
+ ) => void,
296
+ ): number;
297
+ connect_after(
298
+ signal: 'new-record',
299
+ callback: (
300
+ _source: this,
301
+ object: number,
302
+ p0: Protocol,
303
+ p1: string,
304
+ p2: number,
305
+ p3: number,
306
+ p4: any | null,
307
+ p5: number,
308
+ p6: LookupResultFlags,
309
+ ) => void,
310
+ ): number;
311
+ emit(
312
+ signal: 'new-record',
313
+ object: number,
314
+ p0: Protocol,
315
+ p1: string,
316
+ p2: number,
317
+ p3: number,
318
+ p4: any | null,
319
+ p5: number,
320
+ p6: LookupResultFlags,
321
+ ): void;
322
+ connect(
323
+ signal: 'removed-record',
324
+ callback: (
325
+ _source: this,
326
+ object: number,
327
+ p0: Protocol,
328
+ p1: string,
329
+ p2: number,
330
+ p3: number,
331
+ p4: any | null,
332
+ p5: number,
333
+ p6: LookupResultFlags,
334
+ ) => void,
335
+ ): number;
336
+ connect_after(
337
+ signal: 'removed-record',
338
+ callback: (
339
+ _source: this,
340
+ object: number,
341
+ p0: Protocol,
342
+ p1: string,
343
+ p2: number,
344
+ p3: number,
345
+ p4: any | null,
346
+ p5: number,
347
+ p6: LookupResultFlags,
348
+ ) => void,
349
+ ): number;
350
+ emit(
351
+ signal: 'removed-record',
352
+ object: number,
353
+ p0: Protocol,
354
+ p1: string,
355
+ p2: number,
356
+ p3: number,
357
+ p4: any | null,
358
+ p5: number,
359
+ p6: LookupResultFlags,
360
+ ): void;
361
+
362
+ // Own methods of Avahi.RecordBrowser
363
+
364
+ attach(client: Client): boolean;
365
+ }
366
+
367
+ module ServiceBrowser {
368
+ // Signal callback interfaces
369
+
370
+ interface AllForNow {
371
+ (): void;
372
+ }
373
+
374
+ interface CacheExhausted {
375
+ (): void;
376
+ }
377
+
378
+ interface Failure {
379
+ (object?: any | null): void;
380
+ }
381
+
382
+ interface NewService {
383
+ (object: number, p0: Protocol, p1: string, p2: string, p3: string, p4: LookupResultFlags): void;
384
+ }
385
+
386
+ interface RemovedService {
387
+ (object: number, p0: Protocol, p1: string, p2: string, p3: string, p4: LookupResultFlags): void;
388
+ }
389
+
390
+ // Constructor properties interface
391
+
392
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
393
+ domain: string;
394
+ flags: LookupFlags;
395
+ interface: number;
396
+ protocol: Protocol;
397
+ type: string;
398
+ }
399
+ }
400
+
401
+ class ServiceBrowser extends GObject.Object {
402
+ static $gtype: GObject.GType<ServiceBrowser>;
403
+
404
+ // Own properties of Avahi.ServiceBrowser
405
+
406
+ get domain(): string;
407
+ set domain(val: string);
408
+ get flags(): LookupFlags;
409
+ set flags(val: LookupFlags);
410
+ get interface(): number;
411
+ set interface(val: number);
412
+ get protocol(): Protocol;
413
+ set protocol(val: Protocol);
414
+ get type(): string;
415
+ set type(val: string);
416
+
417
+ // Constructors of Avahi.ServiceBrowser
418
+
419
+ constructor(properties?: Partial<ServiceBrowser.ConstructorProps>, ...args: any[]);
420
+
421
+ _init(...args: any[]): void;
422
+
423
+ static ['new'](type: string): ServiceBrowser;
424
+
425
+ static new_full(
426
+ _interface: AvahiCore.IfIndex,
427
+ protocol: AvahiCore.Protocol,
428
+ type: string,
429
+ domain: string,
430
+ flags: LookupFlags,
431
+ ): ServiceBrowser;
432
+
433
+ // Own signals of Avahi.ServiceBrowser
434
+
435
+ connect(id: string, callback: (...args: any[]) => any): number;
436
+ connect_after(id: string, callback: (...args: any[]) => any): number;
437
+ emit(id: string, ...args: any[]): void;
438
+ connect(signal: 'all-for-now', callback: (_source: this) => void): number;
439
+ connect_after(signal: 'all-for-now', callback: (_source: this) => void): number;
440
+ emit(signal: 'all-for-now'): void;
441
+ connect(signal: 'cache-exhausted', callback: (_source: this) => void): number;
442
+ connect_after(signal: 'cache-exhausted', callback: (_source: this) => void): number;
443
+ emit(signal: 'cache-exhausted'): void;
444
+ connect(signal: 'failure', callback: (_source: this, object: any | null) => void): number;
445
+ connect_after(signal: 'failure', callback: (_source: this, object: any | null) => void): number;
446
+ emit(signal: 'failure', object?: any | null): void;
447
+ connect(
448
+ signal: 'new-service',
449
+ callback: (
450
+ _source: this,
451
+ object: number,
452
+ p0: Protocol,
453
+ p1: string,
454
+ p2: string,
455
+ p3: string,
456
+ p4: LookupResultFlags,
457
+ ) => void,
458
+ ): number;
459
+ connect_after(
460
+ signal: 'new-service',
461
+ callback: (
462
+ _source: this,
463
+ object: number,
464
+ p0: Protocol,
465
+ p1: string,
466
+ p2: string,
467
+ p3: string,
468
+ p4: LookupResultFlags,
469
+ ) => void,
470
+ ): number;
471
+ emit(
472
+ signal: 'new-service',
473
+ object: number,
474
+ p0: Protocol,
475
+ p1: string,
476
+ p2: string,
477
+ p3: string,
478
+ p4: LookupResultFlags,
479
+ ): void;
480
+ connect(
481
+ signal: 'removed-service',
482
+ callback: (
483
+ _source: this,
484
+ object: number,
485
+ p0: Protocol,
486
+ p1: string,
487
+ p2: string,
488
+ p3: string,
489
+ p4: LookupResultFlags,
490
+ ) => void,
491
+ ): number;
492
+ connect_after(
493
+ signal: 'removed-service',
494
+ callback: (
495
+ _source: this,
496
+ object: number,
497
+ p0: Protocol,
498
+ p1: string,
499
+ p2: string,
500
+ p3: string,
501
+ p4: LookupResultFlags,
502
+ ) => void,
503
+ ): number;
504
+ emit(
505
+ signal: 'removed-service',
506
+ object: number,
507
+ p0: Protocol,
508
+ p1: string,
509
+ p2: string,
510
+ p3: string,
511
+ p4: LookupResultFlags,
512
+ ): void;
513
+
514
+ // Own methods of Avahi.ServiceBrowser
515
+
516
+ attach(client: Client): boolean;
517
+ }
518
+
519
+ module ServiceResolver {
520
+ // Signal callback interfaces
521
+
522
+ interface Failure {
523
+ (object?: any | null): void;
524
+ }
525
+
526
+ interface Found {
527
+ (
528
+ object: number,
529
+ p0: Protocol,
530
+ p1: string,
531
+ p2: string,
532
+ p3: string,
533
+ p4: string,
534
+ p5: any | null,
535
+ p6: number,
536
+ p7: any | null,
537
+ p8: LookupResultFlags,
538
+ ): void;
539
+ }
540
+
541
+ // Constructor properties interface
542
+
543
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
544
+ aprotocol: Protocol;
545
+ domain: string;
546
+ flags: LookupFlags;
547
+ interface: number;
548
+ name: string;
549
+ protocol: Protocol;
550
+ type: string;
551
+ }
552
+ }
553
+
554
+ class ServiceResolver extends GObject.Object {
555
+ static $gtype: GObject.GType<ServiceResolver>;
556
+
557
+ // Own properties of Avahi.ServiceResolver
558
+
559
+ get aprotocol(): Protocol;
560
+ set aprotocol(val: Protocol);
561
+ get domain(): string;
562
+ set domain(val: string);
563
+ get flags(): LookupFlags;
564
+ set flags(val: LookupFlags);
565
+ get interface(): number;
566
+ set interface(val: number);
567
+ get name(): string;
568
+ set name(val: string);
569
+ get protocol(): Protocol;
570
+ set protocol(val: Protocol);
571
+ get type(): string;
572
+ set type(val: string);
573
+
574
+ // Constructors of Avahi.ServiceResolver
575
+
576
+ constructor(properties?: Partial<ServiceResolver.ConstructorProps>, ...args: any[]);
577
+
578
+ _init(...args: any[]): void;
579
+
580
+ static ['new'](
581
+ _interface: AvahiCore.IfIndex,
582
+ protocol: AvahiCore.Protocol,
583
+ name: string,
584
+ type: string,
585
+ domain: string,
586
+ address_protocol: AvahiCore.Protocol,
587
+ flags: LookupFlags,
588
+ ): ServiceResolver;
589
+
590
+ // Own signals of Avahi.ServiceResolver
591
+
592
+ connect(id: string, callback: (...args: any[]) => any): number;
593
+ connect_after(id: string, callback: (...args: any[]) => any): number;
594
+ emit(id: string, ...args: any[]): void;
595
+ connect(signal: 'failure', callback: (_source: this, object: any | null) => void): number;
596
+ connect_after(signal: 'failure', callback: (_source: this, object: any | null) => void): number;
597
+ emit(signal: 'failure', object?: any | null): void;
598
+ connect(
599
+ signal: 'found',
600
+ callback: (
601
+ _source: this,
602
+ object: number,
603
+ p0: Protocol,
604
+ p1: string,
605
+ p2: string,
606
+ p3: string,
607
+ p4: string,
608
+ p5: any | null,
609
+ p6: number,
610
+ p7: any | null,
611
+ p8: LookupResultFlags,
612
+ ) => void,
613
+ ): number;
614
+ connect_after(
615
+ signal: 'found',
616
+ callback: (
617
+ _source: this,
618
+ object: number,
619
+ p0: Protocol,
620
+ p1: string,
621
+ p2: string,
622
+ p3: string,
623
+ p4: string,
624
+ p5: any | null,
625
+ p6: number,
626
+ p7: any | null,
627
+ p8: LookupResultFlags,
628
+ ) => void,
629
+ ): number;
630
+ emit(
631
+ signal: 'found',
632
+ object: number,
633
+ p0: Protocol,
634
+ p1: string,
635
+ p2: string,
636
+ p3: string,
637
+ p4: string,
638
+ p5: any | null,
639
+ p6: number,
640
+ p7: any | null,
641
+ p8: LookupResultFlags,
642
+ ): void;
643
+
644
+ // Own methods of Avahi.ServiceResolver
645
+
646
+ attach(client: Client): boolean;
647
+ get_address(address: AvahiCore.Address, port: number): boolean;
648
+ }
649
+
650
+ type ClientClass = typeof Client;
651
+ type EntryGroupClass = typeof EntryGroup;
652
+ class EntryGroupService {
653
+ static $gtype: GObject.GType<EntryGroupService>;
654
+
655
+ // Own fields of Avahi.EntryGroupService
656
+
657
+ 'interface': AvahiCore.IfIndex;
658
+ protocol: AvahiCore.Protocol;
659
+ flags: AvahiCore.PublishFlags;
660
+ name: string;
661
+ type: string;
662
+ domain: string;
663
+ host: string;
664
+ port: number;
665
+
666
+ // Constructors of Avahi.EntryGroupService
667
+
668
+ _init(...args: any[]): void;
669
+
670
+ // Own methods of Avahi.EntryGroupService
671
+
672
+ freeze(): void;
673
+ remove_key(key: string): boolean;
674
+ set(key: string, value: string): boolean;
675
+ set_arbitrary(key: string, value: number, size: number): boolean;
676
+ thaw(): boolean;
677
+ }
678
+
679
+ type RecordBrowserClass = typeof RecordBrowser;
680
+ type ServiceBrowserClass = typeof ServiceBrowser;
681
+ type ServiceResolverClass = typeof ServiceResolver;
682
+ /**
683
+ * Name of the imported GIR library
684
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
685
+ */
686
+ const __name__: string;
687
+ /**
688
+ * Version of the imported GIR library
689
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
690
+ */
691
+ const __version__: string;
692
+ }
693
+
694
+ export default Avahi;
695
+ // END
package/avahi-0.6.js ADDED
@@ -0,0 +1,6 @@
1
+
2
+ // @ts-expect-error
3
+ import Avahi from 'gi://Avahi?version=0.6';
4
+ export { Avahi };
5
+ export default Avahi;
6
+
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "@girs/avahi-0.6",
3
+ "version": "0.6.0-4.0.0",
4
+ "description": "GJS TypeScript type definitions for Avahi-0.6, generated from library version 0.6.0",
5
+ "type": "module",
6
+ "module": "avahi-0.6.js",
7
+ "main": "avahi-0.6.js",
8
+ "exports": {
9
+ "./ambient": {
10
+ "types": "./avahi-0.6-ambient.d.ts",
11
+ "import": "./avahi-0.6-ambient.js",
12
+ "default": "./avahi-0.6-ambient.js"
13
+ },
14
+ "./import": {
15
+ "types": "./avahi-0.6-import.d.ts",
16
+ "import": "./avahi-0.6-import.js",
17
+ "default": "./avahi-0.6-import.js"
18
+ },
19
+ ".": {
20
+ "types": "./avahi-0.6.d.ts",
21
+ "import": "./avahi-0.6.js",
22
+ "default": "./avahi-0.6.js"
23
+ }
24
+ },
25
+ "scripts": {
26
+ "test": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit avahi-0.6.d.ts"
27
+ },
28
+ "dependencies": {
29
+ "@girs/avahicore-0.6": "^0.6.0-4.0.0",
30
+ "@girs/gjs": "^4.0.0-beta.1",
31
+ "@girs/glib-2.0": "^2.77.0-4.0.0-beta.1",
32
+ "@girs/gobject-2.0": "^2.77.0-4.0.0-beta.1"
33
+ },
34
+ "devDependencies": {
35
+ "typescript": "*"
36
+ },
37
+ "keywords": [
38
+ "Gir",
39
+ "TypeScript",
40
+ "types",
41
+ "GObject-Introspection",
42
+ "GJS",
43
+ "Avahi-0.6"
44
+ ],
45
+ "author": "ts-for-gir",
46
+ "license": "MIT",
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "git+https://github.com/gjsify/ts-for-gir.git"
50
+ },
51
+ "bugs": {
52
+ "url": "https://github.com/gjsify/ts-for-gir/issues"
53
+ },
54
+ "homepage": "https://github.com/gjsify/types/tree/main/avahi-0.6#readme"
55
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ // General settings for code interpretation
4
+ "target": "ESNext",
5
+ "module": "ESNext",
6
+ "lib": ["ESNext"],
7
+ "types": [],
8
+ "experimentalDecorators": true,
9
+ "moduleResolution": "node",
10
+ "noEmit": true,
11
+ "noEmitOnError": false,
12
+ "baseUrl": "./",
13
+ "rootDir": ".",
14
+ // General settings for code generation
15
+ "removeComments": false,
16
+ "inlineSourceMap": false,
17
+ "inlineSources": false,
18
+ "newLine": "LF"
19
+ },
20
+ "include": ["./avahi-0.6.d.ts"]
21
+ }
22
+
23
+
package/typedoc.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "entryPoints": ["./avahi-0.6.d.ts"],
3
+ "readme": "./README.md",
4
+ "name": "Avahi-0.6",
5
+ "tsconfig": "./tsconfig.json"
6
+ }
7
+