diff options
author | Bert Vermeulen <bert@biot.com> | 2012-02-12 14:55:20 +0100 |
---|---|---|
committer | Bert Vermeulen <bert@biot.com> | 2012-02-12 14:55:20 +0100 |
commit | 582c8473ffd456dfb0796974ef2c0b1b78de38a8 (patch) | |
tree | 7ae052de00e260ab66ee4fec34014eacf553bb7b /decoder.c | |
parent | 12243c22bf01506ac3b220bfe38384db9903756c (diff) | |
download | libsigrokdecode-582c8473ffd456dfb0796974ef2c0b1b78de38a8.tar.gz libsigrokdecode-582c8473ffd456dfb0796974ef2c0b1b78de38a8.zip |
srd: last public/private fix, and docs for all publis functions.
Diffstat (limited to 'decoder.c')
-rw-r--r-- | decoder.c | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -45,6 +45,7 @@ SRD_API GSList *srd_list_decoders(void) * Get the decoder with the specified ID. * * @param id The ID string of the decoder to return. + * * @return The decoder with the specified ID, or NULL if not found. */ SRD_API struct srd_decoder *srd_get_decoder_by_id(const char *id) @@ -281,6 +282,14 @@ err_out: return ret; } +/** + * Return a protocol decoder's docstring. + * + * @param dec The loaded protocol decoder. + * + * @return A newly allocated buffer containing the docstring. The caller should + * free this after use. + */ SRD_API char *srd_decoder_doc(struct srd_decoder *dec) { PyObject *py_str; @@ -362,6 +371,11 @@ SRD_API int srd_unload_decoder(struct srd_decoder *dec) return SRD_OK; } +/** + * Load all protocol decoders libsigrokdecode knows about. + * + * @return SRD_OK upon success, a (negative) error code otherwise. + */ SRD_API int srd_load_all_decoders(void) { GDir *dir; @@ -390,7 +404,9 @@ SRD_API int srd_load_all_decoders(void) } /** - * TODO + * Unload all loaded protocol decoders. + * + * @return SRD_OK upon success, a (negative) error code otherwise. */ SRD_API int srd_unload_all_decoders(void) { |