Grss.FeedEnclosure¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Grss.FeedEnclosure(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(url)¶
- Parameters:
url (
str
) – URL of the external element.- Returns:
a new
Grss.FeedEnclosure
.- Return type:
Allocates a new
Grss.FeedEnclosure
, to be downloaded separately.
- fetch()¶
- Raises:
- Returns:
temporary file where the contents have been written, or
None
if an error occours.- Return type:
Utility to fetch a
Grss.FeedEnclosure
. Contents are stored in a temporaryGio.File
, which is suggested to move on a permanent location to keep it over time.
- fetch_async(callback, *user_data)¶
- Parameters:
callback (
Gio.AsyncReadyCallback
orNone
) – function to invoke at the end of the download.
Similar to
Grss.FeedEnclosure.fetch
(), but asyncronous.
- fetch_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – theGio.AsyncResult
passed to the callback.- Raises:
- Returns:
temporary file where the contents have been written, or
None
if an error occours.- Return type:
Finalizes an asyncronous operation started with
Grss.FeedEnclosure.fetch_async
().
- get_length()¶
- Returns:
size of the self, in bytes.
- Return type:
Retrieves the size of the embedded file.
- get_url()¶
- Returns:
the URL where the enclosure may be found.
- Return type:
Retrieves the URL of the self.