cyg_bundle_enumerate

Name

cyg_bundle_enumerate -- Enumerate bundle contents

Synopsis

#include <cyg/bundle/bundle_api.h>

int cyg_bundle_enumerate(cyg_bundle_context_t *bc, cyg_bundle_enumerate_callback cb, void *private);

Description

This function is passed a callback function cb that is called once for each item present in the referenced bc bundle. The private parameter is an application specific context passed to the callback routine, and may reference any data required.

The callback function is passed the specific item identifying tag, along with the length of the item data. The arblength parameter provides the length of any arbitrary data associated with the item, or 0x00000000 if the item has no arbitrary data attached.

The callback function is passed the special tag value of 0x0000 to indicate “no more items”.

Return value

If at least 1 item exists in the bundle then CYG_BUNDLE_VALID is returned. If the passed bc parameter is invalid, or the bundle contains no items then the function will return CYG_BUNDLE_INVALID.

2017-02-09
Documentation license for this page: eCosPro License