gwenhywfar  5.2.0
Macros | Typedefs
httpsession.h File Reference
#include <gwenhywfar/inherit.h>
#include <gwenhywfar/url.h>
#include <gwenhywfar/buffer.h>
#include <gwenhywfar/syncio.h>
#include <gwenhywfar/inetsocket.h>

Go to the source code of this file.

Macros

#define GWEN_HTTP_SESSION_FLAGS_FORCE_SSL3   0x00000001 /* deprecated, will be removed in a future release */
 
#define GWEN_HTTP_SESSION_FLAGS_NO_CACHE   0x00000002
 
#define GWEN_HTTP_SESSION_FLAGS_PASSIVE   0x00000020 /* server session */
 
#define GWEN_HTTP_SESSION_FLAGS_TLS_FORCE_UNSAFE_CIPHERS   0x00000008 /* deprecated, will be removed in a future release */
 
#define GWEN_HTTP_SESSION_FLAGS_TLS_IGN_PREMATURE_CLOSE   0x00000010
 
#define GWEN_HTTP_SESSION_FLAGS_TLS_ONLY_SAFE_CIPHERS   0x00000004 /* deprecated, will be removed in a future release */
 

Typedefs

typedef struct GWEN_HTTP_SESSION GWEN_HTTP_SESSION
 

Functions

Contructor/Destructor
GWENHYWFAR_API GWEN_HTTP_SESSIONGWEN_HttpSession_new (const char *url, const char *defaultProto, int defaultPort)
 
GWENHYWFAR_API GWEN_HTTP_SESSIONGWEN_HttpSession_fromSocketPassive (GWEN_SOCKET *sk, const char *proto, int port)
 
GWENHYWFAR_API GWEN_HTTP_SESSIONGWEN_HttpSession_fromSyncIoPassive (GWEN_SYNCIO *sio)
 
GWENHYWFAR_API void GWEN_HttpSession_Attach (GWEN_HTTP_SESSION *sess)
 
GWENHYWFAR_API void GWEN_HttpSession_free (GWEN_HTTP_SESSION *sess)
 
HTTP Setup Functions

Functions of this groups should be called before GWEN_HttpSession_Init because the information conveyed via these functions is needed upon initialisation.

GWENHYWFAR_API uint32_t GWEN_HttpSession_GetFlags (const GWEN_HTTP_SESSION *sess)
 
GWENHYWFAR_API void GWEN_HttpSession_SetFlags (GWEN_HTTP_SESSION *sess, uint32_t fl)
 
GWENHYWFAR_API void GWEN_HttpSession_AddFlags (GWEN_HTTP_SESSION *sess, uint32_t fl)
 
GWENHYWFAR_API void GWEN_HttpSession_SubFlags (GWEN_HTTP_SESSION *sess, uint32_t fl)
 
GWENHYWFAR_API const char * GWEN_HttpSession_GetHttpUserAgent (const GWEN_HTTP_SESSION *sess)
 
GWENHYWFAR_API void GWEN_HttpSession_SetHttpUserAgent (GWEN_HTTP_SESSION *sess, const char *s)
 
GWENHYWFAR_API const char * GWEN_HttpSession_GetHttpContentType (const GWEN_HTTP_SESSION *sess)
 
GWENHYWFAR_API void GWEN_HttpSession_SetHttpContentType (GWEN_HTTP_SESSION *sess, const char *s)
 
GWENHYWFAR_API int GWEN_HttpSession_GetHttpVMajor (const GWEN_HTTP_SESSION *sess)
 
GWENHYWFAR_API void GWEN_HttpSession_SetHttpVMajor (GWEN_HTTP_SESSION *sess, int i)
 
GWENHYWFAR_API int GWEN_HttpSession_GetHttpVMinor (const GWEN_HTTP_SESSION *sess)
 
GWENHYWFAR_API void GWEN_HttpSession_SetHttpVMinor (GWEN_HTTP_SESSION *sess, int i)
 
