gwenhywfar  4.99.8beta
Macros | Functions
syncio_http.c File Reference
#include "syncio_http_p.h"
#include "i18n_l.h"
#include <gwenhywfar/misc.h>
#include <gwenhywfar/debug.h>
#include <gwenhywfar/gui.h>
#include <gwenhywfar/text.h>
#include <assert.h>
#include <errno.h>
#include <string.h>
#include <ctype.h>
Include dependency graph for syncio_http.c:

Go to the source code of this file.

Macros

#define DISABLE_DEBUGLOG
 

Functions

int GWENHYWFAR_CB GWEN_SyncIo_Http_Connect (GWEN_SYNCIO *sio)
 
int GWENHYWFAR_CB GWEN_SyncIo_Http_Disconnect (GWEN_SYNCIO *sio)
 
void GWENHYWFAR_CB GWEN_SyncIo_Http_FreeData (void *bp, void *p)
 
GWEN_DB_NODEGWEN_SyncIo_Http_GetDbCommandIn (const GWEN_SYNCIO *sio)
 
GWEN_DB_NODEGWEN_SyncIo_Http_GetDbCommandOut (const GWEN_SYNCIO *sio)
 
GWEN_DB_NODEGWEN_SyncIo_Http_GetDbHeaderIn (const GWEN_SYNCIO *sio)
 
GWEN_DB_NODEGWEN_SyncIo_Http_GetDbHeaderOut (const GWEN_SYNCIO *sio)
 
GWEN_DB_NODEGWEN_SyncIo_Http_GetDbStatusIn (const GWEN_SYNCIO *sio)
 
GWEN_DB_NODEGWEN_SyncIo_Http_GetDbStatusOut (const GWEN_SYNCIO *sio)
 
GWEN_SYNCIOGWEN_SyncIo_Http_new (GWEN_SYNCIO *baseIo)
 
int GWEN_SyncIo_Http_ParseCommand (GWEN_SYNCIO *sio, const char *buffer)
 
int GWEN_SyncIo_Http_ParseHeader (GWEN_SYNCIO *sio, char *buf)
 
int GWEN_SyncIo_Http_ParseStatus (GWEN_SYNCIO *sio, char *buffer)
 
int GWENHYWFAR_CB GWEN_SyncIo_Http_Read (GWEN_SYNCIO *sio, uint8_t *buffer, uint32_t size)
 
int GWEN_SyncIo_Http_ReadBody (GWEN_SYNCIO *sio, uint8_t *buffer, uint32_t size)
 
int GWEN_SyncIo_Http_ReadChunk (GWEN_SYNCIO *sio, uint8_t *buffer, uint32_t size)
 
int GWEN_SyncIo_Http_ReadChunkSize (GWEN_SYNCIO *sio)
 
int GWEN_SyncIo_Http_ReadCommand (GWEN_SYNCIO *sio)
 
int GWEN_SyncIo_Http_ReadHeader (GWEN_SYNCIO *sio)
 
int GWEN_SyncIo_Http_ReadLine (GWEN_SYNCIO *sio, GWEN_BUFFER *tbuf)
 
int GWEN_SyncIo_Http_ReadStatus (GWEN_SYNCIO *sio)
 
int GWEN_SyncIo_Http_RecvBody (GWEN_SYNCIO *sio, GWEN_BUFFER *buf)
 
int GWEN_SyncIo_Http_RecvBodyToSio (GWEN_SYNCIO *sio, GWEN_SYNCIO *sout)
 
void GWEN_SyncIo_Http_SetReadIdle (GWEN_SYNCIO *sio)
 
void GWEN_SyncIo_Http_SetWriteIdle (GWEN_SYNCIO *sio)
 
int GWENHYWFAR_CB GWEN_SyncIo_Http_Write (GWEN_SYNCIO *sio, const uint8_t *buffer, uint32_t size)
 
int GWEN_SyncIo_Http_WriteChunkSize (GWEN_SYNCIO *sio, uint32_t size)
 
int GWEN_SyncIo_Http_WriteCommand (GWEN_SYNCIO *sio)
 
int GWEN_SyncIo_Http_WriteHeader (GWEN_SYNCIO *sio)
 
int GWEN_SyncIo_Http_WriteStatus (GWEN_SYNCIO *sio)
 

Macro Definition Documentation

#define DISABLE_DEBUGLOG

Definition at line 29 of file syncio_http.c.

Function Documentation

int GWENHYWFAR_CB GWEN_SyncIo_Http_Connect ( GWEN_SYNCIO sio)

Definition at line 97 of file syncio_http.c.

