]> sigrok.org Git - libsigrokdecode.git/blobdiff - decode.c
sigrokdecode.h: More doxygen-friendly comments.
[libsigrokdecode.git] / decode.c
index e8828d7e01da40f2c9b7477035a7e2619679ef98..026a6133a7956a5344a416b84bbbfab8e9e34efa 100644 (file)
--- a/decode.c
+++ b/decode.c
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
+#include "config.h"
 #include <sigrokdecode.h> /* First, so we avoid a _POSIX_C_SOURCE warning. */
 #include <stdio.h>
 #include <string.h>
 #include <dirent.h>
-#include <config.h>
 
 /* Re-define some string functions for Python >= 3.0. */
 #if PY_VERSION_HEX >= 0x03000000
@@ -225,9 +225,26 @@ static int srd_load_decoder(const char *name,
        if ((r = h_str(py_res, py_func, py_mod, "name", &(d->name))) < 0)
                return r;
 
+       if ((r = h_str(py_res, py_func, py_mod, "longname",
+                      &(d->longname))) < 0)
+               return r;
+
        if ((r = h_str(py_res, py_func, py_mod, "desc", &(d->desc))) < 0)
                return r;
 
+       if ((r = h_str(py_res, py_func, py_mod, "longdesc",
+                      &(d->longdesc))) < 0)
+               return r;
+
+       if ((r = h_str(py_res, py_func, py_mod, "author", &(d->author))) < 0)
+               return r;
+
+       if ((r = h_str(py_res, py_func, py_mod, "email", &(d->email))) < 0)
+               return r;
+
+       if ((r = h_str(py_res, py_func, py_mod, "license", &(d->license))) < 0)
+               return r;
+
        d->py_mod = py_mod;
 
        Py_XDECREF(py_res);
@@ -390,7 +407,7 @@ static int srd_unload_all_decoders(void)
  *
  * @return SRD_OK upon success, a (negative) error code otherwise.
  */
-int srd_shutdown(void)
+int srd_exit(void)
 {
        /* Unload/free all decoders, and then the list of decoders itself. */
        /* TODO: Error handling. */