1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250
|
.TH "Devices" 3 "28 Jul 2005" "discover" \" -*- nroff -*-
.ad l
.nh
.SH NAME
Devices \-
.SS "Functions"
.in +1c
.ti -1c
.RI "\fBdiscover_device_t\fP * \fBdiscover_device_find\fP (char *discover_class, \fBdiscover_error_t\fP *status)"
.br
.ti -1c
.RI "char * \fBdiscover_device_get_data\fP (\fBdiscover_device_t\fP *device, char *discover_class, char *version, \fBdiscover_error_t\fP *status)"
.br
.ti -1c
.RI "void \fBdiscover_device_copy\fP (\fBdiscover_device_t\fP *src, \fBdiscover_device_t\fP *dst)"
.br
.ti -1c
.RI "char * \fBdiscover_data_get_class\fP (\fBdiscover_data_t\fP *data)"
.br
.ti -1c
.RI "char * \fBdiscover_data_get_text\fP (\fBdiscover_data_t\fP *data)"
.br
.ti -1c
.RI "\fBdiscover_data_t\fP * \fBdiscover_data_get_parent\fP (\fBdiscover_data_t\fP *data)"
.br
.ti -1c
.RI "\fBdiscover_data_t\fP * \fBdiscover_data_get_child\fP (\fBdiscover_data_t\fP *data)"
.br
.ti -1c
.RI "\fBdiscover_data_t\fP * \fBdiscover_data_get_next\fP (\fBdiscover_data_t\fP *data)"
.br
.ti -1c
.RI "\fBdiscover_data_t\fP * \fBdiscover_data_get_prev\fP (\fBdiscover_data_t\fP *data)"
.br
.ti -1c
.RI "\fBdiscover_data_t\fP * \fBdiscover_data_get_first\fP (\fBdiscover_data_t\fP *data)"
.br
.ti -1c
.RI "\fBdiscover_data_t\fP * \fBdiscover_data_new\fP (void)"
.br
.ti -1c
.RI "void \fBdiscover_data_free\fP (\fBdiscover_data_t\fP *data_tree)"
.br
.ti -1c
.RI "char * \fBdiscover_device_get_busclass\fP (\fBdiscover_device_t\fP *device)"
.br
.ti -1c
.RI "char * \fBdiscover_device_get_model_id\fP (\fBdiscover_device_t\fP *device)"
.br
.ti -1c
.RI "char * \fBdiscover_device_get_model_name\fP (\fBdiscover_device_t\fP *device)"
.br
.ti -1c
.RI "char * \fBdiscover_device_get_vendor_id\fP (\fBdiscover_device_t\fP *device)"
.br
.ti -1c
.RI "char * \fBdiscover_device_get_vendor_name\fP (\fBdiscover_device_t\fP *device)"
.br
.ti -1c
.RI "\fBdiscover_data_t\fP * \fBdiscover_device_get_data_struct\fP (\fBdiscover_device_t\fP *device)"
.br
.ti -1c
.RI "\fBdiscover_device_t\fP * \fBdiscover_device_get_next\fP (\fBdiscover_device_t\fP *device)"
.br
.ti -1c
.RI "\fBdiscover_device_t\fP * \fBdiscover_device_new\fP (void)"
.br
.ti -1c
.RI "void \fBdiscover_device_free\fP (\fBdiscover_device_t\fP *devices, int free_data)"
.br
.in -1c
.SH "Function Documentation"
.PP
.SS "void discover_data_free (\fBdiscover_data_t\fP * data_tree)"
.PP
Free the data tree. Note that unlike the other free functions in Discover, this one does not free data_tree itself. This is a side-effect of how it is implemented. It frees all children and siblings of data_tree as well as the data. After calling discover_data_free, you have to call free(3) on data_tree itself.
.PP
\fBParameters:\fP
.RS 4
\fIdata_tree\fP Data tree to free
.RE
.PP
.PP
Definition at line 436 of file device.c.
.PP
References discover_data_free().
.PP
Referenced by discover_data_free(), and discover_device_free().
.SS "\fBdiscover_data_t\fP* discover_data_get_child (\fBdiscover_data_t\fP * data)"
.PP
Get the child member of data.
.PP
Definition at line 341 of file device.c.
.SS "char* discover_data_get_class (\fBdiscover_data_t\fP * data)"
.PP
Get the class member of data.
.PP
Definition at line 308 of file device.c.
.SS "\fBdiscover_data_t\fP* discover_data_get_first (\fBdiscover_data_t\fP * data)"
.PP
Get the first member of data.
.PP
Definition at line 374 of file device.c.
.SS "\fBdiscover_data_t\fP* discover_data_get_next (\fBdiscover_data_t\fP * data)"
.PP
Get the next member of data.
.PP
Definition at line 352 of file device.c.
.SS "\fBdiscover_data_t\fP* discover_data_get_parent (\fBdiscover_data_t\fP * data)"
.PP
Get the parent member of data.
.PP
Definition at line 330 of file device.c.
.SS "\fBdiscover_data_t\fP* discover_data_get_prev (\fBdiscover_data_t\fP * data)"
.PP
Get the prev member of data.
.PP
Definition at line 363 of file device.c.
.SS "char* discover_data_get_text (\fBdiscover_data_t\fP * data)"
.PP
Get the text member of data.
.PP
Definition at line 319 of file device.c.
.SS "\fBdiscover_data_t\fP* discover_data_new (void)"
.PP
Create and initialize a new discover_data_t structure.
.PP
Definition at line 409 of file device.c.
.PP
Referenced by _discover_convert_device_data().
.SS "void discover_device_copy (\fBdiscover_device_t\fP * src, \fBdiscover_device_t\fP * dst)"
.PP
Copy a device structure.
.PP
\fBParameters:\fP
.RS 4
\fIsrc\fP Copy from (source)
.br
\fIdst\fP Copy to (destination)
.RE
.PP
.PP
Definition at line 268 of file device.c.
.PP
Referenced by discover_device_find(), and discover_xml_get_matching_devices().
.SS "\fBdiscover_device_t\fP* discover_device_find (char * discover_class, \fBdiscover_error_t\fP * status)"
.PP
Get a list of devices of a specified class on all buses scanned by default.
.PP
\fBParameters:\fP
.RS 4
\fIdiscover_class\fP Class of devices to find
.br
\fIstatus\fP Address in which to place status report
.RE
.PP
.PP
Definition at line 63 of file device.c.
.PP
References discover_error::code, discover_error::create_message, discover_conf_get_full_bus_map(), discover_device_copy(), discover_device_get_next(), discover_device_new(), DISCOVER_EDEVICENOTFOUND, discover_get_devices(), DISCOVER_SUCCESS, discover_xml_busclass_cmp(), and discover_xml_get_busclasses().
.SS "void discover_device_free (\fBdiscover_device_t\fP * devices, int free_data)"
.PP
Free the device or list of devices. Pass 1 as the second argument to free the data structure for this device, 0 to leave it. It is necessary to specify 0 when one structure was copied from another with discover_device_copy. Otherwise, you must pass 1.
.PP
\fBParameters:\fP
.RS 4
\fIdevices\fP Device or list of devices to free
.br
\fIfree_data\fP Whether to free the data structure
.RE
.PP
.PP
Definition at line 592 of file device.c.
.PP
References discover_data_free().
.PP
Referenced by discover_free_devices(), and discover_xml_free_devices().
.SS "char* discover_device_get_busclass (\fBdiscover_device_t\fP * device)"
.PP
Get the busclass member of device.
.PP
Definition at line 485 of file device.c.
.SS "char* discover_device_get_data (\fBdiscover_device_t\fP * device, char * discover_class, char * version, \fBdiscover_error_t\fP * status)"
.PP
Get the data matching the class path and version number (optional) from the device structure.
.PP
The class parameter requires further explanation. The XML data sources have hierarchical data elements for each device. You access the data in an element by specifying the path along the data elements to it.
.PP
For example, device elements for video cards usually have a data element of class 'xfree86' containing data related to the XFree86 package; that element itself usually contains a data element of class 'server' that specifies which server to use for this video card. You access this data by passing the string 'xfree86/server' to this function.
.PP
\fBParameters:\fP
.RS 4
\fIdevice\fP Device from which to get the data
.br
\fIdiscover_class\fP Class to search for
.br
\fIversion\fP Version number to require (NULL for unversioned search)
.br
\fIstatus\fP Address in which to place status report
.RE
.PP
.PP
Definition at line 204 of file device.c.
.PP
References discover_error::code.
.SS "\fBdiscover_data_t\fP* discover_device_get_data_struct (\fBdiscover_device_t\fP * device)"
.PP
Get the data member of device.
.PP
Definition at line 540 of file device.c.
.SS "char* discover_device_get_model_id (\fBdiscover_device_t\fP * device)"
.PP
Get the model_id member of device.
.PP
Definition at line 496 of file device.c.
.SS "char* discover_device_get_model_name (\fBdiscover_device_t\fP * device)"
.PP
Get the model_name member of device.
.PP
Definition at line 507 of file device.c.
.SS "\fBdiscover_device_t\fP* discover_device_get_next (\fBdiscover_device_t\fP * device)"
.PP
Get the next member of device.
.PP
Definition at line 551 of file device.c.
.PP
Referenced by discover_device_find().
.SS "char* discover_device_get_vendor_id (\fBdiscover_device_t\fP * device)"
.PP
Get the vendor_id member of device.
.PP
Definition at line 518 of file device.c.
.SS "char* discover_device_get_vendor_name (\fBdiscover_device_t\fP * device)"
.PP
Get the vendor_name member of device.
.PP
Definition at line 529 of file device.c.
.SS "\fBdiscover_device_t\fP* discover_device_new (void)"
.PP
Create and initialize a new discover_device_t structure.
.PP
Definition at line 562 of file device.c.
.PP
Referenced by discover_device_find(), discover_get_devices(), and discover_xml_get_matching_devices().
|