References DBG_INFO, GWEN_INHERIT_GETDATA, GWEN_LOGDOMAIN, GWEN_SyncIo_Connect(), GWEN_SyncIo_GetBaseIo(), GWEN_SyncIo_GetStatus(), GWEN_SyncIo_Http_SetReadIdle(), GWEN_SyncIo_SetStatus(), and GWEN_SyncIo_Status_Connected.

Referenced by GWEN_SyncIo_Http_new().

Here is the call graph for this function:

Here is the caller graph for this function:

int GWENHYWFAR_CB GWEN_SyncIo_Http_Disconnect ( GWEN_SYNCIO sio)
void GWENHYWFAR_CB GWEN_SyncIo_Http_FreeData ( void *  bp,
void *  p 
)

Definition at line 79 of file syncio_http.c.

References GWEN_DB_Group_free(), and GWEN_FREE_OBJECT.

Referenced by GWEN_SyncIo_Http_new().

Here is the call graph for this function:

Here is the caller graph for this function:

GWEN_DB_NODE* GWEN_SyncIo_Http_GetDbCommandIn ( const GWEN_SYNCIO sio)

Definition at line 1237 of file syncio_http.c.

References GWEN_INHERIT_GETDATA.

GWEN_DB_NODE* GWEN_SyncIo_Http_GetDbCommandOut ( const GWEN_SYNCIO sio)

Definition at line 1273 of file syncio_http.c.

References GWEN_INHERIT_GETDATA.

Referenced by GWEN_Gui_Internal_GetSyncIo(), and GWEN_HttpSession_SendPacket().

Here is the caller graph for this function:

GWEN_DB_NODE* GWEN_SyncIo_Http_GetDbHeaderIn ( const GWEN_SYNCIO sio)

Definition at line 1261 of file syncio_http.c.

References GWEN_INHERIT_GETDATA.

Referenced by GWEN_HttpSession__RecvPacket(), GWEN_HttpSession__RecvPacketToSio(), GWEN_SyncIo_Http_RecvBody(), and GWEN_SyncIo_Http_RecvBodyToSio().

Here is the caller graph for this function:

GWEN_DB_NODE* GWEN_SyncIo_Http_GetDbHeaderOut ( const GWEN_SYNCIO sio)

Definition at line 1297 of file syncio_http.c.

References GWEN_INHERIT_GETDATA.

Referenced by GWEN_Gui_Internal_GetSyncIo(), GWEN_HttpSession_Init(), and GWEN_HttpSession_SendPacket().

Here is the caller graph for this function:

GWEN_DB_NODE* GWEN_SyncIo_Http_GetDbStatusIn ( const GWEN_SYNCIO sio)

Definition at line 1249 of file syncio_http.c.

References GWEN_INHERIT_GETDATA.

GWEN_DB_NODE* GWEN_SyncIo_Http_GetDbStatusOut ( const GWEN_SYNCIO sio)

Definition at line 1285 of file syncio_http.c.

References GWEN_INHERIT_GETDATA.

GWEN_SYNCIO* GWEN_SyncIo_Http_new ( GWEN_SYNCIO baseIo)
int GWEN_SyncIo_Http_ParseCommand ( GWEN_SYNCIO sio,
const char *  buffer 
)

Definition at line 511 of file syncio_http.c.

References DBG_ERROR, GWEN_DB_FLAGS_OVERWRITE_VARS, GWEN_DB_SetCharValue(), GWEN_ERROR_INVALID, GWEN_INHERIT_GETDATA, and GWEN_LOGDOMAIN.

Referenced by GWEN_SyncIo_Http_ReadCommand().

Here is the call graph for this function:

Here is the caller graph for this function:

int GWEN_SyncIo_Http_ParseHeader ( GWEN_SYNCIO sio,
char *  buf 
)
int GWEN_SyncIo_Http_ParseStatus ( GWEN_SYNCIO sio,
char *  buffer 
)

Definition at line 464 of file syncio_http.c.

References DBG_ERROR, GWEN_DB_FLAGS_OVERWRITE_VARS, GWEN_DB_SetCharValue(), GWEN_DB_SetIntValue(), GWEN_ERROR_INVALID, GWEN_INHERIT_GETDATA, and GWEN_LOGDOMAIN.

Referenced by GWEN_SyncIo_Http_ReadStatus().

Here is the call graph for this function:

Here is the caller graph for this function:

int GWENHYWFAR_CB GWEN_SyncIo_Http_Read ( GWEN_SYNCIO sio,
uint8_t *  buffer,
uint32_t  size 
)
int GWEN_SyncIo_Http_ReadBody ( GWEN_SYNCIO sio,
uint8_t *  buffer,
uint32_t  size 
)

Definition at line 935 of file syncio_http.c.

