▼ToUse the API for Storing Name-ValueRecords
Callhc_init once per process.
Call“hc_session_create_ez”on page 53 to initialize the session and download the schema.
Createthe metadata record with “hc_nvr_create”on page 65.
Fillthe new metadata piece by piece with hc_nvr_add_metadata_* functions (see “Building
Name-ValueRecords”on page 66) for each 5800 system type.
Calleither “hc_store_metadata_ez”on page 88 or “hc_store_both_ez” on page 87 to store
thenew metadata record.
Whenyou are done, free the metadatarecord by calling “hc_nvr_free” on page 66.
Whenthe session is nished, call “hc_session_free”on page 55 to free the session data
structures.
Whenall threads are completed, call hc_cleanup to releasethe global session.
UsingReturned Name -ValueRecordsName-valuerecords are also returned as the result of queries that return metadata information,
suchas “hc_retrieve_metadata_ez” on page 92.
▼ToUse Returned Name-ValueRecords
Runthe query to create an “hc_nvr_t”on page 48 record or a table of “hc_nvr_t” on page 48
structures.
Useeither name-based access (for example, hc_nvr_get_*) or index-based access (for example,
“hc_nvr_get_count”on page 76 and “hc_nvr_get_value_at_index” on page 77).
Tofreethe “hc_nvr_t” on page 48 structure, call “hc_nvr_free”on page 66.
Note– Structures created by hc_nvr_create can also be freed by calling hc_nvr_free.
1
2
3
4
5
6
7
8
1
2
SynchronousCAPI Functions
SunStorageTek5800 System Client API Reference Manual • June 200864