PRCYCoin
2.0.0.7rc1
P2P Digital Currency
src
curl_json.h
Go to the documentation of this file.
1
// Copyright (c) 2009-2014 The Bitcoin developers
2
// Distributed under the MIT software license, see the accompanying
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5
#ifndef PRCYCOIN_CURLJSON_H
6
#define PRCYCOIN_CURLJSON_H
7
8
#include <curl/curl.h>
9
10
#include <string>
11
12
#define TIME_IN_US 1
13
#define TIMETYPE curl_off_t
14
#define TIMEOPT CURLINFO_TOTAL_TIME_T
15
#define MINIMAL_PROGRESS_FUNCTIONALITY_INTERVAL 3000000
16
17
struct
CurlProgress
{
18
TIMETYPE
lastruntime
;
/* type depends on version, see above */
19
CURL *
curl
;
20
};
21
22
struct
JsonDownload
{
23
std::string
URL
=
""
;
24
std::string
response
=
""
;
25
bool
failed
=
false
;
26
bool
complete
=
false
;
27
CURL *
curl
;
28
CurlProgress
prog
;
29
};
30
31
extern
JsonDownload
downloadedJSON
;
32
33
static
size_t
writer(
char
*in,
size_t
size,
size_t
nmemb, std::string *out);
34
extern
void
getHttpsJson
(std::string
url
);
35
36
#endif
TIMETYPE
#define TIMETYPE
Definition:
curl_json.h:13
JsonDownload::response
std::string response
Definition:
curl_json.h:24
getHttpsJson
void getHttpsJson(std::string url)
Definition:
curl_json.cpp:18
CurlProgress::lastruntime
TIMETYPE lastruntime
Definition:
curl_json.h:18
CurlProgress::curl
CURL * curl
Definition:
curl_json.h:19
JsonDownload::complete
bool complete
Definition:
curl_json.h:26
url
const char * url
Definition:
rpcconsole.cpp:61
JsonDownload::prog
CurlProgress prog
Definition:
curl_json.h:28
CurlProgress
Definition:
curl_json.h:17
JsonDownload
Definition:
curl_json.h:22
JsonDownload::failed
bool failed
Definition:
curl_json.h:25
JsonDownload::curl
CURL * curl
Definition:
curl_json.h:27
downloadedJSON
JsonDownload downloadedJSON
Definition:
curl_json.cpp:10
JsonDownload::URL
std::string URL
Definition:
curl_json.h:23
Generated on Tue Apr 28 2026 00:02:50 for PRCYCoin by
1.8.17