@girs/grss-0.7 0.7.0-3.0.0-beta.12

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/grss-0.7.d.ts ADDED
@@ -0,0 +1,1848 @@
1
+
2
+ /*
3
+ * Type Definitions for Gjs (https://gjs.guide/)
4
+ *
5
+ * These type definitions are automatically generated, do not edit them by hand.
6
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gjs
7
+ */
8
+ /**
9
+ * Grss-0.7
10
+ */
11
+
12
+ import type libxml2 from '@girs/libxml2-2.0';
13
+ import type Soup from '@girs/soup-2.4';
14
+ import type Gio from '@girs/gio-2.0';
15
+ import type GObject from '@girs/gobject-2.0';
16
+ import type GLib from '@girs/glib-2.0';
17
+
18
+ export namespace Grss {
19
+
20
+ module FeedAtomFormatter {
21
+
22
+ // Constructor properties interface
23
+
24
+ interface ConstructorProperties extends FeedFormatter.ConstructorProperties {
25
+ }
26
+
27
+ }
28
+
29
+ interface FeedAtomFormatter {
30
+
31
+ // Own fields of Grss-0.7.Grss.FeedAtomFormatter
32
+
33
+ parent: FeedFormatter & GObject.Object
34
+
35
+ // Class property signals of Grss-0.7.Grss.FeedAtomFormatter
36
+
37
+ connect(sigName: string, callback: (...args: any[]) => void): number
38
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
39
+ emit(sigName: string, ...args: any[]): void
40
+ disconnect(id: number): void
41
+ }
42
+
43
+ class FeedAtomFormatter extends FeedFormatter {
44
+
45
+ // Own properties of Grss-0.7.Grss.FeedAtomFormatter
46
+
47
+ static name: string
48
+ static $gtype: GObject.GType<FeedAtomFormatter>
49
+
50
+ // Constructors of Grss-0.7.Grss.FeedAtomFormatter
51
+
52
+ constructor(config?: FeedAtomFormatter.ConstructorProperties)
53
+ constructor()
54
+ static new(): FeedAtomFormatter
55
+ _init(config?: FeedAtomFormatter.ConstructorProperties): void
56
+ }
57
+
58
+ module FeedChannel {
59
+
60
+ // Constructor properties interface
61
+
62
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
63
+ }
64
+
65
+ }
66
+
67
+ interface FeedChannel {
68
+
69
+ // Own fields of Grss-0.7.Grss.FeedChannel
70
+
71
+ parent: GObject.Object
72
+ priv: FeedChannelPrivate
73
+
74
+ // Owm methods of Grss-0.7.Grss.FeedChannel
75
+
76
+ /**
77
+ * To add a contributor to the `channel`.
78
+ * @param contributor a #GrssPerson.
79
+ */
80
+ add_contributor(contributor: Person): void
81
+ /**
82
+ * To add a cookie related to the `channel,` will be involved in HTTP sessions
83
+ * while fetching it. More cookie can be added to every #GrssFeedChannel
84
+ * @param cookie HTML cookie to add to the #GrssFeedChannel's cookie jar
85
+ */
86
+ add_cookie(cookie: Soup.Cookie): void
87
+ /**
88
+ * Utility to fetch and populate a #GrssFeedChannel for the first time, and init
89
+ * all his internal values. Only the source URL has to be set in `channel`
90
+ * (with grss_feed_channel_set_source()). Be aware this function is sync, do not
91
+ * returns until the feed isn't downloaded and parsed.
92
+ * @returns %TRUE if the feed is correctly fetched and parsed, %FALSE otherwise.
93
+ */
94
+ fetch(): boolean
95
+ /**
96
+ * Utility to fetch and populate a #GrssFeedChannel, and retrieve all its
97
+ * items.
98
+ * @returns a GList of #GrssFeedItem, to be completely unreferenced and freed when no longer in use, or %NULL if an error occurs.
99
+ */
100
+ fetch_all(): FeedItem[]
101
+ /**
102
+ * Similar to grss_feed_channel_fetch_all(), but asyncronous.
103
+ * @param callback function to invoke at the end of the download.
104
+ */
105
+ fetch_all_async(callback: Gio.AsyncReadyCallback<this> | null): void
106
+ /**
107
+ * Finalizes an asyncronous operation started with
108
+ * grss_feed_channel_fetch_all_async().
109
+ * @param res the #GAsyncResult passed to the callback.
110
+ * @returns list of items fetched from the #GrssFeedChannel, or %NULL if @error is set. The list (and contained items) is freed at the end of the callback
111
+ */
112
+ fetch_all_finish(res: Gio.AsyncResult): FeedItem[]
113
+ /**
114
+ * Similar to grss_feed_channel_fetch(), but asyncronous.
115
+ * @param callback function to invoke at the end of the download.
116
+ */
117
+ fetch_async(callback: Gio.AsyncReadyCallback<this> | null): void
118
+ /**
119
+ * If a fetch operation was scheduled with grss_feed_channel_fetch_async() or
120
+ * grss_feed_channel_fetch_all_async(), cancel it.
121
+ * @returns %TRUE if a fetch was scheduled (and now cancelled), %FALSE if this function had nothing to do
122
+ */
123
+ fetch_cancel(): boolean
124
+ /**
125
+ * Finalizes an asyncronous operation started with
126
+ * grss_feed_channel_fetch_async().
127
+ * @param res the #GAsyncResult passed to the callback.
128
+ * @returns %TRUE if @channel informations have been successfully fetched, %FALSE otherwise.
129
+ */
130
+ fetch_finish(res: Gio.AsyncResult): boolean
131
+ /**
132
+ * Retrieves category of the `channel`.
133
+ * @returns category of the feed, or %NULL.
134
+ */
135
+ get_category(): string | null
136
+ /**
137
+ * Retrieves reference to the contributors of the `channel`.
138
+ * @returns list of contributors to the channel, or %NULL.
139
+ */
140
+ get_contributors(): Person[]
141
+ /**
142
+ * Retrieves reference to the HTML cookies of the `channel`.
143
+ * The list and the individual cookies should all be freed after use.
144
+ * You can use soup_cookies_free.
145
+ * @returns list of cookies to the channel, or %NULL.
146
+ */
147
+ get_cookies(): Soup.Cookie[]
148
+ /**
149
+ * Retrieves indications about the copyright.
150
+ * @returns copyright of the @channel, or %NULL.
151
+ */
152
+ get_copyright(): string | null
153
+ /**
154
+ * Retrieves the description of `channel`.
155
+ * @returns description of the feed, or %NULL.
156
+ */
157
+ get_description(): string | null
158
+ /**
159
+ * Retrieves reference to the editor or the `channel`.
160
+ * @returns #GrssPerson, or %NULL.
161
+ */
162
+ get_editor(): Person
163
+ /**
164
+ * Retrieves the file format of `channel`.
165
+ * @returns file format of channel.
166
+ */
167
+ get_format(): string | null
168
+ /**
169
+ * Retrieves information about the feed's software generator.
170
+ * @returns generator of @channel, or %NULL.
171
+ */
172
+ get_generator(): string | null
173
+ /**
174
+ * GZIP compression of the channel is either on or off.
175
+ * @returns %TRUE if @channel has GZIP compression on.
176
+ */
177
+ get_gzip_compression(): boolean
178
+ /**
179
+ * Retrieves the homepage of the site for which `channel` is the feed.
180
+ * @returns reference homepage of the feed, or %NULL.
181
+ */
182
+ get_homepage(): string | null
183
+ /**
184
+ * Retrieves URL of the favicon of the channel (and/or the website for which
185
+ * this is the feed).
186
+ * @returns URL of the favicon, or %NULL.
187
+ */
188
+ get_icon(): string | null
189
+ /**
190
+ * Retrieves the URL of the image assigned to the channel.
191
+ * @returns URL of the image, or %NULL.
192
+ */
193
+ get_image(): string | null
194
+ /**
195
+ * Retrieves the language of the `channel`.
196
+ * @returns string rappresenting the language of channel, or %NULL.
197
+ */
198
+ get_language(): string | null
199
+ /**
200
+ * Retrieves the publishing time of `channel`.
201
+ * @returns time of feed's publish.
202
+ */
203
+ get_publish_time(): number
204
+ /**
205
+ * Retrieves information about the PubSubHubbub hub of the channel.
206
+ * @param hub location for the hub string, or %NULL.
207
+ * @returns %TRUE if a valid PubSubHubbub hub has been set for the @channel, %FALSE otherwise.
208
+ */
209
+ get_pubsubhub(hub: string | null): boolean
210
+ /**
211
+ * Retrieves information about the RSSCloud coordinates of the channel.
212
+ * @param path location for the path string, or %NULL.
213
+ * @param protocol location for the protocol string, or %NULL.
214
+ * @returns %TRUE if a valid RSSCloud path has been set for the @channel, %FALSE otherwise.
215
+ */
216
+ get_rsscloud(path: string | null, protocol: string | null): boolean
217
+ /**
218
+ * Retrieves URL where to fetch the `channel`.
219
+ * @returns URL of the channel.
220
+ */
221
+ get_source(): string | null
222
+ /**
223
+ * Retrieves title of the `channel`.
224
+ * @returns title of the feed, or %NULL.
225
+ */
226
+ get_title(): string | null
227
+ /**
228
+ * Retrieves the update interval for the feed. Pay attention to the fact the
229
+ * value can be unset, and the function returns 0: in this case the caller
230
+ * must manually set a default update interval with
231
+ * grss_feed_channel_set_update_interval().
232
+ * @returns update interval for the @channel, in minutes.
233
+ */
234
+ get_update_interval(): number
235
+ /**
236
+ * Retrieves the update time of `channel`.
237
+ * @returns time of the feed's latest update. If this value was not set (with grss_feed_channel_set_update_time()) returns grss_feed_channel_get_publish_time().
238
+ */
239
+ get_update_time(): number
240
+ /**
241
+ * Retrieves reference to the webmaster of the feed.
242
+ * @returns webmaster of @channel, or %NULL.
243
+ */
244
+ get_webmaster(): string | null
245
+ /**
246
+ * To set the category of the `channel`.
247
+ * @param category category of the feed.
248
+ */
249
+ set_category(category: string | null): void
250
+ /**
251
+ * To set the copyright of the feed.
252
+ * @param copyright copyright of the channel.
253
+ */
254
+ set_copyright(copyright: string | null): void
255
+ /**
256
+ * To set the description of `channel`.
257
+ * @param description description of the feed.
258
+ */
259
+ set_description(description: string | null): void
260
+ /**
261
+ * To set the editor of the `channel`.
262
+ * @param editor a #GrssPerson.
263
+ */
264
+ set_editor(editor: Person): void
265
+ /**
266
+ * To assign a file format to the feed.
267
+ * @param format format of the file, such as "application/atom+xml" or "application/rss+xml".
268
+ */
269
+ set_format(format: string | null): void
270
+ /**
271
+ * To set information about the software generator of `channel`.
272
+ * @param generator software generator of the feed.
273
+ */
274
+ set_generator(generator: string | null): void
275
+ /**
276
+ * Set the GZIP compression for the channel to on or off.
277
+ * @param value %TRUE to enable GZIP compression when fetching the channel
278
+ */
279
+ set_gzip_compression(value: boolean): void
280
+ /**
281
+ * To set the homepage of the site the `channel` belongs.
282
+ * @param homepage homepage for the main website.
283
+ * @returns %TRUE if @homepage is a valid URL, %FALSE otherwise
284
+ */
285
+ set_homepage(homepage: string | null): boolean
286
+ /**
287
+ * To set the URL of the icon rappresenting `channel`.
288
+ * @param icon URL where to retrieve the favicon.
289
+ * @returns %TRUE if @icon is a valid URL, %FALSE otherwise
290
+ */
291
+ set_icon(icon: string | null): boolean
292
+ /**
293
+ * To set a rappresentative image to `channel`.
294
+ * @param image URL of the image.
295
+ * @returns %TRUE if @image is a valid URL, %FALSE otherwise
296
+ */
297
+ set_image(image: string | null): boolean
298
+ /**
299
+ * To set the language of `channel`.
300
+ * @param language string holding the language of the feed.
301
+ */
302
+ set_language(language: string | null): void
303
+ /**
304
+ * To set the time of publishing for the feed.
305
+ * @param publish timestamp of publishing.
306
+ */
307
+ set_publish_time(publish: number): void
308
+ /**
309
+ * To set information about PubSubHubbub for the channel. To unset the hub,
310
+ * pass %NULL as parameter.
311
+ * @param hub hub for the feed, or %NULL.
312
+ * @returns %TRUE if @hub is a valid URL, %FALSE otherwise
313
+ */
314
+ set_pubsubhub(hub: string | null): boolean
315
+ /**
316
+ * To set information about RSSCloud notifications for the channel.
317
+ * @param path complete references of the URL where to register subscription, e.g. http://example.com/rsscloudNotify .
318
+ * @param protocol type of protocol used for notifications.
319
+ */
320
+ set_rsscloud(path: string | null, protocol: string | null): void
321
+ /**
322
+ * To assign the URL where to fetch the feed.
323
+ * @param source URL of the feed.
324
+ * @returns %TRUE if @source is a valid URL, %FALSE otherwise
325
+ */
326
+ set_source(source: string | null): boolean
327
+ /**
328
+ * To set a title to the `channel`.
329
+ * @param title title of the feed.
330
+ */
331
+ set_title(title: string | null): void
332
+ /**
333
+ * To set the update interval for `channel`.
334
+ * @param minutes update interval, in minutes.
335
+ */
336
+ set_update_interval(minutes: number): void
337
+ /**
338
+ * To set the latest update time of `channel`.
339
+ * @param update update time of the feed.
340
+ */
341
+ set_update_time(update: number): void
342
+ /**
343
+ * To assign a webmaster to the `channel`.
344
+ * @param webmaster webmaster of the feed.
345
+ */
346
+ set_webmaster(webmaster: string | null): void
347
+
348
+ // Class property signals of Grss-0.7.Grss.FeedChannel
349
+
350
+ connect(sigName: string, callback: (...args: any[]) => void): number
351
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
352
+ emit(sigName: string, ...args: any[]): void
353
+ disconnect(id: number): void
354
+ }
355
+
356
+ class FeedChannel extends GObject.Object {
357
+
358
+ // Own properties of Grss-0.7.Grss.FeedChannel
359
+
360
+ static name: string
361
+ static $gtype: GObject.GType<FeedChannel>
362
+
363
+ // Constructors of Grss-0.7.Grss.FeedChannel
364
+
365
+ constructor(config?: FeedChannel.ConstructorProperties)
366
+ /**
367
+ * Allocates a new #GrssFeedChannel.
368
+ * @constructor
369
+ * @returns a #GrssFeedChannel.
370
+ */
371
+ constructor()
372
+ /**
373
+ * Allocates a new #GrssFeedChannel.
374
+ * @constructor
375
+ * @returns a #GrssFeedChannel.
376
+ */
377
+ static new(): FeedChannel
378
+ /**
379
+ * Allocates a new #GrssFeedChannel and init it with contents found in specified
380
+ * file.
381
+ * @constructor
382
+ * @param path path of the file to parse.
383
+ * @returns a #GrssFeedChannel, or %NULL if the file in @path is not a valid document.
384
+ */
385
+ static new_from_file(path: string | null): FeedChannel
386
+ /**
387
+ * Allocates a new #GrssFeedChannel and init it with contents found in specified
388
+ * memory block.
389
+ * @constructor
390
+ * @param data string to parse.
391
+ * @returns a #GrssFeedChannel, or %NULL if an error occurs.
392
+ */
393
+ static new_from_memory(data: string | null): FeedChannel
394
+ /**
395
+ * Allocates a new #GrssFeedChannel and init it with contents found in specified
396
+ * XML document.
397
+ * @constructor
398
+ * @param doc an XML document previously parsed with libxml2.
399
+ * @returns a #GrssFeedChannel, or %NULL if an error occurs.
400
+ */
401
+ static new_from_xml(doc: libxml2.DocPtr): FeedChannel
402
+ /**
403
+ * Allocates a new #GrssFeedChannel and assign it the given remote source.
404
+ * @constructor
405
+ * @param source URL of the feed.
406
+ * @returns a #GrssFeedChannel.
407
+ */
408
+ static new_with_source(source: string | null): FeedChannel
409
+ _init(config?: FeedChannel.ConstructorProperties): void
410
+ }
411
+
412
+ module FeedEnclosure {
413
+
414
+ // Constructor properties interface
415
+
416
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
417
+ }
418
+
419
+ }
420
+
421
+ interface FeedEnclosure {
422
+
423
+ // Own fields of Grss-0.7.Grss.FeedEnclosure
424
+
425
+ parent: GObject.Object
426
+ priv: FeedEnclosurePrivate
427
+
428
+ // Owm methods of Grss-0.7.Grss.FeedEnclosure
429
+
430
+ /**
431
+ * Utility to fetch a #GrssFeedEnclosure. Contents are stored in a temporary
432
+ * #GFile, which is suggested to move on a permanent location to keep it over
433
+ * time.
434
+ * @returns temporary file where the contents have been written, or %NULL if an error occours.
435
+ */
436
+ fetch(): Gio.File
437
+ /**
438
+ * Similar to grss_feed_enclosure_fetch(), but asyncronous.
439
+ * @param callback function to invoke at the end of the download.
440
+ */
441
+ fetch_async(callback: Gio.AsyncReadyCallback<this> | null): void
442
+ /**
443
+ * Finalizes an asyncronous operation started with
444
+ * grss_feed_enclosure_fetch_async().
445
+ * @param res the #GAsyncResult passed to the callback.
446
+ * @returns temporary file where the contents have been written, or %NULL if an error occours.
447
+ */
448
+ fetch_finish(res: Gio.AsyncResult): Gio.File
449
+ /**
450
+ * Retrieves the format of the enclosed file.
451
+ * @returns type of @enclosure.
452
+ */
453
+ get_format(): string | null
454
+ /**
455
+ * Retrieves the size of the embedded file.
456
+ * @returns size of the @enclosure, in bytes.
457
+ */
458
+ get_length(): number
459
+ /**
460
+ * Retrieves the URL of the `enclosure`.
461
+ * @returns the URL where the enclosure may be found.
462
+ */
463
+ get_url(): string | null
464
+ /**
465
+ * To set the type of the external file.
466
+ * @param type type of content.
467
+ */
468
+ set_format(type: string | null): void
469
+ /**
470
+ * To set the size of the embedded `enclosure`.
471
+ * @param length size of the enclosure, in bytes.
472
+ */
473
+ set_length(length: number): void
474
+
475
+ // Class property signals of Grss-0.7.Grss.FeedEnclosure
476
+
477
+ connect(sigName: string, callback: (...args: any[]) => void): number
478
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
479
+ emit(sigName: string, ...args: any[]): void
480
+ disconnect(id: number): void
481
+ }
482
+
483
+ class FeedEnclosure extends GObject.Object {
484
+
485
+ // Own properties of Grss-0.7.Grss.FeedEnclosure
486
+
487
+ static name: string
488
+ static $gtype: GObject.GType<FeedEnclosure>
489
+
490
+ // Constructors of Grss-0.7.Grss.FeedEnclosure
491
+
492
+ constructor(config?: FeedEnclosure.ConstructorProperties)
493
+ /**
494
+ * Allocates a new #GrssFeedEnclosure, to be downloaded separately.
495
+ * @constructor
496
+ * @param url URL of the external element.
497
+ * @returns a new #GrssFeedEnclosure.
498
+ */
499
+ constructor(url: string | null)
500
+ /**
501
+ * Allocates a new #GrssFeedEnclosure, to be downloaded separately.
502
+ * @constructor
503
+ * @param url URL of the external element.
504
+ * @returns a new #GrssFeedEnclosure.
505
+ */
506
+ static new(url: string | null): FeedEnclosure
507
+ _init(config?: FeedEnclosure.ConstructorProperties): void
508
+ }
509
+
510
+ module FeedFormatter {
511
+
512
+ // Constructor properties interface
513
+
514
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
515
+ }
516
+
517
+ }
518
+
519
+ interface FeedFormatter {
520
+
521
+ // Own fields of Grss-0.7.Grss.FeedFormatter
522
+
523
+ parent: GObject.Object
524
+ priv: FeedFormatterPrivate
525
+
526
+ // Owm methods of Grss-0.7.Grss.FeedFormatter
527
+
528
+ /**
529
+ * Adds a single #GrssFeedItem in the `formatter`.
530
+ * @param item a #GrssFeedItem to add into the `formatter`.
531
+ */
532
+ add_item(item: FeedItem): void
533
+ /**
534
+ * Adds a list of #GrssFeedItems in the `formatter`.
535
+ * @param items a list of #GrssFeedItems to add into the `formatter`.
536
+ */
537
+ add_items(items: FeedItem[]): void
538
+ /**
539
+ * Formats the assigned #GrssFeedChannel and #GrssFeedItems into a plain text
540
+ * string, accordly to the current #GrssFeedFormatter instance.
541
+ * @returns a string containing the plain text rappresentation of the given channel containing the given items.
542
+ */
543
+ format(): string | null
544
+ /**
545
+ * Gets the current #GrssFeedChannel assigned to the `formatter`.
546
+ * @returns a #GrssFeedChannel, or %NULL if none has been assigned.
547
+ */
548
+ get_channel(): FeedChannel
549
+ /**
550
+ * Gets the current #GrssFeedItems assigned to the `formatter`.
551
+ * @returns a list of #GrssFeedItems, or %NULL if none has been assigned.
552
+ */
553
+ get_items(): FeedItem[]
554
+ /**
555
+ * Resets the status of the #GrssFeedFormatter, cleaning up the assigned
556
+ * #GrssFeedChannel and related #GrssFeedItems. This way `formatter` is ready to
557
+ * be used again with new data.
558
+ */
559
+ reset(): void
560
+ /**
561
+ * Inits the #GrssFeedFormatter with the given `channel`. A #GrssFeedFormatter
562
+ * can format a single #GrssFeedChannel each time, but may be reused by calling
563
+ * grss_feed_formatter_reset()
564
+ * @param channel the reference #GrssFeedChannel for the `formatter`.
565
+ */
566
+ set_channel(channel: FeedChannel): void
567
+
568
+ // Own virtual methods of Grss-0.7.Grss.FeedFormatter
569
+
570
+ /**
571
+ * Formats the assigned #GrssFeedChannel and #GrssFeedItems into a plain text
572
+ * string, accordly to the current #GrssFeedFormatter instance.
573
+ * @virtual
574
+ * @returns a string containing the plain text rappresentation of the given channel containing the given items.
575
+ */
576
+ vfunc_format(): string | null
577
+
578
+ // Class property signals of Grss-0.7.Grss.FeedFormatter
579
+
580
+ connect(sigName: string, callback: (...args: any[]) => void): number
581
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
582
+ emit(sigName: string, ...args: any[]): void
583
+ disconnect(id: number): void
584
+ }
585
+
586
+ class FeedFormatter extends GObject.Object {
587
+
588
+ // Own properties of Grss-0.7.Grss.FeedFormatter
589
+
590
+ static name: string
591
+ static $gtype: GObject.GType<FeedFormatter>
592
+
593
+ // Constructors of Grss-0.7.Grss.FeedFormatter
594
+
595
+ constructor(config?: FeedFormatter.ConstructorProperties)
596
+ _init(config?: FeedFormatter.ConstructorProperties): void
597
+ }
598
+
599
+ module FeedItem {
600
+
601
+ // Constructor properties interface
602
+
603
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
604
+ }
605
+
606
+ }
607
+
608
+ interface FeedItem {
609
+
610
+ // Own fields of Grss-0.7.Grss.FeedItem
611
+
612
+ parent: GObject.Object
613
+ priv: FeedItemPrivate
614
+
615
+ // Owm methods of Grss-0.7.Grss.FeedItem
616
+
617
+ /**
618
+ * Adds a category to the `item`. The complete list can be obtained with
619
+ * grss_feed_item_get_categories().
620
+ * @param category a new category to assign to the item.
621
+ */
622
+ add_category(category: string | null): void
623
+ /**
624
+ * To add a contributor to the `item`.
625
+ * @param contributor a #GrssPerson.
626
+ */
627
+ add_contributor(contributor: Person): void
628
+ /**
629
+ * Adds an enclosure to the `item`. That external elements may be references
630
+ * to images, videos, or other contents (usually multimedial) embedded in the
631
+ * element.
632
+ * @param enclosure a #GrssFeedEnclosure to add to the item.
633
+ */
634
+ add_enclosure(enclosure: FeedEnclosure): void
635
+ /**
636
+ * Retrieves the author of `item`.
637
+ * @returns #GrssPerson, or %NULL.
638
+ */
639
+ get_author(): Person
640
+ /**
641
+ * Retrieves list of categories assigned to the `item`.
642
+ * @returns list of strings, one for assigned category. Do not free or modify this list.
643
+ */
644
+ get_categories(): string[]
645
+ /**
646
+ * Retrieves the URL where to catch comments to the `item`.
647
+ * @returns URL to parse to read comments for @item, or %NULL.
648
+ */
649
+ get_comments_url(): string | null
650
+ /**
651
+ * Retrieves contributors for `item`.
652
+ * @returns list of contributors to the item.
653
+ */
654
+ get_contributors(): Person[]
655
+ /**
656
+ * Retrieves copyright reference for the `item`.
657
+ * @returns copyright mark, or %NULL.
658
+ */
659
+ get_copyright(): string | null
660
+ /**
661
+ * Retrieves the description of the `item`.
662
+ * @returns description of @item.
663
+ */
664
+ get_description(): string | null
665
+ /**
666
+ * Retrieves the list of enclosures added with grss_feed_item_add_enclosure().
667
+ * @returns a list of #GrssFeedEnclosure. This is a direct reference to the internal list, do not free or modify it.
668
+ */
669
+ get_enclosures(): FeedEnclosure[]
670
+ /**
671
+ * Retrieves the geo reference of the `item`.
672
+ * @returns %TRUE if @item has geographic coordinates assigned and @latitude and @longitude have been set, %FALSE if @item has not geo reference.
673
+ */
674
+ get_geo_point(): [ /* returnType */ boolean, /* latitude */ number, /* longitude */ number ]
675
+ /**
676
+ * Retrieves the ID assigned to the `item`. If no ID was set with
677
+ * grss_feed_item_set_id() this returns the same of grss_feed_item_get_source().
678
+ * Pay attention to the fact this library do not check uniqueness of assigned
679
+ * IDs.
680
+ * @returns ID of the item.
681
+ */
682
+ get_id(): string | null
683
+ /**
684
+ * Retrieves the feed from which the item belongs.
685
+ * @returns the parent feed, as set in grss_feed_item_new().
686
+ */
687
+ get_parent(): FeedChannel
688
+ /**
689
+ * Retrieves the publish time of the item. By default this value is the
690
+ * current timestamp assigned when creating the #GrssFeedItem, and may be
691
+ * changed with grss_feed_item_set_publish_time().
692
+ * @returns publish time of @item.
693
+ */
694
+ get_publish_time(): number
695
+ /**
696
+ * Retrieves references to the real source of `item`.
697
+ * @param realsource will be assigned to the URL of the real source, or %NULL.
698
+ * @param title will be assigned to the title of the real source, or %NULL.
699
+ */
700
+ get_real_source(realsource: string | null, title: string | null): void
701
+ /**
702
+ * Retrieves indication about posts related to `item`.
703
+ * @returns related posts, or %NULL.
704
+ */
705
+ get_related(): string | null
706
+ /**
707
+ * Retrieves the URL where the `item` can be found.
708
+ * @returns URL of the item, or %NULL.
709
+ */
710
+ get_source(): string | null
711
+ /**
712
+ * Retrieves the title assigned to `item`.
713
+ * @returns title of the element.
714
+ */
715
+ get_title(): string | null
716
+ /**
717
+ * To assign an author to the `item`.
718
+ * @param author a #GrssPerson.
719
+ */
720
+ set_author(author: Person): void
721
+ /**
722
+ * To assign the URL where to fetch comments for the item.
723
+ * @param url URL where to retrieve comments to the item.
724
+ * @returns %TRUE if @url is a valid URL, %FALSE otherwise
725
+ */
726
+ set_comments_url(url: string | null): boolean
727
+ /**
728
+ * To set a copyright reference to `item`.
729
+ * @param copyright copyright declaration for the item.
730
+ */
731
+ set_copyright(copyright: string | null): void
732
+ /**
733
+ * To set the description of `item`. Usually "description" means his content.
734
+ * @param description content of the item.
735
+ */
736
+ set_description(description: string | null): void
737
+ /**
738
+ * To assign geographic context to the `item`.
739
+ * Passing -1 as `latitude` or `longitude,` the relative value is untouched in
740
+ * the object. This is to easy assignment of coordinates in more than a
741
+ * single step. If both are -1, nothing happens.
742
+ * @param latitude latitude of the point, or -1 to leave the previous one.
743
+ * @param longitude longitude of the point, or -1 to leave the previous one.
744
+ */
745
+ set_geo_point(latitude: number, longitude: number): void
746
+ /**
747
+ * To set the ID of the `item`. This parameter has not a particular format: it
748
+ * is just a string used to identify in unique way the item.
749
+ * @param id the new ID to set.
750
+ */
751
+ set_id(id: string | null): void
752
+ /**
753
+ * To set the publish time of the item.
754
+ * @param publish publishing timestamp of the item.
755
+ */
756
+ set_publish_time(publish: number): void
757
+ /**
758
+ * To set an alternative real source for `item`. This parameter is used by web
759
+ * aggregators to explicit the origin of a content reproduced in them.
760
+ * @param realsource URL of the real source for the item.
761
+ * @param title title of the real source.
762
+ * @returns %TRUE if @realsource is a valid URL, %FALSE otherwise
763
+ */
764
+ set_real_source(realsource: string | null, title: string | null): boolean
765
+ /**
766
+ * To set reference to a post related to `item`.
767
+ * @param related reference to a related post.
768
+ */
769
+ set_related(related: string | null): void
770
+ /**
771
+ * To set the source of the `item`.
772
+ * @param source URL of the item.
773
+ * @returns %TRUE if @source is a valid URL, %FALSE otherwise
774
+ */
775
+ set_source(source: string | null): boolean
776
+ /**
777
+ * To set a title to the `item`.
778
+ * @param title title of the item.
779
+ */
780
+ set_title(title: string | null): void
781
+
782
+ // Class property signals of Grss-0.7.Grss.FeedItem
783
+
784
+ connect(sigName: string, callback: (...args: any[]) => void): number
785
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
786
+ emit(sigName: string, ...args: any[]): void
787
+ disconnect(id: number): void
788
+ }
789
+
790
+ class FeedItem extends GObject.Object {
791
+
792
+ // Own properties of Grss-0.7.Grss.FeedItem
793
+
794
+ static name: string
795
+ static $gtype: GObject.GType<FeedItem>
796
+
797
+ // Constructors of Grss-0.7.Grss.FeedItem
798
+
799
+ constructor(config?: FeedItem.ConstructorProperties)
800
+ /**
801
+ * To allocate a new empty #GrssFeedItem.
802
+ * @constructor
803
+ * @param parent the feed from which the new item belongs.
804
+ * @returns a new #GrssFeedItem.
805
+ */
806
+ constructor(parent: FeedChannel)
807
+ /**
808
+ * To allocate a new empty #GrssFeedItem.
809
+ * @constructor
810
+ * @param parent the feed from which the new item belongs.
811
+ * @returns a new #GrssFeedItem.
812
+ */
813
+ static new(parent: FeedChannel): FeedItem
814
+ _init(config?: FeedItem.ConstructorProperties): void
815
+ }
816
+
817
+ module FeedParser {
818
+
819
+ // Constructor properties interface
820
+
821
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
822
+ }
823
+
824
+ }
825
+
826
+ interface FeedParser {
827
+
828
+ // Own fields of Grss-0.7.Grss.FeedParser
829
+
830
+ parent: GObject.Object
831
+ priv: FeedParserPrivate
832
+
833
+ // Owm methods of Grss-0.7.Grss.FeedParser
834
+
835
+ /**
836
+ * Parses the given XML `doc,` belonging to the given `feed,` to obtain a list
837
+ * of #GrssFeedItem.
838
+ * @param feed a #GrssFeedChannel to be parsed.
839
+ * @param doc XML document extracted from the contents of the feed, which must already been fetched.
840
+ * @returns a list of #GrssFeedItem, to be freed when no longer in use, or NULL if anerror occours and @error is set.
841
+ */
842
+ parse(feed: FeedChannel, doc: libxml2.DocPtr): FeedItem[]
843
+ /**
844
+ * Parses the given XML `doc,` belonging to the given `feed`.
845
+ *
846
+ * Similar to grss_feed_parser_parse(), but grss_feed_parser_parse_channel()
847
+ * skips parsing of items into the document.
848
+ * @param feed a #GrssFeedChannel to be parsed.
849
+ * @param doc XML document extracted from the contents of the feed, which must already been fetched.
850
+ */
851
+ parse_channel(feed: FeedChannel, doc: libxml2.DocPtr): void
852
+
853
+ // Class property signals of Grss-0.7.Grss.FeedParser
854
+
855
+ connect(sigName: string, callback: (...args: any[]) => void): number
856
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
857
+ emit(sigName: string, ...args: any[]): void
858
+ disconnect(id: number): void
859
+ }
860
+
861
+ class FeedParser extends GObject.Object {
862
+
863
+ // Own properties of Grss-0.7.Grss.FeedParser
864
+
865
+ static name: string
866
+ static $gtype: GObject.GType<FeedParser>
867
+
868
+ // Constructors of Grss-0.7.Grss.FeedParser
869
+
870
+ constructor(config?: FeedParser.ConstructorProperties)
871
+ /**
872
+ * Allocates a new #GrssFeedParser.
873
+ * @constructor
874
+ * @returns a new #GrssFeedParser.
875
+ */
876
+ constructor()
877
+ /**
878
+ * Allocates a new #GrssFeedParser.
879
+ * @constructor
880
+ * @returns a new #GrssFeedParser.
881
+ */
882
+ static new(): FeedParser
883
+ _init(config?: FeedParser.ConstructorProperties): void
884
+ }
885
+
886
+ module FeedRssFormatter {
887
+
888
+ // Constructor properties interface
889
+
890
+ interface ConstructorProperties extends FeedFormatter.ConstructorProperties {
891
+ }
892
+
893
+ }
894
+
895
+ interface FeedRssFormatter {
896
+
897
+ // Own fields of Grss-0.7.Grss.FeedRssFormatter
898
+
899
+ parent: FeedFormatter & GObject.Object
900
+
901
+ // Class property signals of Grss-0.7.Grss.FeedRssFormatter
902
+
903
+ connect(sigName: string, callback: (...args: any[]) => void): number
904
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
905
+ emit(sigName: string, ...args: any[]): void
906
+ disconnect(id: number): void
907
+ }
908
+
909
+ class FeedRssFormatter extends FeedFormatter {
910
+
911
+ // Own properties of Grss-0.7.Grss.FeedRssFormatter
912
+
913
+ static name: string
914
+ static $gtype: GObject.GType<FeedRssFormatter>
915
+
916
+ // Constructors of Grss-0.7.Grss.FeedRssFormatter
917
+
918
+ constructor(config?: FeedRssFormatter.ConstructorProperties)
919
+ constructor()
920
+ static new(): FeedRssFormatter
921
+ _init(config?: FeedRssFormatter.ConstructorProperties): void
922
+ }
923
+
924
+ module FeedsGroup {
925
+
926
+ // Constructor properties interface
927
+
928
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
929
+ }
930
+
931
+ }
932
+
933
+ interface FeedsGroup {
934
+
935
+ // Own fields of Grss-0.7.Grss.FeedsGroup
936
+
937
+ parent: GObject.Object
938
+ priv: FeedsGroupPrivate
939
+
940
+ // Owm methods of Grss-0.7.Grss.FeedsGroup
941
+
942
+ /**
943
+ * Creates a new file with the list of `channels` represented in the required
944
+ * `format`. If the file already exists at the `uri` location, it is overwritten.
945
+ * @param channels list of #GrssFeedChannels.
946
+ * @param format string rappresenting the desired export format, as returnes by grss_feeds_group_get_formats().
947
+ * @param uri URI of the file to write.
948
+ * @returns %TRUE if the file is created correctly, or %FALSE if an error occours and @error is set.
949
+ */
950
+ export_file(channels: FeedChannel[], format: string | null, uri: string | null): boolean
951
+ /**
952
+ * Returns the list of supported file formats.
953
+ * @returns a list of constant strings with names of supported formats. The list must be freed when no longer used
954
+ */
955
+ get_formats(): string[]
956
+ /**
957
+ * Parses the given file to obtain list of listed feeds.
958
+ * @param path path of the file to parse.
959
+ * @returns a list of #GrssFeedChannels, or NULL if an error occours and @error is set.
960
+ */
961
+ parse_file(path: string | null): FeedChannel[]
962
+
963
+ // Class property signals of Grss-0.7.Grss.FeedsGroup
964
+
965
+ connect(sigName: string, callback: (...args: any[]) => void): number
966
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
967
+ emit(sigName: string, ...args: any[]): void
968
+ disconnect(id: number): void
969
+ }
970
+
971
+ class FeedsGroup extends GObject.Object {
972
+
973
+ // Own properties of Grss-0.7.Grss.FeedsGroup
974
+
975
+ static name: string
976
+ static $gtype: GObject.GType<FeedsGroup>
977
+
978
+ // Constructors of Grss-0.7.Grss.FeedsGroup
979
+
980
+ constructor(config?: FeedsGroup.ConstructorProperties)
981
+ /**
982
+ * Allocates a new #GrssFeedsGroup.
983
+ * @constructor
984
+ * @returns a new #GrssFeedsGroup.
985
+ */
986
+ constructor()
987
+ /**
988
+ * Allocates a new #GrssFeedsGroup.
989
+ * @constructor
990
+ * @returns a new #GrssFeedsGroup.
991
+ */
992
+ static new(): FeedsGroup
993
+ _init(config?: FeedsGroup.ConstructorProperties): void
994
+ }
995
+
996
+ module FeedsPool {
997
+
998
+ // Signal callback interfaces
999
+
1000
+ /**
1001
+ * Signal callback interface for `feed-fail`
1002
+ */
1003
+ interface FeedFailSignalCallback {
1004
+ ($obj: FeedsPool, feed: GObject.Object): void
1005
+ }
1006
+
1007
+ /**
1008
+ * Signal callback interface for `feed-fetching`
1009
+ */
1010
+ interface FeedFetchingSignalCallback {
1011
+ ($obj: FeedsPool, feed: GObject.Object): void
1012
+ }
1013
+
1014
+ /**
1015
+ * Signal callback interface for `feed-ready`
1016
+ */
1017
+ interface FeedReadySignalCallback {
1018
+ ($obj: FeedsPool, feed: GObject.Object, items: FeedItem[]): void
1019
+ }
1020
+
1021
+
1022
+ // Constructor properties interface
1023
+
1024
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
1025
+ }
1026
+
1027
+ }
1028
+
1029
+ interface FeedsPool {
1030
+
1031
+ // Own fields of Grss-0.7.Grss.FeedsPool
1032
+
1033
+ parent: GObject.Object
1034
+ priv: FeedsPoolPrivate
1035
+
1036
+ // Owm methods of Grss-0.7.Grss.FeedsPool
1037
+
1038
+ /**
1039
+ * Returns the list of feeds currently managed by the `pool`. Please consider
1040
+ * this function has to build the list that returns, and of course this is a
1041
+ * time and resources consuming task: if you only need to know how many feeds
1042
+ * are currently handled, check grss_feeds_pool_get_listened_num().
1043
+ * @returns a list of #GrssFeedChannel, to be freed with g_list_free() when no longer in use. Do not modify elements found in this list.
1044
+ */
1045
+ get_listened(): FeedChannel[]
1046
+ /**
1047
+ * Returns number of feeds under the `pool` control, as provided by
1048
+ * grss_feeds_pool_listen(). To get the complete list of those feeds, check
1049
+ * grss_feeds_pool_get_listened().
1050
+ * @returns number of feeds currently managed by the #GrssFeedsPool.
1051
+ */
1052
+ get_listened_num(): number
1053
+ /**
1054
+ * To access the internal #SoupSession used by the `pool` to fetch items.
1055
+ * @returns instance of #SoupSession. Do not free it.
1056
+ */
1057
+ get_session(): Soup.Session
1058
+ /**
1059
+ * To set the list of feeds to be managed by the pool. The previous list, if
1060
+ * any, is invalidated. After invokation to the function, grss_feeds_pool_switch()
1061
+ * must be call to run the auto-fetching (always, also if previous state was
1062
+ * "running").
1063
+ * The list in `feeds` can be freed after calling this; linked #GrssFeedChannel
1064
+ * are g_object_ref'd here.
1065
+ * @param feeds a list of #GrssFeedChannel.
1066
+ */
1067
+ listen(feeds: FeedChannel[]): void
1068
+ /**
1069
+ * Permits to pause or resume the `pool` fetching feeds. If `run` is %TRUE, the
1070
+ * `pool` starts immediately.
1071
+ * @param run %TRUE to run the pool, %FALSE to pause it.
1072
+ */
1073
+ switch(run: boolean): void
1074
+
1075
+ // Own virtual methods of Grss-0.7.Grss.FeedsPool
1076
+
1077
+ vfunc_feed_fetching(feed: FeedChannel): void
1078
+
1079
+ // Own signals of Grss-0.7.Grss.FeedsPool
1080
+
1081
+ connect(sigName: "feed-fail", callback: FeedsPool.FeedFailSignalCallback): number
1082
+ connect_after(sigName: "feed-fail", callback: FeedsPool.FeedFailSignalCallback): number
1083
+ emit(sigName: "feed-fail", feed: GObject.Object, ...args: any[]): void
1084
+ connect(sigName: "feed-fetching", callback: FeedsPool.FeedFetchingSignalCallback): number
1085
+ connect_after(sigName: "feed-fetching", callback: FeedsPool.FeedFetchingSignalCallback): number
1086
+ emit(sigName: "feed-fetching", feed: GObject.Object, ...args: any[]): void
1087
+ connect(sigName: "feed-ready", callback: FeedsPool.FeedReadySignalCallback): number
1088
+ connect_after(sigName: "feed-ready", callback: FeedsPool.FeedReadySignalCallback): number
1089
+ emit(sigName: "feed-ready", feed: GObject.Object, items: FeedItem[], ...args: any[]): void
1090
+
1091
+ // Class property signals of Grss-0.7.Grss.FeedsPool
1092
+
1093
+ connect(sigName: string, callback: (...args: any[]) => void): number
1094
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1095
+ emit(sigName: string, ...args: any[]): void
1096
+ disconnect(id: number): void
1097
+ }
1098
+
1099
+ class FeedsPool extends GObject.Object {
1100
+
1101
+ // Own properties of Grss-0.7.Grss.FeedsPool
1102
+
1103
+ static name: string
1104
+ static $gtype: GObject.GType<FeedsPool>
1105
+
1106
+ // Constructors of Grss-0.7.Grss.FeedsPool
1107
+
1108
+ constructor(config?: FeedsPool.ConstructorProperties)
1109
+ /**
1110
+ * Allocates a new #GrssFeedsPool.
1111
+ * @constructor
1112
+ * @returns a new #GrssFeedsPool.
1113
+ */
1114
+ constructor()
1115
+ /**
1116
+ * Allocates a new #GrssFeedsPool.
1117
+ * @constructor
1118
+ * @returns a new #GrssFeedsPool.
1119
+ */
1120
+ static new(): FeedsPool
1121
+ _init(config?: FeedsPool.ConstructorProperties): void
1122
+ }
1123
+
1124
+ module FeedsPublisher {
1125
+
1126
+ // Signal callback interfaces
1127
+
1128
+ /**
1129
+ * Signal callback interface for `delete-subscription`
1130
+ */
1131
+ interface DeleteSubscriptionSignalCallback {
1132
+ ($obj: FeedsPublisher, object: FeedChannel, p0: string | null): void
1133
+ }
1134
+
1135
+ /**
1136
+ * Signal callback interface for `new-subscription`
1137
+ */
1138
+ interface NewSubscriptionSignalCallback {
1139
+ ($obj: FeedsPublisher, object: FeedChannel, p0: string | null): void
1140
+ }
1141
+
1142
+
1143
+ // Constructor properties interface
1144
+
1145
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
1146
+ }
1147
+
1148
+ }
1149
+
1150
+ interface FeedsPublisher {
1151
+
1152
+ // Own fields of Grss-0.7.Grss.FeedsPublisher
1153
+
1154
+ parent: GObject.Object
1155
+ priv: FeedsPublisherPrivate
1156
+
1157
+ // Owm methods of Grss-0.7.Grss.FeedsPublisher
1158
+
1159
+ /**
1160
+ * Format a #GrssFeedChannel in Atom and returns the resulting string.
1161
+ * @param channel the #GrssFeedChannel to dump in the file.
1162
+ * @param items list of #GrssFeedItems to be added in the feed.
1163
+ * @returns a newly allocated string holding the formatted feed, to be freed when no longer in use.
1164
+ */
1165
+ format_content(channel: FeedChannel, items: FeedItem[]): string | null
1166
+ /**
1167
+ * To customize the port opened by the local server to deliver feeds and
1168
+ * catch incoming subscriptions. By default this is 80. Changing the port
1169
+ * while the hub is running imply restart the local server.
1170
+ * @param port new listening port for the server.
1171
+ */
1172
+ hub_set_port(port: number): void
1173
+ /**
1174
+ * To define a list of valid "topics" for which the #GrssFeedsPublisher will
1175
+ * deliver contents. Sources of those channels, as retrieved by
1176
+ * grss_feed_channel_get_source(), are accepted as "hub.topic" parameter in
1177
+ * PubSubHubbub registration requests from remote subscribers.
1178
+ * Pay attention to the fact subscriptions requests for different topic are
1179
+ * now rejected.
1180
+ * @param topics a list of #GrssFeedChannels.
1181
+ */
1182
+ hub_set_topics(topics: FeedChannel[]): void
1183
+ /**
1184
+ * Permits to start and stop the webserver implemented by this object.
1185
+ * @param run %TRUE to run the local server, %FALSE to stop it.
1186
+ */
1187
+ hub_switch(run: boolean): void
1188
+ /**
1189
+ * Dump the given `channel` in an Atom formatted file in `path`. If the local
1190
+ * PubSubHubbub hub has been activated (with grss_feeds_publisher_hub_switch())
1191
+ * notifies remote subscribers about the new items which has been added since
1192
+ * previous invocation of this function for the same #GrssFeedChannel.
1193
+ * @param channel the #GrssFeedChannel to dump in the file.
1194
+ * @param items list of #GrssFeedItems to be added in the feed.
1195
+ * @param uri URI of the file to write. The full path must exists.
1196
+ * @returns %TRUE if the file is successfully written, %FALSE otherwise.
1197
+ */
1198
+ publish_file(channel: FeedChannel, items: FeedItem[], uri: string | null): boolean
1199
+ /**
1200
+ * If the local web server has been executed (with
1201
+ * grss_feeds_publisher_hub_switch()) this function exposes the given `channel`
1202
+ * as an Atom formatted file avalable to http://[LOCAL_IP:DEFINED_PORT]/`id` .
1203
+ * @param channel the #GrssFeedChannel to dump in the file.
1204
+ * @param items list of #GrssFeedItems to be added in the feed.
1205
+ * @param id name used in the external URL of the feed.
1206
+ * @returns %TRUE if the file is successfully written, %FALSE otherwise.
1207
+ */
1208
+ publish_web(channel: FeedChannel, items: FeedItem[], id: string | null): boolean
1209
+
1210
+ // Own virtual methods of Grss-0.7.Grss.FeedsPublisher
1211
+
1212
+ vfunc_delete_subscription(topic: FeedChannel, callback: string | null): void
1213
+ vfunc_new_subscription(topic: FeedChannel, callback: string | null): void
1214
+
1215
+ // Own signals of Grss-0.7.Grss.FeedsPublisher
1216
+
1217
+ connect(sigName: "delete-subscription", callback: FeedsPublisher.DeleteSubscriptionSignalCallback): number
1218
+ connect_after(sigName: "delete-subscription", callback: FeedsPublisher.DeleteSubscriptionSignalCallback): number
1219
+ emit(sigName: "delete-subscription", object: FeedChannel, p0: string | null, ...args: any[]): void
1220
+ connect(sigName: "new-subscription", callback: FeedsPublisher.NewSubscriptionSignalCallback): number
1221
+ connect_after(sigName: "new-subscription", callback: FeedsPublisher.NewSubscriptionSignalCallback): number
1222
+ emit(sigName: "new-subscription", object: FeedChannel, p0: string | null, ...args: any[]): void
1223
+
1224
+ // Class property signals of Grss-0.7.Grss.FeedsPublisher
1225
+
1226
+ connect(sigName: string, callback: (...args: any[]) => void): number
1227
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1228
+ emit(sigName: string, ...args: any[]): void
1229
+ disconnect(id: number): void
1230
+ }
1231
+
1232
+ class FeedsPublisher extends GObject.Object {
1233
+
1234
+ // Own properties of Grss-0.7.Grss.FeedsPublisher
1235
+
1236
+ static name: string
1237
+ static $gtype: GObject.GType<FeedsPublisher>
1238
+
1239
+ // Constructors of Grss-0.7.Grss.FeedsPublisher
1240
+
1241
+ constructor(config?: FeedsPublisher.ConstructorProperties)
1242
+ /**
1243
+ * Allocates a new #GrssFeedsPublisher.
1244
+ * @constructor
1245
+ * @returns a new #GrssFeedsPublisher.
1246
+ */
1247
+ constructor()
1248
+ /**
1249
+ * Allocates a new #GrssFeedsPublisher.
1250
+ * @constructor
1251
+ * @returns a new #GrssFeedsPublisher.
1252
+ */
1253
+ static new(): FeedsPublisher
1254
+ _init(config?: FeedsPublisher.ConstructorProperties): void
1255
+ }
1256
+
1257
+ module FeedsStore {
1258
+
1259
+ // Constructor properties interface
1260
+
1261
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
1262
+ }
1263
+
1264
+ }
1265
+
1266
+ interface FeedsStore {
1267
+
1268
+ // Own fields of Grss-0.7.Grss.FeedsStore
1269
+
1270
+ parent: GObject.Object
1271
+ priv: FeedsStorePrivate
1272
+
1273
+ // Owm methods of Grss-0.7.Grss.FeedsStore
1274
+
1275
+ /**
1276
+ * To save a new #GrssFeedItem into the `store`. It performs a check to grant
1277
+ * `item` is not already saved.
1278
+ * @param channel parent feed for the new item.
1279
+ * @param item new item to permanently save.
1280
+ */
1281
+ add_item_in_channel(channel: FeedChannel, item: FeedItem): void
1282
+ /**
1283
+ * To retrieve list of feeds permanently saved into the store.
1284
+ * @returns list of #GrssFeedChannel found in the @store. Do not modify or free it.
1285
+ */
1286
+ get_channels(): FeedChannel[]
1287
+ /**
1288
+ * To retrieve list of items saved into the store, assigned to the given
1289
+ * `channel`.
1290
+ * @param channel parent feed containing required items.
1291
+ * @returns list of #GrssFeedItem found in the @store. Do not modify or free it.
1292
+ */
1293
+ get_items_by_channel(channel: FeedChannel): FeedItem[]
1294
+ /**
1295
+ * To retrieve an item into a feed, given his unique ID.
1296
+ * @param channel parent feed containing required item.
1297
+ * @param id unique ID to look for.
1298
+ * @returns %TRUE if the specified item exists, %FALSE otherwise.
1299
+ */
1300
+ has_item(channel: FeedChannel, id: string | null): boolean
1301
+ /**
1302
+ * This is to permit the `store` to auto-update itself: it creates an internal
1303
+ * #GrssFeedsPool and listens for his signals, so to implement the whole loop
1304
+ * fetch-parse-save trasparently.
1305
+ * @param run %TRUE to run the `store,` %FALSE to stop.
1306
+ */
1307
+ switch(run: boolean): void
1308
+
1309
+ // Own virtual methods of Grss-0.7.Grss.FeedsStore
1310
+
1311
+ /**
1312
+ * To save a new #GrssFeedItem into the `store`. It performs a check to grant
1313
+ * `item` is not already saved.
1314
+ * @virtual
1315
+ * @param channel parent feed for the new item.
1316
+ * @param item new item to permanently save.
1317
+ */
1318
+ vfunc_add_item_in_channel(channel: FeedChannel, item: FeedItem): void
1319
+ /**
1320
+ * To retrieve list of feeds permanently saved into the store.
1321
+ * @virtual
1322
+ * @returns list of #GrssFeedChannel found in the @store. Do not modify or free it.
1323
+ */
1324
+ vfunc_get_channels(): FeedChannel[]
1325
+ /**
1326
+ * To retrieve list of items saved into the store, assigned to the given
1327
+ * `channel`.
1328
+ * @virtual
1329
+ * @param channel parent feed containing required items.
1330
+ * @returns list of #GrssFeedItem found in the @store. Do not modify or free it.
1331
+ */
1332
+ vfunc_get_items_by_channel(channel: FeedChannel): FeedItem[]
1333
+ /**
1334
+ * To retrieve an item into a feed, given his unique ID.
1335
+ * @virtual
1336
+ * @param channel parent feed containing required item.
1337
+ * @param id unique ID to look for.
1338
+ * @returns %TRUE if the specified item exists, %FALSE otherwise.
1339
+ */
1340
+ vfunc_has_item(channel: FeedChannel, id: string | null): boolean
1341
+
1342
+ // Class property signals of Grss-0.7.Grss.FeedsStore
1343
+
1344
+ connect(sigName: string, callback: (...args: any[]) => void): number
1345
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1346
+ emit(sigName: string, ...args: any[]): void
1347
+ disconnect(id: number): void
1348
+ }
1349
+
1350
+ class FeedsStore extends GObject.Object {
1351
+
1352
+ // Own properties of Grss-0.7.Grss.FeedsStore
1353
+
1354
+ static name: string
1355
+ static $gtype: GObject.GType<FeedsStore>
1356
+
1357
+ // Constructors of Grss-0.7.Grss.FeedsStore
1358
+
1359
+ constructor(config?: FeedsStore.ConstructorProperties)
1360
+ _init(config?: FeedsStore.ConstructorProperties): void
1361
+ }
1362
+
1363
+ module FeedsSubscriber {
1364
+
1365
+ // Signal callback interfaces
1366
+
1367
+ /**
1368
+ * Signal callback interface for `notification-received`
1369
+ */
1370
+ interface NotificationReceivedSignalCallback {
1371
+ ($obj: FeedsSubscriber, feed: GObject.Object, item: GObject.Object): void
1372
+ }
1373
+
1374
+
1375
+ // Constructor properties interface
1376
+
1377
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
1378
+ }
1379
+
1380
+ }
1381
+
1382
+ interface FeedsSubscriber {
1383
+
1384
+ // Own fields of Grss-0.7.Grss.FeedsSubscriber
1385
+
1386
+ parent: GObject.Object
1387
+ priv: FeedsSubscriberPrivate
1388
+
1389
+ // Owm methods of Grss-0.7.Grss.FeedsSubscriber
1390
+
1391
+ /**
1392
+ * This function returns the Internet address where `sub` is listening for
1393
+ * external events. It is often required by #GrssFeedsSubscriberHandlers while
1394
+ * subscribing contents to specify the local endpoint for communications.
1395
+ * @returns the #GInetAddress used by @sub, or %NULL if the #GrssFeedsSubscriber is switched off.
1396
+ */
1397
+ get_address(): Gio.InetAddress
1398
+ /**
1399
+ * Returns the list of feeds currently managed by `sub`.
1400
+ * @returns a list of #GrssFeedChannel, to be freed with g_list_free() when no longer in use. Do not modify elements found in this list.
1401
+ */
1402
+ get_listened(): FeedChannel[]
1403
+ /**
1404
+ * This function returns the Internet port where `sub` is listening for
1405
+ * external events. It is often required by #GrssFeedsSubscriberHandlers while
1406
+ * subscribing contents to specify the local endpoint for communications.
1407
+ * @returns the port of the socket locally opened by @sub.
1408
+ */
1409
+ get_port(): number
1410
+ /**
1411
+ * To obtain the internal #SoupSession of a #GrssFeedsSubscriber, so to re-use
1412
+ * it in #GrssFeedsSubscriberHandlers or similar tasks.
1413
+ * @returns the #SoupSession used by the provided #GrssFeedsSubscriber.
1414
+ */
1415
+ get_session(): Soup.Session
1416
+ /**
1417
+ * To set the list of feeds to be managed by `sub`. The previous list, if any,
1418
+ * is invalidated. After invokation to the function, grss_feeds_subscriber_switch()
1419
+ * must be call to run the subscription.
1420
+ * The list in `feeds` can be freed after calling this; linked #GrssFeedChannel
1421
+ * are g_object_ref'd here.
1422
+ * @param feeds a list of #GrssFeedChannel.
1423
+ * @returns %TRUE if all #GrssFeedChannels involved in @feeds are valid and can be listened with one of the implemented procotols, %FALSE otherwise.
1424
+ */
1425
+ listen(feeds: FeedChannel[]): boolean
1426
+ /**
1427
+ * To customize the port opened by the local server to catch incoming
1428
+ * publishers' events. By default this is 8444. Changing the port while the
1429
+ * subscriber is running imply restart the local server.
1430
+ * Pay attention to the fact many publishers' implementations accept only
1431
+ * certain ports.
1432
+ * @param port new listening port for the server.
1433
+ */
1434
+ set_port(port: number): void
1435
+ /**
1436
+ * Permits to pause or resume `sub` listening for events.
1437
+ * @param run %TRUE to run the subscriber, %FALSE to pause it.
1438
+ */
1439
+ switch(run: boolean): void
1440
+
1441
+ // Own virtual methods of Grss-0.7.Grss.FeedsSubscriber
1442
+
1443
+ vfunc_notification_received(feed: FeedChannel, item: FeedItem): void
1444
+
1445
+ // Own signals of Grss-0.7.Grss.FeedsSubscriber
1446
+
1447
+ connect(sigName: "notification-received", callback: FeedsSubscriber.NotificationReceivedSignalCallback): number
1448
+ connect_after(sigName: "notification-received", callback: FeedsSubscriber.NotificationReceivedSignalCallback): number
1449
+ emit(sigName: "notification-received", feed: GObject.Object, item: GObject.Object, ...args: any[]): void
1450
+
1451
+ // Class property signals of Grss-0.7.Grss.FeedsSubscriber
1452
+
1453
+ connect(sigName: string, callback: (...args: any[]) => void): number
1454
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1455
+ emit(sigName: string, ...args: any[]): void
1456
+ disconnect(id: number): void
1457
+ }
1458
+
1459
+ class FeedsSubscriber extends GObject.Object {
1460
+
1461
+ // Own properties of Grss-0.7.Grss.FeedsSubscriber
1462
+
1463
+ static name: string
1464
+ static $gtype: GObject.GType<FeedsSubscriber>
1465
+
1466
+ // Constructors of Grss-0.7.Grss.FeedsSubscriber
1467
+
1468
+ constructor(config?: FeedsSubscriber.ConstructorProperties)
1469
+ /**
1470
+ * Allocates a new #GrssFeedsSubscriber.
1471
+ * @constructor
1472
+ * @returns a new #GrssFeedsSubscriber.
1473
+ */
1474
+ constructor()
1475
+ /**
1476
+ * Allocates a new #GrssFeedsSubscriber.
1477
+ * @constructor
1478
+ * @returns a new #GrssFeedsSubscriber.
1479
+ */
1480
+ static new(): FeedsSubscriber
1481
+ _init(config?: FeedsSubscriber.ConstructorProperties): void
1482
+ }
1483
+
1484
+ interface FeedAtomFormatterClass {
1485
+
1486
+ // Own fields of Grss-0.7.Grss.FeedAtomFormatterClass
1487
+
1488
+ parent: FeedFormatterClass
1489
+ }
1490
+
1491
+ abstract class FeedAtomFormatterClass {
1492
+
1493
+ // Own properties of Grss-0.7.Grss.FeedAtomFormatterClass
1494
+
1495
+ static name: string
1496
+ }
1497
+
1498
+ interface FeedAtomFormatterPrivate {
1499
+ }
1500
+
1501
+ class FeedAtomFormatterPrivate {
1502
+
1503
+ // Own properties of Grss-0.7.Grss.FeedAtomFormatterPrivate
1504
+
1505
+ static name: string
1506
+ }
1507
+
1508
+ interface FeedChannelClass {
1509
+
1510
+ // Own fields of Grss-0.7.Grss.FeedChannelClass
1511
+
1512
+ parent: GObject.ObjectClass
1513
+ }
1514
+
1515
+ abstract class FeedChannelClass {
1516
+
1517
+ // Own properties of Grss-0.7.Grss.FeedChannelClass
1518
+
1519
+ static name: string
1520
+ }
1521
+
1522
+ interface FeedChannelPrivate {
1523
+ }
1524
+
1525
+ class FeedChannelPrivate {
1526
+
1527
+ // Own properties of Grss-0.7.Grss.FeedChannelPrivate
1528
+
1529
+ static name: string
1530
+ }
1531
+
1532
+ interface FeedEnclosureClass {
1533
+
1534
+ // Own fields of Grss-0.7.Grss.FeedEnclosureClass
1535
+
1536
+ parent: GObject.ObjectClass
1537
+ }
1538
+
1539
+ abstract class FeedEnclosureClass {
1540
+
1541
+ // Own properties of Grss-0.7.Grss.FeedEnclosureClass
1542
+
1543
+ static name: string
1544
+ }
1545
+
1546
+ interface FeedEnclosurePrivate {
1547
+ }
1548
+
1549
+ class FeedEnclosurePrivate {
1550
+
1551
+ // Own properties of Grss-0.7.Grss.FeedEnclosurePrivate
1552
+
1553
+ static name: string
1554
+ }
1555
+
1556
+ interface FeedFormatterClass {
1557
+
1558
+ // Own fields of Grss-0.7.Grss.FeedFormatterClass
1559
+
1560
+ parent: GObject.ObjectClass
1561
+ format: (formatter: FeedFormatter) => string | null
1562
+ }
1563
+
1564
+ abstract class FeedFormatterClass {
1565
+
1566
+ // Own properties of Grss-0.7.Grss.FeedFormatterClass
1567
+
1568
+ static name: string
1569
+ }
1570
+
1571
+ interface FeedFormatterPrivate {
1572
+ }
1573
+
1574
+ class FeedFormatterPrivate {
1575
+
1576
+ // Own properties of Grss-0.7.Grss.FeedFormatterPrivate
1577
+
1578
+ static name: string
1579
+ }
1580
+
1581
+ interface FeedItemClass {
1582
+
1583
+ // Own fields of Grss-0.7.Grss.FeedItemClass
1584
+
1585
+ parent: GObject.ObjectClass
1586
+ }
1587
+
1588
+ abstract class FeedItemClass {
1589
+
1590
+ // Own properties of Grss-0.7.Grss.FeedItemClass
1591
+
1592
+ static name: string
1593
+ }
1594
+
1595
+ interface FeedItemPrivate {
1596
+ }
1597
+
1598
+ class FeedItemPrivate {
1599
+
1600
+ // Own properties of Grss-0.7.Grss.FeedItemPrivate
1601
+
1602
+ static name: string
1603
+ }
1604
+
1605
+ interface FeedParserClass {
1606
+
1607
+ // Own fields of Grss-0.7.Grss.FeedParserClass
1608
+
1609
+ parent: GObject.ObjectClass
1610
+ }
1611
+
1612
+ abstract class FeedParserClass {
1613
+
1614
+ // Own properties of Grss-0.7.Grss.FeedParserClass
1615
+
1616
+ static name: string
1617
+ }
1618
+
1619
+ interface FeedParserPrivate {
1620
+ }
1621
+
1622
+ class FeedParserPrivate {
1623
+
1624
+ // Own properties of Grss-0.7.Grss.FeedParserPrivate
1625
+
1626
+ static name: string
1627
+ }
1628
+
1629
+ interface FeedRssFormatterClass {
1630
+
1631
+ // Own fields of Grss-0.7.Grss.FeedRssFormatterClass
1632
+
1633
+ parent: FeedFormatterClass
1634
+ }
1635
+
1636
+ abstract class FeedRssFormatterClass {
1637
+
1638
+ // Own properties of Grss-0.7.Grss.FeedRssFormatterClass
1639
+
1640
+ static name: string
1641
+ }
1642
+
1643
+ interface FeedRssFormatterPrivate {
1644
+ }
1645
+
1646
+ class FeedRssFormatterPrivate {
1647
+
1648
+ // Own properties of Grss-0.7.Grss.FeedRssFormatterPrivate
1649
+
1650
+ static name: string
1651
+ }
1652
+
1653
+ interface FeedsGroupClass {
1654
+
1655
+ // Own fields of Grss-0.7.Grss.FeedsGroupClass
1656
+
1657
+ parent: GObject.ObjectClass
1658
+ }
1659
+
1660
+ abstract class FeedsGroupClass {
1661
+
1662
+ // Own properties of Grss-0.7.Grss.FeedsGroupClass
1663
+
1664
+ static name: string
1665
+ }
1666
+
1667
+ interface FeedsGroupPrivate {
1668
+ }
1669
+
1670
+ class FeedsGroupPrivate {
1671
+
1672
+ // Own properties of Grss-0.7.Grss.FeedsGroupPrivate
1673
+
1674
+ static name: string
1675
+ }
1676
+
1677
+ interface FeedsPoolClass {
1678
+
1679
+ // Own fields of Grss-0.7.Grss.FeedsPoolClass
1680
+
1681
+ parent: GObject.ObjectClass
1682
+ feed_fetching: (pool: FeedsPool, feed: FeedChannel) => void
1683
+ }
1684
+
1685
+ abstract class FeedsPoolClass {
1686
+
1687
+ // Own properties of Grss-0.7.Grss.FeedsPoolClass
1688
+
1689
+ static name: string
1690
+ }
1691
+
1692
+ interface FeedsPoolPrivate {
1693
+ }
1694
+
1695
+ class FeedsPoolPrivate {
1696
+
1697
+ // Own properties of Grss-0.7.Grss.FeedsPoolPrivate
1698
+
1699
+ static name: string
1700
+ }
1701
+
1702
+ interface FeedsPublisherClass {
1703
+
1704
+ // Own fields of Grss-0.7.Grss.FeedsPublisherClass
1705
+
1706
+ parent: GObject.ObjectClass
1707
+ new_subscription: (pub: FeedsPublisher, topic: FeedChannel, callback: string | null) => void
1708
+ delete_subscription: (pub: FeedsPublisher, topic: FeedChannel, callback: string | null) => void
1709
+ }
1710
+
1711
+ abstract class FeedsPublisherClass {
1712
+
1713
+ // Own properties of Grss-0.7.Grss.FeedsPublisherClass
1714
+
1715
+ static name: string
1716
+ }
1717
+
1718
+ interface FeedsPublisherPrivate {
1719
+ }
1720
+
1721
+ class FeedsPublisherPrivate {
1722
+
1723
+ // Own properties of Grss-0.7.Grss.FeedsPublisherPrivate
1724
+
1725
+ static name: string
1726
+ }
1727
+
1728
+ interface FeedsStoreClass {
1729
+
1730
+ // Own fields of Grss-0.7.Grss.FeedsStoreClass
1731
+
1732
+ parent: GObject.ObjectClass
1733
+ get_channels: (store: FeedsStore) => FeedChannel[]
1734
+ get_items_by_channel: (store: FeedsStore, channel: FeedChannel) => FeedItem[]
1735
+ has_item: (store: FeedsStore, channel: FeedChannel, id: string | null) => boolean
1736
+ add_item_in_channel: (store: FeedsStore, channel: FeedChannel, item: FeedItem) => void
1737
+ }
1738
+
1739
+ abstract class FeedsStoreClass {
1740
+
1741
+ // Own properties of Grss-0.7.Grss.FeedsStoreClass
1742
+
1743
+ static name: string
1744
+ }
1745
+
1746
+ interface FeedsStorePrivate {
1747
+ }
1748
+
1749
+ class FeedsStorePrivate {
1750
+
1751
+ // Own properties of Grss-0.7.Grss.FeedsStorePrivate
1752
+
1753
+ static name: string
1754
+ }
1755
+
1756
+ interface FeedsSubscriberClass {
1757
+
1758
+ // Own fields of Grss-0.7.Grss.FeedsSubscriberClass
1759
+
1760
+ parent: GObject.ObjectClass
1761
+ notification_received: (sub: FeedsSubscriber, feed: FeedChannel, item: FeedItem) => void
1762
+ }
1763
+
1764
+ abstract class FeedsSubscriberClass {
1765
+
1766
+ // Own properties of Grss-0.7.Grss.FeedsSubscriberClass
1767
+
1768
+ static name: string
1769
+ }
1770
+
1771
+ interface FeedsSubscriberPrivate {
1772
+ }
1773
+
1774
+ class FeedsSubscriberPrivate {
1775
+
1776
+ // Own properties of Grss-0.7.Grss.FeedsSubscriberPrivate
1777
+
1778
+ static name: string
1779
+ }
1780
+
1781
+ interface Person {
1782
+
1783
+ // Owm methods of Grss-0.7.Grss.Person
1784
+
1785
+ get_email(): string | null
1786
+ get_name(): string | null
1787
+ get_uri(): string | null
1788
+ /**
1789
+ * Atomically increments the reference count of `person` by one.
1790
+ * @returns the #GrssPerson with the reference count increased
1791
+ */
1792
+ ref(): Person
1793
+ /**
1794
+ * Atomically decrements the reference count of `person` by one.
1795
+ *
1796
+ * When the reference count reaches zero, the resources allocated by
1797
+ * `person` are freed
1798
+ */
1799
+ unref(): void
1800
+ }
1801
+
1802
+ /**
1803
+ * `GrssPerson` is an opaque structure whose members
1804
+ * cannot be accessed directly.
1805
+ * @record
1806
+ */
1807
+ class Person {
1808
+
1809
+ // Own properties of Grss-0.7.Grss.Person
1810
+
1811
+ static name: string
1812
+
1813
+ // Constructors of Grss-0.7.Grss.Person
1814
+
1815
+ /**
1816
+ * Creates a new #GrssPerson.
1817
+ * @constructor
1818
+ * @param name the name of the person
1819
+ * @param email the email of the person, or %NULL
1820
+ * @param uri the homepage (uri) of the person, or %NULL
1821
+ * @returns a new #GrssPerson, or %NULL
1822
+ */
1823
+ constructor(name: string | null, email: string | null, uri: string | null)
1824
+ /**
1825
+ * Creates a new #GrssPerson.
1826
+ * @constructor
1827
+ * @param name the name of the person
1828
+ * @param email the email of the person, or %NULL
1829
+ * @param uri the homepage (uri) of the person, or %NULL
1830
+ * @returns a new #GrssPerson, or %NULL
1831
+ */
1832
+ static new(name: string | null, email: string | null, uri: string | null): Person
1833
+ }
1834
+
1835
+ /**
1836
+ * Name of the imported GIR library
1837
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
1838
+ */
1839
+ const __name__: string
1840
+ /**
1841
+ * Version of the imported GIR library
1842
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
1843
+ */
1844
+ const __version__: string
1845
+ }
1846
+
1847
+ export default Grss;
1848
+ // END