MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Service Configuration Facility Library Functions
                                        scfpropertycreate(3SCF)



NAME
     scfpropertycreate,                    scfpropertyhandle,
     scfpropertydestroy,                 scfpropertygetname,
     scfpropertytype, scfpropertyistype, scftypetostring,
     scfstringtotype,                  scfpropertygetvalue,
     scfpggetproperty - create and manipulate property handles
     in the Service Configuration Facility

SYNOPSIS
     cc [ flag... ] file... -lscf [ library... ]
     #include 

     scfpropertyt *scfpropertycreate(scfhandlet *handle);


     scfhandlet *scfpropertyhandle(scfpropertyt *prop);


     void scfpropertydestroy(scfpropertyt *prop);


     ssizet scfpropertygetname(const scfpropertyt *prop,
          char *buf, sizet size);


     int scfpropertytype(const scfpropertyt *prop,
          scftypet *type);


     int scfpropertyistype(const scfpropertyt *prop,
          scftypet type);


     const char *scftypetostring(scftypet type);


     scftypet scfstringtotype(const char *type);


     int scfpropertygetvalue(const scfpropertyt *prop,
          scfvaluet *value);


     int scfpggetproperty(const scfpropertyt *pg,
          const char *name, scfpropertyt *prop);


DESCRIPTION
     Properties are named sets of values of one  type.  They  are
     grouped  into property groups (see scfpgcreate(3SCF)) that
     are   updated    atomically    using    transactions    (see



SunOS 5.11          Last change: 28 Oct 2008                    1






Service Configuration Facility Library Functions
                                        scfpropertycreate(3SCF)



     scftransactioncreate(3SCF)).


     An scfpropertyt is an opaque handle that can be set  to  a
     single property at any given time. When set, it inherits the
     point-in-time from the source scfpropertygroupt  and  does
     not change until reset.


     The scfpropertycreate() function allocates and initializes
     a     new    scfpropertyt    bound    to    handle.    The
     scfpropertydestroy() function destroys and frees prop.


     The scfpropertyhandle() function  returns  the  handle  to
     which prop is bound.


     The scfpropertytype() function retrieves the type  of  the
     property to which prop is set.


     The scfpropertyistype() function determines if  the  pro-
     perty is compatible with type. See scfvaluecreate(3SCF).


     The scftypetostring() function returns the string name of
     the  type  supplied.  If  the type is invalid or unknown, it
     returns "unknown".


     The scfstringtotype()  function  returns  the  scftypet
     definition  of  the  string supplied. If the string does not
     translate to an existing type, it returns SCFTYPEINVALID.


     The scfpropertygetvalue() function retrieves  the  single
     value  that  the  property to which prop is set contains. If
     the property has more than one value, the value argument  is
     set  to one of the values. To retrieve all values associated
     with a property, see scfiterpropertyvalues(3SCF).


     The scfpggetproperty() function sets prop to the property
     specified by name in the property group specified by pg.

RETURN VALUES
     Upon successful completion, scfpropertycreate() returns  a
     new scfpropertyt. Otherwise, it returns NUL.





SunOS 5.11          Last change: 28 Oct 2008                    2






Service Configuration Facility Library Functions
                                        scfpropertycreate(3SCF)



     Upon successful completion,   scfpropertygetname()  func-
     tion returns the length of the string written, not including
     the terminating null byte. Otherwise, it returns -1.


     Upon    successful    completion,     scfpggetproperty(),
     scfpropertytype(),       scfpropertyistype(),       and
     scfpggetvalue()  functions  return  0.  Otherwise,   they
     return -1.


     Upon successful completion, scftypetostring()  returns  a
     string of the type supplied.


     Upon successful completion, scfstringtotype() returns the
     scftypet definition of the string supplied

ERORS
     The scfpropertycreate() function will fail if:

     SCFERORINVALIDARGUMENT    The value of the handle  argu-
                                   ment is NUL.


     SCFERORNOMEMORY           There is not enough memory  to
                                   allocate an scfpropertyt.


     SCFERORNORESOURCES        The server does not have  ade-
                                   quate resources for a new pro-
                                   perty handle.



     The scfpropertyhandle() function will fail if:

     SCFERORHANDLEDESTROYED    The  handle  associated   with
                                   prop has been destroyed.



     The      scfpropertygetname(),       scfpropertytype(),
     scfpropertyistype(),  and  scfpropertygetvalue() func-
     tions will fail if:

     SCFERORCONECTIONBROKEN

         The connection to the repository was lost.





SunOS 5.11          Last change: 28 Oct 2008                    3






Service Configuration Facility Library Functions
                                        scfpropertycreate(3SCF)



     SCFERORDELETED

         The property's parent property group or an ancestor  has
         been deleted.


     SCFERORNOTBOUND

         The handle was never bound or has been unbound.


     SCFERORNOTSET

         The property is not set.



     The scfpropertyistype() function will fail if:

     SCFERORINVALIDARGUMENT    The type  argument  is  not  a
                                   valid type.


     SCFERORTYPEMISMATCH       The prop argument is not of  a
                                   type compatible with type.



     The scfpggetproperty() function 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 property group or an ancestor has been deleted.


     SCFERORHANDLEMISMATCH

         The property group and property are not derived from the
         same handle.




SunOS 5.11          Last change: 28 Oct 2008                    4






Service Configuration Facility Library Functions
                                        scfpropertycreate(3SCF)



     SCFERORINTERNAL

         An internal error occurred.


     SCFERORINVALIDARGUMENT

         The value of the name argument is not a  valid  property
         name.


     SCFERORNORESOURCES

         The server does not have the resources to  complete  the
         request.


     SCFERORNOTBOUND

         The handle was never bound or has been unbound.


     SCFERORNOTFOUND

         The property specified by name was not found.


     SCFERORNOTSET

         The property group specified by pg is not set.



     The scfpropertygetvalue() function will fail if:

     SCFERORCONSTRAINTVIOLATED

         The property has more than one value associated with it.
         The value argument will be set to one of the values.


     SCFERORHANDLEMISMATCH

         The property and value are derived from  different  han-
         dles.


     SCFERORNOTFOUND

         The property has no values associated with it. The value
         argument will be reset.



SunOS 5.11          Last change: 28 Oct 2008                    5






Service Configuration Facility Library Functions
                                        scfpropertycreate(3SCF)



     SCFERORPERMISIONDENIED

         The value could not be read due to access restrictions.



     The scferror(3SCF) function can be  used  to  retrieve  the
     error value.

ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Interface Stability          Committed                   
    
     MT-Level                     Safe                        
    


SEE ALSO
     libscf(3LIB), scferror(3SCF), scfhandledecodefmri(3SCF),
     scfiterpropertyvalues(3SCF),         scfpgcreate(3SCF),
     scfpropertytofmri(3SCF),    scftransactioncreate(3SCF),
     scfvaluecreate(3SCF), attributes(5)

























SunOS 5.11          Last change: 28 Oct 2008                    6






Service Configuration Facility Library Functions
                                        scfpropertycreate(3SCF)






















































SunOS 5.11          Last change: 28 Oct 2008                    7






OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™