@girs/dmap-4.0 4.0.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/dmap-4.0.d.ts ADDED
@@ -0,0 +1,2295 @@
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 './dmap-4.0-ambient.d.ts';
9
+
10
+ /**
11
+ * Dmap-4.0
12
+ */
13
+
14
+ import type Soup from '@girs/soup-3.0';
15
+ import type Gio from '@girs/gio-2.0';
16
+ import type GObject from '@girs/gobject-2.0';
17
+ import type GLib from '@girs/glib-2.0';
18
+ import type Gst from '@girs/gst-1.0';
19
+ import type GModule from '@girs/gmodule-2.0';
20
+
21
+ export namespace Dmap {
22
+ /**
23
+ * Enumeration of connection states.
24
+ */
25
+ enum ConnectionState {
26
+ /**
27
+ * getting DMAP server information
28
+ */
29
+ GET_INFO,
30
+ /**
31
+ * logging in to DMAP server
32
+ */
33
+ LOGIN,
34
+ /**
35
+ * getting server's database revision number
36
+ */
37
+ GET_REVISION_NUMBER,
38
+ /**
39
+ * getting DMAP database information
40
+ */
41
+ GET_DB_INFO,
42
+ /**
43
+ * getting DMAP media listing
44
+ */
45
+ GET_MEDIA,
46
+ /**
47
+ * getting DMAP playlists
48
+ */
49
+ GET_PLAYLISTS,
50
+ /**
51
+ * getting entries in playlist
52
+ */
53
+ GET_PLAYLIST_ENTRIES,
54
+ /**
55
+ * logging out of DMAP server
56
+ */
57
+ LOGOUT,
58
+ /**
59
+ * done
60
+ */
61
+ DONE,
62
+ }
63
+ enum ContentCode {
64
+ CC_INVALID,
65
+ RAW,
66
+ CC_MDCL,
67
+ CC_MEDS,
68
+ CC_MSTT,
69
+ CC_MIID,
70
+ CC_MINM,
71
+ CC_MIKD,
72
+ CC_MPER,
73
+ CC_MCON,
74
+ CC_MCTI,
75
+ CC_MPCO,
76
+ CC_MSTS,
77
+ CC_MIMC,
78
+ CC_MCTC,
79
+ CC_MRCO,
80
+ CC_MTCO,
81
+ CC_MLCL,
82
+ CC_MLIT,
83
+ CC_MBCL,
84
+ CC_MSRV,
85
+ CC_MSAU,
86
+ CC_MSLR,
87
+ CC_MPRO,
88
+ CC_MSAL,
89
+ CC_MSUP,
90
+ CC_MSPI,
91
+ CC_MSEX,
92
+ CC_MSBR,
93
+ CC_MSQY,
94
+ CC_MSIX,
95
+ CC_MSRS,
96
+ CC_MSTM,
97
+ CC_MSDC,
98
+ CC_MCCR,
99
+ CC_MCNM,
100
+ CC_MCNA,
101
+ CC_MCTY,
102
+ CC_MLOG,
103
+ CC_MLID,
104
+ CC_MUPD,
105
+ CC_MUSR,
106
+ CC_MUTY,
107
+ CC_MUDL,
108
+ CC_MSMA,
109
+ CC_FQUESCH,
110
+ CC_MDBK,
111
+ CC_APRO,
112
+ CC_AVDB,
113
+ CC_ABRO,
114
+ CC_ABAL,
115
+ CC_ABAR,
116
+ CC_ABCP,
117
+ CC_ABGN,
118
+ CC_ADBS,
119
+ CC_ASAL,
120
+ CC_ASAI,
121
+ CC_ASAA,
122
+ CC_ASAR,
123
+ CC_ASBT,
124
+ CC_ASBR,
125
+ CC_ASCM,
126
+ CC_ASCO,
127
+ CC_ASDA,
128
+ CC_ASDM,
129
+ CC_ASDC,
130
+ CC_ASDN,
131
+ CC_ASDB,
132
+ CC_ASEQ,
133
+ CC_ASFM,
134
+ CC_ASGN,
135
+ CC_ASDT,
136
+ CC_ASRV,
137
+ CC_ASSR,
138
+ CC_ASSZ,
139
+ CC_ASST,
140
+ CC_ASSP,
141
+ CC_ASTM,
142
+ CC_ASTC,
143
+ CC_ASTN,
144
+ CC_ASUR,
145
+ CC_ASYR,
146
+ CC_ASDK,
147
+ CC_ASUL,
148
+ CC_ASSU,
149
+ CC_ASSA,
150
+ CC_APLY,
151
+ CC_ABPL,
152
+ CC_APSO,
153
+ CC_PRSV,
154
+ CC_ARIF,
155
+ CC_MSAS,
156
+ CC_AGRP,
157
+ CC_AGAL,
158
+ CC_ASCP,
159
+ CC_PPRO,
160
+ CC_PASP,
161
+ CC_PFDT,
162
+ CC_PICD,
163
+ CC_PIMF,
164
+ CC_PFMT,
165
+ CC_PIFS,
166
+ CC_PLSZ,
167
+ CC_PHGT,
168
+ CC_PWTH,
169
+ CC_PRAT,
170
+ CC_PCMT,
171
+ CC_PRET,
172
+ CC_AECS,
173
+ CC_AESV,
174
+ CC_AEHV,
175
+ CC_AESP,
176
+ CC_AEPP,
177
+ CC_AEPS,
178
+ CC_AESG,
179
+ CC_AEMK,
180
+ CC_AEMK2,
181
+ CC_AEFP,
182
+ CC_ATED,
183
+ CC_ASGR,
184
+ CC_AEMQ,
185
+ CC_AESL,
186
+ CC_AESR,
187
+ CC_AETR,
188
+ CC_MSED,
189
+ CC_CMPA,
190
+ CC_CMNM,
191
+ CC_CMTY,
192
+ CC_CMPG,
193
+ CC_CACI,
194
+ CC_CAPS,
195
+ CC_CASH,
196
+ CC_CARP,
197
+ CC_CAAS,
198
+ CC_CAAR,
199
+ CC_CAIA,
200
+ CC_CANP,
201
+ CC_CANN,
202
+ CC_CANA,
203
+ CC_CANL,
204
+ CC_CANG,
205
+ CC_CANT,
206
+ CC_CASP,
207
+ CC_CASS,
208
+ CC_CAST,
209
+ CC_CASU,
210
+ CC_CASG,
211
+ CC_CACR,
212
+ CC_CMCP,
213
+ CC_CMGT,
214
+ CC_CMIK,
215
+ CC_CMSP,
216
+ CC_CMST,
217
+ CC_CMSV,
218
+ CC_CMSR,
219
+ CC_CMMK,
220
+ CC_CMVO,
221
+ CC_CMPR,
222
+ CC_CAPR,
223
+ CC_AEFR,
224
+ CC_CAOV,
225
+ CC_CMRL,
226
+ CC_CAHP,
227
+ CC_CAIV,
228
+ CC_CAVC,
229
+ }
230
+ enum ControlPlayState {
231
+ STOPPED,
232
+ PAUSED,
233
+ PLAYING,
234
+ }
235
+ enum ControlRepeatState {
236
+ NONE,
237
+ SINGLE,
238
+ ALL,
239
+ }
240
+ /**
241
+ * Special DmapDb ID values.
242
+ */
243
+ enum DbId {
244
+ /**
245
+ * the value which represents a bad DmapDb ID.
246
+ */
247
+ BAD,
248
+ }
249
+ /**
250
+ * Errors inside the libdmapsharing library.
251
+ */
252
+ class Error extends GLib.Error {
253
+ static $gtype: GObject.GType<Error>;
254
+
255
+ // Static fields of Dmap.Error
256
+
257
+ static OK: number;
258
+ static FAILED: number;
259
+ static INVALID_CONTENT_CODE: number;
260
+ static INVALID_CONTENT_CODE_SIZE: number;
261
+ static RESPONSE_TOO_SHORT: number;
262
+ static BAD_FORMAT: number;
263
+ static BAD_BROWSE_CATEGORY: number;
264
+ static RECORD_MISSING_FIELD: number;
265
+ static DB_BAD_ID: number;
266
+ static OPEN_FAILED: number;
267
+ static CLOSE_FAILED: number;
268
+ static SEEK_FAILED: number;
269
+ static NUM_ERRORS: number;
270
+
271
+ // Constructors of Dmap.Error
272
+
273
+ constructor(options: { message: string; code: number });
274
+ _init(...args: any[]): void;
275
+
276
+ // Own static methods of Dmap.Error
277
+
278
+ static quark(): GLib.Quark;
279
+ }
280
+
281
+ class MdnsBrowserError extends GLib.Error {
282
+ static $gtype: GObject.GType<MdnsBrowserError>;
283
+
284
+ // Static fields of Dmap.MdnsBrowserError
285
+
286
+ static NOT_RUNNING: number;
287
+ static FAILED: number;
288
+
289
+ // Constructors of Dmap.MdnsBrowserError
290
+
291
+ constructor(options: { message: string; code: number });
292
+ _init(...args: any[]): void;
293
+
294
+ // Own static methods of Dmap.MdnsBrowserError
295
+
296
+ static quark(): GLib.Quark;
297
+ }
298
+
299
+ class MdnsPublisherError extends GLib.Error {
300
+ static $gtype: GObject.GType<MdnsPublisherError>;
301
+
302
+ // Static fields of Dmap.MdnsPublisherError
303
+
304
+ static NOT_RUNNING: number;
305
+ static FAILED: number;
306
+
307
+ // Constructors of Dmap.MdnsPublisherError
308
+
309
+ constructor(options: { message: string; code: number });
310
+ _init(...args: any[]): void;
311
+
312
+ // Own static methods of Dmap.MdnsPublisherError
313
+
314
+ static quark(): GLib.Quark;
315
+ }
316
+
317
+ enum MdnsServiceTransportProtocol {
318
+ TCP,
319
+ UDP,
320
+ LAST,
321
+ }
322
+ /**
323
+ * Enum values used to specify the service type.
324
+ */
325
+ enum MdnsServiceType {
326
+ /**
327
+ * an invalid service type
328
+ */
329
+ INVALID,
330
+ /**
331
+ * a DAAP service type
332
+ */
333
+ DAAP,
334
+ /**
335
+ * a DPAP service type
336
+ */
337
+ DPAP,
338
+ /**
339
+ * a DACP service type
340
+ */
341
+ DACP,
342
+ /**
343
+ * a RAOP service type
344
+ */
345
+ RAOP,
346
+ /**
347
+ * an invalid service type
348
+ */
349
+ LAST,
350
+ }
351
+ enum MediaKind {
352
+ MUSIC,
353
+ MOVIE,
354
+ PODCAST,
355
+ TV_SHOW,
356
+ }
357
+ enum ShareAuthMethod {
358
+ NONE,
359
+ NAME_AND_PASSWORD,
360
+ PASSWORD,
361
+ }
362
+ const HASH_SIZE: number;
363
+ /**
364
+ * Compares the two records associated with the provided keys according
365
+ * to album. Suitable to sort lists of albums.
366
+ * @param a first ID.
367
+ * @param b second ID.
368
+ * @param db A DmapDb for which a and b are valid ID's.
369
+ */
370
+ function av_record_cmp_by_album(a: any | null, b: any | null, db: Db): number;
371
+ function error_quark(): GLib.Quark;
372
+ function md5_generate(
373
+ version_major: number,
374
+ url: number,
375
+ hash_select: number,
376
+ out: number,
377
+ request_id: number,
378
+ ): void;
379
+ function md5_progressive_final(context: HashContext, digest: number): void;
380
+ function md5_progressive_init(context: HashContext): void;
381
+ function md5_progressive_to_string(digest: number, string: string): void;
382
+ function md5_progressive_update(context: HashContext, buffer: number, length: number): void;
383
+ function mdns_browser_error_quark(): GLib.Quark;
384
+ function mdns_publisher_error_quark(): GLib.Quark;
385
+ function utils_mime_to_format(transcode_mimetype: string): string;
386
+ interface ConnectionFunc {
387
+ (connection: Connection, result: boolean, reason: string): void;
388
+ }
389
+ interface IdContainerRecordFunc {
390
+ (id: number, record: ContainerRecord): void;
391
+ }
392
+ interface IdRecordFunc {
393
+ (id: number, record: Record): void;
394
+ }
395
+ module AvConnection {
396
+ // Constructor properties interface
397
+
398
+ interface ConstructorProps extends Connection.ConstructorProps {}
399
+ }
400
+
401
+ class AvConnection extends Connection {
402
+ static $gtype: GObject.GType<AvConnection>;
403
+
404
+ // Own fields of Dmap.AvConnection
405
+
406
+ dmap_connection_instance: Connection;
407
+
408
+ // Constructors of Dmap.AvConnection
409
+
410
+ constructor(properties?: Partial<AvConnection.ConstructorProps>, ...args: any[]);
411
+
412
+ _init(...args: any[]): void;
413
+
414
+ static ['new'](name: string, host: string, port: number, db: Db, factory: RecordFactory): AvConnection;
415
+ }
416
+
417
+ module AvShare {
418
+ // Constructor properties interface
419
+
420
+ interface ConstructorProps extends Share.ConstructorProps {}
421
+ }
422
+
423
+ class AvShare extends Share {
424
+ static $gtype: GObject.GType<AvShare>;
425
+
426
+ // Own fields of Dmap.AvShare
427
+
428
+ dmap_share_instance: Share;
429
+
430
+ // Constructors of Dmap.AvShare
431
+
432
+ constructor(properties?: Partial<AvShare.ConstructorProps>, ...args: any[]);
433
+
434
+ _init(...args: any[]): void;
435
+
436
+ static ['new'](
437
+ name: string,
438
+ password: string | null,
439
+ db: Db,
440
+ container_db: ContainerDb,
441
+ transcode_mimetype?: string | null,
442
+ ): AvShare;
443
+ }
444
+
445
+ module Connection {
446
+ // Signal callback interfaces
447
+
448
+ interface Authenticate {
449
+ (object: string, p0: Soup.Session, p1: Soup.Message, p2: Soup.Auth, p3: boolean): void;
450
+ }
451
+
452
+ interface Connected {
453
+ (): void;
454
+ }
455
+
456
+ interface Connecting {
457
+ (object: number, p0: number): void;
458
+ }
459
+
460
+ interface Disconnected {
461
+ (): void;
462
+ }
463
+
464
+ interface Error {
465
+ (object?: any | null): void;
466
+ }
467
+
468
+ interface OperationDone {
469
+ (): void;
470
+ }
471
+
472
+ // Constructor properties interface
473
+
474
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
475
+ base_uri: GLib.Uri;
476
+ baseUri: GLib.Uri;
477
+ database_id: number;
478
+ databaseId: number;
479
+ db: Db;
480
+ dmap_version: number;
481
+ dmapVersion: number;
482
+ factory: RecordFactory;
483
+ host: string;
484
+ name: string;
485
+ password: string;
486
+ port: number;
487
+ revision_number: number;
488
+ revisionNumber: number;
489
+ session_id: number;
490
+ sessionId: number;
491
+ username: string;
492
+ }
493
+ }
494
+
495
+ class Connection extends GObject.Object {
496
+ static $gtype: GObject.GType<Connection>;
497
+
498
+ // Own properties of Dmap.Connection
499
+
500
+ get base_uri(): GLib.Uri;
501
+ set base_uri(val: GLib.Uri);
502
+ get baseUri(): GLib.Uri;
503
+ set baseUri(val: GLib.Uri);
504
+ get database_id(): number;
505
+ set database_id(val: number);
506
+ get databaseId(): number;
507
+ set databaseId(val: number);
508
+ get db(): Db;
509
+ get dmap_version(): number;
510
+ set dmap_version(val: number);
511
+ get dmapVersion(): number;
512
+ set dmapVersion(val: number);
513
+ get factory(): RecordFactory;
514
+ get host(): string;
515
+ get name(): string;
516
+ set password(val: string);
517
+ get port(): number;
518
+ get revision_number(): number;
519
+ set revision_number(val: number);
520
+ get revisionNumber(): number;
521
+ set revisionNumber(val: number);
522
+ get session_id(): number;
523
+ set session_id(val: number);
524
+ get sessionId(): number;
525
+ set sessionId(val: number);
526
+ get username(): string;
527
+
528
+ // Constructors of Dmap.Connection
529
+
530
+ constructor(properties?: Partial<Connection.ConstructorProps>, ...args: any[]);
531
+
532
+ _init(...args: any[]): void;
533
+
534
+ // Own signals of Dmap.Connection
535
+
536
+ connect(id: string, callback: (...args: any[]) => any): number;
537
+ connect_after(id: string, callback: (...args: any[]) => any): number;
538
+ emit(id: string, ...args: any[]): void;
539
+ connect(
540
+ signal: 'authenticate',
541
+ callback: (
542
+ _source: this,
543
+ object: string,
544
+ p0: Soup.Session,
545
+ p1: Soup.Message,
546
+ p2: Soup.Auth,
547
+ p3: boolean,
548
+ ) => void,
549
+ ): number;
550
+ connect_after(
551
+ signal: 'authenticate',
552
+ callback: (
553
+ _source: this,
554
+ object: string,
555
+ p0: Soup.Session,
556
+ p1: Soup.Message,
557
+ p2: Soup.Auth,
558
+ p3: boolean,
559
+ ) => void,
560
+ ): number;
561
+ emit(
562
+ signal: 'authenticate',
563
+ object: string,
564
+ p0: Soup.Session,
565
+ p1: Soup.Message,
566
+ p2: Soup.Auth,
567
+ p3: boolean,
568
+ ): void;
569
+ connect(signal: 'connected', callback: (_source: this) => void): number;
570
+ connect_after(signal: 'connected', callback: (_source: this) => void): number;
571
+ emit(signal: 'connected'): void;
572
+ connect(signal: 'connecting', callback: (_source: this, object: number, p0: number) => void): number;
573
+ connect_after(signal: 'connecting', callback: (_source: this, object: number, p0: number) => void): number;
574
+ emit(signal: 'connecting', object: number, p0: number): void;
575
+ connect(signal: 'disconnected', callback: (_source: this) => void): number;
576
+ connect_after(signal: 'disconnected', callback: (_source: this) => void): number;
577
+ emit(signal: 'disconnected'): void;
578
+ connect(signal: 'error', callback: (_source: this, object: any | null) => void): number;
579
+ connect_after(signal: 'error', callback: (_source: this, object: any | null) => void): number;
580
+ emit(signal: 'error', object?: any | null): void;
581
+ connect(signal: 'operation-done', callback: (_source: this) => void): number;
582
+ connect_after(signal: 'operation-done', callback: (_source: this) => void): number;
583
+ emit(signal: 'operation-done'): void;
584
+
585
+ // Own virtual methods of Dmap.Connection
586
+
587
+ vfunc_authenticate(name: string): string;
588
+ vfunc_connected(): void;
589
+ vfunc_connecting(state: ConnectionState, progress: number): void;
590
+ vfunc_disconnected(): void;
591
+ vfunc_get_protocol_version_cc(): ContentCode;
592
+ vfunc_get_query_metadata(): string;
593
+ vfunc_operation_done(): void;
594
+
595
+ // Own methods of Dmap.Connection
596
+
597
+ /**
598
+ * Attach an authentication credential to a request. This
599
+ * method should be called by a function that is connected to the
600
+ * #DmapConnection::authenticate signal. The signal will provide the
601
+ * connection, session, message and auth to that function. That function
602
+ * should obtain a password and provide it to this method.
603
+ * @param session A #SoupSession
604
+ * @param message A #SoupMessage
605
+ * @param auth A #SoupAuth
606
+ * @param password A password
607
+ */
608
+ authenticate_message(session: Soup.Session, message: Soup.Message, auth: Soup.Auth, password: string): void;
609
+ get_headers(uri: string): Soup.MessageHeaders;
610
+ /**
611
+ * Get the playlists associated with a #DmapConnection instance.
612
+ * @returns pointer to a list of playlists.
613
+ */
614
+ get_playlists(): Playlist[];
615
+ /**
616
+ * Returns TRUE if the connection is presently connected.
617
+ */
618
+ is_connected(): boolean;
619
+ /**
620
+ * Connect to the remote DMAP share.
621
+ * @param callback The function to call once the connection is complete.
622
+ */
623
+ start(callback: ConnectionFunc): void;
624
+ /**
625
+ * Disconnect from the remote DMAP share.
626
+ * @param callback The function to call once the connection is complete.
627
+ */
628
+ stop(callback: ConnectionFunc): void;
629
+ }
630
+
631
+ module ControlConnection {
632
+ // Constructor properties interface
633
+
634
+ interface ConstructorProps extends Connection.ConstructorProps {}
635
+ }
636
+
637
+ class ControlConnection extends Connection {
638
+ static $gtype: GObject.GType<ControlConnection>;
639
+
640
+ // Own fields of Dmap.ControlConnection
641
+
642
+ dmap_connection_instance: Connection;
643
+
644
+ // Constructors of Dmap.ControlConnection
645
+
646
+ constructor(properties?: Partial<ControlConnection.ConstructorProps>, ...args: any[]);
647
+
648
+ _init(...args: any[]): void;
649
+
650
+ static ['new'](name: string, host: string, port: number, db: Db, factory: RecordFactory): ControlConnection;
651
+ }
652
+
653
+ module ControlShare {
654
+ // Signal callback interfaces
655
+
656
+ interface AddGuid {
657
+ (object: string): void;
658
+ }
659
+
660
+ interface LookupGuid {
661
+ (object: string): boolean;
662
+ }
663
+
664
+ interface RemoteFound {
665
+ (object: string, p0: string): void;
666
+ }
667
+
668
+ interface RemoteLost {
669
+ (object: string): void;
670
+ }
671
+
672
+ interface RemotePaired {
673
+ (object: string, p0: boolean): void;
674
+ }
675
+
676
+ // Constructor properties interface
677
+
678
+ interface ConstructorProps extends Share.ConstructorProps {
679
+ library_name: string;
680
+ libraryName: string;
681
+ player: GObject.Object;
682
+ }
683
+ }
684
+
685
+ class ControlShare extends Share {
686
+ static $gtype: GObject.GType<ControlShare>;
687
+
688
+ // Own properties of Dmap.ControlShare
689
+
690
+ get library_name(): string;
691
+ set library_name(val: string);
692
+ get libraryName(): string;
693
+ set libraryName(val: string);
694
+ get player(): GObject.Object;
695
+
696
+ // Own fields of Dmap.ControlShare
697
+
698
+ dmap_av_share_instance: AvShare;
699
+
700
+ // Constructors of Dmap.ControlShare
701
+
702
+ constructor(properties?: Partial<ControlShare.ConstructorProps>, ...args: any[]);
703
+
704
+ _init(...args: any[]): void;
705
+
706
+ static ['new'](library_name: string, player: ControlPlayer, db: Db, container_db: ContainerDb): ControlShare;
707
+
708
+ // Own signals of Dmap.ControlShare
709
+
710
+ connect(id: string, callback: (...args: any[]) => any): number;
711
+ connect_after(id: string, callback: (...args: any[]) => any): number;
712
+ emit(id: string, ...args: any[]): void;
713
+ connect(signal: 'add-guid', callback: (_source: this, object: string) => void): number;
714
+ connect_after(signal: 'add-guid', callback: (_source: this, object: string) => void): number;
715
+ emit(signal: 'add-guid', object: string): void;
716
+ connect(signal: 'lookup-guid', callback: (_source: this, object: string) => boolean): number;
717
+ connect_after(signal: 'lookup-guid', callback: (_source: this, object: string) => boolean): number;
718
+ emit(signal: 'lookup-guid', object: string): void;
719
+ connect(signal: 'remote-found', callback: (_source: this, object: string, p0: string) => void): number;
720
+ connect_after(signal: 'remote-found', callback: (_source: this, object: string, p0: string) => void): number;
721
+ emit(signal: 'remote-found', object: string, p0: string): void;
722
+ connect(signal: 'remote-lost', callback: (_source: this, object: string) => void): number;
723
+ connect_after(signal: 'remote-lost', callback: (_source: this, object: string) => void): number;
724
+ emit(signal: 'remote-lost', object: string): void;
725
+ connect(signal: 'remote-paired', callback: (_source: this, object: string, p0: boolean) => void): number;
726
+ connect_after(signal: 'remote-paired', callback: (_source: this, object: string, p0: boolean) => void): number;
727
+ emit(signal: 'remote-paired', object: string, p0: boolean): void;
728
+
729
+ // Own virtual methods of Dmap.ControlShare
730
+
731
+ vfunc_add_guid(guid: string): void;
732
+ vfunc_lookup_guid(guid: string): boolean;
733
+ vfunc_remote_found(service_name: string, remote_name: string): void;
734
+ vfunc_remote_lost(service_name: string): void;
735
+ vfunc_remote_paired(service_name: string, connected: boolean): void;
736
+
737
+ // Own methods of Dmap.ControlShare
738
+
739
+ /**
740
+ * Pairs a DACP client (Remote) with this server. If the passcode is
741
+ * correct (the same as shown on the remote), the remote will start connecting
742
+ * to this server.
743
+ * @param service_name DACP client (remote) service identifier.
744
+ * @param passcode 4-Digit PIN code entered by the user.
745
+ */
746
+ pair(service_name: string, passcode: string): void;
747
+ player_updated(): void;
748
+ /**
749
+ * Start looking up for DACP remotes. Connect to #DmapControlShare::remote-found signal
750
+ * to detect new remotes. Be aware that when a #DmapControlShare is created, only
751
+ * after calling this function is that it starts looking up for Remotes on the
752
+ * network.
753
+ * @returns TRUE on success, else FALSE with error set.
754
+ */
755
+ start_lookup(): boolean;
756
+ /**
757
+ * Stop looking up for DACP remotes.
758
+ */
759
+ stop_lookup(): boolean;
760
+ }
761
+
762
+ module ImageConnection {
763
+ // Constructor properties interface
764
+
765
+ interface ConstructorProps extends Connection.ConstructorProps {}
766
+ }
767
+
768
+ class ImageConnection extends Connection {
769
+ static $gtype: GObject.GType<ImageConnection>;
770
+
771
+ // Own fields of Dmap.ImageConnection
772
+
773
+ dmap_connection_instance: Connection;
774
+
775
+ // Constructors of Dmap.ImageConnection
776
+
777
+ constructor(properties?: Partial<ImageConnection.ConstructorProps>, ...args: any[]);
778
+
779
+ _init(...args: any[]): void;
780
+
781
+ static ['new'](name: string, host: string, port: number, db: Db, factory: RecordFactory): ImageConnection;
782
+ }
783
+
784
+ module ImageShare {
785
+ // Constructor properties interface
786
+
787
+ interface ConstructorProps extends Share.ConstructorProps {}
788
+ }
789
+
790
+ class ImageShare extends Share {
791
+ static $gtype: GObject.GType<ImageShare>;
792
+
793
+ // Own fields of Dmap.ImageShare
794
+
795
+ dmap_share_instance: Share;
796
+
797
+ // Constructors of Dmap.ImageShare
798
+
799
+ constructor(properties?: Partial<ImageShare.ConstructorProps>, ...args: any[]);
800
+
801
+ _init(...args: any[]): void;
802
+
803
+ static ['new'](
804
+ name: string,
805
+ password?: string | null,
806
+ db?: any | null,
807
+ container_db?: any | null,
808
+ transcode_mimetype?: string | null,
809
+ ): ImageShare;
810
+ }
811
+
812
+ module MdnsBrowser {
813
+ // Signal callback interfaces
814
+
815
+ interface ServiceAdded {
816
+ (service: MdnsService): void;
817
+ }
818
+
819
+ interface ServiceRemoved {
820
+ (object: string): void;
821
+ }
822
+
823
+ // Constructor properties interface
824
+
825
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
826
+ }
827
+
828
+ class MdnsBrowser extends GObject.Object {
829
+ static $gtype: GObject.GType<MdnsBrowser>;
830
+
831
+ // Own fields of Dmap.MdnsBrowser
832
+
833
+ object: GObject.Object;
834
+
835
+ // Constructors of Dmap.MdnsBrowser
836
+
837
+ constructor(properties?: Partial<MdnsBrowser.ConstructorProps>, ...args: any[]);
838
+
839
+ _init(...args: any[]): void;
840
+
841
+ static ['new'](type: MdnsServiceType): MdnsBrowser;
842
+
843
+ // Own signals of Dmap.MdnsBrowser
844
+
845
+ connect(id: string, callback: (...args: any[]) => any): number;
846
+ connect_after(id: string, callback: (...args: any[]) => any): number;
847
+ emit(id: string, ...args: any[]): void;
848
+ connect(signal: 'service-added', callback: (_source: this, service: MdnsService) => void): number;
849
+ connect_after(signal: 'service-added', callback: (_source: this, service: MdnsService) => void): number;
850
+ emit(signal: 'service-added', service: MdnsService): void;
851
+ connect(signal: 'service-removed', callback: (_source: this, object: string) => void): number;
852
+ connect_after(signal: 'service-removed', callback: (_source: this, object: string) => void): number;
853
+ emit(signal: 'service-removed', object: string): void;
854
+
855
+ // Own virtual methods of Dmap.MdnsBrowser
856
+
857
+ vfunc_service_added(service: MdnsService): void;
858
+ vfunc_service_removed(service: MdnsService): void;
859
+
860
+ // Own methods of Dmap.MdnsBrowser
861
+
862
+ get_service_type(): MdnsServiceType;
863
+ get_services(): MdnsService[];
864
+ /**
865
+ * Starts a DmapMdnsBrowser.
866
+ * @returns TRUE on success, else FALSE.
867
+ */
868
+ start(): boolean;
869
+ /**
870
+ * Stops a DmapMdnsBrowser.
871
+ * @returns TRUE on success, else FALSE.
872
+ */
873
+ stop(): boolean;
874
+ }
875
+
876
+ module MdnsPublisher {
877
+ // Signal callback interfaces
878
+
879
+ interface NameCollision {
880
+ (object: string): void;
881
+ }
882
+
883
+ interface Published {
884
+ (object: string): void;
885
+ }
886
+
887
+ // Constructor properties interface
888
+
889
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
890
+ }
891
+
892
+ class MdnsPublisher extends GObject.Object {
893
+ static $gtype: GObject.GType<MdnsPublisher>;
894
+
895
+ // Own fields of Dmap.MdnsPublisher
896
+
897
+ object: GObject.Object;
898
+
899
+ // Constructors of Dmap.MdnsPublisher
900
+
901
+ constructor(properties?: Partial<MdnsPublisher.ConstructorProps>, ...args: any[]);
902
+
903
+ _init(...args: any[]): void;
904
+
905
+ static ['new'](): MdnsPublisher;
906
+
907
+ // Own signals of Dmap.MdnsPublisher
908
+
909
+ connect(id: string, callback: (...args: any[]) => any): number;
910
+ connect_after(id: string, callback: (...args: any[]) => any): number;
911
+ emit(id: string, ...args: any[]): void;
912
+ connect(signal: 'name-collision', callback: (_source: this, object: string) => void): number;
913
+ connect_after(signal: 'name-collision', callback: (_source: this, object: string) => void): number;
914
+ emit(signal: 'name-collision', object: string): void;
915
+ connect(signal: 'published', callback: (_source: this, object: string) => void): number;
916
+ connect_after(signal: 'published', callback: (_source: this, object: string) => void): number;
917
+ emit(signal: 'published', object: string): void;
918
+
919
+ // Own virtual methods of Dmap.MdnsPublisher
920
+
921
+ vfunc_name_collision(name: string): void;
922
+ vfunc_published(name: string): void;
923
+
924
+ // Own methods of Dmap.MdnsPublisher
925
+
926
+ publish(
927
+ name: string,
928
+ port: number,
929
+ type_of_service: string,
930
+ password_required: boolean,
931
+ txt_records: string,
932
+ ): boolean;
933
+ rename_at_port(port: number, name: string): boolean;
934
+ withdraw(port: number): boolean;
935
+ }
936
+
937
+ module MdnsService {
938
+ // Constructor properties interface
939
+
940
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
941
+ host: string;
942
+ name: string;
943
+ pair: string;
944
+ password_protected: boolean;
945
+ passwordProtected: boolean;
946
+ port: number;
947
+ service_name: string;
948
+ serviceName: string;
949
+ transport_protocol: number;
950
+ transportProtocol: number;
951
+ }
952
+ }
953
+
954
+ class MdnsService extends GObject.Object {
955
+ static $gtype: GObject.GType<MdnsService>;
956
+
957
+ // Own properties of Dmap.MdnsService
958
+
959
+ get host(): string;
960
+ set host(val: string);
961
+ get name(): string;
962
+ set name(val: string);
963
+ get pair(): string;
964
+ set pair(val: string);
965
+ get password_protected(): boolean;
966
+ set password_protected(val: boolean);
967
+ get passwordProtected(): boolean;
968
+ set passwordProtected(val: boolean);
969
+ get port(): number;
970
+ set port(val: number);
971
+ get service_name(): string;
972
+ set service_name(val: string);
973
+ get serviceName(): string;
974
+ set serviceName(val: string);
975
+ get transport_protocol(): number;
976
+ set transport_protocol(val: number);
977
+ get transportProtocol(): number;
978
+ set transportProtocol(val: number);
979
+
980
+ // Own fields of Dmap.MdnsService
981
+
982
+ object: GObject.Object;
983
+
984
+ // Constructors of Dmap.MdnsService
985
+
986
+ constructor(properties?: Partial<MdnsService.ConstructorProps>, ...args: any[]);
987
+
988
+ _init(...args: any[]): void;
989
+ }
990
+
991
+ module Share {
992
+ // Signal callback interfaces
993
+
994
+ interface Error {
995
+ (object?: any | null): void;
996
+ }
997
+
998
+ // Constructor properties interface
999
+
1000
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
1001
+ auth_method: number;
1002
+ authMethod: number;
1003
+ container_db: ContainerDb;
1004
+ containerDb: ContainerDb;
1005
+ db: Db;
1006
+ name: string;
1007
+ password: string;
1008
+ revision_number: number;
1009
+ revisionNumber: number;
1010
+ server: Soup.Server;
1011
+ transcode_mimetype: string;
1012
+ transcodeMimetype: string;
1013
+ txt_records: string[];
1014
+ txtRecords: string[];
1015
+ }
1016
+ }
1017
+
1018
+ abstract class Share extends GObject.Object {
1019
+ static $gtype: GObject.GType<Share>;
1020
+
1021
+ // Own properties of Dmap.Share
1022
+
1023
+ get auth_method(): number;
1024
+ set auth_method(val: number);
1025
+ get authMethod(): number;
1026
+ set authMethod(val: number);
1027
+ get container_db(): ContainerDb;
1028
+ get containerDb(): ContainerDb;
1029
+ get db(): Db;
1030
+ get name(): string;
1031
+ set name(val: string);
1032
+ get password(): string;
1033
+ set password(val: string);
1034
+ get revision_number(): number;
1035
+ set revision_number(val: number);
1036
+ get revisionNumber(): number;
1037
+ set revisionNumber(val: number);
1038
+ get server(): Soup.Server;
1039
+ get transcode_mimetype(): string;
1040
+ get transcodeMimetype(): string;
1041
+ get txt_records(): string[];
1042
+ set txt_records(val: string[]);
1043
+ get txtRecords(): string[];
1044
+ set txtRecords(val: string[]);
1045
+
1046
+ // Constructors of Dmap.Share
1047
+
1048
+ constructor(properties?: Partial<Share.ConstructorProps>, ...args: any[]);
1049
+
1050
+ _init(...args: any[]): void;
1051
+
1052
+ // Own signals of Dmap.Share
1053
+
1054
+ connect(id: string, callback: (...args: any[]) => any): number;
1055
+ connect_after(id: string, callback: (...args: any[]) => any): number;
1056
+ emit(id: string, ...args: any[]): void;
1057
+ connect(signal: 'error', callback: (_source: this, object: any | null) => void): number;
1058
+ connect_after(signal: 'error', callback: (_source: this, object: any | null) => void): number;
1059
+ emit(signal: 'error', object?: any | null): void;
1060
+
1061
+ // Own static methods of Dmap.Share
1062
+
1063
+ /**
1064
+ * Free the given filter list.
1065
+ * @param filter The filter list to free.
1066
+ */
1067
+ static free_filter(filter: GLib.SList[]): void;
1068
+
1069
+ // Own virtual methods of Dmap.Share
1070
+
1071
+ vfunc_content_codes(message: Soup.ServerMessage, path: string): void;
1072
+ vfunc_ctrl_int(
1073
+ message: Soup.ServerMessage,
1074
+ path: string,
1075
+ query: { [key: string]: any } | GLib.HashTable<any, any>,
1076
+ ): void;
1077
+ vfunc_databases(
1078
+ server: Soup.Server,
1079
+ message: Soup.ServerMessage,
1080
+ path: string,
1081
+ query: { [key: string]: any } | GLib.HashTable<any, any>,
1082
+ ): void;
1083
+ vfunc_databases_browse_xxx(
1084
+ msg: Soup.ServerMessage,
1085
+ path: string,
1086
+ query: { [key: string]: any } | GLib.HashTable<any, any>,
1087
+ ): void;
1088
+ vfunc_databases_items_xxx(server: Soup.Server, msg: Soup.ServerMessage, path: string): void;
1089
+ vfunc_get_desired_port(): number;
1090
+ vfunc_get_meta_data_map(): any | null;
1091
+ vfunc_get_type_of_service(): string;
1092
+ vfunc_login(
1093
+ message: Soup.ServerMessage,
1094
+ path: string,
1095
+ query: { [key: string]: any } | GLib.HashTable<any, any>,
1096
+ ): void;
1097
+ vfunc_logout(
1098
+ message: Soup.ServerMessage,
1099
+ path: string,
1100
+ query: { [key: string]: any } | GLib.HashTable<any, any>,
1101
+ ): void;
1102
+ vfunc_message_add_standard_headers(msg: Soup.ServerMessage): void;
1103
+ vfunc_name_collision(publisher: MdnsPublisher, name: string): void;
1104
+ vfunc_published(publisher: MdnsPublisher, name: string): void;
1105
+ vfunc_server_info(message: Soup.ServerMessage, path: string): void;
1106
+ vfunc_update(
1107
+ message: Soup.ServerMessage,
1108
+ path: string,
1109
+ query: { [key: string]: any } | GLib.HashTable<any, any>,
1110
+ ): void;
1111
+
1112
+ // Own methods of Dmap.Share
1113
+
1114
+ /**
1115
+ * Publish the availability of the given share using mDNS-SD.
1116
+ * @returns TRUE if publishing succeeds, else FALSE.
1117
+ */
1118
+ publish(): boolean;
1119
+ /**
1120
+ * Begin serving the service defined by share. A program will normally also
1121
+ * call dmap_share_publish.
1122
+ * @returns TRUE if serving succeeds, else FALSE with error set.
1123
+ */
1124
+ serve(): boolean;
1125
+ }
1126
+
1127
+ module TranscodeStream {
1128
+ // Constructor properties interface
1129
+
1130
+ interface ConstructorProps extends Gio.InputStream.ConstructorProps, Gio.Seekable.ConstructorProps {}
1131
+ }
1132
+
1133
+ class TranscodeStream extends Gio.InputStream implements Gio.Seekable {
1134
+ static $gtype: GObject.GType<TranscodeStream>;
1135
+
1136
+ // Constructors of Dmap.TranscodeStream
1137
+
1138
+ constructor(properties?: Partial<TranscodeStream.ConstructorProps>, ...args: any[]);
1139
+
1140
+ _init(...args: any[]): void;
1141
+
1142
+ static ['new'](transcode_mimetype: string, src_stream: Gio.InputStream): TranscodeStream;
1143
+
1144
+ // Own virtual methods of Dmap.TranscodeStream
1145
+
1146
+ vfunc_kill_pipeline(): void;
1147
+
1148
+ // Inherited methods
1149
+ /**
1150
+ * Tests if the stream supports the #GSeekableIface.
1151
+ * @returns %TRUE if @seekable can be seeked. %FALSE otherwise.
1152
+ */
1153
+ can_seek(): boolean;
1154
+ /**
1155
+ * Tests if the length of the stream can be adjusted with
1156
+ * g_seekable_truncate().
1157
+ * @returns %TRUE if the stream can be truncated, %FALSE otherwise.
1158
+ */
1159
+ can_truncate(): boolean;
1160
+ /**
1161
+ * Seeks in the stream by the given `offset,` modified by `type`.
1162
+ *
1163
+ * Attempting to seek past the end of the stream will have different
1164
+ * results depending on if the stream is fixed-sized or resizable. If
1165
+ * the stream is resizable then seeking past the end and then writing
1166
+ * will result in zeros filling the empty space. Seeking past the end
1167
+ * of a resizable stream and reading will result in EOF. Seeking past
1168
+ * the end of a fixed-sized stream will fail.
1169
+ *
1170
+ * Any operation that would result in a negative offset will fail.
1171
+ *
1172
+ * If `cancellable` is not %NULL, then the operation can be cancelled by
1173
+ * triggering the cancellable object from another thread. If the operation
1174
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
1175
+ * @param offset a #goffset.
1176
+ * @param type a #GSeekType.
1177
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
1178
+ * @returns %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present.
1179
+ */
1180
+ seek(offset: number, type: GLib.SeekType, cancellable?: Gio.Cancellable | null): boolean;
1181
+ /**
1182
+ * Tells the current position within the stream.
1183
+ * @returns the (positive or zero) offset from the beginning of the buffer, zero if the target is not seekable.
1184
+ */
1185
+ tell(): number;
1186
+ /**
1187
+ * Sets the length of the stream to `offset`. If the stream was previously
1188
+ * larger than `offset,` the extra data is discarded. If the stream was
1189
+ * previously shorter than `offset,` it is extended with NUL ('\0') bytes.
1190
+ *
1191
+ * If `cancellable` is not %NULL, then the operation can be cancelled by
1192
+ * triggering the cancellable object from another thread. If the operation
1193
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
1194
+ * operation was partially finished when the operation was cancelled the
1195
+ * partial result will be returned, without an error.
1196
+ * @param offset new length for @seekable, in bytes.
1197
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
1198
+ * @returns %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present.
1199
+ */
1200
+ truncate(offset: number, cancellable?: Gio.Cancellable | null): boolean;
1201
+ /**
1202
+ * Tests if the stream supports the #GSeekableIface.
1203
+ */
1204
+ vfunc_can_seek(): boolean;
1205
+ /**
1206
+ * Tests if the length of the stream can be adjusted with
1207
+ * g_seekable_truncate().
1208
+ */
1209
+ vfunc_can_truncate(): boolean;
1210
+ /**
1211
+ * Seeks in the stream by the given `offset,` modified by `type`.
1212
+ *
1213
+ * Attempting to seek past the end of the stream will have different
1214
+ * results depending on if the stream is fixed-sized or resizable. If
1215
+ * the stream is resizable then seeking past the end and then writing
1216
+ * will result in zeros filling the empty space. Seeking past the end
1217
+ * of a resizable stream and reading will result in EOF. Seeking past
1218
+ * the end of a fixed-sized stream will fail.
1219
+ *
1220
+ * Any operation that would result in a negative offset will fail.
1221
+ *
1222
+ * If `cancellable` is not %NULL, then the operation can be cancelled by
1223
+ * triggering the cancellable object from another thread. If the operation
1224
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
1225
+ * @param offset a #goffset.
1226
+ * @param type a #GSeekType.
1227
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
1228
+ */
1229
+ vfunc_seek(offset: number, type: GLib.SeekType, cancellable?: Gio.Cancellable | null): boolean;
1230
+ /**
1231
+ * Tells the current position within the stream.
1232
+ */
1233
+ vfunc_tell(): number;
1234
+ /**
1235
+ * Sets the length of the stream to `offset`. If the stream was previously
1236
+ * larger than `offset,` the extra data is discarded. If the stream was
1237
+ * previously shorter than `offset,` it is extended with NUL ('\0') bytes.
1238
+ *
1239
+ * If `cancellable` is not %NULL, then the operation can be cancelled by
1240
+ * triggering the cancellable object from another thread. If the operation
1241
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
1242
+ * operation was partially finished when the operation was cancelled the
1243
+ * partial result will be returned, without an error.
1244
+ * @param offset new length for @seekable, in bytes.
1245
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
1246
+ */
1247
+ vfunc_truncate_fn(offset: number, cancellable?: Gio.Cancellable | null): boolean;
1248
+ /**
1249
+ * Creates a binding between `source_property` on `source` and `target_property`
1250
+ * on `target`.
1251
+ *
1252
+ * Whenever the `source_property` is changed the `target_property` is
1253
+ * updated using the same value. For instance:
1254
+ *
1255
+ *
1256
+ * ```c
1257
+ * g_object_bind_property (action, "active", widget, "sensitive", 0);
1258
+ * ```
1259
+ *
1260
+ *
1261
+ * Will result in the "sensitive" property of the widget #GObject instance to be
1262
+ * updated with the same value of the "active" property of the action #GObject
1263
+ * instance.
1264
+ *
1265
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
1266
+ * if `target_property` on `target` changes then the `source_property` on `source`
1267
+ * will be updated as well.
1268
+ *
1269
+ * The binding will automatically be removed when either the `source` or the
1270
+ * `target` instances are finalized. To remove the binding without affecting the
1271
+ * `source` and the `target` you can just call g_object_unref() on the returned
1272
+ * #GBinding instance.
1273
+ *
1274
+ * Removing the binding by calling g_object_unref() on it must only be done if
1275
+ * the binding, `source` and `target` are only used from a single thread and it
1276
+ * is clear that both `source` and `target` outlive the binding. Especially it
1277
+ * is not safe to rely on this if the binding, `source` or `target` can be
1278
+ * finalized from different threads. Keep another reference to the binding and
1279
+ * use g_binding_unbind() instead to be on the safe side.
1280
+ *
1281
+ * A #GObject can have multiple bindings.
1282
+ * @param source_property the property on @source to bind
1283
+ * @param target the target #GObject
1284
+ * @param target_property the property on @target to bind
1285
+ * @param flags flags to pass to #GBinding
1286
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
1287
+ */
1288
+ bind_property(
1289
+ source_property: string,
1290
+ target: GObject.Object,
1291
+ target_property: string,
1292
+ flags: GObject.BindingFlags,
1293
+ ): GObject.Binding;
1294
+ /**
1295
+ * Complete version of g_object_bind_property().
1296
+ *
1297
+ * Creates a binding between `source_property` on `source` and `target_property`
1298
+ * on `target,` allowing you to set the transformation functions to be used by
1299
+ * the binding.
1300
+ *
1301
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
1302
+ * if `target_property` on `target` changes then the `source_property` on `source`
1303
+ * will be updated as well. The `transform_from` function is only used in case
1304
+ * of bidirectional bindings, otherwise it will be ignored
1305
+ *
1306
+ * The binding will automatically be removed when either the `source` or the
1307
+ * `target` instances are finalized. This will release the reference that is
1308
+ * being held on the #GBinding instance; if you want to hold on to the
1309
+ * #GBinding instance, you will need to hold a reference to it.
1310
+ *
1311
+ * To remove the binding, call g_binding_unbind().
1312
+ *
1313
+ * A #GObject can have multiple bindings.
1314
+ *
1315
+ * The same `user_data` parameter will be used for both `transform_to`
1316
+ * and `transform_from` transformation functions; the `notify` function will
1317
+ * be called once, when the binding is removed. If you need different data
1318
+ * for each transformation function, please use
1319
+ * g_object_bind_property_with_closures() instead.
1320
+ * @param source_property the property on @source to bind
1321
+ * @param target the target #GObject
1322
+ * @param target_property the property on @target to bind
1323
+ * @param flags flags to pass to #GBinding
1324
+ * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
1325
+ * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
1326
+ * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
1327
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
1328
+ */
1329
+ bind_property_full(
1330
+ source_property: string,
1331
+ target: GObject.Object,
1332
+ target_property: string,
1333
+ flags: GObject.BindingFlags,
1334
+ transform_to?: GObject.BindingTransformFunc | null,
1335
+ transform_from?: GObject.BindingTransformFunc | null,
1336
+ notify?: GLib.DestroyNotify | null,
1337
+ ): GObject.Binding;
1338
+ // Conflicted with GObject.Object.bind_property_full
1339
+ bind_property_full(...args: never[]): any;
1340
+ /**
1341
+ * This function is intended for #GObject implementations to re-enforce
1342
+ * a [floating][floating-ref] object reference. Doing this is seldom
1343
+ * required: all #GInitiallyUnowneds are created with a floating reference
1344
+ * which usually just needs to be sunken by calling g_object_ref_sink().
1345
+ */
1346
+ force_floating(): void;
1347
+ /**
1348
+ * Increases the freeze count on `object`. If the freeze count is
1349
+ * non-zero, the emission of "notify" signals on `object` is
1350
+ * stopped. The signals are queued until the freeze count is decreased
1351
+ * to zero. Duplicate notifications are squashed so that at most one
1352
+ * #GObject::notify signal is emitted for each property modified while the
1353
+ * object is frozen.
1354
+ *
1355
+ * This is necessary for accessors that modify multiple properties to prevent
1356
+ * premature notification while the object is still being modified.
1357
+ */
1358
+ freeze_notify(): void;
1359
+ /**
1360
+ * Gets a named field from the objects table of associations (see g_object_set_data()).
1361
+ * @param key name of the key for that association
1362
+ * @returns the data if found, or %NULL if no such data exists.
1363
+ */
1364
+ get_data(key: string): any | null;
1365
+ get_property(property_name: string): any;
1366
+ /**
1367
+ * This function gets back user data pointers stored via
1368
+ * g_object_set_qdata().
1369
+ * @param quark A #GQuark, naming the user data pointer
1370
+ * @returns The user data pointer set, or %NULL
1371
+ */
1372
+ get_qdata(quark: GLib.Quark): any | null;
1373
+ /**
1374
+ * Gets `n_properties` properties for an `object`.
1375
+ * Obtained properties will be set to `values`. All properties must be valid.
1376
+ * Warnings will be emitted and undefined behaviour may result if invalid
1377
+ * properties are passed in.
1378
+ * @param names the names of each property to get
1379
+ * @param values the values of each property to get
1380
+ */
1381
+ getv(names: string[], values: (GObject.Value | any)[]): void;
1382
+ /**
1383
+ * Checks whether `object` has a [floating][floating-ref] reference.
1384
+ * @returns %TRUE if @object has a floating reference
1385
+ */
1386
+ is_floating(): boolean;
1387
+ /**
1388
+ * Emits a "notify" signal for the property `property_name` on `object`.
1389
+ *
1390
+ * When possible, eg. when signaling a property change from within the class
1391
+ * that registered the property, you should use g_object_notify_by_pspec()
1392
+ * instead.
1393
+ *
1394
+ * Note that emission of the notify signal may be blocked with
1395
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
1396
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
1397
+ * called.
1398
+ * @param property_name the name of a property installed on the class of @object.
1399
+ */
1400
+ notify(property_name: string): void;
1401
+ /**
1402
+ * Emits a "notify" signal for the property specified by `pspec` on `object`.
1403
+ *
1404
+ * This function omits the property name lookup, hence it is faster than
1405
+ * g_object_notify().
1406
+ *
1407
+ * One way to avoid using g_object_notify() from within the
1408
+ * class that registered the properties, and using g_object_notify_by_pspec()
1409
+ * instead, is to store the GParamSpec used with
1410
+ * g_object_class_install_property() inside a static array, e.g.:
1411
+ *
1412
+ *
1413
+ * ```c
1414
+ * typedef enum
1415
+ * {
1416
+ * PROP_FOO = 1,
1417
+ * PROP_LAST
1418
+ * } MyObjectProperty;
1419
+ *
1420
+ * static GParamSpec *properties[PROP_LAST];
1421
+ *
1422
+ * static void
1423
+ * my_object_class_init (MyObjectClass *klass)
1424
+ * {
1425
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
1426
+ * 0, 100,
1427
+ * 50,
1428
+ * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
1429
+ * g_object_class_install_property (gobject_class,
1430
+ * PROP_FOO,
1431
+ * properties[PROP_FOO]);
1432
+ * }
1433
+ * ```
1434
+ *
1435
+ *
1436
+ * and then notify a change on the "foo" property with:
1437
+ *
1438
+ *
1439
+ * ```c
1440
+ * g_object_notify_by_pspec (self, properties[PROP_FOO]);
1441
+ * ```
1442
+ *
1443
+ * @param pspec the #GParamSpec of a property installed on the class of @object.
1444
+ */
1445
+ notify_by_pspec(pspec: GObject.ParamSpec): void;
1446
+ /**
1447
+ * Increases the reference count of `object`.
1448
+ *
1449
+ * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
1450
+ * of `object` will be propagated to the return type (using the GCC typeof()
1451
+ * extension), so any casting the caller needs to do on the return type must be
1452
+ * explicit.
1453
+ * @returns the same @object
1454
+ */
1455
+ ref(): GObject.Object;
1456
+ /**
1457
+ * Increase the reference count of `object,` and possibly remove the
1458
+ * [floating][floating-ref] reference, if `object` has a floating reference.
1459
+ *
1460
+ * In other words, if the object is floating, then this call "assumes
1461
+ * ownership" of the floating reference, converting it to a normal
1462
+ * reference by clearing the floating flag while leaving the reference
1463
+ * count unchanged. If the object is not floating, then this call
1464
+ * adds a new normal reference increasing the reference count by one.
1465
+ *
1466
+ * Since GLib 2.56, the type of `object` will be propagated to the return type
1467
+ * under the same conditions as for g_object_ref().
1468
+ * @returns @object
1469
+ */
1470
+ ref_sink(): GObject.Object;
1471
+ /**
1472
+ * Releases all references to other objects. This can be used to break
1473
+ * reference cycles.
1474
+ *
1475
+ * This function should only be called from object system implementations.
1476
+ */
1477
+ run_dispose(): void;
1478
+ /**
1479
+ * Each object carries around a table of associations from
1480
+ * strings to pointers. This function lets you set an association.
1481
+ *
1482
+ * If the object already had an association with that name,
1483
+ * the old association will be destroyed.
1484
+ *
1485
+ * Internally, the `key` is converted to a #GQuark using g_quark_from_string().
1486
+ * This means a copy of `key` is kept permanently (even after `object` has been
1487
+ * finalized) — so it is recommended to only use a small, bounded set of values
1488
+ * for `key` in your program, to avoid the #GQuark storage growing unbounded.
1489
+ * @param key name of the key
1490
+ * @param data data to associate with that key
1491
+ */
1492
+ set_data(key: string, data?: any | null): void;
1493
+ set_property(property_name: string, value: any): void;
1494
+ /**
1495
+ * Remove a specified datum from the object's data associations,
1496
+ * without invoking the association's destroy handler.
1497
+ * @param key name of the key
1498
+ * @returns the data if found, or %NULL if no such data exists.
1499
+ */
1500
+ steal_data(key: string): any | null;
1501
+ /**
1502
+ * This function gets back user data pointers stored via
1503
+ * g_object_set_qdata() and removes the `data` from object
1504
+ * without invoking its destroy() function (if any was
1505
+ * set).
1506
+ * Usually, calling this function is only required to update
1507
+ * user data pointers with a destroy notifier, for example:
1508
+ *
1509
+ * ```c
1510
+ * void
1511
+ * object_add_to_user_list (GObject *object,
1512
+ * const gchar *new_string)
1513
+ * {
1514
+ * // the quark, naming the object data
1515
+ * GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
1516
+ * // retrieve the old string list
1517
+ * GList *list = g_object_steal_qdata (object, quark_string_list);
1518
+ *
1519
+ * // prepend new string
1520
+ * list = g_list_prepend (list, g_strdup (new_string));
1521
+ * // this changed 'list', so we need to set it again
1522
+ * g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
1523
+ * }
1524
+ * static void
1525
+ * free_string_list (gpointer data)
1526
+ * {
1527
+ * GList *node, *list = data;
1528
+ *
1529
+ * for (node = list; node; node = node->next)
1530
+ * g_free (node->data);
1531
+ * g_list_free (list);
1532
+ * }
1533
+ * ```
1534
+ *
1535
+ * Using g_object_get_qdata() in the above example, instead of
1536
+ * g_object_steal_qdata() would have left the destroy function set,
1537
+ * and thus the partial string list would have been freed upon
1538
+ * g_object_set_qdata_full().
1539
+ * @param quark A #GQuark, naming the user data pointer
1540
+ * @returns The user data pointer set, or %NULL
1541
+ */
1542
+ steal_qdata(quark: GLib.Quark): any | null;
1543
+ /**
1544
+ * Reverts the effect of a previous call to
1545
+ * g_object_freeze_notify(). The freeze count is decreased on `object`
1546
+ * and when it reaches zero, queued "notify" signals are emitted.
1547
+ *
1548
+ * Duplicate notifications for each property are squashed so that at most one
1549
+ * #GObject::notify signal is emitted for each property, in the reverse order
1550
+ * in which they have been queued.
1551
+ *
1552
+ * It is an error to call this function when the freeze count is zero.
1553
+ */
1554
+ thaw_notify(): void;
1555
+ /**
1556
+ * Decreases the reference count of `object`. When its reference count
1557
+ * drops to 0, the object is finalized (i.e. its memory is freed).
1558
+ *
1559
+ * If the pointer to the #GObject may be reused in future (for example, if it is
1560
+ * an instance variable of another object), it is recommended to clear the
1561
+ * pointer to %NULL rather than retain a dangling pointer to a potentially
1562
+ * invalid #GObject instance. Use g_clear_object() for this.
1563
+ */
1564
+ unref(): void;
1565
+ /**
1566
+ * This function essentially limits the life time of the `closure` to
1567
+ * the life time of the object. That is, when the object is finalized,
1568
+ * the `closure` is invalidated by calling g_closure_invalidate() on
1569
+ * it, in order to prevent invocations of the closure with a finalized
1570
+ * (nonexisting) object. Also, g_object_ref() and g_object_unref() are
1571
+ * added as marshal guards to the `closure,` to ensure that an extra
1572
+ * reference count is held on `object` during invocation of the
1573
+ * `closure`. Usually, this function will be called on closures that
1574
+ * use this `object` as closure data.
1575
+ * @param closure #GClosure to watch
1576
+ */
1577
+ watch_closure(closure: GObject.Closure): void;
1578
+ vfunc_constructed(): void;
1579
+ vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
1580
+ vfunc_dispose(): void;
1581
+ vfunc_finalize(): void;
1582
+ vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
1583
+ /**
1584
+ * Emits a "notify" signal for the property `property_name` on `object`.
1585
+ *
1586
+ * When possible, eg. when signaling a property change from within the class
1587
+ * that registered the property, you should use g_object_notify_by_pspec()
1588
+ * instead.
1589
+ *
1590
+ * Note that emission of the notify signal may be blocked with
1591
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
1592
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
1593
+ * called.
1594
+ * @param pspec
1595
+ */
1596
+ vfunc_notify(pspec: GObject.ParamSpec): void;
1597
+ vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
1598
+ disconnect(id: number): void;
1599
+ set(properties: { [key: string]: any }): void;
1600
+ block_signal_handler(id: number): any;
1601
+ unblock_signal_handler(id: number): any;
1602
+ stop_emission_by_name(detailedName: string): any;
1603
+ }
1604
+
1605
+ type AvConnectionClass = typeof AvConnection;
1606
+ abstract class AvConnectionPrivate {
1607
+ static $gtype: GObject.GType<AvConnectionPrivate>;
1608
+
1609
+ // Constructors of Dmap.AvConnectionPrivate
1610
+
1611
+ _init(...args: any[]): void;
1612
+ }
1613
+
1614
+ type AvRecordInterface = typeof AvRecord;
1615
+ type AvShareClass = typeof AvShare;
1616
+ abstract class AvSharePrivate {
1617
+ static $gtype: GObject.GType<AvSharePrivate>;
1618
+
1619
+ // Constructors of Dmap.AvSharePrivate
1620
+
1621
+ _init(...args: any[]): void;
1622
+ }
1623
+
1624
+ type ConnectionClass = typeof Connection;
1625
+ abstract class ConnectionPrivate {
1626
+ static $gtype: GObject.GType<ConnectionPrivate>;
1627
+
1628
+ // Constructors of Dmap.ConnectionPrivate
1629
+
1630
+ _init(...args: any[]): void;
1631
+ }
1632
+
1633
+ type ContainerDbInterface = typeof ContainerDb;
1634
+ type ContainerRecordInterface = typeof ContainerRecord;
1635
+ type ControlConnectionClass = typeof ControlConnection;
1636
+ abstract class ControlConnectionPrivate {
1637
+ static $gtype: GObject.GType<ControlConnectionPrivate>;
1638
+
1639
+ // Constructors of Dmap.ControlConnectionPrivate
1640
+
1641
+ _init(...args: any[]): void;
1642
+ }
1643
+
1644
+ type ControlPlayerInterface = typeof ControlPlayer;
1645
+ type ControlShareClass = typeof ControlShare;
1646
+ abstract class ControlSharePrivate {
1647
+ static $gtype: GObject.GType<ControlSharePrivate>;
1648
+
1649
+ // Constructors of Dmap.ControlSharePrivate
1650
+
1651
+ _init(...args: any[]): void;
1652
+ }
1653
+
1654
+ class DbFilterDefinition {
1655
+ static $gtype: GObject.GType<DbFilterDefinition>;
1656
+
1657
+ // Own fields of Dmap.DbFilterDefinition
1658
+
1659
+ key: string;
1660
+ value: string;
1661
+ negate: boolean;
1662
+
1663
+ // Constructors of Dmap.DbFilterDefinition
1664
+
1665
+ constructor(
1666
+ properties?: Partial<{
1667
+ key: string;
1668
+ value: string;
1669
+ negate: boolean;
1670
+ }>,
1671
+ );
1672
+ _init(...args: any[]): void;
1673
+ }
1674
+
1675
+ type DbInterface = typeof Db;
1676
+ class HashContext {
1677
+ static $gtype: GObject.GType<HashContext>;
1678
+
1679
+ // Own fields of Dmap.HashContext
1680
+
1681
+ buf: number[];
1682
+ bits: number[];
1683
+ 'in': Uint8Array;
1684
+ version: number;
1685
+
1686
+ // Constructors of Dmap.HashContext
1687
+
1688
+ constructor(
1689
+ properties?: Partial<{
1690
+ buf: number[];
1691
+ bits: number[];
1692
+ in: Uint8Array;
1693
+ version: number;
1694
+ }>,
1695
+ );
1696
+ _init(...args: any[]): void;
1697
+ }
1698
+
1699
+ type ImageConnectionClass = typeof ImageConnection;
1700
+ abstract class ImageConnectionPrivate {
1701
+ static $gtype: GObject.GType<ImageConnectionPrivate>;
1702
+
1703
+ // Constructors of Dmap.ImageConnectionPrivate
1704
+
1705
+ _init(...args: any[]): void;
1706
+ }
1707
+
1708
+ type ImageRecordInterface = typeof ImageRecord;
1709
+ type ImageShareClass = typeof ImageShare;
1710
+ abstract class ImageSharePrivate {
1711
+ static $gtype: GObject.GType<ImageSharePrivate>;
1712
+
1713
+ // Constructors of Dmap.ImageSharePrivate
1714
+
1715
+ _init(...args: any[]): void;
1716
+ }
1717
+
1718
+ type MdnsBrowserClass = typeof MdnsBrowser;
1719
+ abstract class MdnsBrowserPrivate {
1720
+ static $gtype: GObject.GType<MdnsBrowserPrivate>;
1721
+
1722
+ // Constructors of Dmap.MdnsBrowserPrivate
1723
+
1724
+ _init(...args: any[]): void;
1725
+ }
1726
+
1727
+ type MdnsPublisherClass = typeof MdnsPublisher;
1728
+ abstract class MdnsPublisherPrivate {
1729
+ static $gtype: GObject.GType<MdnsPublisherPrivate>;
1730
+
1731
+ // Constructors of Dmap.MdnsPublisherPrivate
1732
+
1733
+ _init(...args: any[]): void;
1734
+ }
1735
+
1736
+ type MdnsServiceClass = typeof MdnsService;
1737
+ abstract class MdnsServicePrivate {
1738
+ static $gtype: GObject.GType<MdnsServicePrivate>;
1739
+
1740
+ // Constructors of Dmap.MdnsServicePrivate
1741
+
1742
+ _init(...args: any[]): void;
1743
+ }
1744
+
1745
+ class MetaDataMap {
1746
+ static $gtype: GObject.GType<MetaDataMap>;
1747
+
1748
+ // Own fields of Dmap.MetaDataMap
1749
+
1750
+ tag: string;
1751
+ md: number;
1752
+
1753
+ // Constructors of Dmap.MetaDataMap
1754
+
1755
+ constructor(
1756
+ properties?: Partial<{
1757
+ tag: string;
1758
+ md: number;
1759
+ }>,
1760
+ );
1761
+ _init(...args: any[]): void;
1762
+ }
1763
+
1764
+ class MlclBits {
1765
+ static $gtype: GObject.GType<MlclBits>;
1766
+
1767
+ // Own fields of Dmap.MlclBits
1768
+
1769
+ bits: Bits;
1770
+ share: Share;
1771
+
1772
+ // Constructors of Dmap.MlclBits
1773
+
1774
+ _init(...args: any[]): void;
1775
+ }
1776
+
1777
+ class Playlist {
1778
+ static $gtype: GObject.GType<Playlist>;
1779
+
1780
+ // Own fields of Dmap.Playlist
1781
+
1782
+ name: string;
1783
+ id: number;
1784
+ uris: any[];
1785
+
1786
+ // Constructors of Dmap.Playlist
1787
+
1788
+ constructor(
1789
+ properties?: Partial<{
1790
+ name: string;
1791
+ id: number;
1792
+ }>,
1793
+ );
1794
+ _init(...args: any[]): void;
1795
+ }
1796
+
1797
+ type RecordFactoryInterface = typeof RecordFactory;
1798
+ type RecordInterface = typeof Record;
1799
+ type ShareClass = typeof Share;
1800
+ abstract class SharePrivate {
1801
+ static $gtype: GObject.GType<SharePrivate>;
1802
+
1803
+ // Constructors of Dmap.SharePrivate
1804
+
1805
+ _init(...args: any[]): void;
1806
+ }
1807
+
1808
+ type TranscodeStreamClass = typeof TranscodeStream;
1809
+ abstract class TranscodeStreamPrivate {
1810
+ static $gtype: GObject.GType<TranscodeStreamPrivate>;
1811
+
1812
+ // Constructors of Dmap.TranscodeStreamPrivate
1813
+
1814
+ _init(...args: any[]): void;
1815
+ }
1816
+
1817
+ module AvRecord {
1818
+ // Constructor properties interface
1819
+
1820
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
1821
+ bitrate: number;
1822
+ disc: number;
1823
+ duration: number;
1824
+ filesize: number;
1825
+ firstseen: number;
1826
+ format: string;
1827
+ has_video: boolean;
1828
+ hasVideo: boolean;
1829
+ hash: any[];
1830
+ location: string;
1831
+ mediakind: MediaKind;
1832
+ mtime: number;
1833
+ rating: number;
1834
+ songalbum: string;
1835
+ songalbumid: number;
1836
+ songartist: string;
1837
+ songgenre: string;
1838
+ sort_album: string;
1839
+ sortAlbum: string;
1840
+ sort_artist: string;
1841
+ sortArtist: string;
1842
+ title: string;
1843
+ track: number;
1844
+ year: number;
1845
+ }
1846
+ }
1847
+
1848
+ export interface AvRecordNamespace {
1849
+ $gtype: GObject.GType<AvRecord>;
1850
+ prototype: AvRecord;
1851
+
1852
+ /**
1853
+ * Compares the two records associated with the provided keys according
1854
+ * to album. Suitable to sort lists of albums.
1855
+ * @param a first ID.
1856
+ * @param b second ID.
1857
+ * @param db A DmapDb for which a and b are valid ID's.
1858
+ */
1859
+ cmp_by_album(a: any | null, b: any | null, db: Db): number;
1860
+ }
1861
+ interface AvRecord extends GObject.Object {
1862
+ // Own properties of Dmap.AvRecord
1863
+
1864
+ get bitrate(): number;
1865
+ set bitrate(val: number);
1866
+ get disc(): number;
1867
+ set disc(val: number);
1868
+ get duration(): number;
1869
+ set duration(val: number);
1870
+ get filesize(): number;
1871
+ set filesize(val: number);
1872
+ get firstseen(): number;
1873
+ set firstseen(val: number);
1874
+ get format(): string;
1875
+ set format(val: string);
1876
+ get has_video(): boolean;
1877
+ set has_video(val: boolean);
1878
+ get hasVideo(): boolean;
1879
+ set hasVideo(val: boolean);
1880
+ get hash(): any[];
1881
+ set hash(val: any[]);
1882
+ get location(): string;
1883
+ set location(val: string);
1884
+ get mediakind(): MediaKind;
1885
+ set mediakind(val: MediaKind);
1886
+ get mtime(): number;
1887
+ set mtime(val: number);
1888
+ get rating(): number;
1889
+ set rating(val: number);
1890
+ get songalbum(): string;
1891
+ set songalbum(val: string);
1892
+ get songalbumid(): number;
1893
+ set songalbumid(val: number);
1894
+ get songartist(): string;
1895
+ set songartist(val: string);
1896
+ get songgenre(): string;
1897
+ set songgenre(val: string);
1898
+ get sort_album(): string;
1899
+ set sort_album(val: string);
1900
+ get sortAlbum(): string;
1901
+ set sortAlbum(val: string);
1902
+ get sort_artist(): string;
1903
+ set sort_artist(val: string);
1904
+ get sortArtist(): string;
1905
+ set sortArtist(val: string);
1906
+ get title(): string;
1907
+ set title(val: string);
1908
+ get track(): number;
1909
+ set track(val: number);
1910
+ get year(): number;
1911
+ set year(val: number);
1912
+
1913
+ // Own methods of Dmap.AvRecord
1914
+
1915
+ itunes_compat(): boolean;
1916
+ read(): Gio.InputStream;
1917
+
1918
+ // Own virtual methods of Dmap.AvRecord
1919
+
1920
+ vfunc_itunes_compat(): boolean;
1921
+ vfunc_read(): Gio.InputStream;
1922
+ }
1923
+
1924
+ export const AvRecord: AvRecordNamespace;
1925
+
1926
+ module ContainerDb {
1927
+ // Constructor properties interface
1928
+
1929
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
1930
+ }
1931
+
1932
+ export interface ContainerDbNamespace {
1933
+ $gtype: GObject.GType<ContainerDb>;
1934
+ prototype: ContainerDb;
1935
+ }
1936
+ interface ContainerDb extends GObject.Object {
1937
+ // Own methods of Dmap.ContainerDb
1938
+
1939
+ /**
1940
+ * Add a record to the database.
1941
+ * @param record A record.
1942
+ */
1943
+ add(record: ContainerRecord): void;
1944
+ count(): number;
1945
+ /**
1946
+ * Apply a function to each record in a container database.
1947
+ * @param func The function to apply to each record in the database.
1948
+ */
1949
+ foreach(func: IdContainerRecordFunc): void;
1950
+ lookup_by_id(id: number): ContainerRecord;
1951
+
1952
+ // Own virtual methods of Dmap.ContainerDb
1953
+
1954
+ /**
1955
+ * Add a record to the database.
1956
+ * @param record A record.
1957
+ */
1958
+ vfunc_add(record: ContainerRecord): void;
1959
+ vfunc_count(): number;
1960
+ /**
1961
+ * Apply a function to each record in a container database.
1962
+ * @param func The function to apply to each record in the database.
1963
+ */
1964
+ vfunc_foreach(func: IdContainerRecordFunc): void;
1965
+ vfunc_lookup_by_id(id: number): ContainerRecord;
1966
+ }
1967
+
1968
+ export const ContainerDb: ContainerDbNamespace;
1969
+
1970
+ module ContainerRecord {
1971
+ // Constructor properties interface
1972
+
1973
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
1974
+ name: string;
1975
+ }
1976
+ }
1977
+
1978
+ export interface ContainerRecordNamespace {
1979
+ $gtype: GObject.GType<ContainerRecord>;
1980
+ prototype: ContainerRecord;
1981
+ }
1982
+ interface ContainerRecord extends GObject.Object {
1983
+ // Own properties of Dmap.ContainerRecord
1984
+
1985
+ get name(): string;
1986
+ set name(val: string);
1987
+
1988
+ // Own methods of Dmap.ContainerRecord
1989
+
1990
+ /**
1991
+ * Add a record to the database. It is assumed that the record is placed
1992
+ * directly into the database (not copied) and not freed.
1993
+ * @param record A DmapRecord.
1994
+ * @param id The record's ID.
1995
+ */
1996
+ add_entry(record: Record, id: number): void;
1997
+ get_entries(): Db;
1998
+ get_entry_count(): number;
1999
+ get_id(): number;
2000
+
2001
+ // Own virtual methods of Dmap.ContainerRecord
2002
+
2003
+ /**
2004
+ * Add a record to the database. It is assumed that the record is placed
2005
+ * directly into the database (not copied) and not freed.
2006
+ * @param record A DmapRecord.
2007
+ * @param id The record's ID.
2008
+ */
2009
+ vfunc_add_entry(record: Record, id: number): void;
2010
+ vfunc_get_entries(): Db;
2011
+ vfunc_get_entry_count(): number;
2012
+ vfunc_get_id(): number;
2013
+ }
2014
+
2015
+ export const ContainerRecord: ContainerRecordNamespace;
2016
+
2017
+ module ControlPlayer {
2018
+ // Constructor properties interface
2019
+
2020
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
2021
+ play_state: ControlPlayState;
2022
+ playState: ControlPlayState;
2023
+ playing_time: number;
2024
+ playingTime: number;
2025
+ repeat_state: ControlRepeatState;
2026
+ repeatState: ControlRepeatState;
2027
+ shuffle_state: boolean;
2028
+ shuffleState: boolean;
2029
+ volume: number;
2030
+ }
2031
+ }
2032
+
2033
+ export interface ControlPlayerNamespace {
2034
+ $gtype: GObject.GType<ControlPlayer>;
2035
+ prototype: ControlPlayer;
2036
+ }
2037
+ interface ControlPlayer extends GObject.Object {
2038
+ // Own properties of Dmap.ControlPlayer
2039
+
2040
+ get play_state(): ControlPlayState;
2041
+ set play_state(val: ControlPlayState);
2042
+ get playState(): ControlPlayState;
2043
+ set playState(val: ControlPlayState);
2044
+ get playing_time(): number;
2045
+ set playing_time(val: number);
2046
+ get playingTime(): number;
2047
+ set playingTime(val: number);
2048
+ get repeat_state(): ControlRepeatState;
2049
+ set repeat_state(val: ControlRepeatState);
2050
+ get repeatState(): ControlRepeatState;
2051
+ set repeatState(val: ControlRepeatState);
2052
+ get shuffle_state(): boolean;
2053
+ set shuffle_state(val: boolean);
2054
+ get shuffleState(): boolean;
2055
+ set shuffleState(val: boolean);
2056
+ get volume(): number;
2057
+ set volume(val: number);
2058
+
2059
+ // Own methods of Dmap.ControlPlayer
2060
+
2061
+ cue_clear(): void;
2062
+ cue_play(records: Record[], index: number): void;
2063
+ next_item(): void;
2064
+ now_playing_artwork(width: number, height: number): string;
2065
+ now_playing_record(): AvRecord;
2066
+ pause(): void;
2067
+ play_pause(): void;
2068
+ prev_item(): void;
2069
+
2070
+ // Own virtual methods of Dmap.ControlPlayer
2071
+
2072
+ vfunc_cue_clear(): void;
2073
+ vfunc_cue_play(records: Record[], index: number): void;
2074
+ vfunc_next_item(): void;
2075
+ vfunc_now_playing_artwork(width: number, height: number): string;
2076
+ vfunc_now_playing_record(): AvRecord;
2077
+ vfunc_pause(): void;
2078
+ vfunc_play_pause(): void;
2079
+ vfunc_prev_item(): void;
2080
+ }
2081
+
2082
+ export const ControlPlayer: ControlPlayerNamespace;
2083
+
2084
+ module Db {
2085
+ // Constructor properties interface
2086
+
2087
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
2088
+ }
2089
+
2090
+ export interface DbNamespace {
2091
+ $gtype: GObject.GType<Db>;
2092
+ prototype: Db;
2093
+ }
2094
+ interface Db extends GObject.Object {
2095
+ // Own methods of Dmap.Db
2096
+
2097
+ /**
2098
+ * Add a record to the database.
2099
+ * @param record A database record.
2100
+ * @returns The ID for the newly added record or @DMAP_DB_ID_BAD on failure. A reference to the record will be retained by the database (if required; an adapter-type implementation might not want to retain a reference as the record data may be placed elsewhere). In all cases, a returned record should be unrefed by the calling code.
2101
+ */
2102
+ add(record: Record): number;
2103
+ /**
2104
+ * Create a record and add it to the database.
2105
+ * @param path A path to an appropriate media file.
2106
+ * @returns The ID for the newly added record or DMAP_DB_ID_BAD on failure. See also the notes for dmap_db_add regarding reference counting.
2107
+ */
2108
+ add_path(path: string): number;
2109
+ /**
2110
+ * Add a record to the database and assign it the given ID. `id` cannot be
2111
+ * `DMAP_DB_ID_BAD`.
2112
+ * @param record A database record.
2113
+ * @param id A database record ID.
2114
+ * @returns The ID for the newly added record or DMAP_DB_ID_BAD on failure. See also the notes for dmap_db_add regarding reference counting.
2115
+ */
2116
+ add_with_id(record: Record, id: number): number;
2117
+ apply_filter(filter_def: DbFilterDefinition[]): GLib.HashTable<number, Record>;
2118
+ count(): number;
2119
+ /**
2120
+ * Apply a function to each record in a media database.
2121
+ * @param func The function to apply to each record in the database.
2122
+ */
2123
+ foreach(func: IdRecordFunc): void;
2124
+ lookup_by_id(id: number): Record;
2125
+ lookup_id_by_location(location: string): number;
2126
+
2127
+ // Own virtual methods of Dmap.Db
2128
+
2129
+ /**
2130
+ * Add a record to the database.
2131
+ * @param record A database record.
2132
+ */
2133
+ vfunc_add(record: Record): number;
2134
+ /**
2135
+ * Create a record and add it to the database.
2136
+ * @param path A path to an appropriate media file.
2137
+ */
2138
+ vfunc_add_path(path: string): number;
2139
+ /**
2140
+ * Add a record to the database and assign it the given ID. `id` cannot be
2141
+ * `DMAP_DB_ID_BAD`.
2142
+ * @param record A database record.
2143
+ * @param id A database record ID.
2144
+ */
2145
+ vfunc_add_with_id(record: Record, id: number): number;
2146
+ vfunc_count(): number;
2147
+ /**
2148
+ * Apply a function to each record in a media database.
2149
+ * @param func The function to apply to each record in the database.
2150
+ */
2151
+ vfunc_foreach(func: IdRecordFunc): void;
2152
+ vfunc_lookup_by_id(id: number): Record;
2153
+ vfunc_lookup_id_by_location(location: string): number;
2154
+ }
2155
+
2156
+ export const Db: DbNamespace;
2157
+
2158
+ module ImageRecord {
2159
+ // Constructor properties interface
2160
+
2161
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
2162
+ aspect_ratio: string;
2163
+ aspectRatio: string;
2164
+ comments: string;
2165
+ creation_date: number;
2166
+ creationDate: number;
2167
+ filename: string;
2168
+ format: string;
2169
+ hash: any[];
2170
+ large_filesize: number;
2171
+ largeFilesize: number;
2172
+ location: string;
2173
+ pixel_height: number;
2174
+ pixelHeight: number;
2175
+ pixel_width: number;
2176
+ pixelWidth: number;
2177
+ rating: number;
2178
+ thumbnail: any[];
2179
+ }
2180
+ }
2181
+
2182
+ export interface ImageRecordNamespace {
2183
+ $gtype: GObject.GType<ImageRecord>;
2184
+ prototype: ImageRecord;
2185
+ }
2186
+ interface ImageRecord extends GObject.Object {
2187
+ // Own properties of Dmap.ImageRecord
2188
+
2189
+ get aspect_ratio(): string;
2190
+ set aspect_ratio(val: string);
2191
+ get aspectRatio(): string;
2192
+ set aspectRatio(val: string);
2193
+ get comments(): string;
2194
+ set comments(val: string);
2195
+ get creation_date(): number;
2196
+ set creation_date(val: number);
2197
+ get creationDate(): number;
2198
+ set creationDate(val: number);
2199
+ get filename(): string;
2200
+ set filename(val: string);
2201
+ get format(): string;
2202
+ set format(val: string);
2203
+ get hash(): any[];
2204
+ set hash(val: any[]);
2205
+ get large_filesize(): number;
2206
+ set large_filesize(val: number);
2207
+ get largeFilesize(): number;
2208
+ set largeFilesize(val: number);
2209
+ get location(): string;
2210
+ set location(val: string);
2211
+ get pixel_height(): number;
2212
+ set pixel_height(val: number);
2213
+ get pixelHeight(): number;
2214
+ set pixelHeight(val: number);
2215
+ get pixel_width(): number;
2216
+ set pixel_width(val: number);
2217
+ get pixelWidth(): number;
2218
+ set pixelWidth(val: number);
2219
+ get rating(): number;
2220
+ set rating(val: number);
2221
+ get thumbnail(): any[];
2222
+ set thumbnail(val: any[]);
2223
+
2224
+ // Own methods of Dmap.ImageRecord
2225
+
2226
+ read(): Gio.InputStream;
2227
+
2228
+ // Own virtual methods of Dmap.ImageRecord
2229
+
2230
+ vfunc_read(): Gio.InputStream;
2231
+ }
2232
+
2233
+ export const ImageRecord: ImageRecordNamespace;
2234
+
2235
+ module Record {
2236
+ // Constructor properties interface
2237
+
2238
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
2239
+ }
2240
+
2241
+ export interface RecordNamespace {
2242
+ $gtype: GObject.GType<Record>;
2243
+ prototype: Record;
2244
+ }
2245
+ interface Record extends GObject.Object {
2246
+ // Own methods of Dmap.Record
2247
+
2248
+ set_from_blob(blob: Uint8Array | string): boolean;
2249
+ to_blob(): Uint8Array;
2250
+
2251
+ // Own virtual methods of Dmap.Record
2252
+
2253
+ vfunc_set_from_blob(blob: Uint8Array | string): boolean;
2254
+ vfunc_to_blob(): Uint8Array;
2255
+ }
2256
+
2257
+ export const Record: RecordNamespace;
2258
+
2259
+ module RecordFactory {
2260
+ // Constructor properties interface
2261
+
2262
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
2263
+ }
2264
+
2265
+ export interface RecordFactoryNamespace {
2266
+ $gtype: GObject.GType<RecordFactory>;
2267
+ prototype: RecordFactory;
2268
+ }
2269
+ interface RecordFactory extends GObject.Object {
2270
+ // Own methods of Dmap.RecordFactory
2271
+
2272
+ create(user_data?: any | null): Record;
2273
+
2274
+ // Own virtual methods of Dmap.RecordFactory
2275
+
2276
+ vfunc_create(): Record;
2277
+ }
2278
+
2279
+ export const RecordFactory: RecordFactoryNamespace;
2280
+
2281
+ type Bits = number;
2282
+ /**
2283
+ * Name of the imported GIR library
2284
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
2285
+ */
2286
+ const __name__: string;
2287
+ /**
2288
+ * Version of the imported GIR library
2289
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
2290
+ */
2291
+ const __version__: string;
2292
+ }
2293
+
2294
+ export default Dmap;
2295
+ // END