]> sigrok.org Git - libsigrok.git/blobdiff - sigrok.h
Prefix device structs with sr_.
[libsigrok.git] / sigrok.h
index 101a2f9f5e466fe41bf7811e151683f37c66c52a..20bd59430a9df6c08bd4634c9162162348a3f967 100644 (file)
--- a/sigrok.h
+++ b/sigrok.h
@@ -132,7 +132,7 @@ struct analog_sample {
 struct sr_input {
        struct sr_input_format *format;
        char *param;
-       struct device *vdevice;
+       struct sr_device *vdevice;
 };
 
 struct sr_input_format {
@@ -145,7 +145,7 @@ struct sr_input_format {
 
 struct sr_output {
        struct sr_output_format *format;
-       struct device *device;
+       struct sr_device *device;
        char *param;
        void *internal;
 };
@@ -186,9 +186,9 @@ struct datastore {
  * to the device index within that plugin; it may be handling more than one
  * device. All relevant plugin calls take a device_index parameter for this.
  */
-struct device {
+struct sr_device {
        /* Which plugin handles this device */
-       struct device_plugin *plugin;
+       struct sr_device_plugin *plugin;
        /* A plugin may handle multiple devices of the same type */
        int plugin_index;
        /* List of struct probe* */
@@ -312,9 +312,10 @@ struct samplerates {
        uint64_t *list;
 };
 
-struct device_plugin {
+struct sr_device_plugin {
        /* Plugin-specific */
        char *name;
+       char *longname;
        int api_version;
        int (*init) (char *deviceinfo);
        void (*cleanup) (void);
@@ -338,7 +339,7 @@ struct gsource_fd {
 };
 
 struct session {
-       /* List of struct device* */
+       /* List of struct sr_device* */
        GSList *devices;
        /* List of struct analyzer* */
        GSList *analyzers;