xref: /illumos-gate/usr/src/lib/hal/libhal/common/libhal.c (revision b483d17c)
118c2aff7Sartem /***************************************************************************
218c2aff7Sartem  * CVSID: $Id$
318c2aff7Sartem  *
418c2aff7Sartem  * libhal.c : HAL daemon C convenience library
518c2aff7Sartem  *
618c2aff7Sartem  * Copyright (C) 2003 David Zeuthen, <david@fubar.dk>
7ae7c44f8SMilan Jurik  * Copyright (C) 2006 Sjoerd Simons, <sjoerd@luon.net>
844faeccfSartem  * Copyright (C) 2007 Codethink Ltd. Author Rob Taylor <rob.taylor@codethink.co.uk>
918c2aff7Sartem  *
1018c2aff7Sartem  * Licensed under the Academic Free License version 2.1
1118c2aff7Sartem  *
1218c2aff7Sartem  * This program is free software; you can redistribute it and/or modify
1318c2aff7Sartem  * it under the terms of the GNU General Public License as published by
1418c2aff7Sartem  * the Free Software Foundation; either version 2 of the License, or
1518c2aff7Sartem  * (at your option) any later version.
1618c2aff7Sartem  *
1718c2aff7Sartem  * This program is distributed in the hope that it will be useful,
1818c2aff7Sartem  * but WITHOUT ANY WARRANTY; without even the implied warranty of
1918c2aff7Sartem  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
2018c2aff7Sartem  * GNU General Public License for more details.
2118c2aff7Sartem  *
2218c2aff7Sartem  * You should have received a copy of the GNU General Public License
2318c2aff7Sartem  * along with this program; if not, write to the Free Software
2418c2aff7Sartem  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307	 USA
2518c2aff7Sartem  *
2618c2aff7Sartem  **************************************************************************/
2718c2aff7Sartem 
2818c2aff7Sartem #ifdef HAVE_CONFIG_H
2918c2aff7Sartem #  include <config.h>
3018c2aff7Sartem #endif
3118c2aff7Sartem 
3218c2aff7Sartem #include <stdio.h>
3318c2aff7Sartem #include <stdlib.h>
3418c2aff7Sartem #include <string.h>
3518c2aff7Sartem #include <dbus/dbus.h>
3618c2aff7Sartem 
3718c2aff7Sartem #include "libhal.h"
3818c2aff7Sartem 
3918c2aff7Sartem #ifdef ENABLE_NLS
4018c2aff7Sartem # include <libintl.h>
4118c2aff7Sartem # define _(String) dgettext (GETTEXT_PACKAGE, String)
4218c2aff7Sartem # ifdef gettext_noop
4318c2aff7Sartem #   define N_(String) gettext_noop (String)
4418c2aff7Sartem # else
4518c2aff7Sartem #   define N_(String) (String)
4618c2aff7Sartem # endif
4718c2aff7Sartem #else
4818c2aff7Sartem /* Stubs that do something close enough.  */
49