BBS2chProxyAuth.h 379 B

123456789101112131415161718192021
  1. #pragma once
  2. #include <pthread.h>
  3. #include <curl/curl.h>
  4. #include <string>
  5. class BBS2chProxyAuth {
  6. private:
  7. std::string sid;
  8. int expire;
  9. pthread_mutex_t *mutex;
  10. public:
  11. BBS2chProxyAuth(pthread_mutex_t *m) : expire(0), mutex(m) {};
  12. ~BBS2chProxyAuth() {};
  13. const std::string requestBodyForURL(const char *url, CURL *curl);
  14. private:
  15. bool updateSID(CURL *curl);
  16. };