summaryrefslogtreecommitdiff
path: root/rtclient.c
diff options
context:
space:
mode:
authorErik Prabowo Kamal <erik@darapsa.co.id>2019-08-27 08:28:24 +0800
committerErik Prabowo Kamal <erik@darapsa.co.id>2019-08-27 08:28:24 +0800
commitafdab77790e8db165b43e9ab34cb26313b067856 (patch)
tree71a96cde29f2da00683ded90c99db8b72df007e5 /rtclient.c
parent9716f5aab10be667878942cb5c89a7433a420086 (diff)
Added rtclient module
Diffstat (limited to 'rtclient.c')
-rw-r--r--rtclient.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/rtclient.c b/rtclient.c
deleted file mode 100644
index 1be0579..0000000
--- a/rtclient.c
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifdef DEBUG
-#ifdef ANDROID
-#include <android/log.h>
-#else
-#include <stdio.h>
-#endif // ANDROID
-#endif // DEBUG
-#include <stdbool.h>
-#include <curl/curl.h>
-#include "rtclient.h"
-
-static CURL *handle = NULL;
-
-bool rtclient_init()
-{
- curl_global_init(CURL_GLOBAL_SSL);
- handle = curl_easy_init();
- if (handle) {
- curl_easy_setopt(handle, CURLOPT_FOLLOWLOCATION, 1L);
-#ifdef DEBUG
- curl_easy_setopt(handle, CURLOPT_VERBOSE, 1L);
-#endif
- }
-
- return (bool)handle;
-}
-
-void rtclient_cleanup()
-{
- if (handle)
- curl_easy_cleanup(handle);
- curl_global_cleanup();
-}