]> sigrok.org Git - libsigrokdecode.git/blobdiff - sigrokdecode.h
lib headers: Add 'extern "C"' for C++ usage.
[libsigrokdecode.git] / sigrokdecode.h
index ecd141ae15a8f7a001406b664cf38330acee45d9..4876b5bd7f8c1480ccc344f0cb3fe01319240e26 100644 (file)
 #include <stdint.h>
 #include <glib.h>
 
 #include <stdint.h>
 #include <glib.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Status/error codes returned by libsigrokdecode functions.
  *
 /*
  * Status/error codes returned by libsigrokdecode functions.
  *
@@ -49,9 +53,6 @@
 #define SIGROKDECODE_ERR_PYTHON                -4 /* Python C API error */
 #define SIGROKDECODE_ERR_DECODERS_DIR  -5 /* Protocol decoder path invalid */
 
 #define SIGROKDECODE_ERR_PYTHON                -4 /* Python C API error */
 #define SIGROKDECODE_ERR_DECODERS_DIR  -5 /* Protocol decoder path invalid */
 
-/* The list of loaded protocol decoders. */
-GSList *list_pds;
-
 /* TODO: Documentation. */
 struct sigrokdecode_decoder {
        char *id;
 /* TODO: Documentation. */
 struct sigrokdecode_decoder {
        char *id;
@@ -66,10 +67,15 @@ struct sigrokdecode_decoder {
 };
 
 int sigrokdecode_init(void);
 };
 
 int sigrokdecode_init(void);
+GSList *sigrokdecode_list_decoders(void);
 int sigrokdecode_load_decoder(const char *name, struct sigrokdecode_decoder **dec);
 int sigrokdecode_run_decoder(struct sigrokdecode_decoder *dec,
                             uint8_t *inbuf, uint64_t inbuflen,
                             uint8_t **outbuf, uint64_t *outbuflen);
 int sigrokdecode_shutdown(void);
 
 int sigrokdecode_load_decoder(const char *name, struct sigrokdecode_decoder **dec);
 int sigrokdecode_run_decoder(struct sigrokdecode_decoder *dec,
                             uint8_t *inbuf, uint64_t inbuflen,
                             uint8_t **outbuf, uint64_t *outbuflen);
 int sigrokdecode_shutdown(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
 #endif