00001 /* 00002 * ipmi_glib.h 00003 * 00004 * MontaVista IPMI os handler interface. 00005 * 00006 * Author: MontaVista Software, Inc. 00007 * Corey Minyard <minyard@mvista.com> 00008 * source@mvista.com 00009 * 00010 * Copyright 2002,2003 MontaVista Software Inc. 00011 * 00012 * This program is free software; you can redistribute it and/or 00013 * modify it under the terms of the GNU Lesser General Public License 00014 * as published by the Free Software Foundation; either version 2 of 00015 * the License, or (at your option) any later version. 00016 * 00017 * 00018 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED 00019 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00020 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 00021 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 00022 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 00023 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 00024 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 00025 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 00026 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 00027 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00028 * 00029 * You should have received a copy of the GNU Lesser General Public 00030 * License along with this program; if not, write to the Free 00031 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00032 */ 00033 00034 #ifndef __IPMI_GLIB_H 00035 #define __IPMI_GLIB_H 00036 00037 #include <OpenIPMI/os_handler.h> 00038 00039 #ifdef __cplusplus 00040 extern "C" { 00041 #endif 00042 00043 /* Logs go to the standard glib log hander, unless overridden by 00044 set_log_handler in the os_handler. */ 00045 00046 /* Allocate and configure an OS handler. */ 00047 os_handler_t *ipmi_glib_get_os_handler(void); 00048 00049 /* This is a convenience log handler that allows the glib stuff to be 00050 used without having to link with glib to get the log handler 00051 information. */ 00052 void ipmi_glib_set_log_handler(void (*hndlr)(const char *domain, 00053 const char *pfx, 00054 const char *msg)); 00055 00056 #ifdef __cplusplus 00057 } 00058 #endif 00059 00060 #endif /* __IPMI_GLIB_H */