projects
/
libsigrokdecode.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
srd: rename public API functions to srd_thing_action format
[libsigrokdecode.git]
/
decoder.c
diff --git
a/decoder.c
b/decoder.c
index 33521c4045e3e297b27103a19b3e333033bd55fc..365e906a5a8d3424d0e711e387b6226d3126d0e2 100644
(file)
--- a/
decoder.c
+++ b/
decoder.c
@@
-36,7
+36,7
@@
extern SRD_PRIV PyObject *mod_sigrokdecode;
*
* @return List of decoders, NULL if none are supported or loaded.
*/
*
* @return List of decoders, NULL if none are supported or loaded.
*/
-SRD_API GSList *srd_
list_decoders
(void)
+SRD_API GSList *srd_
decoders_list
(void)
{
return pd_list;
}
{
return pd_list;
}
@@
-48,12
+48,12
@@
SRD_API GSList *srd_list_decoders(void)
*
* @return The decoder with the specified ID, or NULL if not found.
*/
*
* @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)
+SRD_API struct srd_decoder *srd_
decoder_get
_by_id(const char *id)
{
GSList *l;
struct srd_decoder *dec;
{
GSList *l;
struct srd_decoder *dec;
- for (l = srd_
list_decoders
(); l; l = l->next) {
+ for (l = srd_
decoders_list
(); l; l = l->next) {
dec = l->data;
if (!strcmp(dec->id, id))
return dec;
dec = l->data;
if (!strcmp(dec->id, id))
return dec;
@@
-127,7
+127,7
@@
err_out:
*
* @return SRD_OK upon success, a (negative) error code otherwise.
*/
*
* @return SRD_OK upon success, a (negative) error code otherwise.
*/
-SRD_API int srd_
load_decoder
(const char *module_name)
+SRD_API int srd_
decoder_load
(const char *module_name)
{
PyObject *py_basedec, *py_method, *py_attr, *py_annlist, *py_ann;
struct srd_decoder *d;
{
PyObject *py_basedec, *py_method, *py_attr, *py_annlist, *py_ann;
struct srd_decoder *d;
@@
-338,7
+338,7
@@
static void free_probes(GSList *probelist)
*
* @return SRD_OK upon success, a (negative) error code otherwise.
*/
*
* @return SRD_OK upon success, a (negative) error code otherwise.
*/
-SRD_API int srd_
unload_decoder
(struct srd_decoder *dec)
+SRD_API int srd_
decoder_unload
(struct srd_decoder *dec)
{
srd_dbg("unloading decoder %s", dec->name);
{
srd_dbg("unloading decoder %s", dec->name);
@@
-377,7
+377,7
@@
SRD_API int srd_unload_decoder(struct srd_decoder *dec)
*
* @return SRD_OK upon success, a (negative) error code otherwise.
*/
*
* @return SRD_OK upon success, a (negative) error code otherwise.
*/
-SRD_API int srd_
load_all_decoders
(void)
+SRD_API int srd_
decoders_load_all
(void)
{
GDir *dir;
GError *error;
{
GDir *dir;
GError *error;
@@
-390,7
+390,7
@@
SRD_API int srd_load_all_decoders(void)
while ((direntry = g_dir_read_name(dir)) != NULL) {
/* The directory name is the module name (e.g. "i2c"). */
while ((direntry = g_dir_read_name(dir)) != NULL) {
/* The directory name is the module name (e.g. "i2c"). */
- srd_
load_decoder
(direntry);
+ srd_
decoder_load
(direntry);
}
g_dir_close(dir);
}
g_dir_close(dir);
@@
-402,14
+402,14
@@
SRD_API int srd_load_all_decoders(void)
*
* @return SRD_OK upon success, a (negative) error code otherwise.
*/
*
* @return SRD_OK upon success, a (negative) error code otherwise.
*/
-SRD_API int srd_
unload_all_decoders
(void)
+SRD_API int srd_
decoders_unload_all
(void)
{
GSList *l;
struct srd_decoder *dec;
{
GSList *l;
struct srd_decoder *dec;
- for (l = srd_
list_decoders
(); l; l = l->next) {
+ for (l = srd_
decoders_list
(); l; l = l->next) {
dec = l->data;
dec = l->data;
- srd_
unload_decoder
(dec);
+ srd_
decoder_unload
(dec);
}
return SRD_OK;
}
return SRD_OK;