mme_metadata_getinfo_file()

Get metadata for a specified file, based on the filepath

Synopsis:

#include <mme/mme.h>

int mme_metadata_getinfo_file( mme_metadata_session_t *session,
                               uint64_t msid,
                               const char *file,
                               const char *metadata_groups,
                               uint64_t *mdinfo_rid,
                               mme_metadata_info_t **metadata );

Arguments:

session
A pointer to a metadata session structure.
msid
The mediastore ID for the mediastore with the file for which metadata is required.
file
A pointer to the path, relative to the mediastore mountpath, of the file for which metadata is required.
metadata_groups
A pointer to a string representing the metadata information groups for which metadata is requested.
mdinfo_rid
A pointer to a generated metadata information request ID.
metadata
A pointer to the location with the requested metadata. See metadata pointer below.

Library:

mme

Description:

The function mme_metadata_getinfo_file() retrieves metadata for the file identified by the its filepath, and places this metadata at the location specified by metadata. You must call mme_metadata_create_session() to create a metadata session before using mme_metadata_getinfo_file().


Note:
  • Metadata and images retrieved with this function are only valid for the current metadata session.
  • A call to an mme_metadata_getinfo_*() function switches the metadata session context to the newly requested file, thus causing any requests for image IDs from previous image data to fail.
  • After an mme_metadata_getinfo_*() function has been called, any further calls to an mme_metadata_getinfo_*() function before receipt of a MME_EVENT_METADATA_INFO event will return an EBUSY error.

metadata pointer

The metadata argument points to a pointer to a mme_metadata_info_t metadata structure with the retrieved metadata. Depending on the value of metadata, mme_metadata_getinfo_*() operates either synchonously or asynchronously.

NULL pointer

If metadata is NULL, mme_metadata_getinfo_*() operates asynchronously, and the mme_metadata_info_t structure is delivered with the MME_EVENT_METADATA_INFO event.

non-NULL pointer

If metadata is non-NULL function mme_metadata_getinfo_*() operates synchronously and the following applies:

For an example of the XML delivered in the mme_metadata_info_t structure, see XML content with the description of the structure.

Events

MME_EVENT_METADATA_INFO.

Blocking and validation

See metadata pointer above.

Returns:

0
Success: mdinfo_rid is set.
-1
An error occurred (errno is set).

Classification:

QNX Neutrino

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

mme_metadata_create_session(), mme_metadata_free_session(), mme_metadata_getinfo_current(), mme_metadata_getinfo_library(), mme_metadata_image_cache_clear(), mme_metadata_image_load(), mme_metadata_image_unload(), mme_metadata_image_url_t, mme_metadata_info_t, mme_metadata_session_t