Gsf.Blob¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
object |
r |
Class Details¶
- class Gsf.Blob(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(data_to_copy)¶
- Parameters:
data_to_copy (
bytes
) – Data which will be copied into the blob, orNone
if size is zero.- Raises:
- Returns:
A newly-created
Gsf.Blob
, orNone
if the data could not be copied.Error domain: #GSF_ERROR
Possible errors:
Gsf.Error.OUT_OF_MEMORY
if the data_to_copy could not be copied.- Return type:
Creates a new
Gsf.Blob
object to hold the specified data. The blob can then be used as a facility for reference-counting for the data. The data is copied internally, so the blob does not hold references to external chunks of memory.
- get_size()¶
-
Queries the size in bytes of the data stored in the blob.
- peek_data()¶
- Returns:
Pointer to the data stored in the blob, or
None
if the size of the data is zero.- Return type:
Queries a pointer to the data stored in the blob. This does not copy the data for you; it returns a pointer to the actual buffer which the blob uses internally, so you should not free this buffer on your own.