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