gwenhywfar  5.10.1
Macros | Functions
httpsession.c File Reference
#include "httpsession_p.h"
#include "i18n_l.h"
#include <gwenhywfar/syncio.h>
#include <gwenhywfar/syncio_socket.h>
#include <gwenhywfar/syncio_tls.h>
#include <gwenhywfar/syncio_http.h>
#include <gwenhywfar/syncio_file.h>
#include <gwenhywfar/misc.h>
#include <gwenhywfar/debug.h>
#include <gwenhywfar/gui.h>
#include <gwenhywfar/text.h>
#include <assert.h>
#include <unistd.h>
Include dependency graph for httpsession.c:

Go to the source code of this file.

Macros

#define DISABLE_DEBUGLOG
 

Functions

static void _setHostHeaderFromUrl (const char *sUrl, GWEN_DB_NODE *dbHeader)
 
int GWEN_HttpSession__RecvPacket (GWEN_HTTP_SESSION *sess, GWEN_BUFFER *buf)
 
int GWEN_HttpSession__RecvPacketToSio (GWEN_HTTP_SESSION *sess, GWEN_SYNCIO *sio)
 
void GWEN_HttpSession_AddFlags (GWEN_HTTP_SESSION *sess, uint32_t fl)
 
void GWEN_HttpSession_Attach (GWEN_HTTP_SESSION *sess)
 
int GWEN_HttpSession_ConnectionTest (GWEN_HTTP_SESSION *sess)
 
int GWEN_HttpSession_Fini (GWEN_HTTP_SESSION *sess)
 
void GWEN_HttpSession_free (GWEN_HTTP_SESSION *sess)
 
GWEN_HTTP_SESSIONGWEN_HttpSession_fromSocketPassive (GWEN_SOCKET *sk, const char *proto, int port)
 
GWEN_HTTP_SESSIONGWEN_HttpSession_fromSyncIoPassive (GWEN_SYNCIO *sio)
 
uint32_t GWEN_HttpSession_GetFlags (const GWEN_HTTP_SESSION *sess)
 
const char * GWEN_HttpSession_GetHttpContentType (const GWEN_HTTP_SESSION *sess)
 
const char * GWEN_HttpSession_GetHttpUserAgent (const GWEN_HTTP_SESSION *sess)
 
int GWEN_HttpSession_GetHttpVMajor (const GWEN_HTTP_SESSION *sess)
 
int GWEN_HttpSession_GetHttpVMinor (const GWEN_HTTP_SESSION *sess)
 
int GWEN_HttpSession_Init (GWEN_HTTP_SESSION *sess)
 
int GWEN_HttpSession_InitSyncIo (GWEN_HTTP_SESSION *sess, GWEN_SYNCIO *sio)
 
GWEN_HTTP_SESSIONGWEN_HttpSession_new (const char *url, const char *defaultProto, int defaultPort)
 
int GWEN_HttpSession_RecvCommand (GWEN_HTTP_SESSION *sess, GWEN_DB_NODE *dbCommandAndHeader, GWEN_BUFFER *buf)
 
int GWEN_HttpSession_RecvPacket (GWEN_HTTP_SESSION *sess, GWEN_BUFFER *buf)
 
int GWEN_HttpSession_RecvPacketToFile (GWEN_HTTP_SESSION *sess, const char *fname)
 
int GWEN_HttpSession_SendPacket (GWEN_HTTP_SESSION *sess, const char *httpCommand, const uint8_t *buf, uint32_t blen)
 
int GWEN_HttpSession_SendStatus (GWEN_HTTP_SESSION *sess, int resultCode, const char *resultText, const uint8_t *buf, uint32_t blen)
 
void GWEN_HttpSession_SetFlags (GWEN_HTTP_SESSION *sess, uint32_t fl)
 
void GWEN_HttpSession_SetHttpContentType (GWEN_HTTP_SESSION *sess, const char *s)
 
void GWEN_HttpSession_SetHttpUserAgent (GWEN_HTTP_SESSION *sess, const char *s)
 
void GWEN_HttpSession_SetHttpVMajor (GWEN_HTTP_SESSION *sess, int i)
 
void GWEN_HttpSession_SetHttpVMinor (GWEN_HTTP_SESSION *sess, int i)
 
GWEN_HTTPSESSION_INITSYNCIO_FN GWEN_HttpSession_SetInitSyncIoFn (GWEN_HTTP_SESSION *sess, GWEN_HTTPSESSION_INITSYNCIO_FN f)
 
void GWEN_HttpSession_SubFlags (GWEN_HTTP_SESSION *sess, uint32_t fl)
 

Macro Definition Documentation

◆ DISABLE_DEBUGLOG

#define DISABLE_DEBUGLOG

Definition at line 15 of file httpsession.c.

Function Documentation

◆ _setHostHeaderFromUrl()

void _setHostHeaderFromUrl ( const char *  sUrl,
GWEN_DB_NODE dbHeader 
)
static

Definition at line 382 of file httpsession.c.

References GWEN_DB_FLAGS_OVERWRITE_VARS, GWEN_DB_SetCharValue(), GWEN_Url_free(), GWEN_Url_fromString(), and GWEN_Url_GetServer().

Referenced by GWEN_HttpSession_Init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_HttpSession__RecvPacket()

int GWEN_HttpSession__RecvPacket ( GWEN_HTTP_SESSION sess,
GWEN_BUFFER buf 
)

◆ GWEN_HttpSession__RecvPacketToSio()

int GWEN_HttpSession__RecvPacketToSio ( GWEN_HTTP_SESSION sess,
GWEN_SYNCIO sio 
)

Definition at line 742 of file httpsession.c.

References DBG_INFO, GWEN_DB_GetCharValue(), GWEN_Gui_ProgressLog2(), GWEN_LOGDOMAIN, GWEN_LoggerLevel_Warning, GWEN_SyncIo_Http_GetDbHeaderIn(), GWEN_SyncIo_Http_RecvBodyToSio(), and I18N.

Referenced by GWEN_HttpSession_RecvPacketToFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_HttpSession_InitSyncIo()

int GWEN_HttpSession_InitSyncIo ( GWEN_HTTP_SESSION sess,
GWEN_SYNCIO sio 
)

Definition at line 914 of file httpsession.c.

References DBG_INFO, GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_LOGDOMAIN.

Referenced by GWEN_HttpSession_Init().

Here is the caller graph for this function: