diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2011-01-15 02:37:51 +0100 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2011-01-15 02:53:29 +0100 |
commit | 871d21e2555c345350ec951f1639b4a75dbd4fea (patch) | |
tree | 7a8aa181bb8101b31896c993217234b8dc47021f /decode.c | |
parent | f301bde35eda4b33218d947243da33ef11d52d47 (diff) | |
download | libsigrokdecode-871d21e2555c345350ec951f1639b4a75dbd4fea.tar.gz libsigrokdecode-871d21e2555c345350ec951f1639b4a75dbd4fea.zip |
Don't expose libsigrokdecode's interal GSList.
Instead, add a libsigrokdecode_list_decoders() API call which gives you
the list of known protocol decoders.
Diffstat (limited to 'decode.c')
-rw-r--r-- | decode.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -31,7 +31,7 @@ #endif /* The list of protocol decoders. */ -GSList *list_pds; +GSList *list_pds = NULL; /** * Initialize libsigrokdecode. @@ -71,6 +71,18 @@ int sigrokdecode_init(void) } /** + * Returns the list of supported/loaded protocol decoders. + * + * This is a GSList containing the names of the decoders as strings. + * + * @return List of decoders, NULL if none are supported or loaded. + */ +GSList *sigrokdecode_list_decoders(void) +{ + return list_pds; +} + +/** * Helper function to handle Python strings. * * TODO: @param entries. |