Main Page | Modules | Data Structures | File List | Data Fields | Globals

discover-xml.h

Go to the documentation of this file.
00001 
00010 /* $Progeny: discover-xml.h 3839 2003-11-17 04:25:01Z dsp $
00011  *
00012  * AUTHOR: John R. Daily <jdaily@progeny.com>
00013  *
00014  * Copyright 2002 Hewlett-Packard Company
00015  * Copyright 2002 Progeny Linux Systems, Inc.
00016  *
00017  * Permission is hereby granted, free of charge, to any person obtaining a
00018  * copy of this software and associated documentation files (the "Software"),
00019  * to deal in the Software without restriction, including without limitation
00020  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00021  * and/or sell copies of the Software, and to permit persons to whom the
00022  * Software is furnished to do so, subject to the following conditions:
00023  *
00024  * The above copyright notice and this permission notice shall be included in
00025  * all copies or substantial portions of the Software.
00026  *
00027  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00028  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00029  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
00030  * THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00031  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00032  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00033  * DEALINGS IN THE SOFTWARE.
00034  */
00035 
00036 #ifndef DISCOVER_XML_H
00037 #define DISCOVER_XML_H
00038 
00039 #include <discover.h>
00040 
00041 #ifdef __cplusplus
00042     extern "C" {
00043 #endif
00044 
00045 discover_device_t *
00046 discover_xml_find_device(discover_device_t *xml_devices,
00047                          char *target_vendor, char *target_model,
00048                          discover_error_t *status);
00049 discover_device_t *
00050 discover_xml_find_next_device(discover_device_t *xml_devices,
00051                               char *target_vendor, char *target_model,
00052                               discover_error_t *status);
00053 
00054 discover_device_t *
00055 discover_xml_get_matching_devices(discover_device_t *xml_devices,
00056                                   char *target_vendor, char *target_model,
00057                                   discover_error_t *status);
00058 
00059 int discover_xml_version_cmp(char *range, char *version,
00060                              discover_error_t *status);
00061 
00062 /******************************************************************************
00063  * url
00064  */
00065 
00066 discover_xml_url_t *discover_xml_url_new(void);
00067 void discover_xml_url_copy(discover_xml_url_t *src, discover_xml_url_t *dst);
00068 void discover_xml_url_free(discover_xml_url_t *urls);
00069 
00070 char *
00071 discover_xml_url_get_url(discover_xml_url_t *url);
00072 
00073 char *
00074 discover_xml_url_get_bus(discover_xml_url_t *url);
00075 
00076 char *
00077 discover_xml_url_get_type(discover_xml_url_t *url);
00078 
00079 discover_xml_url_t *
00080 discover_xml_url_get_next(discover_xml_url_t *url);
00081 
00082 discover_xml_url_t *
00083 discover_xml_url_get_last(discover_xml_url_t *url);
00084 
00085 char *
00086 discover_xml_url_get_label(discover_xml_url_t *url);
00087 
00088 discover_xml_url_t *discover_xml_get_urls(discover_error_t *status);
00089 void discover_xml_free_urls(void);
00090 
00091 discover_xml_url_t *discover_xml_get_data_urls(discover_bus_t bus,
00092                                                discover_filetype_t filetype,
00093                                                discover_error_t *status);
00094 void discover_xml_free_data_urls(void);
00095 
00096 /******************************************************************************
00097  * busclass
00098  */
00099 
00100 discover_xml_busclass_t *discover_xml_busclass_new(void);
00101 
00102 discover_xml_busclass_t *discover_xml_get_busclasses(discover_bus_t bus,
00103                                                      discover_error_t *status);
00104 
00105 void discover_xml_free_busclasses(void);
00106 
00107 void
00108 discover_xml_merge_busclass_url(discover_xml_busclass_t **blist,
00109                                 char *filename, discover_error_t *status);
00110 
00111 char *discover_xml_busclass_to_class(char *busclass,
00112                                      discover_xml_busclass_t *busclasses);
00113 int discover_xml_busclass_cmp(char *busclass, char *discover_class,
00114                               discover_xml_busclass_t *busclasses);
00115 char *discover_xml_busclass_get_id(discover_xml_busclass_t *busclass);
00116 
00117 char *discover_xml_busclass_get_name(discover_xml_busclass_t *busclass);
00118 discover_xml_busclass_t *
00119 discover_xml_busclass_get_next(discover_xml_busclass_t *busclass);
00120 
00121 void discover_xml_busclass_free(discover_xml_busclass_t *busclasses);
00122 
00123 /******************************************************************************
00124  * device
00125  */
00126 
00127 discover_device_t *
00128 discover_xml_get_devices(discover_bus_t bus, discover_error_t *status);
00129 
00130 void discover_xml_free_devices(void);
00131 
00132 void
00133 discover_xml_merge_device_url(discover_device_t **dlist, char *url,
00134                               discover_xml_busclass_t *busclasses,
00135                               discover_xml_vendor_t *vendors,
00136                               discover_error_t *status);
00137 
00138 /******************************************************************************
00139  * vendor
00140  */
00141 
00142 discover_xml_vendor_t *discover_xml_vendor_new(void);
00143 
00144 void
00145 discover_xml_merge_vendor_url(discover_xml_vendor_t **vlist, char *filename,
00146                               discover_error_t *status);
00147 discover_xml_vendor_t *discover_xml_get_vendors(discover_bus_t bus,
00148                                                 discover_error_t *status);
00149 void discover_xml_free_vendors(void);
00150 
00151 char *discover_xml_vendor_id2name(discover_xml_vendor_t *vendors, char *id);
00152 char *discover_xml_vendor_get_id(discover_xml_vendor_t *vendor);
00153 char *discover_xml_vendor_get_name(discover_xml_vendor_t *vendor);
00154 discover_xml_vendor_t *
00155 discover_xml_vendor_get_next(discover_xml_vendor_t *vendor);
00156 
00157 void discover_xml_vendor_free(discover_xml_vendor_t *vendors);
00158 
00159 #ifdef __cplusplus
00160     }
00161 #endif
00162 
00163 #endif

Generated on Sat Jan 31 14:39:17 2004 for discover by doxygen 1.3.4