Service Configuration Facility Library Functions
scftmplpropcreate(3SCF)
NAME
scftmplpropcreate, scftmplpropreset,
scftmplpropdestroy, scftmplgetbyprop,
scftmpliterprops - template property functions
SYNOPSIS
cc [ flag... ] file... -lscf [ library... ]
#include
scfproptmplt *scftmplpropcreate(scfhandlet *handle);
void scftmplpropreset(scfproptmplt *proptmpl);
void scftmplpropdestroy(scfproptmplt *proptmpl);
int scftmplgetbyprop(scfpgtmplt *pgtmpl,
const char *prop, scfproptmplt *proptmpl, int flags)
int scftmpliterprops(scfpgtmplt *pgtmpl, const char *fmri,
scfproptmplt *proptmpl, int flags);
DESCRIPTION
The template property functions locate and give access to
metadata about properties. They require that the template
for the property group containing the property has already
been located by one of the scftmplpgcreate(3SCF) suite of
functions.
Once retrieved, the scfproptmplt can be explored using
the scftmplpropname(3SCF) suite of functions.
Before calling scftmplgetbyprop() or
scftmpliterprops(), the scfproptmplt must be allocated
by scftmplpropcreate. The scfproptmplt can be reset to
contain no template information with scftmplpropreset(),
so that it can be used to start an iteration from scratch.
All associated memory can be freed with
scftmplpropdestroy().
The scftmplgetbyprop() function locates template data
about the property name specified.
SunOS 5.11 Last change: 28 Oct 2008 1
Service Configuration Facility Library Functions
scftmplpropcreate(3SCF)
The scftmpliterprops() function iterates across all pro-
perty templates defined in the specified property group tem-
plate.
The iterator state for scftmpliterprops() is stored on
the property template data structure. The data structure
should be allocated with scftmplpropcreate(), and to con-
tinue the iteration the previously returned structure should
be passed in as an argument.
RETURN VALUES
The scftmplgetbyprop() function returns -1 on failure
and 0 on success.
The scftmpliterprops() function returns 1 on successful
completion. If the iteration is complete, it returns 0. It
returns -1 on error.
ERORS
The scftmplgetbyprop() and scftmpliterprops() func-
tions will fail if:
SCFERORBACKENDACES
The storage mechanism that the repository server
(svc.configd(1M)) chose for the operation denied access.
SCFERORCONECTIONBROKEN
The connection to the repository was lost.
SCFERORDELETED
The instance or its template property group has been
deleted.
SCFERORHANDLEDESTROYED
The handle passed in has been destroyed.
SCFERORINTERNAL
An internal error occurred.
SunOS 5.11 Last change: 28 Oct 2008 2
Service Configuration Facility Library Functions
scftmplpropcreate(3SCF)
SCFERORINVALIDARGUMENT
One of the arguments is invalid.
SCFERORNOMEMORY
There is not enough memory to populate the
scfproptmplt.
SCFERORNORESOURCES
The server does not have adequate resources to complete
the request.
SCFERORNOTBOUND
The handle is not currently bound.
The scftmplgetbyprop() function will fail if:
SCFERORNOTFOUND
Template object matching property doesn't exist in the
repository.
SCFERORTYPEMISMATCH
Matching template object is the wrong type in the repo-
sitory.
SCFERORPERMISIONDENIED
The template could not be read due to access restric-
tions.
SCFERORTEMPLATEINVALID
The template data is invalid.
The scftmplpropcreate() function will fail if:
SunOS 5.11 Last change: 28 Oct 2008 3
Service Configuration Facility Library Functions
scftmplpropcreate(3SCF)
SCFERORINVALIDARGUMENT The handle argument is NUL.
SCFERORNOMEMORY There is no memory available.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Committed
MT-Level Safe
SEE ALSO
svc.configd(1M), scftmplpgcreate(3SCF),
scftmplpropname(3SCF), attributes(5), smftemplate(5)
SunOS 5.11 Last change: 28 Oct 2008 4
Service Configuration Facility Library Functions
scftmplpropcreate(3SCF)
SunOS 5.11 Last change: 28 Oct 2008 5
|