Slimline fork of, with lots of things cleaned up and improved
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
696 B

#pragma once
#include <string.h>
#include <iostream>
#include <sstream>
#include "Swiften/Network/Timer.h"
#include "curl/curl.h"
#include "transport/Logging.h"
#include "transport/ThreadPool.h"
namespace Transport {
class HTTPRequest;
class Component;
class HTTPRequestQueue {
HTTPRequestQueue(Component *component, const std::string &user, int delayBetweenRequests = 1);
virtual ~HTTPRequestQueue();
void queueRequest(HTTPRequest *req);
void sendNextRequest();
void handleRequestFinished();
int m_delay;
std::queue<HTTPRequest *> m_queue;
HTTPRequest *m_req;
Swift::Timer::ref m_queueTimer;
std::string m_user;
} // namespace Transport