49 lines
885 B
C++
49 lines
885 B
C++
/* -----------------------------------------------------------------------------
|
|
GSFramework
|
|
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
|
|
----------------------------------------------------------------------------- */
|
|
|
|
|
|
#ifndef __HTTPCURL__
|
|
#define __HTTPCURL__
|
|
|
|
|
|
#include "http/http_interface.h"
|
|
#include "async/async_call_queue.h"
|
|
|
|
|
|
namespace GS {
|
|
namespace HTTP {
|
|
class CurlThread;
|
|
|
|
/*!
|
|
@short CURL based HTTP helper.
|
|
@author Emmanuel Julien (ejulien@owloh.com)
|
|
*/
|
|
class Curl : public IHTTP
|
|
{
|
|
CurlThread *curl_thread;
|
|
|
|
int u_ticket_id;
|
|
int GetTicketId();
|
|
|
|
public:
|
|
|
|
ASync::CallQueue event_queue;
|
|
|
|
/// Post an asynchronous HTTP request.
|
|
virtual int Post(const char *url, const char *post);
|
|
|
|
/// Process pending event dispatch in the caller thread.
|
|
virtual void Update();
|
|
|
|
Curl();
|
|
~Curl();
|
|
};
|
|
|
|
} // Http
|
|
} // GS
|
|
|
|
|
|
#endif // __HTTPCURL__
|