summaryrefslogtreecommitdiff
path: root/tests/test-gphoto2.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-gphoto2.c')
-rw-r--r--tests/test-gphoto2.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test-gphoto2.c b/tests/test-gphoto2.c
index 19ee25e02..dba711b4d 100644
--- a/tests/test-gphoto2.c
+++ b/tests/test-gphoto2.c
@@ -1,9 +1,17 @@
#include <gphoto2-core.h>
#include <gphoto2-camera.h>
+#include <gphoto2-debug.h>
+
#include <stdio.h>
#define CHECK(f) {int res = f; if (res < 0) {printf ("ERROR: %s\n", gp_result_as_string (res)); exit (1);}}
+static void
+my_debug_func (const char *id, const char *msg, void *data)
+{
+ printf ("DEBUG: %s\n", msg);
+}
+
int
main (int argc, char *argv [])
{
@@ -15,6 +23,10 @@ main (int argc, char *argv [])
* internally.
*/
+ /* Just to show off a bit... */
+ gp_debug_set_level (GP_DEBUG_LOW);
+ gp_debug_set_func (my_debug_func, NULL);
+
/*
* You'll probably want to access your camera. You will first have
* to create a camera (that is, allocating the memory).