@girs/dmap-3.0 3.0.0-4.0.0-beta.21 → 3.0.0-4.0.0-beta.24

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/dmap-3.0.d.ts +219 -101
  3. package/package.json +7 -7
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/dmap-3.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for DMAP-3.0, generated from library version 3.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.21.
8
+ GJS TypeScript type definitions for DMAP-3.0, generated from library version 3.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.24.
9
9
 
10
10
 
11
11
  ## Install
package/dmap-3.0.d.ts CHANGED
@@ -7,6 +7,8 @@
7
7
  * The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
8
8
  */
9
9
 
10
+ import '@girs/gjs';
11
+
10
12
  // Module dependencies
11
13
  import type Soup from '@girs/soup-2.4';
12
14
  import type Gio from '@girs/gio-2.0';
@@ -314,26 +316,31 @@ export namespace DMAP {
314
316
  (connection: Connection, status: number, structure: GLib.Node): void;
315
317
  }
316
318
  namespace Connection {
317
- // Signal callback interfaces
318
-
319
- interface Authenticate {
320
- (object: string, p0: Soup.Session, p1: Soup.Message, p2: Soup.Auth, p3: boolean): void;
321
- }
322
-
323
- interface Connected {
324
- (): void;
325
- }
326
-
327
- interface Connecting {
328
- (object: number, p0: number): void;
329
- }
330
-
331
- interface Disconnected {
332
- (): void;
333
- }
334
-
335
- interface OperationDone {
336
- (): void;
319
+ // Signal signatures
320
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
321
+ authenticate: (
322
+ arg0: string,
323
+ arg1: Soup.Session,
324
+ arg2: Soup.Message,
325
+ arg3: Soup.Auth,
326
+ arg4: boolean,
327
+ ) => void;
328
+ connected: () => void;
329
+ connecting: (arg0: number, arg1: number) => void;
330
+ disconnected: () => void;
331
+ 'operation-done': () => void;
332
+ 'notify::base-uri': (pspec: GObject.ParamSpec) => void;
333
+ 'notify::database-id': (pspec: GObject.ParamSpec) => void;
334
+ 'notify::db': (pspec: GObject.ParamSpec) => void;
335
+ 'notify::dmap-version': (pspec: GObject.ParamSpec) => void;
336
+ 'notify::factory': (pspec: GObject.ParamSpec) => void;
337
+ 'notify::host': (pspec: GObject.ParamSpec) => void;
338
+ 'notify::name': (pspec: GObject.ParamSpec) => void;
339
+ 'notify::password': (pspec: GObject.ParamSpec) => void;
340
+ 'notify::port': (pspec: GObject.ParamSpec) => void;
341
+ 'notify::revision-number': (pspec: GObject.ParamSpec) => void;
342
+ 'notify::session-id': (pspec: GObject.ParamSpec) => void;
343
+ 'notify::username': (pspec: GObject.ParamSpec) => void;
337
344
  }
338
345
 
339
346
  // Constructor properties interface
@@ -392,6 +399,15 @@ export namespace DMAP {
392
399
  set sessionId(val: number);
393
400
  get username(): string;
394
401
 
402
+ /**
403
+ * Compile-time signal type information.
404
+ *
405
+ * This instance property is generated only for TypeScript type checking.
406
+ * It is not defined at runtime and should not be accessed in JS code.
407
+ * @internal
408
+ */
409
+ $signals: Connection.SignalSignatures;
410
+
395
411
  // Constructors
396
412
 
397
413
  constructor(properties?: Partial<Connection.ConstructorProps>, ...args: any[]);
@@ -400,51 +416,21 @@ export namespace DMAP {
400
416
 
401
417
  // Signals
402
418
 
403
- connect(id: string, callback: (...args: any[]) => any): number;
404
- connect_after(id: string, callback: (...args: any[]) => any): number;
405
- emit(id: string, ...args: any[]): void;
406
- connect(
407
- signal: 'authenticate',
408
- callback: (
409
- _source: this,
410
- object: string,
411
- p0: Soup.Session,
412
- p1: Soup.Message,
413
- p2: Soup.Auth,
414
- p3: boolean,
415
- ) => void,
419
+ connect<K extends keyof Connection.SignalSignatures>(
420
+ signal: K,
421
+ callback: GObject.SignalCallback<this, Connection.SignalSignatures[K]>,
416
422
  ): number;
417
- connect_after(
418
- signal: 'authenticate',
419
- callback: (
420
- _source: this,
421
- object: string,
422
- p0: Soup.Session,
423
- p1: Soup.Message,
424
- p2: Soup.Auth,
425
- p3: boolean,
426
- ) => void,
423
+ connect(signal: string, callback: (...args: any[]) => any): number;
424
+ connect_after<K extends keyof Connection.SignalSignatures>(
425
+ signal: K,
426
+ callback: GObject.SignalCallback<this, Connection.SignalSignatures[K]>,
427
427
  ): number;
428
- emit(
429
- signal: 'authenticate',
430
- object: string,
431
- p0: Soup.Session,
432
- p1: Soup.Message,
433
- p2: Soup.Auth,
434
- p3: boolean,
428
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
429
+ emit<K extends keyof Connection.SignalSignatures>(
430
+ signal: K,
431
+ ...args: GObject.GjsParameters<Connection.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
435
432
  ): void;
436
- connect(signal: 'connected', callback: (_source: this) => void): number;
437
- connect_after(signal: 'connected', callback: (_source: this) => void): number;
438
- emit(signal: 'connected'): void;
439
- connect(signal: 'connecting', callback: (_source: this, object: number, p0: number) => void): number;
440
- connect_after(signal: 'connecting', callback: (_source: this, object: number, p0: number) => void): number;
441
- emit(signal: 'connecting', object: number, p0: number): void;
442
- connect(signal: 'disconnected', callback: (_source: this) => void): number;
443
- connect_after(signal: 'disconnected', callback: (_source: this) => void): number;
444
- emit(signal: 'disconnected'): void;
445
- connect(signal: 'operation-done', callback: (_source: this) => void): number;
446
- connect_after(signal: 'operation-done', callback: (_source: this) => void): number;
447
- emit(signal: 'operation-done'): void;
433
+ emit(signal: string, ...args: any[]): void;
448
434
 
449
435
  // Virtual methods
450
436
 
@@ -476,6 +462,9 @@ export namespace DMAP {
476
462
  }
477
463
 
478
464
  namespace GstInputStream {
465
+ // Signal signatures
466
+ interface SignalSignatures extends Gio.InputStream.SignalSignatures {}
467
+
479
468
  // Constructor properties interface
480
469
 
481
470
  interface ConstructorProps extends Gio.InputStream.ConstructorProps, Gio.Seekable.ConstructorProps {}
@@ -484,6 +473,15 @@ export namespace DMAP {
484
473
  class GstInputStream extends Gio.InputStream implements Gio.Seekable {
485
474
  static $gtype: GObject.GType<GstInputStream>;
486
475
 
476
+ /**
477
+ * Compile-time signal type information.
478
+ *
479
+ * This instance property is generated only for TypeScript type checking.
480
+ * It is not defined at runtime and should not be accessed in JS code.
481
+ * @internal
482
+ */
483
+ $signals: GstInputStream.SignalSignatures;
484
+
487
485
  // Constructors
488
486
 
489
487
  constructor(properties?: Partial<GstInputStream.ConstructorProps>, ...args: any[]);
@@ -492,6 +490,24 @@ export namespace DMAP {
492
490
 
493
491
  static ['new'](transcode_mimetype: string, src_stream: Gio.InputStream): GstInputStream;
494
492
 
493
+ // Signals
494
+
495
+ connect<K extends keyof GstInputStream.SignalSignatures>(
496
+ signal: K,
497
+ callback: GObject.SignalCallback<this, GstInputStream.SignalSignatures[K]>,
498
+ ): number;
499
+ connect(signal: string, callback: (...args: any[]) => any): number;
500
+ connect_after<K extends keyof GstInputStream.SignalSignatures>(
501
+ signal: K,
502
+ callback: GObject.SignalCallback<this, GstInputStream.SignalSignatures[K]>,
503
+ ): number;
504
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
505
+ emit<K extends keyof GstInputStream.SignalSignatures>(
506
+ signal: K,
507
+ ...args: GObject.GjsParameters<GstInputStream.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
508
+ ): void;
509
+ emit(signal: string, ...args: any[]): void;
510
+
495
511
  // Virtual methods
496
512
 
497
513
  vfunc_kill_pipeline(): void;
@@ -713,7 +729,21 @@ export namespace DMAP {
713
729
  * @returns the data if found, or %NULL if no such data exists.
714
730
  */
715
731
  get_data(key: string): any | null;
716
- get_property(property_name: string): any;
732
+ /**
733
+ * Gets a property of an object.
734
+ *
735
+ * The value can be:
736
+ * - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
737
+ * - a GObject.Value initialized with the expected type of the property
738
+ * - a GObject.Value initialized with a type to which the expected type of the property can be transformed
739
+ *
740
+ * In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
741
+ *
742
+ * Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
743
+ * @param property_name The name of the property to get
744
+ * @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
745
+ */
746
+ get_property(property_name: string, value: GObject.Value | any): any;
717
747
  /**
718
748
  * This function gets back user data pointers stored via
719
749
  * g_object_set_qdata().
@@ -841,7 +871,12 @@ export namespace DMAP {
841
871
  * @param data data to associate with that key
842
872
  */
843
873
  set_data(key: string, data?: any | null): void;
844
- set_property(property_name: string, value: any): void;
874
+ /**
875
+ * Sets a property on an object.
876
+ * @param property_name The name of the property to set
877
+ * @param value The value to set the property to
878
+ */
879
+ set_property(property_name: string, value: GObject.Value | any): void;
845
880
  /**
846
881
  * Remove a specified datum from the object's data associations,
847
882
  * without invoking the association's destroy handler.
@@ -991,22 +1026,38 @@ export namespace DMAP {
991
1026
  * @param pspec
992
1027
  */
993
1028
  vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
1029
+ /**
1030
+ * Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
1031
+ * @param id Handler ID of the handler to be disconnected
1032
+ */
994
1033
  disconnect(id: number): void;
1034
+ /**
1035
+ * Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
1036
+ * @param properties Object containing the properties to set
1037
+ */
995
1038
  set(properties: { [key: string]: any }): void;
996
- block_signal_handler(id: number): any;
997
- unblock_signal_handler(id: number): any;
998
- stop_emission_by_name(detailedName: string): any;
1039
+ /**
1040
+ * Blocks a handler of an instance so it will not be called during any signal emissions
1041
+ * @param id Handler ID of the handler to be blocked
1042
+ */
1043
+ block_signal_handler(id: number): void;
1044
+ /**
1045
+ * Unblocks a handler so it will be called again during any signal emissions
1046
+ * @param id Handler ID of the handler to be unblocked
1047
+ */
1048
+ unblock_signal_handler(id: number): void;
1049
+ /**
1050
+ * Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
1051
+ * @param detailedName Name of the signal to stop emission of
1052
+ */
1053
+ stop_emission_by_name(detailedName: string): void;
999
1054
  }
1000
1055
 
1001
1056
  namespace MdnsBrowser {
1002
- // Signal callback interfaces
1003
-
1004
- interface ServiceAdded {
1005
- (service: any): void;
1006
- }
1007
-
1008
- interface ServiceRemoved {
1009
- (object: string): void;
1057
+ // Signal signatures
1058
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
1059
+ 'service-added': (arg0: any) => void;
1060
+ 'service-removed': (arg0: string) => void;
1010
1061
  }
1011
1062
 
1012
1063
  // Constructor properties interface
@@ -1017,6 +1068,15 @@ export namespace DMAP {
1017
1068
  class MdnsBrowser extends GObject.Object {
1018
1069
  static $gtype: GObject.GType<MdnsBrowser>;
1019
1070
 
1071
+ /**
1072
+ * Compile-time signal type information.
1073
+ *
1074
+ * This instance property is generated only for TypeScript type checking.
1075
+ * It is not defined at runtime and should not be accessed in JS code.
1076
+ * @internal
1077
+ */
1078
+ $signals: MdnsBrowser.SignalSignatures;
1079
+
1020
1080
  // Fields
1021
1081
 
1022
1082
  object: GObject.Object;
@@ -1031,15 +1091,21 @@ export namespace DMAP {
1031
1091
 
1032
1092
  // Signals
1033
1093
 
1034
- connect(id: string, callback: (...args: any[]) => any): number;
1035
- connect_after(id: string, callback: (...args: any[]) => any): number;
1036
- emit(id: string, ...args: any[]): void;
1037
- connect(signal: 'service-added', callback: (_source: this, service: any) => void): number;
1038
- connect_after(signal: 'service-added', callback: (_source: this, service: any) => void): number;
1039
- emit(signal: 'service-added', service: any): void;
1040
- connect(signal: 'service-removed', callback: (_source: this, object: string) => void): number;
1041
- connect_after(signal: 'service-removed', callback: (_source: this, object: string) => void): number;
1042
- emit(signal: 'service-removed', object: string): void;
1094
+ connect<K extends keyof MdnsBrowser.SignalSignatures>(
1095
+ signal: K,
1096
+ callback: GObject.SignalCallback<this, MdnsBrowser.SignalSignatures[K]>,
1097
+ ): number;
1098
+ connect(signal: string, callback: (...args: any[]) => any): number;
1099
+ connect_after<K extends keyof MdnsBrowser.SignalSignatures>(
1100
+ signal: K,
1101
+ callback: GObject.SignalCallback<this, MdnsBrowser.SignalSignatures[K]>,
1102
+ ): number;
1103
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1104
+ emit<K extends keyof MdnsBrowser.SignalSignatures>(
1105
+ signal: K,
1106
+ ...args: GObject.GjsParameters<MdnsBrowser.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
1107
+ ): void;
1108
+ emit(signal: string, ...args: any[]): void;
1043
1109
 
1044
1110
  // Virtual methods
1045
1111
 
@@ -1062,14 +1128,10 @@ export namespace DMAP {
1062
1128
  }
1063
1129
 
1064
1130
  namespace MdnsPublisher {
1065
- // Signal callback interfaces
1066
-
1067
- interface NameCollision {
1068
- (object: string): void;
1069
- }
1070
-
1071
- interface Published {
1072
- (object: string): void;
1131
+ // Signal signatures
1132
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
1133
+ 'name-collision': (arg0: string) => void;
1134
+ published: (arg0: string) => void;
1073
1135
  }
1074
1136
 
1075
1137
  // Constructor properties interface
@@ -1080,6 +1142,15 @@ export namespace DMAP {
1080
1142
  class MdnsPublisher extends GObject.Object {
1081
1143
  static $gtype: GObject.GType<MdnsPublisher>;
1082
1144
 
1145
+ /**
1146
+ * Compile-time signal type information.
1147
+ *
1148
+ * This instance property is generated only for TypeScript type checking.
1149
+ * It is not defined at runtime and should not be accessed in JS code.
1150
+ * @internal
1151
+ */
1152
+ $signals: MdnsPublisher.SignalSignatures;
1153
+
1083
1154
  // Fields
1084
1155
 
1085
1156
  object: GObject.Object;
@@ -1094,15 +1165,21 @@ export namespace DMAP {
1094
1165
 
1095
1166
  // Signals
1096
1167
 
1097
- connect(id: string, callback: (...args: any[]) => any): number;
1098
- connect_after(id: string, callback: (...args: any[]) => any): number;
1099
- emit(id: string, ...args: any[]): void;
1100
- connect(signal: 'name-collision', callback: (_source: this, object: string) => void): number;
1101
- connect_after(signal: 'name-collision', callback: (_source: this, object: string) => void): number;
1102
- emit(signal: 'name-collision', object: string): void;
1103
- connect(signal: 'published', callback: (_source: this, object: string) => void): number;
1104
- connect_after(signal: 'published', callback: (_source: this, object: string) => void): number;
1105
- emit(signal: 'published', object: string): void;
1168
+ connect<K extends keyof MdnsPublisher.SignalSignatures>(
1169
+ signal: K,
1170
+ callback: GObject.SignalCallback<this, MdnsPublisher.SignalSignatures[K]>,
1171
+ ): number;
1172
+ connect(signal: string, callback: (...args: any[]) => any): number;
1173
+ connect_after<K extends keyof MdnsPublisher.SignalSignatures>(
1174
+ signal: K,
1175
+ callback: GObject.SignalCallback<this, MdnsPublisher.SignalSignatures[K]>,
1176
+ ): number;
1177
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1178
+ emit<K extends keyof MdnsPublisher.SignalSignatures>(
1179
+ signal: K,
1180
+ ...args: GObject.GjsParameters<MdnsPublisher.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
1181
+ ): void;
1182
+ emit(signal: string, ...args: any[]): void;
1106
1183
 
1107
1184
  // Virtual methods
1108
1185
 
@@ -1123,6 +1200,20 @@ export namespace DMAP {
1123
1200
  }
1124
1201
 
1125
1202
  namespace Share {
1203
+ // Signal signatures
1204
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
1205
+ 'notify::auth-method': (pspec: GObject.ParamSpec) => void;
1206
+ 'notify::container-db': (pspec: GObject.ParamSpec) => void;
1207
+ 'notify::db': (pspec: GObject.ParamSpec) => void;
1208
+ 'notify::name': (pspec: GObject.ParamSpec) => void;
1209
+ 'notify::password': (pspec: GObject.ParamSpec) => void;
1210
+ 'notify::revision-number': (pspec: GObject.ParamSpec) => void;
1211
+ 'notify::server-ipv4': (pspec: GObject.ParamSpec) => void;
1212
+ 'notify::server-ipv6': (pspec: GObject.ParamSpec) => void;
1213
+ 'notify::transcode-mimetype': (pspec: GObject.ParamSpec) => void;
1214
+ 'notify::txt-records': (pspec: GObject.ParamSpec) => void;
1215
+ }
1216
+
1126
1217
  // Constructor properties interface
1127
1218
 
1128
1219
  interface ConstructorProps extends GObject.Object.ConstructorProps {
@@ -1177,12 +1268,39 @@ export namespace DMAP {
1177
1268
  get txtRecords(): string[];
1178
1269
  set txtRecords(val: string[]);
1179
1270
 
1271
+ /**
1272
+ * Compile-time signal type information.
1273
+ *
1274
+ * This instance property is generated only for TypeScript type checking.
1275
+ * It is not defined at runtime and should not be accessed in JS code.
1276
+ * @internal
1277
+ */
1278
+ $signals: Share.SignalSignatures;
1279
+
1180
1280
  // Constructors
1181
1281
 
1182
1282
  constructor(properties?: Partial<Share.ConstructorProps>, ...args: any[]);
1183
1283
 
1184
1284
  _init(...args: any[]): void;
1185
1285
 
1286
+ // Signals
1287
+
1288
+ connect<K extends keyof Share.SignalSignatures>(
1289
+ signal: K,
1290
+ callback: GObject.SignalCallback<this, Share.SignalSignatures[K]>,
1291
+ ): number;
1292
+ connect(signal: string, callback: (...args: any[]) => any): number;
1293
+ connect_after<K extends keyof Share.SignalSignatures>(
1294
+ signal: K,
1295
+ callback: GObject.SignalCallback<this, Share.SignalSignatures[K]>,
1296
+ ): number;
1297
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1298
+ emit<K extends keyof Share.SignalSignatures>(
1299
+ signal: K,
1300
+ ...args: GObject.GjsParameters<Share.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
1301
+ ): void;
1302
+ emit(signal: string, ...args: any[]): void;
1303
+
1186
1304
  // Virtual methods
1187
1305
 
1188
1306
  vfunc_content_codes(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/dmap-3.0",
3
- "version": "3.0.0-4.0.0-beta.21",
3
+ "version": "3.0.0-4.0.0-beta.24",
4
4
  "description": "GJS TypeScript type definitions for DMAP-3.0, generated from library version 3.0.0",
5
5
  "type": "module",
6
6
  "module": "dmap-3.0.js",
@@ -31,12 +31,12 @@
31
31
  "test": "tsc --project tsconfig.json"
32
32
  },
33
33
  "dependencies": {
34
- "@girs/gio-2.0": "^2.83.3-4.0.0-beta.21",
35
- "@girs/gjs": "^4.0.0-beta.21",
36
- "@girs/glib-2.0": "^2.83.3-4.0.0-beta.21",
37
- "@girs/gmodule-2.0": "^2.0.0-4.0.0-beta.21",
38
- "@girs/gobject-2.0": "^2.83.3-4.0.0-beta.21",
39
- "@girs/soup-2.4": "^2.74.3-4.0.0-beta.21"
34
+ "@girs/gio-2.0": "^2.84.2-4.0.0-beta.24",
35
+ "@girs/gjs": "^4.0.0-beta.24",
36
+ "@girs/glib-2.0": "^2.84.2-4.0.0-beta.24",
37
+ "@girs/gmodule-2.0": "^2.0.0-4.0.0-beta.24",
38
+ "@girs/gobject-2.0": "^2.84.2-4.0.0-beta.24",
39
+ "@girs/soup-2.4": "^2.74.3-4.0.0-beta.24"
40
40
  },
41
41
  "devDependencies": {
42
42
  "typescript": "*"