]> sigrok.org Git - libsigrokdecode.git/blobdiff - sigrokdecode.h
sigrokdecode.h: Add struct sigrokdecode_decoder_info.
[libsigrokdecode.git] / sigrokdecode.h
index 228fc1f261e4a1123523ad35957b8e180cdb370f..be3ab98e05d9929bf2b2864c29f5508557c40f57 100644 (file)
@@ -18,8 +18,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
-#ifndef LIBSIGROKDECODE_SIGROKDECODE_H
-#define LIBSIGROKDECODE_SIGROKDECODE_H
+#ifndef SIGROKDECODE_SIGROKDECODE_H
+#define SIGROKDECODE_SIGROKDECODE_H
 
 #include <Python.h> /* First, so we avoid a _POSIX_C_SOURCE warning. */
 #include <stdint.h>
 #define SIGROKDECODE_ERR               -1 /* Generic/unspecified error */
 #define SIGROKDECODE_ERR_MALLOC                -2 /* Malloc/calloc/realloc error */
 
+/* TODO: Documentation. */
+struct sigrokdecode_decoder_info {
+       char *id;
+       char *name;
+       char *description;
+       char *function;
+       char *inputformats; /* FIXME: Should be a list. */
+       char *outputformats; /* FIXME: Should be a list. */
+};
+
 int sigrokdecode_init(void);
 int sigrokdecode_load_decoder_file(const char *name);
-int sigrokdecode_run_decoder(const char *decodername, uint8_t *inbuf,
-                            uint64_t inbuflen, uint8_t **outbuf,
-                            uint64_t *outbuflen);
+int sigrokdecode_run_decoder(const char *modulename, const char *decodername,
+                            uint8_t *inbuf, uint64_t inbuflen,
+                            uint8_t **outbuf, uint64_t *outbuflen);
 int sigrokdecode_shutdown(void);
 
 #endif