Seth Woolley's Man Viewer

device(3) - /scratch/jlicquia/pkgs/discover/discover-2.0.6/lib/device.c - Device enumeration and information management - man 3 device

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

Devices(3)                                                          Devices(3)



NAME
       Devices -

   Functions
       discover_device_t * discover_device_find (char *discover_class,
           discover_error_t *status)
       char * discover_device_get_data (discover_device_t *device, char
           *discover_class, char *version(1,3,5), discover_error_t *status)
       void discover_device_copy (discover_device_t *src, discover_device_t
           *dst)
       char * discover_data_get_class (discover_data_t *data)
       char * discover_data_get_text (discover_data_t *data)
       discover_data_t * discover_data_get_parent (discover_data_t *data)
       discover_data_t * discover_data_get_child (discover_data_t *data)
       discover_data_t * discover_data_get_next (discover_data_t *data)
       discover_data_t * discover_data_get_prev (discover_data_t *data)
       discover_data_t * discover_data_get_first (discover_data_t *data)
       discover_data_t * discover_data_new (void)
       void discover_data_free (discover_data_t *data_tree)
       char * discover_device_get_busclass (discover_device_t *device)
       char * discover_device_get_model_id (discover_device_t *device)
       char * discover_device_get_model_name (discover_device_t *device)
       char * discover_device_get_vendor_id (discover_device_t *device)
       char * discover_device_get_vendor_name (discover_device_t *device)
       discover_data_t * discover_device_get_data_struct (discover_device_t
           *device)
       discover_device_t * discover_device_get_next (discover_device_t
           *device)
       discover_device_t * discover_device_new (void)
       void discover_device_free (discover_device_t *devices, int free_data)

Function Documentation
   void discover_data_free (discover_data_t * data_tree)
       Free the data tree. Note that unlike the other free functions in(1,8)
       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.

       Parameters:
           data_tree Data tree to free



       Definition at line 436 of file(1,n) device.c.

       References discover_data_t.

       Referenced by discover_device_free().

   discover_data_t* discover_data_get_child (discover_data_t * data)
       Get the child member of data.

       Definition at line 341 of file(1,n) device.c.

   char* discover_data_get_class (discover_data_t * data)
       Get the class member of data.

       Definition at line 308 of file(1,n) device.c.

   discover_data_t* discover_data_get_first (discover_data_t * data)
       Get the first member of data.

       Definition at line 374 of file(1,n) device.c.

   discover_data_t* discover_data_get_next (discover_data_t * data)
       Get the next member of data.

       Definition at line 352 of file(1,n) device.c.

   discover_data_t* discover_data_get_parent (discover_data_t * data)
       Get the parent member of data.

       Definition at line 330 of file(1,n) device.c.

   discover_data_t* discover_data_get_prev (discover_data_t * data)
       Get the prev member of data.

       Definition at line 363 of file(1,n) device.c.

   char* discover_data_get_text (discover_data_t * data)
       Get the text member of data.

       Definition at line 319 of file(1,n) device.c.

   discover_data_t* discover_data_new (void)
       Create and initialize a new discover_data_t structure.

       Definition at line 409 of file(1,n) device.c.

       References discover_data_t.

   void discover_device_copy (discover_device_t * src, discover_device_t *
       dst)
       Copy a device structure.

       Parameters:
           src Copy from (source)
           dst Copy to (destination)



       Definition at line 268 of file(1,n) device.c.

       Referenced by discover_device_find(), and
       discover_xml_get_matching_devices().

   discover_device_t* discover_device_find (char * discover_class,
       discover_error_t * status)
       Get a list of devices of a specified class on all buses scanned by
       default.

       Parameters:
           discover_class Class of devices to find
           status Address in(1,8) which to place status report



       Definition at line 63 of file(1,n) device.c.

       References discover_error::code, discover_error::create_message,
       discover_bus_map_t, discover_conf_get_full_bus_map(),
       discover_device_copy(), discover_device_get_next(),
       discover_device_new(), discover_device_t, discover_error_t,
       discover_get_devices(), discover_xml_busclass_cmp(),
       discover_xml_busclass_t, discover_xml_get_busclasses(),
       discover_bus_map::name, and discover_bus_map::scan_default.

   void discover_device_free (discover_device_t * devices, int free_data)
       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.

       Parameters:
           devices Device or list of devices to free
           free_data Whether to free the data structure



       Definition at line 592 of file(1,n) device.c.

       References discover_data_free(), and discover_device_t.

       Referenced by discover_free_devices(), and discover_xml_free_devices().

   char* discover_device_get_busclass (discover_device_t * device)
       Get the busclass member of device.

       Definition at line 485 of file(1,n) device.c.

   char* discover_device_get_data (discover_device_t * device, char *
       discover_class, char * version(1,3,5), discover_error_t * status)
       Get the data matching the class path and version(1,3,5) number (optional) from
       the device structure.

       The class parameter requires further explanation. The XML data sources
       have hierarchical data elements for each device. You access(2,5) the data in(1,8)
       an element by specifying the path along the data elements to it.

       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(2,5) this data by passing the string(3,n) 'xfree86/server' to this
       function.

       Parameters:
           device Device from which to get the data
           discover_class Class to search for
           version(1,3,5) Version number to require (NULL for unversioned search)
           status Address in(1,8) which to place status report



       Definition at line 204 of file(1,n) device.c.

       References discover_error::code, discover_data_t, and discover_error_t.

   discover_data_t* discover_device_get_data_struct (discover_device_t *
       device)
       Get the data member of device.

       Definition at line 540 of file(1,n) device.c.

   char* discover_device_get_model_id (discover_device_t * device)
       Get the model_id member of device.

       Definition at line 496 of file(1,n) device.c.

   char* discover_device_get_model_name (discover_device_t * device)
       Get the model_name member of device.

       Definition at line 507 of file(1,n) device.c.

   discover_device_t* discover_device_get_next (discover_device_t * device)
       Get the next member of device.

       Definition at line 551 of file(1,n) device.c.

       Referenced by discover_device_find().

   char* discover_device_get_vendor_id (discover_device_t * device)
       Get the vendor_id member of device.

       Definition at line 518 of file(1,n) device.c.

   char* discover_device_get_vendor_name (discover_device_t * device)
       Get the vendor_name member of device.

       Definition at line 529 of file(1,n) device.c.

   discover_device_t* discover_device_new (void)
       Create and initialize a new discover_device_t structure.

       Definition at line 562 of file(1,n) device.c.

       References discover_device_t.

       Referenced by discover_device_find(), discover_get_devices(), and
       discover_xml_get_matching_devices().



discover(1,3,5)                          19 Nov 2004                       Devices(3)

References for this manual (incoming links)