OBEX_ObjectReadStream

Name

OBEX_ObjectReadStream --  Read data from body stream

Synopsis

int OBEX_ObjectReadStream (obex_t * self, obex_object_t * object, const uint8_t ** buf);

Arguments

self

OBEX handle

object

OBEX object

buf

A pointer to a pointer which this function will set to a buffer which shall be read (and ONLY read) after this function returns.

Description

To recieve the body as a stream call this function with buf = NULL as soon as you get an OBEX_EV_REQHINT event.

You will now recieve OBEX_EV_STREAMAVAIL events when data is available for you. Call this function to get the data.

Note! When receiving a stream data is not buffered so if you don't call this function when you get an OBEX_EV_STREAMAVAIL event data will be lost.

Returns the number of bytes in buffer, or 0 for end-of-stream.