Synchronous C API Functions

hc_nvr_add_timestamp

Adds new metadata value of type timestamp.

Synopsis

#include <time.h>

hcerr_t hc_nvr_add_timestamp(hc_nvr_t *nvr,

hc_string_t name,

struct timespec *value);

Description

This function adds a new metadata name-value-type tuple to a designated name-value record, where type is hc_timestamp_t. The struct timespec is defined in the POSIX standard:

time_t tv_sec; /* seconds */

long tv_nsec; /* and nanoseconds */

where tv_sec is measured since the UNIX epoch (00:00:00 UTC on January 1, 1970). The maximum value of tv_sec is truncated by three decimal digits owing to database limitations and tv_nsec is truncated to milliseconds. The name-value record automatically expands as needed. The name and value are copied into the structure.

Parameters

nvr

Points to a name-value-record. name

IN: Name for the tuple. value

IN: The struct timespec(time.h) value.

Return Codes

HCERR_OK

HCERR_BAD_REQUEST

HCERR_OOM

HCERR_INVALID_NVR

HCERR_ILLEGAL_ARGUMENT

HCERR_ILLEGAL_VALUE_FOR_METADATA

HCERR_NO_SUCH_ATTRIBUTE

74

Sun StorageTek 5800 System Client API Reference Manual • June 2008

Page 74
Image 74
Sun Microsystems 5800 manual Hcnvraddtimestamp