Initialisation and Deinitialisation
GWENHYWFAR_API int GWEN_HttpSession_Init (GWEN_HTTP_SESSION *sess)
 
GWENHYWFAR_API int GWEN_HttpSession_Fini (GWEN_HTTP_SESSION *sess)
 
Client: Sending and Receiving
GWENHYWFAR_API int GWEN_HttpSession_SendPacket (GWEN_HTTP_SESSION *sess, const char *httpCommand, const uint8_t *buf, uint32_t blen)
 
GWENHYWFAR_API int GWEN_HttpSession_RecvPacket (GWEN_HTTP_SESSION *sess, GWEN_BUFFER *buf)
 
GWENHYWFAR_API int GWEN_HttpSession_RecvPacketToFile (GWEN_HTTP_SESSION *sess, const char *fname)
 
GWENHYWFAR_API int GWEN_HttpSession_ConnectionTest (GWEN_HTTP_SESSION *sess)
 
Server: Sending and Receiving
GWENHYWFAR_API int GWEN_HttpSession_RecvCommand (GWEN_HTTP_SESSION *sess, GWEN_DB_NODE *dbCommandAndHeader, GWEN_BUFFER *buf)
 
GWENHYWFAR_API int GWEN_HttpSession_SendStatus (GWEN_HTTP_SESSION *sess, int resultCode, const char *resultText, const uint8_t *buf, uint32_t blen)
 

SyncIO Initialisation

After creating a connection layer (consisting of a chain of GWEN_SYNCIO's) this callback is called. AqBanking uses it to set the TLS-cert-checking callback for the TLS syncio part (GWEN_SyncIo_Tls_SetCheckCertFn), so whenever a TLS connection is established and a certificate received, that function is called.

typedef int GWENHYWFAR_CB(* GWEN_HTTPSESSION_INITSYNCIO_FN) (GWEN_HTTP_SESSION *sess, GWEN_SYNCIO *sio)
 
GWENHYWFAR_API GWEN_HTTPSESSION_INITSYNCIO_FN GWEN_HttpSession_SetInitSyncIoFn (GWEN_HTTP_SESSION *sess, GWEN_HTTPSESSION_INITSYNCIO_FN f)
 

Macro Definition Documentation

◆ GWEN_HTTP_SESSION_FLAGS_FORCE_SSL3

#define GWEN_HTTP_SESSION_FLAGS_FORCE_SSL3   0x00000001 /* deprecated, will be removed in a future release */

This flag forces SSLv3 connections when in HTTPS mode.

Definition at line 39 of file httpsession.h.

◆ GWEN_HTTP_SESSION_FLAGS_NO_CACHE

#define GWEN_HTTP_SESSION_FLAGS_NO_CACHE   0x00000002

Definition at line 41 of file httpsession.h.

◆ GWEN_HTTP_SESSION_FLAGS_PASSIVE

#define GWEN_HTTP_SESSION_FLAGS_PASSIVE   0x00000020 /* server session */

Definition at line 49 of file httpsession.h.

◆ GWEN_HTTP_SESSION_FLAGS_TLS_FORCE_UNSAFE_CIPHERS

#define GWEN_HTTP_SESSION_FLAGS_TLS_FORCE_UNSAFE_CIPHERS   0x00000008 /* deprecated, will be removed in a future release */

Definition at line 44 of file httpsession.h.

◆ GWEN_HTTP_SESSION_FLAGS_TLS_IGN_PREMATURE_CLOSE

#define GWEN_HTTP_SESSION_FLAGS_TLS_IGN_PREMATURE_CLOSE   0x00000010

Definition at line 47 of file httpsession.h.

◆ GWEN_HTTP_SESSION_FLAGS_TLS_ONLY_SAFE_CIPHERS

#define GWEN_HTTP_SESSION_FLAGS_TLS_ONLY_SAFE_CIPHERS   0x00000004 /* deprecated, will be removed in a future release */

Definition at line 43 of file httpsession.h.

Typedef Documentation

◆ GWEN_HTTP_SESSION

Definition at line 21 of file httpsession.h.