first commit

This commit is contained in:
2026-06-22 11:49:35 +02:00
commit d805f2ba86
619 changed files with 126873 additions and 0 deletions

View File

@ -0,0 +1,47 @@
/* -----------------------------------------------------------------------------
GSFramework
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */
#ifndef __HTTPINTERFACE__
#define __HTTPINTERFACE__
#include "container/narray.h"
namespace GS {
namespace HTTP {
/*!
@short HTTP interface.
@author Emmanuel Julien (ejulien@owloh.com)
*/
struct IHTTP
{
/// Process a request return value.
virtual void OnRequestComplete(int ticket_id, const Array <char> &data) = 0;
/// Process a request error.
virtual void OnRequestError(int ticket_id) = 0;
/*!
@short Post an asynchronous HTTP request.
This function posts an asynchronous HTTP request and returns a ticket
id to the caller. When task result is available the OnRequestComplete
or OnRequestError handler functions will be called.
*/
virtual int Post(const char *url, const char *post) = 0;
/// Process pending event dispatch in the caller thread.
virtual void Update() = 0;
virtual ~IHTTP() {}
};
} // HTTP
} // GS
#endif // __HTTPINTERFACE__