Put requester into namespace sc

This commit is contained in:
Bob Polis 2023-11-05 00:51:47 +00:00
parent c1638ec24d
commit b798539502
2 changed files with 28 additions and 23 deletions

View File

@ -4,6 +4,8 @@
#include <cstring> #include <cstring>
#include <stdexcept> #include <stdexcept>
using namespace sc;
size_t requester::write_data(char *buf, size_t sz, size_t nmemb, void *user_data) { size_t requester::write_data(char *buf, size_t sz, size_t nmemb, void *user_data) {
size_t realsize = sz * nmemb; size_t realsize = sz * nmemb;
requester* req {reinterpret_cast<requester*>(user_data)}; requester* req {reinterpret_cast<requester*>(user_data)};

View File

@ -6,6 +6,8 @@
#include <curl/curl.h> #include <curl/curl.h>
#include <libsclogging.hpp> #include <libsclogging.hpp>
namespace sc {
class requester { class requester {
public: public:
// callback for data receiving // callback for data receiving
@ -36,4 +38,5 @@ class requester {
std::string _text; std::string _text;
}; };
}
#endif // _requester_H_ #endif // _requester_H_