Openable data blobs.
Definition in file blob.h.
Open data blob.
- Parameters
-
| xfer | Data transfer interface |
| data | Data |
| len | Length of data |
- Return values
-
Definition at line 110 of file blob.c.
110 {
112 void *copy;
113
114
121 copy = ( ( (
void * )
blob ) +
sizeof ( *
blob ) );
125
126
129 return 0;
130}
#define NULL
NULL pointer (VOID *).
static struct process_descriptor blob_process_desc
Data blob process descriptor.
static struct interface_descriptor blob_xfer_desc
Data blob interface descriptor.
uint8_t data[48]
Additional event data.
#define ENOMEM
Not enough space.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
void intf_plug_plug(struct interface *a, struct interface *b)
Plug two object interfaces together.
static void intf_init(struct interface *intf, struct interface_descriptor *desc, struct refcnt *refcnt)
Initialise an object interface.
void * zalloc(size_t size)
Allocate cleared memory.
static void process_init(struct process *process, struct process_descriptor *desc, struct refcnt *refcnt)
Initialise process and add to process list.
#define ref_put(refcnt)
Drop reference to object.
#define ref_init(refcnt, free)
Initialise a reference counter.
struct refcnt refcnt
Reference count.
struct interface xfer
Data transfer interface.
struct process process
Download process.
size_t len
Length of data.
References blob_process_desc, blob_xfer_desc, blob::data, data, ENOMEM, intf_init(), intf_plug_plug(), blob::len, len, memcpy(), NULL, blob::process, process_init(), ref_init, ref_put, blob::refcnt, blob::xfer, and zalloc().
Referenced by datauri_open().