hal/hald/dummy Makefile.am,NONE,1.1 osspec.c,NONE,1.1
David Zeuthen
david at freedesktop.org
Wed Dec 15 20:55:30 PST 2004
Update of /cvs/hal/hal/hald/dummy
In directory gabe:/tmp/cvs-serv17698/hald/dummy
Added Files:
Makefile.am osspec.c
Log Message:
2004-12-15 David Zeuthen <davidz at redhat.com>
* hald/dummy/Makefile.am: New file
* hald/dummy/osspec.c: New file
* hald/linux/Makefile.am: New file
* hald/Makefile.am: Use new $(HALD_BACKEND) variable
* configure.in: Add --with-backend; default to linux
--- NEW FILE: Makefile.am ---
INCLUDES = \
-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \
-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
-DPACKAGE_BIN_DIR=\""$(bindir)"\" \
-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
-DPACKAGE_LOCALSTATEDIR=\""$(localstatedir)"\" \
-I$(top_srcdir) -I.. \
@PACKAGE_CFLAGS@
noinst_LTLIBRARIES = libhald_dummy.la
libhald_dummy_la_SOURCES = \
osspec.c
--- NEW FILE: osspec.c ---
/***************************************************************************
* CVSID: $Id: osspec.c,v 1.1 2004/12/16 04:55:28 david Exp $
*
* Dummy backend for HAL
*
* Copyright (C) 2004 David Zeuthen, <david at fubar.dk>
*
* Licensed under the Academic Free License version 2.0
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
**************************************************************************/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <glib.h>
#include <dbus/dbus.h>
#include <dbus/dbus-glib.h>
#include "../osspec.h"
#include "../logger.h"
#include "../hald.h"
#include "../callout.h"
#include "../device_info.h"
#include "../hald_conf.h"
void
osspec_init (void)
{
}
void
osspec_shutdown (void)
{
}
void
osspec_probe (void)
{
HalDevice *root;
root = hal_device_new ();
hal_device_property_set_string (root, "info.bus", "unknown");
hal_device_property_set_string (root, "linux.sysfs_path_device", "(none)");
hal_device_property_set_string (root, "info.product", "Computer");
hal_device_property_set_string (root, "info.udi", "/org/freedesktop/Hal/devices/computer");
hal_device_set_udi (root, "/org/freedesktop/Hal/devices/computer");
hal_device_store_add (hald_get_tdl (), root);
di_search_and_merge (root);
hal_device_store_remove (hald_get_tdl (), root);
hal_device_store_add (hald_get_gdl (), root);
osspec_probe_done ();
}
DBusHandlerResult
osspec_filter_function (DBusConnection *connection, DBusMessage *message, void *user_data)
{
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
More information about the hal-commit
mailing list