VortexPayloadFeeder* vortex_payload_feeder_file ( const char *  path,
axl_bool  add_mime_head 

Creates a feeder object connected to the file found at the path provided.

Once you have created the feeder object you initialize a send operation providing the feeder. This will cause to send a frame or the desired type, making its content to be filled from content found at the VortexPayloadFeeder. The the following functions:

NOTE: there is a vortex_payload_feeder_free function. This is usually not required because the send operation already finishes the object when the send operation has been completed.

pathThe path to the file that will be feeded into the send operation.
add_mime_headIn general is recommend that the feeder add an empty mime header before sending the content found on the file. However, it may be required to avoid producing such mime header in the case remote BEEP peer will not process such header. For example, if remote peer disable complete flag, it will require the content to be without a mime header or to detect the first frame fragment and skip the initial MIME header.
A reference to a VortexPayloadFeeder object or NULL if it fails. The function checks if the function exists and can be opened. In such checks fails, function will return NULL.

Important note about reference returned by this function

VortexPayloadFeeder object support reference counting. Once the feeder object is "sent" (using some of available function like vortex_channel_send_msg_from_feeder) then the reference is considered to be owned by the vortex engine (in particular by the vortex sequencer loop).

This means that you must call to vortex_payload_feeder_ref in the case you want to pause a feeder transfer (vortex_payload_feeder_pause) or to check its transfer status (vortex_payload_feeder_status).

In the case you use the feeder to just send content, then you don't have to worry about vortex_payload_feeder_ref. In the other hand, as much calls are done to vortex_payload_feeder_ref as much as required to vortex_payload_feeder_unref.

References vortex_payload_feeder_new().