]> sigrok.org Git - libsigrok.git/blobdiff - sigrok-proto.h
sr: rm unused sr_device_clear() and sr_device_probe_clear()
[libsigrok.git] / sigrok-proto.h
index 5b883043febac8c85f0a203fb38b0b115979ad85..410c0cc452981cb33d13b44f323ec5efb4543f4d 100644 (file)
@@ -17,8 +17,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef SIGROK_SIGROK_PROTO_H
-#define SIGROK_SIGROK_PROTO_H
+#ifndef LIBSIGROK_SIGROK_PROTO_H
+#define LIBSIGROK_SIGROK_PROTO_H
 
 /*--- backend.c -------------------------------------------------------------*/
 
@@ -27,8 +27,15 @@ SR_API int sr_exit(void);
 
 /*--- log.c -----------------------------------------------------------------*/
 
-SR_API int sr_set_loglevel(int loglevel);
-SR_API int sr_get_loglevel(void);
+typedef int (*sr_log_handler_t)(void *data, int loglevel, const char *format,
+                                va_list args);
+
+SR_API int sr_log_loglevel_set(int loglevel);
+SR_API int sr_log_loglevel_get(void);
+SR_API int sr_log_handler_set(sr_log_handler_t handler, void *data);
+SR_API int sr_log_handler_set_default(void);
+SR_API int sr_log_logdomain_set(const char *logdomain);
+SR_API char *sr_log_logdomain_get(void);
 
 /*--- datastore.c -----------------------------------------------------------*/
 
@@ -44,8 +51,6 @@ SR_API int sr_device_scan(void);
 SR_API GSList *sr_device_list(void);
 SR_API struct sr_device *sr_device_new(const struct sr_device_plugin *plugin,
                                       int plugin_index);
-SR_API int sr_device_clear(struct sr_device *device);
-SR_API int sr_device_probe_clear(struct sr_device *device, int probenum);
 SR_API int sr_device_probe_add(struct sr_device *device, const char *name);
 SR_API struct sr_probe *sr_device_probe_find(const struct sr_device *device,
                                             int probenum);