This commit is contained in:
2020-06-01 19:14:01 -07:00
parent 87d2b360bb
commit 98e9bc5e70
15 changed files with 77 additions and 100 deletions

0
asana/asana.c Normal file
View File

4
asana/asana.h Normal file
View File

@@ -0,0 +1,4 @@
#ifndef ASANA_ASANA_H_
#define ASANA_ASANA_H_
#endif // ASANA_ASANA_H_

19
asana/fetch.c Normal file
View File

@@ -0,0 +1,19 @@
#include "fetch.h"
#include <stdbool.h>
#include <curl/curl.h>
CURL *curl;
bool asana_init() {
curl_global_init(CURL_GLOBAL_ALL);
curl = curl_easy_init();
if (!curl) return false;
return true;
}
void asana_cleanup() {
curl_global_cleanup();
}

16
asana/fetch.h Normal file
View File

@@ -0,0 +1,16 @@
#ifndef ASANA_FETCH_H_
#define ASANA_FETCH_H_
#include <stdbool.h>
/**
* initialize libcurl
*/
bool asana_init();
/**
* cleanup libcurl before program end
*/
void asana_cleanup();
#endif // ASANA_FETCH_H_