]> sigrok.org Git - libsigrok.git/blobdiff - include/libsigrok/libsigrok.h
resource: New internal API for accessing resource files
[libsigrok.git] / include / libsigrok / libsigrok.h
index cf8f9b20ed6dda7042c17dfa2cf7d24044e22fee..6c67f570906da0f24680a504619f4e84651de8d7 100644 (file)
@@ -557,6 +557,25 @@ struct sr_option {
        GSList *values;
 };
 
+/** Resource type.
+ * @since 0.4.0
+ */
+enum sr_resource_type {
+       SR_RESOURCE_FIRMWARE = 1,
+};
+
+/** Resource descriptor.
+ * @since 0.4.0
+ */
+struct sr_resource {
+       /** Size of resource in bytes; set by resource open callback. */
+       uint64_t size;
+       /** File handle or equivalent; set by resource open callback. */
+       void *handle;
+       /** Resource type (SR_RESOURCE_FIRMWARE, ...) */
+       int type;
+};
+
 /** Output module flags. */
 enum sr_output_flag {
        /** If set, this output module writes the output itself. */