Logo Search packages:      
Sourcecode: naspro-bridges-bad version File versions  Download package

int lv2_dyn_manifest_get_data ( LV2_Dyn_Manifest_Handle  handle,
FILE *  fp,
const char *  uri 
)

Function that fetches data related to a specific URI.

handle is the dynamic manifest generator handle.

fp is the FILE * identifying the resource the host has to set up for the dynamic manifest generator. The host MUST pass a writable resource to this function, and the dynamic manifest generator MUST ONLY perform write operations on it at the current position of the stream (e.g. use only fprintf(), fwrite() and similar).

uri is the URI to get data about (in the "plain" form, a.k.a. without RDF prefixes).

The dynamic manifest generator has to fill the resource with data related to the URI. For example, if the library exposes a regular LV2 plugin whose URI, as retrieved by the host using lv2_dyn_manifest_get_subjects() is http://www.example.com/plugin/uri, it should output something like:

<http://www.example.com/plugin/uri> a lv2:Plugin; lv2:binary <mylib.so>; doap:name "My Plugin"; ... etc...

This function MUST return 0 on success, otherwise a non-zero error code.

Definition at line 81 of file manifest.c.

References lv2_dyn_manifest_get_data().

{
      struct nacore_descriptor *d;

      if (descs_ok == 0)
            return 0;

      d = (struct nacore_descriptor *)nacore_avl_tree_find(
            _nadssi_pluglib_desc_tree, (void *)uri);
      if (d == NULL)
            return -1;

      nacore_manifest_print_data(d, fp, "dssi");
      
      return 0;
}


Generated by  Doxygen 1.6.0   Back to index