References DBG_INFO, GWEN_INHERIT_GETDATA, GWEN_LOGDOMAIN, GWEN_SyncIo_AddFlags(), GWEN_SYNCIO_FLAGS_TRANSPARENT, GWEN_SyncIo_GetBaseIo(), GWEN_SyncIo_Http_SetReadIdle(), and GWEN_SyncIo_Read().

Referenced by GWEN_SyncIo_Http_Read().

Here is the call graph for this function:

Here is the caller graph for this function:

int GWEN_SyncIo_Http_ReadChunk ( GWEN_SYNCIO sio,
uint8_t *  buffer,
uint32_t  size 
)

Definition at line 881 of file syncio_http.c.

References DBG_DEBUG, DBG_INFO, GWEN_Buffer_free(), GWEN_Buffer_new(), GWEN_INHERIT_GETDATA, GWEN_LOGDOMAIN, GWEN_SyncIo_AddFlags(), GWEN_SYNCIO_FLAGS_TRANSPARENT, GWEN_SyncIo_GetBaseIo(), GWEN_SyncIo_Http_ReadLine(), and GWEN_SyncIo_Read().

Referenced by GWEN_SyncIo_Http_Read().

Here is the call graph for this function:

Here is the caller graph for this function:

int GWEN_SyncIo_Http_ReadChunkSize ( GWEN_SYNCIO sio)

Definition at line 832 of file syncio_http.c.

References DBG_ERROR, DBG_INFO, GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_Buffer_Reset(), GWEN_ERROR_BAD_DATA, GWEN_INHERIT_GETDATA, GWEN_LOGDOMAIN, GWEN_SyncIo_GetBaseIo(), and GWEN_SyncIo_Http_ReadLine().

Referenced by GWEN_SyncIo_Http_Read().

Here is the call graph for this function:

Here is the caller graph for this function:

int GWEN_SyncIo_Http_ReadCommand ( GWEN_SYNCIO sio)

Definition at line 618 of file syncio_http.c.

References DBG_INFO, GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_INHERIT_GETDATA, GWEN_LOGDOMAIN, GWEN_SyncIo_GetBaseIo(), GWEN_SyncIo_Http_ParseCommand(), and GWEN_SyncIo_Http_ReadLine().

Referenced by GWEN_SyncIo_Http_Read().

Here is the call graph for this function:

Here is the caller graph for this function:

int GWEN_SyncIo_Http_ReadHeader ( GWEN_SYNCIO sio)
int GWEN_SyncIo_Http_ReadLine ( GWEN_SYNCIO sio,
GWEN_BUFFER tbuf 
)
int GWEN_SyncIo_Http_ReadStatus ( GWEN_SYNCIO sio)
int GWEN_SyncIo_Http_RecvBody ( GWEN_SYNCIO sio,
GWEN_BUFFER buf 
)
int GWEN_SyncIo_Http_RecvBodyToSio ( GWEN_SYNCIO sio,
GWEN_SYNCIO sout 
)
void GWEN_SyncIo_Http_SetReadIdle ( GWEN_SYNCIO sio)

Definition at line 157 of file syncio_http.c.

References GWEN_INHERIT_GETDATA.

Referenced by GWEN_SyncIo_Http_Connect(), GWEN_SyncIo_Http_ParseHeader(), GWEN_SyncIo_Http_Read(), and GWEN_SyncIo_Http_ReadBody().

Here is the caller graph for this function:

void GWEN_SyncIo_Http_SetWriteIdle ( GWEN_SYNCIO sio)

Definition at line 1223 of file syncio_http.c.

References GWEN_DB_ClearGroup(), GWEN_INHERIT_GETDATA, and NULL.

Referenced by GWEN_SyncIo_Http_Write(), and GWEN_SyncIo_Http_WriteHeader().

Here is the call graph for this function:

Here is the caller graph for this function:

int GWENHYWFAR_CB GWEN_SyncIo_Http_Write ( GWEN_SYNCIO sio,
const uint8_t *  buffer,
uint32_t  size 
)
int GWEN_SyncIo_Http_WriteChunkSize ( GWEN_SYNCIO sio,
uint32_t  size 
)

Definition at line 1193 of file syncio_http.c.

References DBG_INFO, GWEN_INHERIT_GETDATA, GWEN_LOGDOMAIN, GWEN_SyncIo_AddFlags(), GWEN_SYNCIO_FLAGS_TRANSPARENT, GWEN_SyncIo_GetBaseIo(), and GWEN_SyncIo_WriteForced().

Referenced by GWEN_SyncIo_Http_Write().

Here is the call graph for this function:

Here is the caller graph for this function:

int GWEN_SyncIo_Http_WriteCommand ( GWEN_SYNCIO sio)
int GWEN_SyncIo_Http_WriteHeader ( GWEN_SYNCIO sio)
int GWEN_SyncIo_Http_WriteStatus ( GWEN_SYNCIO sio)