diff options
author | Rob Bradford <rob@linux.intel.com> | 2008-09-05 10:47:46 +0100 |
---|---|---|
committer | Rob Bradford <rob@linux.intel.com> | 2008-09-05 10:47:46 +0100 |
commit | 8e8668d6253958e5eeec67842c5d9eb4556ef5f1 (patch) | |
tree | 7cd8eaa6ddbf617471381050858122c756367332 /examples | |
parent | 00b9a2e5f87b174641a3735812021e610f29436c (diff) |
Remove JSON wrappers & tests.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/Makefile.am | 7 | ||||
-rw-r--r-- | examples/test-json.c | 45 |
2 files changed, 3 insertions, 49 deletions
diff --git a/examples/Makefile.am b/examples/Makefile.am index da6eb19..d4299da 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -1,9 +1,8 @@ -noinst_PROGRAMS = test-raw test-json test-xml +noinst_PROGRAMS = test-raw test-xml -AM_CFLAGS = $(GLIB_CFLAGS) $(SOUP_CFLAGS) $(JSON_CFLAGS) -I.. -AM_LDFLAGS = $(GLIB_LIBS) $(SOUP_LIBS) $(JSON_LIBS) ../rest/librest.la +AM_CFLAGS = $(GLIB_CFLAGS) $(SOUP_CFLAGS) -I.. +AM_LDFLAGS = $(GLIB_LIBS) $(SOUP_LIBS) ../rest/librest.la test_raw_SOURCES = test-raw.c -test_json_SOURCES = test-json.c test_xml_SOURCES = test-xml.c diff --git a/examples/test-json.c b/examples/test-json.c deleted file mode 100644 index efd9cd7..0000000 --- a/examples/test-json.c +++ /dev/null @@ -1,45 +0,0 @@ -#include <rest/rest-proxy.h> - -static void -proxy_call_json_async_cb (RestProxy *proxy, - guint status_code, - const gchar *response_message, - GHashTable *headers, - JsonNode *root, - GObject *weak_object, - gpointer userdata) -{ - g_main_loop_quit ((GMainLoop *)userdata); -} - -gint -main (gint argc, gchar **argv) -{ - RestProxy *proxy; - GMainLoop *loop; - gchar *payload; - gssize len; - - g_type_init (); - g_thread_init (NULL); - - loop = g_main_loop_new (NULL, FALSE); - - proxy = rest_proxy_new ("http://www.flickr.com/services/rest/", FALSE); - rest_proxy_call_json_async (proxy, - NULL, - "GET", - proxy_call_json_async_cb, - NULL, - loop, - NULL, - "method", - "flickr.test.echo", - "api_key", - "314691be2e63a4d58994b2be01faacfb", - "format", - "json", - NULL); - - g_main_loop_run (loop); -} |