*
* @return List of decoders, NULL if none are supported or loaded.
*/
-SRD_API GSList *srd_decoders_list(void)
+SRD_API GSList *srd_decoder_list(void)
{
return pd_list;
}
GSList *l;
struct srd_decoder *dec;
- for (l = srd_decoders_list(); l; l = l->next) {
+ for (l = srd_decoder_list(); l; l = l->next) {
dec = l->data;
if (!strcmp(dec->id, id))
return dec;
return NULL;
}
-static int get_probes(struct srd_decoder *d, char *attr, GSList **pl)
+static int get_probes(const struct srd_decoder *d, const char *attr,
+ GSList **pl)
{
PyObject *py_probelist, *py_entry;
struct srd_probe *p;
int alen, ret, i;
char **ann;
- srd_dbg("Loading module '%s'.", module_name);
+ srd_dbg("Loading protocol decoder '%s'.", module_name);
py_basedec = py_method = py_attr = NULL;
* @param dec The loaded protocol decoder.
*
* @return A newly allocated buffer containing the protocol decoder's
- * documentation. The caller is responsible for free'ing this after use.
+ * documentation. The caller is responsible for free'ing the buffer.
*/
-SRD_API char *srd_decoder_doc(struct srd_decoder *dec)
+SRD_API char *srd_decoder_doc(const struct srd_decoder *dec)
{
PyObject *py_str;
char *doc;
*/
SRD_API int srd_decoder_unload(struct srd_decoder *dec)
{
- srd_dbg("Unloading decoder '%s'.", dec->name);
+ srd_dbg("Unloading protocol decoder '%s'.", dec->name);
/*
* Since any instances of this decoder need to be released as well,
*
* @return SRD_OK upon success, a (negative) error code otherwise.
*/
-SRD_API int srd_decoders_load_all(void)
+SRD_API int srd_decoder_load_all(void)
{
GDir *dir;
GError *error;
*
* @return SRD_OK upon success, a (negative) error code otherwise.
*/
-SRD_API int srd_decoders_unload_all(void)
+SRD_API int srd_decoder_unload_all(void)
{
GSList *l;
struct srd_decoder *dec;
- for (l = srd_decoders_list(); l; l = l->next) {
+ for (l = srd_decoder_list(); l; l = l->next) {
dec = l->data;
srd_decoder_unload(dec);
}