diff --git a/man/Makefile b/man/Makefile index 22c1e1a1..8f5292c7 100644 --- a/man/Makefile +++ b/man/Makefile @@ -59,6 +59,21 @@ html: groff -mandoc -Thtml cpg_context_set.3 > html/cpg_context_set.html groff -mandoc -Thtml cpg_local_get.3 > html/cpg_local_get.html + groff -mandoc -Thtml confdb_dispatch.3> html/confdb_dispatch.html + groff -mandoc -Thtml confdb_fd_get.3 > html/confdb_fd_get.html + groff -mandoc -Thtml confdb_finalize.3 > html/confdb_finalize.html + groff -mandoc -Thtml confdb_initialize.3 > html/confdb_initialize.html + groff -mandoc -Thtml confdb_key_create.3 > html/confdb_key_create.html + groff -mandoc -Thtml confdb_key_delete.3 > html/confdb_key_delete.html + groff -mandoc -Thtml confdb_key_iter.3 > html/confdb_key_iter.html + groff -mandoc -Thtml confdb_key_replace.3 > html/confdb_key_replace.html + groff -mandoc -Thtml confdb_object_create.3 > html/confdb_object_create.html + groff -mandoc -Thtml confdb_object_destroy.3 > html/confdb_object_destroy.html + groff -mandoc -Thtml confdb_object_find.3 > html/confdb_object_find.html + groff -mandoc -Thtml confdb_object_iter.3 > html/confdb_object_iter.html + groff -mandoc -Thtml confdb_object_parent_get.3 > html/confdb_object_parent_get.html + groff -mandoc -Thtml confdb_overview.8 > html/confdb_overview.html + cp index.html html clean: diff --git a/man/confdb_dispatch.3 b/man/confdb_dispatch.3 new file mode 100644 index 00000000..eadb10a5 --- /dev/null +++ b/man/confdb_dispatch.3 @@ -0,0 +1,109 @@ +.\"/* +.\" * Copyright (c) 2008 Red Hat, Inc. +.\" * +.\" * All rights reserved. +.\" * +.\" * Author: Christine Caulfield +.\" * +.\" * This software licensed under BSD license, the text of which follows: +.\" * +.\" * Redistribution and use in source and binary forms, with or without +.\" * modification, are permitted provided that the following conditions are met: +.\" * +.\" * - Redistributions of source code must retain the above copyright notice, +.\" * this list of conditions and the following disclaimer. +.\" * - Redistributions in binary form must reproduce the above copyright notice, +.\" * this list of conditions and the following disclaimer in the documentation +.\" * and/or other materials provided with the distribution. +.\" * - Neither the name of the MontaVista Software, Inc. nor the names of its +.\" * contributors may be used to endorse or promote products derived from this +.\" * software without specific prior written permission. +.\" * +.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +.\" * THE POSSIBILITY OF SUCH DAMAGE. +.\" */ +.TH CONFDB_DISPATCH 3 2004-08-31 "openais Man Page" "Openais Programmer's Manual" +.SH NAME +confdb_dispatch \- Dispatches callbacks from the CONFDB service +.SH SYNOPSIS +.B #include +.sp +.BI "int confdb_dispatch(confdb_handle_t " handle ", confdb_dispatch_t *" dispatch_types ");" +.SH DESCRIPTION +The +.B confdb_dispatch +function is used to dispatch configuration changes. +.PP +Each application may have several connections to the CONFDB API. Each application +uses the +.I handle +argument to uniquely identify the connection. +.PP +The +.I dispatch_types +argument is used to identify the type of dispatch to execute. The possible types are +defined by the structure: + +.IP +.RS +.ne 18 +.nf +.ta 4n 30n 33n +typedef enum { + CONFDB_DISPATCH_ONE, + CONFDB_DISPATCH_ALL, + CONFDB_DISPATCH_BLOCKING +} confdb_dispatch_t; +.ta +.fi +.RE +.IP +.PP +.PP +The dispatch values have the following meanings: +.TP +.B CONFDB_DISPATCH_ONE +Dispatch at least one callback, blocking until the callback is dispatched. +.TP +.B CONFDB_DISPATCH_ALL +Dispatch all waiting callbacks without blocking to wait for any callbacks. +.TP +.B CONFDB_DISPATCH_BLOCKING +Dispatch all callbacks blocking indefinitely. This is used in a threaded +program where a thread is created, and then confdb_dispatch() is called immediately +from the created thread to execute callbacks. + +.SH RETURN VALUE +This call returns the CONFDB_OK value if successful, otherwise an error is returned. +.PP +.SH ERRORS +The errors are undocumented. +.SH "SEE ALSO" +.BR confdb_overview (8), +.BR confdb_initialize (3), +.BR confdb_finalize (3), +.BR confdb_fd_get (3), +.BR confdb_object_create (3), +.BR confdb_object_destroy (3), +.BR confdb_object_parent_get (3), +.BR confdb_key_create (3), +.BR confdb_key_delete (3), +.BR confdb_key_get (3), +.BR confdb_key_replace (3), +.BR confdb_object_find_start (3), +.BR confdb_object_find (3), +.BR confdb_object_iter_start (3), +.BR confdb_object_iter (3), +.BR confdb_key_iter_start (3), +.BR confdb_key_iter (3), + +.PP diff --git a/man/confdb_fd_get.3 b/man/confdb_fd_get.3 new file mode 100644 index 00000000..699f3a59 --- /dev/null +++ b/man/confdb_fd_get.3 @@ -0,0 +1,77 @@ +.\"/* +.\" * Copyright (c) 2008 Red Hat, Inc. +.\" * +.\" * All rights reserved. +.\" * +.\" * Author: Christine Caulfield +.\" * +.\" * This software licensed under BSD license, the text of which follows: +.\" * +.\" * Redistribution and use in source and binary forms, with or without +.\" * modification, are permitted provided that the following conditions are met: +.\" * +.\" * - Redistributions of source code must retain the above copyright notice, +.\" * this list of conditions and the following disclaimer. +.\" * - Redistributions in binary form must reproduce the above copyright notice, +.\" * this list of conditions and the following disclaimer in the documentation +.\" * and/or other materials provided with the distribution. +.\" * - Neither the name of the MontaVista Software, Inc. nor the names of its +.\" * contributors may be used to endorse or promote products derived from this +.\" * software without specific prior written permission. +.\" * +.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +.\" * THE POSSIBILITY OF SUCH DAMAGE. +.\" */ +.TH CONFDB_FD_GET 3 2004-08-31 "openais Man Page" "Openais Programmer's Manual" +.SH NAME +confdb_fd_get \- Dispatches callbacks from the CONFDB service +.SH SYNOPSIS +.B #include +.sp +.BI "int confdb_fd_get(confdb_handle_t " handle ", int *" fd ");" +.SH DESCRIPTION +The +.B confdb_fd_get +function is used to retrieve the file descriptor that may be used with the poll +system call to determine when +.B confdb_dispatch(3) +won't block. The +.I handle +argument may not be used directly with +.B poll +because it is not the file descriptor, but instead an internal identifier used +by the CONFDB library. +.SH RETURN VALUE +This call returns the CONFDB_OK value if successful, otherwise an error is returned. +.PP +.SH ERRORS +The errors are undocumented. +.SH "SEE ALSO" +.BR confdb_overview (8), +.BR confdb_initialize (3), +.BR confdb_finalize (3), +.BR confdb_dispatch (3), +.BR confdb_fd_get (3), +.BR confdb_object_create (3), +.BR confdb_object_destroy (3), +.BR confdb_object_parent_get (3), +.BR confdb_key_create (3), +.BR confdb_key_delete (3), +.BR confdb_key_get (3), +.BR confdb_key_replace (3), +.BR confdb_object_find_start (3), +.BR confdb_object_find (3), +.BR confdb_object_iter_start (3), +.BR confdb_object_iter (3), +.BR confdb_key_iter_start (3), +.BR confdb_key_iter (3), +.PP diff --git a/man/confdb_finalize.3 b/man/confdb_finalize.3 new file mode 100644 index 00000000..3587bda2 --- /dev/null +++ b/man/confdb_finalize.3 @@ -0,0 +1,74 @@ +.\"/* +.\" * Copyright (c) 2008 Red Hat, Inc. +.\" * +.\" * All rights reserved. +.\" * +.\" * Author: Christine Caulfield +.\" * +.\" * This software licensed under BSD license, the text of which follows: +.\" * +.\" * Redistribution and use in source and binary forms, with or without +.\" * modification, are permitted provided that the following conditions are met: +.\" * +.\" * - Redistributions of source code must retain the above copyright notice, +.\" * this list of conditions and the following disclaimer. +.\" * - Redistributions in binary form must reproduce the above copyright notice, +.\" * this list of conditions and the following disclaimer in the documentation +.\" * and/or other materials provided with the distribution. +.\" * - Neither the name of the MontaVista Software, Inc. nor the names of its +.\" * contributors may be used to endorse or promote products derived from this +.\" * software without specific prior written permission. +.\" * +.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +.\" * THE POSSIBILITY OF SUCH DAMAGE. +.\" */ +.TH CONFDB_FINALIZE 3 2004-08-31 "openais Man Page" "Openais Programmer's Manual" +.SH NAME +confdb_finalize \- Terminate a connection to the CONFDB service +.SH SYNOPSIS +.B #include +.sp +.BI "int confdb_finalize(confdb_handle_t " handle ");" +.SH DESCRIPTION +The +.B confdb_finalize +function is used to close a connection to the configuration dabatase API. +Once the connection is finalized, the handle may not be used again by applications. +No more callbacks will be dispatched from the +.B confdb_dispatch function. +.PP +.SH RETURN VALUE +This call returns the CONFDB_OK value if successful, otherwise an error is returned. +.PP +.SH ERRORS +The errors are undocumented. +.SH "SEE ALSO" +.BR confdb_overview (8), +.BR confdb_initialize (3), +.BR confdb_finalize (3), +.BR confdb_dispatch (3), +.BR confdb_fd_get (3), +.BR confdb_object_create (3), +.BR confdb_object_destroy (3), +.BR confdb_object_parent_get (3), +.BR confdb_key_create (3), +.BR confdb_key_delete (3), +.BR confdb_key_get (3), +.BR confdb_key_replace (3), +.BR confdb_object_find_start (3), +.BR confdb_object_find (3), +.BR confdb_object_iter_start (3), +.BR confdb_object_iter (3), +.BR confdb_key_iter_start (3), +.BR confdb_key_iter (3), + +.PP diff --git a/man/confdb_initialize.3 b/man/confdb_initialize.3 new file mode 100644 index 00000000..fc873731 --- /dev/null +++ b/man/confdb_initialize.3 @@ -0,0 +1,115 @@ +.\"/* +.\" * Copyright (c) 2008 Red Hat, Inc. +.\" * +.\" * All rights reserved. +.\" * +.\" * Author: Christine Caulfield +.\" * +.\" * This software licensed under BSD license, the text of which follows: +.\" * +.\" * Redistribution and use in source and binary forms, with or without +.\" * modification, are permitted provided that the following conditions are met: +.\" * +.\" * - Redistributions of source code must retain the above copyright notice, +.\" * this list of conditions and the following disclaimer. +.\" * - Redistributions in binary form must reproduce the above copyright notice, +.\" * this list of conditions and the following disclaimer in the documentation +.\" * and/or other materials provided with the distribution. +.\" * - Neither the name of the MontaVista Software, Inc. nor the names of its +.\" * contributors may be used to endorse or promote products derived from this +.\" * software without specific prior written permission. +.\" * +.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +.\" * THE POSSIBILITY OF SUCH DAMAGE. +.\" */ +.TH CONFDB_INITIALIZE 3 2004-08-31 "openais Man Page" "Openais Programmer's Manual" +.SH NAME +confdb_initialize \- Create a new connection to the ConfDb service +.SH SYNOPSIS +.B #include +.sp +.BI "int confdb_initialize(confdb_handle_t *" handle ", confdb_callbacks_t *" callbacks "); +.SH DESCRIPTION +The +.B confdb_initialize +function is used to initialize a connection to the configuration database API. +.PP +Each application may have several connections to the CONFDB API. Each application +uses the +.I handle +argument to uniquely identify the connection. The +.I handle +argument is then used in other function calls to identify the connection to be used +for communication with the CONFDB service. +.PP +Every time the configuration database is updated, the callback is called. +The callback function is described by the following type definitions: +.PP +.PP +.IP +.RS +.ne 18 +.nf +.ta 4n 20n 32n + +typedef void (*confdb_change_notify_fn_t) ( + confdb_handle_t handle, + unsigned int parent_object_handle, + unsigned int object_handle, + void *object_name, + int object_name_len, + void *key_name, + int key_name_len, + void *key_value, + int key_value_len); + +.ta +.fi +.RE +.IP +.PP +.PP +The +.I callbacks +argument is of the type: +.IP +.RS +.ne 18 +.nf +.PP +typedef struct { + confdb_change_notify_fn_t confdb_change_notify_fn; +} confdb_callbacks_t; +.ta +.fi +.RE +.IP +.PP +When a configuration change occurs, the callback +is called from the +.B confdb_dispatch() +function. +.PP +.SH RETURN VALUE +This call returns the CONFDB_OK value if successful, otherwise an error is returned. +.PP +.SH BUGS +Callbacks are not support at the moment. +.PP +.SH ERRORS +The errors are undocumented. +.SH "SEE ALSO" +.BR confdb_overview (8), +.BR confdb_finalize (3), +.BR confdb_fd_get (3), +.BR confdb_dispatch (3), +.PP diff --git a/man/confdb_key_create.3 b/man/confdb_key_create.3 new file mode 100644 index 00000000..a7e88830 --- /dev/null +++ b/man/confdb_key_create.3 @@ -0,0 +1,86 @@ +.\"/* +.\" * Copyright (c) 2008 Red Hat, Inc. +.\" * +.\" * All rights reserved. +.\" * +.\" * Author: Christine Caulfield +.\" * +.\" * This software licensed under BSD license, the text of which follows: +.\" * +.\" * Redistribution and use in source and binary forms, with or without +.\" * modification, are permitted provided that the following conditions are met: +.\" * +.\" * - Redistributions of source code must retain the above copyright notice, +.\" * this list of conditions and the following disclaimer. +.\" * - Redistributions in binary form must reproduce the above copyright notice, +.\" * this list of conditions and the following disclaimer in the documentation +.\" * and/or other materials provided with the distribution. +.\" * - Neither the name of the MontaVista Software, Inc. nor the names of its +.\" * contributors may be used to endorse or promote products derived from this +.\" * software without specific prior written permission. +.\" * +.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +.\" * THE POSSIBILITY OF SUCH DAMAGE. +.\" */ +.TH CONFDB_KEY_CREATE 3 2008-04-17 "openais Man Page" "Openais Programmer's Manual" +.SH NAME +confdb_key_create \- Add a new key/value pair to the Configuration Database +.SH SYNOPSIS +.B #include +.sp +.BI "confdb_error_t confdb_key_create(confdb_handle_t " handle ", +.BI unsigned int " parent_object_handle ", +.BI void " *key_name ", +.Bi int " key_name_len ", +.BI void " *value ", +.BI int " value_len "); " + +.SH DESCRIPTION +The +.B confdb_key_create +function adds a new key/value pair to the specified parent object. Parent objects may contain +many keys and also sub-objects. The names of keys are not required to be unique: if you +call +.B confdb_key_create +twice with the same parameters you will create two identical keys in the database. +.BR +The parent object should already exist in the database, it can be OBJECT_PARENT_HANDLE +(the top-level object) but this is not recommended. +.BR +Unlike objects, keys do not have handles, so you can't go directly to a non-unique key +without using the +.B confdb_key_iter +function. +.SH RETURN VALUE +This call returns the CONFDB_OK value if successful, otherwise an error is returned. +.PP +.SH ERRORS +The errors are undocumented. +.SH "SEE ALSO" +.BR confdb_overview (8), +.BR confdb_initialize (3), +.BR confdb_finalize (3), +.BR confdb_dispatch (3), +.BR confdb_object_create (3), +.BR confdb_object_destroy (3), +.BR confdb_object_parent_get (3), +.BR confdb_key_create (3), +.BR confdb_key_delete (3), +.BR confdb_key_get (3), +.BR confdb_key_replace (3), +.BR confdb_object_find_start (3), +.BR confdb_object_find (3), +.BR confdb_object_iter_start (3), +.BR confdb_object_iter (3), +.BR confdb_key_iter_start (3), +.BR confdb_key_iter (3), +.PP diff --git a/man/confdb_key_delete.3 b/man/confdb_key_delete.3 new file mode 100644 index 00000000..6d5ddbb3 --- /dev/null +++ b/man/confdb_key_delete.3 @@ -0,0 +1,82 @@ +.\"/* +.\" * Copyright (c) 2008 Red Hat, Inc. +.\" * +.\" * All rights reserved. +.\" * +.\" * Author: Christine Caulfield +.\" * +.\" * This software licensed under BSD license, the text of which follows: +.\" * +.\" * Redistribution and use in source and binary forms, with or without +.\" * modification, are permitted provided that the following conditions are met: +.\" * +.\" * - Redistributions of source code must retain the above copyright notice, +.\" * this list of conditions and the following disclaimer. +.\" * - Redistributions in binary form must reproduce the above copyright notice, +.\" * this list of conditions and the following disclaimer in the documentation +.\" * and/or other materials provided with the distribution. +.\" * - Neither the name of the MontaVista Software, Inc. nor the names of its +.\" * contributors may be used to endorse or promote products derived from this +.\" * software without specific prior written permission. +.\" * +.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +.\" * THE POSSIBILITY OF SUCH DAMAGE. +.\" */ +.TH CONFDB_KEY_DELETE 3 2008-04-17 "openais Man Page" "Openais Programmer's Manual" +.SH NAME +confdb_key_delete \- Delete a key/value pair from the Configuration Database +.SH SYNOPSIS +.B #include +.sp +.BI "confdb_error_t confdb_key_delete(confdb_handle_t " handle ", +.BI unsigned int " parent_object_handle ", +.BI void " *key_name ", +.BI int " key_name_len ", +.BI void " *value ", +.BI int " value_len "); " + +.SH DESCRIPTION +The +.B confdb_key_delete +function removes a key/value pair from the configuration database. +.br +You must specify both the key name and its value, this is because keys are not +unique in the database, so a value is not enough to uniqely identify a key belonging +to a particular parent object. +.BR +Strictly, even give the key name and value is not enough to uniquely identify a key, +If there are two (or more) keys with the same name and value, only the first will +be deleted. +.SH RETURN VALUE +This call returns the CONFDB_OK value if successful, otherwise an error is returned. +.PP +.SH ERRORS +The errors are undocumented. +.SH "SEE ALSO" +.BR confdb_overview (8), +.BR confdb_initialize (3), +.BR confdb_finalize (3), +.BR confdb_dispatch (3), +.BR confdb_object_create (3), +.BR confdb_object_destroy (3), +.BR confdb_object_parent_get (3), +.BR confdb_key_create (3), +.BR confdb_key_delete (3), +.BR confdb_key_get (3), +.BR confdb_key_replace (3), +.BR confdb_object_find_start (3), +.BR confdb_object_find (3), +.BR confdb_object_iter_start (3), +.BR confdb_object_iter (3), +.BR confdb_key_iter_start (3), +.BR confdb_key_iter (3), +.PP diff --git a/man/confdb_key_iter.3 b/man/confdb_key_iter.3 new file mode 100644 index 00000000..ce9b5cb7 --- /dev/null +++ b/man/confdb_key_iter.3 @@ -0,0 +1,82 @@ +.\"/* +.\" * Copyright (c) 2008 Red Hat, Inc. +.\" * +.\" * All rights reserved. +.\" * +.\" * Author: Christine Caulfield +.\" * +.\" * This software licensed under BSD license, the text of which follows: +.\" * +.\" * Redistribution and use in source and binary forms, with or without +.\" * modification, are permitted provided that the following conditions are met: +.\" * +.\" * - Redistributions of source code must retain the above copyright notice, +.\" * this list of conditions and the following disclaimer. +.\" * - Redistributions in binary form must reproduce the above copyright notice, +.\" * this list of conditions and the following disclaimer in the documentation +.\" * and/or other materials provided with the distribution. +.\" * - Neither the name of the MontaVista Software, Inc. nor the names of its +.\" * contributors may be used to endorse or promote products derived from this +.\" * software without specific prior written permission. +.\" * +.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +.\" * THE POSSIBILITY OF SUCH DAMAGE. +.\" */ +.TH CONFDB_KEY_ITER 3 2008-04-17 "openais Man Page" "Openais Programmer's Manual" +.SH NAME +confdb_key_iter \- Iterate through key/value pairs in the Configuration Database +.SH SYNOPSIS +.B #include +.sp +.BI "confdb_error_t confdb_key_iter_start(confdb_handle_t " handle ", unsigned int " parent_object_handle " ); " +.sp +.BI "confdb_error_t confdb_key_iter(confdb_handle_t " handle ", unsigned int " parent_object_handle ", void " *key_name ", int " *key_name_len ", void " *value ", int " *value_len " ); " + +.SH DESCRIPTION +The +.B confdb_key_iter +function repeatedly returns all key/value pairs that are subobjects of the specified parent. You must call +.B confdb_key_iter_start +first. This establishes a context for the parent object so that it knows where you are in the list. Then the next call to +.B confdb_key_iter +will return the first key/value in the list. Subsequent calls will return any remaining keys. The function returns CONFDB_ERR_ACCESS when the all of the matching keys have been seen. +.BR +The library holds a seperate context for each parent object, so you can call confdb_key_iter() on several parent objects at the same time and they will not interfere. Nor will they interfere with +.B confdb_object_find +or +.B confdb_object_iter +calls on the same parent object. +.BR +.SH RETURN VALUE +This call returns the CONFDB_OK value if successful, otherwise an error is returned. +.PP +.SH ERRORS +The errors are undocumented. +.SH "SEE ALSO" +.BR confdb_overview (8), +.BR confdb_initialize (3), +.BR confdb_finalize (3), +.BR confdb_dispatch (3), +.BR confdb_object_create (3), +.BR confdb_object_destroy (3), +.BR confdb_object_parent_get (3), +.BR confdb_key_create (3), +.BR confdb_key_delete (3), +.BR confdb_key_get (3), +.BR confdb_key_replace (3), +.BR confdb_object_find_start (3), +.BR confdb_object_find (3), +.BR confdb_object_iter_start (3), +.BR confdb_object_iter (3), +.BR confdb_key_iter_start (3), +.BR confdb_key_iter (3), +.PP diff --git a/man/confdb_key_replace.3 b/man/confdb_key_replace.3 new file mode 100644 index 00000000..32d06ee3 --- /dev/null +++ b/man/confdb_key_replace.3 @@ -0,0 +1,82 @@ +.\"/* +.\" * Copyright (c) 2008 Red Hat, Inc. +.\" * +.\" * All rights reserved. +.\" * +.\" * Author: Christine Caulfield +.\" * +.\" * This software licensed under BSD license, the text of which follows: +.\" * +.\" * Redistribution and use in source and binary forms, with or without +.\" * modification, are permitted provided that the following conditions are met: +.\" * +.\" * - Redistributions of source code must retain the above copyright notice, +.\" * this list of conditions and the following disclaimer. +.\" * - Redistributions in binary form must reproduce the above copyright notice, +.\" * this list of conditions and the following disclaimer in the documentation +.\" * and/or other materials provided with the distribution. +.\" * - Neither the name of the MontaVista Software, Inc. nor the names of its +.\" * contributors may be used to endorse or promote products derived from this +.\" * software without specific prior written permission. +.\" * +.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +.\" * THE POSSIBILITY OF SUCH DAMAGE. +.\" */ +.TH CONFDB_KEY_REPLACE 3 2008-04-17 "openais Man Page" "Openais Programmer's Manual" +.SH NAME +confdb_key_replace \- Replace a key/value pair from the Configuration Database +.SH SYNOPSIS +.B #include +.sp +.BI "confdb_error_t confdb_key_replace(confdb_handle_t " handle ", unsigned int " parent_object_handle ", void " *key_name ", +.BI int " key_name_len ", +.BI void " *old_value ", +.BI int " old_value_len ", +.BI void " *new_value ", +.BI int " new_value_len "); " + +.SH DESCRIPTION +The +.B confdb_key_replace +function replaces the value of a key in the configuration database. +.br +You must specify both the key name and its value, this is because keys are not +unique in the database, so a value is not enough to uniqely identify a key belonging +to a particular parent object. +.BR +Strictly, even give the key name and value is not enough to uniquely identify a key, +If there are two (or more) keys with the same name and value, only the first will have +its value changed . +.SH RETURN VALUE +This call returns the CONFDB_OK value if successful, otherwise an error is returned. +.PP +.SH ERRORS +The errors are undocumented. +.SH "SEE ALSO" +.BR confdb_overview (8), +.BR confdb_initialize (3), +.BR confdb_finalize (3), +.BR confdb_dispatch (3), +.BR confdb_object_create (3), +.BR confdb_object_destroy (3), +.BR confdb_object_parent_get (3), +.BR confdb_key_create (3), +.BR confdb_key_delete (3), +.BR confdb_key_get (3), +.BR confdb_key_replace (3), +.BR confdb_object_find_start (3), +.BR confdb_object_find (3), +.BR confdb_object_iter_start (3), +.BR confdb_object_iter (3), +.BR confdb_key_iter_start (3), +.BR confdb_key_iter (3), +.PP diff --git a/man/confdb_object_create.3 b/man/confdb_object_create.3 new file mode 100644 index 00000000..a679bcf2 --- /dev/null +++ b/man/confdb_object_create.3 @@ -0,0 +1,89 @@ +.\"/* +.\" * Copyright (c) 2008 Red Hat, Inc. +.\" * +.\" * All rights reserved. +.\" * +.\" * Author: Christine Caulfield +.\" * +.\" * This software licensed under BSD license, the text of which follows: +.\" * +.\" * Redistribution and use in source and binary forms, with or without +.\" * modification, are permitted provided that the following conditions are met: +.\" * +.\" * - Redistributions of source code must retain the above copyright notice, +.\" * this list of conditions and the following disclaimer. +.\" * - Redistributions in binary form must reproduce the above copyright notice, +.\" * this list of conditions and the following disclaimer in the documentation +.\" * and/or other materials provided with the distribution. +.\" * - Neither the name of the MontaVista Software, Inc. nor the names of its +.\" * contributors may be used to endorse or promote products derived from this +.\" * software without specific prior written permission. +.\" * +.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +.\" * THE POSSIBILITY OF SUCH DAMAGE. +.\" */ +.TH CONFDB_OBJECT_CREATE 3 2008-04-17 "openais Man Page" "Openais Programmer's Manual" +.SH NAME +confdb_object_create \- Create a new object in the Configuration Database +.SH SYNOPSIS +.B #include +.sp +.BI "confdb_error_t confdb_object_create(confdb_handle_t " handle ", unsigned int " parent_object_handle ", +.BI void " *object_name ", +.BI int " object_name_len ", +.BI unsigned int " *object_handle "); " + +.SH DESCRIPTION +The +.B confdb_object_create +function create a new object in the configuration database. Objects may contain other sub-objects or +keys with values. +.BR +On success the handle of the new object is returned in +.B object_handle. +This value should be used to refer to the object in future, eg when retrieving sub-keys or if the +object is destroyed. +.B parent_object_handle +is the handle of the object that is the parent of the new object. This can be +.B OBJECT_PARENT_HANDLE +if the new object is to be a child of the top-level object. +.BR +Object names are not required to be unique in the database. If you call +.B confdb_object_create +twice with the same parameters you will create two different objects with the same name +but distinct object handles. You can iterate through similarly name objects using the +.B confdb_object_find +call. +.SH RETURN VALUE +This call returns the CONFDB_OK value if successful, otherwise an error is returned. +.PP +.SH ERRORS +The errors are undocumented. +.SH "SEE ALSO" +.BR confdb_initialize (3), +.BR confdb_finalize (3), +.BR confdb_fd_get (3), +.BR confdb_dispatch (3), +.BR confdb_object_create (3), +.BR confdb_object_destroy (3), +.BR confdb_object_parent_get (3), +.BR confdb_key_create (3), +.BR confdb_key_delete (3), +.BR confdb_key_get (3), +.BR confdb_key_replace (3), +.BR confdb_object_find_start (3), +.BR confdb_object_find (3), +.BR confdb_object_iter_start (3), +.BR confdb_object_iter (3), +.BR confdb_key_iter_start (3), +.BR confdb_key_iter (3), +.PP diff --git a/man/confdb_object_destroy.3 b/man/confdb_object_destroy.3 new file mode 100644 index 00000000..31a4fb74 --- /dev/null +++ b/man/confdb_object_destroy.3 @@ -0,0 +1,79 @@ +.\"/* +.\" * Copyright (c) 2008 Red Hat, Inc. +.\" * +.\" * All rights reserved. +.\" * +.\" * Author: Christine Caulfield +.\" * +.\" * This software licensed under BSD license, the text of which follows: +.\" * +.\" * Redistribution and use in source and binary forms, with or without +.\" * modification, are permitted provided that the following conditions are met: +.\" * +.\" * - Redistributions of source code must retain the above copyright notice, +.\" * this list of conditions and the following disclaimer. +.\" * - Redistributions in binary form must reproduce the above copyright notice, +.\" * this list of conditions and the following disclaimer in the documentation +.\" * and/or other materials provided with the distribution. +.\" * - Neither the name of the MontaVista Software, Inc. nor the names of its +.\" * contributors may be used to endorse or promote products derived from this +.\" * software without specific prior written permission. +.\" * +.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +.\" * THE POSSIBILITY OF SUCH DAMAGE. +.\" */ +.TH CONFDB_* 3 2008-04-17 "openais Man Page" "Openais Programmer's Manual" +.SH NAME +confdb_object_destroy \- Remove an object from the Configuration Database +.SH SYNOPSIS +.B #include +.sp +.BI "confdb_error_t confdb_destroy(confdb_handle_t " handle ", unsigned int " object_handle "); +.SH DESCRIPTION +The +.B confdb_object_destroy +call removes an object from the configuration database. It also remove all subkeys and all +subobjects in the database, so be VERY CAREFUL!. +.BR +The input value +.B object_handle +is the handle of the object to remove, this can be got from the +.B confdb_object_find +or +.B confdb_object_iter +calls or +.B confdb_object_create +calls. +.SH RETURN VALUE +This call returns the CONFDB_OK value if successful, otherwise an error is returned. +.PP +.SH ERRORS +The errors are undocumented. +.SH "SEE ALSO" +.BR confdb_overview (8), +.BR confdb_initialize (3), +.BR confdb_finalize (3), +.BR confdb_dispatch (3), +.BR confdb_object_create (3), +.BR confdb_object_destroy (3), +.BR confdb_object_parent_get (3), +.BR confdb_key_create (3), +.BR confdb_key_delete (3), +.BR confdb_key_get (3), +.BR confdb_key_replace (3), +.BR confdb_object_find_start (3), +.BR confdb_object_find (3), +.BR confdb_object_iter_start (3), +.BR confdb_object_iter (3), +.BR confdb_key_iter_start (3), +.BR confdb_key_iter (3), +.PP diff --git a/man/confdb_object_find.3 b/man/confdb_object_find.3 new file mode 100644 index 00000000..233b2c4d --- /dev/null +++ b/man/confdb_object_find.3 @@ -0,0 +1,86 @@ +.\"/* +.\" * Copyright (c) 2008 Red Hat, Inc. +.\" * +.\" * All rights reserved. +.\" * +.\" * Author: Christine Caulfield +.\" * +.\" * This software licensed under BSD license, the text of which follows: +.\" * +.\" * Redistribution and use in source and binary forms, with or without +.\" * modification, are permitted provided that the following conditions are met: +.\" * +.\" * - Redistributions of source code must retain the above copyright notice, +.\" * this list of conditions and the following disclaimer. +.\" * - Redistributions in binary form must reproduce the above copyright notice, +.\" * this list of conditions and the following disclaimer in the documentation +.\" * and/or other materials provided with the distribution. +.\" * - Neither the name of the MontaVista Software, Inc. nor the names of its +.\" * contributors may be used to endorse or promote products derived from this +.\" * software without specific prior written permission. +.\" * +.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +.\" * THE POSSIBILITY OF SUCH DAMAGE. +.\" */ +.TH CONFDB_OBJECT_FIND 3 2008-04-17 "openais Man Page" "Openais Programmer's Manual" +.SH NAME +confdb_object_find \- Find a named object in the Configuration Database +.SH SYNOPSIS +.B #include +.sp +.BI "confdb_error_t confdb_object_find_start(confdb_handle_t " handle ", unsigned int " parent_object_handle " ); " +.sp +.BI "confdb_error_t confdb_object_find(confdb_handle_t " handle ", unsigned int " parent_object_handle ", void " *object_name ", int " object_name_len ", unsigned int " *object_handle " ); " + +.SH DESCRIPTION +The +.B confdb_object_find +function repeatedly returns objects that match a given name. You must call +.B confdb_object_find_start +first. This establishes a context for the parent object so that it knows where you are in the list. Then the next call to +.B confdb_object_find +will return the handle of the first object that matches the passed in name. Subsequent calls will return any remaining objects +with the same name. The function returns CONFDB_ERR_ACCESS when the all of the matching objects have been seen. +.BR +You need to provide the same object name and length for each call to +.B confdb_object_find, +If you change either of then, the results are undefined. +.BR +The library holds a seperate context for each parent object, so you can call confdb_object_iter() on several parent objects at the same time and they will not interfere. Nor will they interfere with +.B confdb_object_iter +or +.B confdb_key_iter +calls on the same parent object. +.SH RETURN VALUE +This call returns the CONFDB_OK value if successful, otherwise an error is returned. +.PP +.SH ERRORS +The errors are undocumented. +.SH "SEE ALSO" +.BR confdb_overview (8), +.BR confdb_initialize (3), +.BR confdb_finalize (3), +.BR confdb_dispatch (3), +.BR confdb_object_create (3), +.BR confdb_object_destroy (3), +.BR confdb_object_parent_get (3), +.BR confdb_key_create (3), +.BR confdb_key_delete (3), +.BR confdb_key_get (3), +.BR confdb_key_replace (3), +.BR confdb_object_find_start (3), +.BR confdb_object_find (3), +.BR confdb_object_iter_start (3), +.BR confdb_object_iter (3), +.BR confdb_key_iter_start (3), +.BR confdb_key_iter (3), +.PP diff --git a/man/confdb_object_iter.3 b/man/confdb_object_iter.3 new file mode 100644 index 00000000..e02665e9 --- /dev/null +++ b/man/confdb_object_iter.3 @@ -0,0 +1,77 @@ +.\"/* +.\" * Copyright (c) 2008 Red Hat, Inc. +.\" * +.\" * All rights reserved. +.\" * +.\" * Author: Christine Caulfield +.\" * +.\" * This software licensed under BSD license, the text of which follows: +.\" * +.\" * Redistribution and use in source and binary forms, with or without +.\" * modification, are permitted provided that the following conditions are met: +.\" * +.\" * - Redistributions of source code must retain the above copyright notice, +.\" * this list of conditions and the following disclaimer. +.\" * - Redistributions in binary form must reproduce the above copyright notice, +.\" * this list of conditions and the following disclaimer in the documentation +.\" * and/or other materials provided with the distribution. +.\" * - Neither the name of the MontaVista Software, Inc. nor the names of its +.\" * contributors may be used to endorse or promote products derived from this +.\" * software without specific prior written permission. +.\" * +.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +.\" * THE POSSIBILITY OF SUCH DAMAGE. +.\" */ +.TH CONFDB_OBJECT_ITER 3 2008-04-17 "openais Man Page" "Openais Programmer's Manual" +.SH NAME +confdb_object_iter \- Iterate through objects in the Configuration Database +.SH SYNOPSIS +.B #include +.sp +.BI "confdb_error_t confdb_object_iter_start(confdb_handle_t " handle ", unsigned int " parent_object_handle " ); " +.sp +.BI "confdb_error_t confdb_object_iter(confdb_handle_t " handle ", unsigned int " parent_object_handle ", unsigned int " *object_handle ", void " *object_name ", int " *object_name_len " ); " + +.SH DESCRIPTION +The +.B confdb_object_iter function repeatedly returns all objects that are subobjects of the specified parent. You must call +.B confdb_object_iter_start +first. This establishes a context for the parent object so that it knows where you are in the list. Then the next call to +.B confdb_object_iter +will return the handle of the first object in the list. Subsequent calls will return any remaining objects. The function returns CONFDB_ERR_ACCESS when the all of the matching objects have been seen. The function returns the name and length of the object as well +as its handle. +.BR +.BR +.SH RETURN VALUE +This call returns the CONFDB_OK value if successful, otherwise an error is returned. +.PP +.SH ERRORS +The errors are undocumented. +.SH "SEE ALSO" +.BR confdb_overview (8), +.BR confdb_initialize (3), +.BR confdb_finalize (3), +.BR confdb_dispatch (3), +.BR confdb_object_create (3), +.BR confdb_object_destroy (3), +.BR confdb_object_parent_get (3), +.BR confdb_key_create (3), +.BR confdb_key_delete (3), +.BR confdb_key_get (3), +.BR confdb_key_replace (3), +.BR confdb_object_find_start (3), +.BR confdb_object_find (3), +.BR confdb_object_iter_start (3), +.BR confdb_object_iter (3), +.BR confdb_key_iter_start (3), +.BR confdb_key_iter (3), +.PP diff --git a/man/confdb_object_parent_get.3 b/man/confdb_object_parent_get.3 new file mode 100644 index 00000000..a686fcca --- /dev/null +++ b/man/confdb_object_parent_get.3 @@ -0,0 +1,72 @@ +.\"/* +.\" * Copyright (c) 2008 Red Hat, Inc. +.\" * +.\" * All rights reserved. +.\" * +.\" * Author: Christine Caulfield +.\" * +.\" * This software licensed under BSD license, the text of which follows: +.\" * +.\" * Redistribution and use in source and binary forms, with or without +.\" * modification, are permitted provided that the following conditions are met: +.\" * +.\" * - Redistributions of source code must retain the above copyright notice, +.\" * this list of conditions and the following disclaimer. +.\" * - Redistributions in binary form must reproduce the above copyright notice, +.\" * this list of conditions and the following disclaimer in the documentation +.\" * and/or other materials provided with the distribution. +.\" * - Neither the name of the MontaVista Software, Inc. nor the names of its +.\" * contributors may be used to endorse or promote products derived from this +.\" * software without specific prior written permission. +.\" * +.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +.\" * THE POSSIBILITY OF SUCH DAMAGE. +.\" */ +.TH CONFDB_OBJECT_PARENT_GET 3 2008-04-17 "openais Man Page" "Openais Programmer's Manual" +.SH NAME +confdb_parent_get \- Configuration Database Object Parent +.SH SYNOPSIS +.B #include +.sp +.BI "confdb_error_t confdb_object_parent_get(confdb_handle_t " handle ", unsigned int " object_handle ", unsigned int " *parent_object_handle ");" +.SH DESCRIPTION +The +.B confdb_object_parent_get +returns the parent object handle of already known object. +.B object_handle +is the handle of an existing object +.B parent_object_handle +returns the handle of its parent. +.SH RETURN VALUE +This call returns the CONFDB_OK value if successful, otherwise an error is returned. +.PP +.SH ERRORS +The errors are undocumented. +.SH "SEE ALSO" +.BR confdb_overview (8), +.BR confdb_initialize (3), +.BR confdb_finalize (3), +.BR confdb_dispatch (3), +.BR confdb_object_create (3), +.BR confdb_object_destroy (3), +.BR confdb_object_parent_get (3), +.BR confdb_key_create (3), +.BR confdb_key_delete (3), +.BR confdb_key_get (3), +.BR confdb_key_replace (3), +.BR confdb_object_find_start (3), +.BR confdb_object_find (3), +.BR confdb_object_iter_start (3), +.BR confdb_object_iter (3), +.BR confdb_key_iter_start (3), +.BR confdb_key_iter (3), +.PP diff --git a/man/confdb_overview.8 b/man/confdb_overview.8 new file mode 100644 index 00000000..01a42fa4 --- /dev/null +++ b/man/confdb_overview.8 @@ -0,0 +1,69 @@ +.\"/* +.\" * Copyright (c) 2008 Red Hat, Inc. +.\" * +.\" * All rights reserved. +.\" * +.\" * Author: Christine Caulfield +.\" * +.\" * This software licensed under BSD license, the text of which follows: +.\" * +.\" * Redistribution and use in source and binary forms, with or without +.\" * modification, are permitted provided that the following conditions are met: +.\" * +.\" * - Redistributions of source code must retain the above copyright notice, +.\" * this list of conditions and the following disclaimer. +.\" * - Redistributions in binary form must reproduce the above copyright notice, +.\" * this list of conditions and the following disclaimer in the documentation +.\" * and/or other materials provided with the distribution. +.\" * - Neither the name of the MontaVista Software, Inc. nor the names of its +.\" * contributors may be used to endorse or promote products derived from this +.\" * software without specific prior written permission. +.\" * +.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +.\" * THE POSSIBILITY OF SUCH DAMAGE. +.\" */ +.TH CONFDB_OVERVIEW 8 2006-03-06 "openais Man Page" "Openais Programmer's Manual" +.SH OVERVIEW +The CONFDB library is delivered with the openais project. This library is used +to examine manipulate the configuratin databser used by openais. +.PP +The library provides a mechanism to: +* Create new objects +* Create new key/value pairs within those objects +* Remove existing keys +* Remove an existing object and all it sub-objects and keys +* Read keys and values +* Iterate keys within an object +* Iterate subobjects within a parent object +* Find a named object +.PP +.SH BUGS +This software is not yet production, so there may still be some bugs. +.SH "SEE ALSO" +.BR confdb_initialize (3), +.BR confdb_finalize (3), +.BR confdb_fd_get (3), +.BR confdb_dispatch (3), +.BR confdb_object_create (3), +.BR confdb_object_destroy (3), +.BR confdb_object_parent_get (3), +.BR confdb_key_create (3), +.BR confdb_key_delete (3), +.BR confdb_key_get (3), +.BR confdb_key_replace (3), +.BR confdb_object_find_start (3), +.BR confdb_object_find (3), +.BR confdb_object_iter_start (3), +.BR confdb_object_iter (3), +.BR confdb_key_iter_start (3), +.BR confdb_key_iter (3), +.PP diff --git a/man/index.html b/man/index.html index a7a930b9..2868ca51 100644 --- a/man/index.html +++ b/man/index.html @@ -1,6 +1,6 @@ -EVS & CPG Documentation +EVS, CPG & CONFDB Documentation @@ -54,4 +54,34 @@ Welcome to the openais project's manual pages.
cpg_local_get(3): Description of the cpg_local_get interface. +
+confdb_overview(3): An overview of the Configuration database toolkit +
+confdb_dispatch(3): Description of the confdb_dispatch.html interface. +
+confdb_fd_get(3): Description of the confdb_fd_get.html interface. +
+confdb_finalize(3): Description of the confdb_finalize.html interface. +
+confdb_initialize(3): Description of the confdb_initialize.html interface. +
+confdb_key_create(3): Description of the confdb_key_create.html interface. +
+confdb_key_delete(3): Description of the confdb_key_delete.html interface. +
+confdb_key_iter(3): Description of the confdb_key_iter.html interface. +
+confdb_key_replace(3): Description of the confdb_key_replace.html interface. +
+confdb_object_create(3): Description of the confdb_object_create.html interface. +
+confdb_object_destroy(3): Description of the confdb_object_destroy.html interface. +
+confdb_object_find(3): Description of the confdb_object_find.html interface. +
+confdb_object_iter(3): Description of the confdb_object_iter.html interface. +
+confdb_object_parent_get(3): Description of the confdb_object_parent_get.html interface. + +