Files
@ c63c87c023a0
Branch filter:
Location: libtransport.git/include/transport/HTTPRequestQueue.h - annotation
c63c87c023a0
680 B
text/plain
Travis: fix macOS build
do not use bottled libswiften to avoid boost linkage errors
do not use bottled libswiften to avoid boost linkage errors
5adb3d1f9733 5adb3d1f9733 5adb3d1f9733 5adb3d1f9733 5adb3d1f9733 5adb3d1f9733 5adb3d1f9733 5adb3d1f9733 5adb3d1f9733 5adb3d1f9733 26a01b8efa0a 26a01b8efa0a 5adb3d1f9733 5adb3d1f9733 5adb3d1f9733 26a01b8efa0a 5adb3d1f9733 5adb3d1f9733 5adb3d1f9733 eb8f7ddad957 5adb3d1f9733 5adb3d1f9733 5adb3d1f9733 5adb3d1f9733 5adb3d1f9733 5adb3d1f9733 5adb3d1f9733 26a01b8efa0a 26a01b8efa0a 26a01b8efa0a 5adb3d1f9733 5adb3d1f9733 5adb3d1f9733 83ba9855b521 26a01b8efa0a eb8f7ddad957 5adb3d1f9733 5adb3d1f9733 5adb3d1f9733 5adb3d1f9733 |
#pragma once
#include "curl/curl.h"
#include "transport/Logging.h"
#include "transport/ThreadPool.h"
#include <iostream>
#include <sstream>
#include <string.h>
#include "Swiften/Network/Timer.h"
namespace Transport {
class HTTPRequest;
class Component;
class HTTPRequestQueue {
public:
HTTPRequestQueue(Component *component, const std::string &user, int delayBetweenRequests = 1);
virtual ~HTTPRequestQueue();
void queueRequest(HTTPRequest *req);
void sendNextRequest();
private:
void handleRequestFinished();
private:
int m_delay;
std::queue<HTTPRequest *> m_queue;
HTTPRequest *m_req;
Swift::Timer::ref m_queueTimer;
std::string m_user;
};
}
|