-#define SRD_OK 0 /**< No error */
-#define SRD_ERR -1 /**< Generic/unspecified error */
-#define SRD_ERR_MALLOC -2 /**< Malloc/calloc/realloc error */
-#define SRD_ERR_ARGS -3 /**< Function argument error */
-#define SRD_ERR_PYTHON -4 /**< Python C API error */
-#define SRD_ERR_DECODERS_DIR -5 /**< Protocol decoder path invalid */
+#define SRD_OK 0 /**< No error */
+#define SRD_ERR -1 /**< Generic/unspecified error */
+#define SRD_ERR_MALLOC -2 /**< Malloc/calloc/realloc error */
+#define SRD_ERR_ARG -3 /**< Function argument error */
+#define SRD_ERR_BUG -4 /**< Errors hinting at internal bugs */
+#define SRD_ERR_PYTHON -5 /**< Python C API error */
+#define SRD_ERR_DECODERS_DIR -6 /**< Protocol decoder path invalid */
+
+/* libsigrokdecode loglevels. */
+#define SRD_LOG_NONE 0 /**< Output no messages at all. */
+#define SRD_LOG_ERR 1 /**< Output error messages. */
+#define SRD_LOG_WARN 2 /**< Output warnings. */
+#define SRD_LOG_INFO 3 /**< Output informational messages. */
+#define SRD_LOG_DBG 4 /**< Output debug messages. */
+#define SRD_LOG_SPEW 5 /**< Output very noisy debug messages. */
+
+enum {
+ SRD_OUTPUT_ANN,
+ SRD_OUTPUT_PROTO,
+ SRD_OUTPUT_BINARY,
+ /* When adding an output type, don't forget to expose it to PDs in:
+ * controller.c:PyInit_sigrokdecode()
+ * and add a check in:
+ * module_sigrokdecode.c:Decoder_put()
+ */
+};
+
+#define SRD_MAX_NUM_PROBES 64