Main Page | Modules | Data Structures | File List | Data Fields | Related Pages

linux_common.h

00001 /***************************************************************************
00002  * CVSID: $Id: linux_common.h,v 1.5 2004/03/03 17:56:56 david Exp $
00003  *
00004  * linux_common.h : Common functionality used by Linux specific parts
00005  *
00006  * Copyright (C) 2003 David Zeuthen, <david@fubar.dk>
00007  *
00008  * Licensed under the Academic Free License version 2.0
00009  *
00010  * This program is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version.
00014  *
00015  * This program is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License
00021  * along with this program; if not, write to the Free Software
00022  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023  *
00024  **************************************************************************/
00025 
00026 #ifndef LINUX_COMMON_H
00027 #define LINUX_COMMON_H
00028 
00029 #include <dbus/dbus.h>
00030 
00031 #include "../device_store.h"
00032 #include "libsysfs/libsysfs.h"
00033 
00041 double parse_double (const char *str);
00042 dbus_int32_t parse_dec (const char *str);
00043 dbus_int32_t parse_hex (const char *str);
00044 
00045 long int find_num (char *pre, char *s, int base);
00046 double find_double (char *pre, char *s);
00047 int find_bcd2 (char *pre, char *s);
00048 char *find_string (char *pre, char *s);
00049 
00050 char *read_single_line (char *filename_format, ...);
00051 
00052 const char *get_last_element (const char *s);
00053 
00054 /* returns the path of the udevinfo program */
00055 const char *udevinfo_path (void);
00056 
00065 typedef char *(*ComputeFDI) (HalDevice * d, int append_num);
00066 
00067 char *rename_and_merge (HalDevice * d, ComputeFDI naming_func,
00068             const char *namespace);
00069 
00070 char *get_parent_sysfs_path (const char *path);
00071 
00072 void find_and_set_physical_device (HalDevice * device);
00073 
00074 
00075 const char *drivers_lookup (const char *device_path);
00076 
00077 void drivers_collect (const char *bus_name);
00078 
00091 #define HAL_LINUX_HOTPLUG_TIMEOUT 30000
00092 
00093 extern dbus_bool_t is_probing;
00094 
00095 extern char sysfs_mount_path[SYSFS_PATH_MAX];
00096 
00097 /* @} */
00098 
00099 #endif              /* LINUX_COMMON_H */

Generated on Thu Mar 11 21:32:22 2004 for HAL by doxygen 1.3.6-20040222