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, orNoneif size is zero.- Raises:
 - Returns:
 A newly-created
Gsf.Blob, orNoneif the data could not be copied.Error domain: #GSF_ERROR
Possible errors:
Gsf.Error.OUT_OF_MEMORYif the data_to_copy could not be copied.- Return type:
 
Creates a new
Gsf.Blobobject 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
Noneif 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.