Skip Navigation Links | |
Exit Print View | |
Remote Administration Daemon Developer Guide Oracle Solaris 11.1 Information Library |
3. Abstract Data Representation
API Definitions and Implementation
Entry Points and Generated Stubs
Objects in the rad namespace can be managed either as a set of statically installed objects or as a dynamic set of objects that are listed or created on demand.
rad_modapi.h declares two interfaces for statically adding objects to a namespace.
cont_insert() adds an object to the namespace. In turn, objects are created by calling instance_create() with a name, a pointer to the interface the object implements, and a pointer to object-specific callback data. For example:
i = instance_create("com.oracle.solaris.user:type=User,name=Kyle", &interface_User_svr, kyle_data); cont_insert(&rad_container, i, error_return);
cont_insert_singleton() is a convenience routine that creates an object instance for the specified interface with the specified name and adds it to the namespace. The callback data is set to NULL.
cont_insert_singleton(&rad_container, "com.oracle.solaris.user:type=UserManager", &interface_UserManager_svr, error_return);