]> 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 34a8df4ad922cec04672f24f3e372c17377a8fe5..6c67f570906da0f24680a504619f4e84651de8d7 100644 (file)
@@ -465,7 +465,7 @@ struct sr_session;
 
 struct sr_rational {
        /** Numerator of the rational number. */
-       uint64_t p;
+       int64_t p;
        /** Denominator of the rational number. */
        uint64_t q;
 };
@@ -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. */
@@ -946,9 +965,6 @@ enum sr_configkey {
        /** Measured quantity. */
        SR_CONF_MEASURED_QUANTITY,
 
-       /** Measured secondary quantity. */
-       SR_CONF_MEASURED_2ND_QUANTITY,
-
        /** Equivalent circuit model. */
        SR_CONF_EQUIV_CIRCUIT_MODEL,