12345678910111213141516171819202122232425 |
- #pragma once
- #include <pthread.h>
- #include <curl/curl.h>
- #include <string>
- class BBS2chProxyAuth {
- private:
- std::string sid;
- int expire;
- pthread_mutex_t mutex;
-
- public:
- BBS2chProxyAuth() : expire(0) {
- pthread_mutex_init(&mutex, NULL);
- };
- ~BBS2chProxyAuth() {
- pthread_mutex_destroy(&mutex);
- };
- std::string requestBodyForURL(const char *url, CURL *curl);
-
- private:
- bool updateSID(CURL *curl);
- };
|