NCBI C++ ToolKit
Classes | Macros | Typedefs | Enumerations | Functions
ncbi_connutil.h File Reference
#include <connect/ncbi_buffer.h>
#include <connect/ncbi_connection.h>
+ Include dependency graph for ncbi_connutil.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

struct  SConnNetInfo
 
struct  SURLExtra
 Extra URL_ConnectEx() parameters. More...
 

Macros

#define CONN_PORT_FTP   21
 
#define CONN_PORT_SSH   22
 
#define CONN_PORT_SMTP   25
 
#define CONN_PORT_HTTP   80
 
#define CONN_PORT_HTTPS   443
 
#define CONN_USER_LEN   63
 
#define CONN_PASS_LEN   63
 
#define CONN_HOST_LEN   255
 
#define CONN_PATH_LEN   4095 /* including arguments and a fragment */
 
#define DEF_CONN_REG_SECTION   "CONN"
 
#define REG_CONN_REQ_METHOD   "REQ_METHOD"
 
#define DEF_CONN_REQ_METHOD   "ANY"
 
#define REG_CONN_USER   "USER"
 
#define DEF_CONN_USER   ""
 
#define REG_CONN_PASS   "PASS"
 
#define DEF_CONN_PASS   ""
 
#define REG_CONN_HOST   "HOST"
 
#define DEF_CONN_HOST   "www.ncbi.nlm.nih.gov"
 
#define REG_CONN_PORT   "PORT"
 
#define DEF_CONN_PORT   0/*default*/
 
#define REG_CONN_PATH   "PATH"
 
#define DEF_CONN_PATH   "/Service/dispd.cgi"
 
#define REG_CONN_ARGS   "ARGS"
 
#define DEF_CONN_ARGS   ""
 
#define REG_CONN_HTTP_PROXY_HOST   "HTTP_PROXY_HOST"
 
#define DEF_CONN_HTTP_PROXY_HOST   ""
 
#define REG_CONN_HTTP_PROXY_PORT   "HTTP_PROXY_PORT"
 
#define DEF_CONN_HTTP_PROXY_PORT   ""
 
#define REG_CONN_HTTP_PROXY_USER   "HTTP_PROXY_USER"
 
#define DEF_CONN_HTTP_PROXY_USER   ""
 
#define REG_CONN_HTTP_PROXY_PASS   "HTTP_PROXY_PASS"
 
#define DEF_CONN_HTTP_PROXY_PASS   ""
 
#define REG_CONN_HTTP_PROXY_LEAK   "HTTP_PROXY_LEAK"
 
#define DEF_CONN_HTTP_PROXY_LEAK   ""
 
#define REG_CONN_HTTP_PROXY_SKIP   "HTTP_PROXY_SKIP"
 
#define DEF_CONN_HTTP_PROXY_SKIP   ""
 
#define REG_CONN_HTTP_PUSH_AUTH   "HTTP_PUSH_AUTH"
 
#define DEF_CONN_HTTP_PUSH_AUTH   ""
 
#define REG_CONN_TIMEOUT   "TIMEOUT"
 
#define DEF_CONN_TIMEOUT   30.0
 
#define REG_CONN_MAX_TRY   "MAX_TRY"
 
#define DEF_CONN_MAX_TRY   3
 
#define REG_CONN_EXTERNAL   "EXTERNAL"
 
#define DEF_CONN_EXTERNAL   ""
 
#define REG_CONN_FIREWALL   "FIREWALL"
 
#define DEF_CONN_FIREWALL   ""
 
#define REG_CONN_STATELESS   "STATELESS"
 
#define DEF_CONN_STATELESS   ""
 
#define REG_CONN_LB_DISABLE   "LB_DISABLE"
 
#define DEF_CONN_LB_DISABLE   ""
 
#define REG_CONN_HTTP_VERSION   "HTTP_VERSION"
 
#define DEF_CONN_HTTP_VERSION   0
 
#define REG_CONN_DEBUG_PRINTOUT   "DEBUG_PRINTOUT"
 
#define DEF_CONN_DEBUG_PRINTOUT   ""
 
#define REG_CONN_HTTP_USER_HEADER   "HTTP_USER_HEADER"
 
#define DEF_CONN_HTTP_USER_HEADER   ""
 
#define REG_CONN_HTTP_REFERER   "HTTP_REFERER"
 
#define DEF_CONN_HTTP_REFERER   0
 
#define REG_CONN_LOCAL_ENABLE   "LOCAL_ENABLE"
 
#define REG_CONN_LBSMD_DISABLE   "LBSMD_DISABLE"
 
#define REG_CONN_LBDNS_ENABLE   "LBDNS_ENABLE"
 
#define REG_CONN_LINKERD_ENABLE   "LINKERD_ENABLE"
 
#define REG_CONN_NAMERD_ENABLE   "NAMERD_ENABLE"
 
#define REG_CONN_DISPD_DISABLE   "DISPD_DISABLE"
 
#define REG_CONN_IMPLICIT_SERVER_TYPE   "IMPLICIT_SERVER_TYPE"
 
#define REG_CONN_SERVICE_NAME   DEF_CONN_REG_SECTION "_" "SERVICE_NAME"
 
#define REG_CONN_LOCAL_SERVICES   DEF_CONN_REG_SECTION "_" "LOCAL_SERVICES"
 
#define REG_CONN_LOCAL_SERVER   DEF_CONN_REG_SECTION "_" "LOCAL_SERVER"
 
#define REG_CONN_LBDNS_DOMAIN   DEF_CONN_REG_SECTION "_" "LBDNS_DOMAIN"
 
#define REG_CONN_LBDNS_DEBUG   DEF_CONN_REG_SECTION "_" "LBDNS_DEBUG"
 
#define REG_CONN_LBDNS_HOST   DEF_CONN_REG_SECTION "_" "LBDNS_HOST"
 
#define REG_CONN_LBDNS_PORT   DEF_CONN_REG_SECTION "_" "LBDNS_PORT"
 
#define DEF_CONN_LOCAL_IPS   "LOCAL_IPS"
 
#define REG_CONN_LOCAL_IPS   DEF_CONN_REG_SECTION "_" DEF_CONN_LOCAL_IPS
 
#define DEF_CONN_LOCAL_IPS_DISABLE   "NONE"
 
#define ConnNetInfo_PostOverrideUserHeader   ConnNetInfo_OverrideUserHeader
 
#define NCBI_CONNUTIL_DEPRECATED   NCBI_DEPRECATED
 
#define CONN_CONTENT_TYPE_LEN   63
 
#define MAX_CONTENT_TYPE_LEN   (CONN_CONTENT_TYPE_LEN+1)
 

Typedefs

typedef unsigned TReqMethod
 
typedef unsigned EBURLScheme
 
typedef unsigned EBFWMode
 
typedef unsigned EBDebugPrintout
 
typedef unsigned EBProxyType
 

Enumerations

enum  EReqMethod {
  eReqMethod_Any = 0 , eReqMethod_Get , eReqMethod_Post , eReqMethod_Head ,
  eReqMethod_Connect , eReqMethod_v1 = 8 , eReqMethod_Any11 = eReqMethod_v1 | eReqMethod_Any , eReqMethod_Get11 = eReqMethod_v1 | eReqMethod_Get ,
  eReqMethod_Post11 = eReqMethod_v1 | eReqMethod_Post , eReqMethod_Head11 = eReqMethod_v1 | eReqMethod_Head , eReqMethod_Connect11 = eReqMethod_v1 | eReqMethod_Connect , eReqMethod_Put = 16 ,
  eReqMethod_Patch , eReqMethod_Trace , eReqMethod_Delete , eReqMethod_Options
}
 
enum  EURLScheme {
  eURL_Unspec = 0 , eURL_Https , eURL_File , eURL_Http ,
  eURL_Ftp
}
 
enum  EFWMode { eFWMode_Legacy = 0 , eFWMode_Adaptive = 1 , eFWMode_Firewall = 2 , eFWMode_Fallback = 3 }
 
enum  EDebugPrintout { eDebugPrintout_None = 0 , eDebugPrintout_Some , eDebugPrintout_Data }
 
enum  EProxyType { fProxy_None = 0 , fProxy_Http , fProxy_Https }
 
enum  EMIME_Type {
  eMIME_T_Undefined = -1 , eMIME_T_NcbiData = 0 , eMIME_T_Text , eMIME_T_Application ,
  eMIME_T_Unknown
}
 
enum  EMIME_SubType {
  eMIME_Undefined = -1 , eMIME_Dispatch = 0 , eMIME_AsnText , eMIME_AsnBinary ,
  eMIME_Fasta , eMIME_WwwForm , eMIME_Html , eMIME_Plain ,
  eMIME_Xml , eMIME_XmlSoap , eMIME_OctetStream , eMIME_Unknown
}
 
enum  EMIME_Encoding { eENCOD_None = 0 , eENCOD_Url , eENCOD_Unknown }
 

Functions

const char * ConnNetInfo_GetValue (const char *service, const char *param, char *value, size_t value_size, const char *def_value)
 
int ConnNetInfo_Boolean (const char *str)
 
SConnNetInfoConnNetInfo_Create (const char *service)
 
SConnNetInfoConnNetInfo_Clone (const SConnNetInfo *net_info)
 
int ConnNetInfo_SetPath (SConnNetInfo *net_info, const char *path)
 
int ConnNetInfo_AddPath (SConnNetInfo *net_info, const char *path)
 
int ConnNetInfo_SetArgs (SConnNetInfo *net_info, const char *args)
 
int ConnNetInfo_SetFrag (SConnNetInfo *net_info, const char *frag)
 
const char * ConnNetInfo_GetArgs (const SConnNetInfo *net_info)
 
int ConnNetInfo_AppendArg (SConnNetInfo *net_info, const char *arg, const char *val)
 
int ConnNetInfo_PrependArg (SConnNetInfo *net_info, const char *arg, const char *val)
 
int ConnNetInfo_DeleteArg (SConnNetInfo *net_info, const char *arg)
 
void ConnNetInfo_DeleteAllArgs (SConnNetInfo *net_info, const char *args)
 
int ConnNetInfo_PreOverrideArg (SConnNetInfo *net_info, const char *arg, const char *val)
 
int ConnNetInfo_PostOverrideArg (SConnNetInfo *net_info, const char *arg, const char *val)
 
int ConnNetInfo_SetupStandardArgs (SConnNetInfo *net_info, const char *service)
 
int ConnNetInfo_SetUserHeader (SConnNetInfo *net_info, const char *header)
 
int ConnNetInfo_AppendUserHeader (SConnNetInfo *net_info, const char *header)
 
int ConnNetInfo_PrependUserHeader (SConnNetInfo *net_info, const char *header)
 
int ConnNetInfo_OverrideUserHeader (SConnNetInfo *net_info, const char *header)
 
int ConnNetInfo_PreOverrideUserHeader (SConnNetInfo *net_info, const char *header)
 
int ConnNetInfo_ExtendUserHeader (SConnNetInfo *net_info, const char *header)
 
void ConnNetInfo_DeleteUserHeader (SConnNetInfo *net_info, const char *header)
 
int ConnNetInfo_SetTimeout (SConnNetInfo *net_info, const STimeout *timeout)
 
int ConnNetInfo_ParseURL (SConnNetInfo *net_info, const char *url)
 
char * ConnNetInfo_URL (const SConnNetInfo *net_info)
 
void ConnNetInfo_Log (const SConnNetInfo *net_info, ELOG_Level sev, LOG log)
 
void ConnNetInfo_Destroy (SConnNetInfo *net_info)
 
EIO_Status URL_ConnectEx (const char *host, unsigned short port, const char *path, const char *args, TReqMethod req_method, size_t content_length, const STimeout *o_timeout, const STimeout *rw_timeout, const char *user_header, SURLExtra *extra, TSOCK_Flags flags, SOCK *sock)
 
SOCK URL_Connect (const char *host, unsigned short port, const char *path, const char *args, EReqMethod req_method, size_t content_length, const STimeout *o_timeout, const STimeout *rw_timeout, const char *user_header, int encode_args, TSOCK_Flags flags)
 
EIO_Status CONN_StripToPattern (CONN conn, const void *pattern, size_t pattern_size, BUF *discard, size_t *n_discarded)
 Discard all input data before (and including) the first occurrence of a "pattern". More...
 
EIO_Status SOCK_StripToPattern (SOCK sock, const void *pattern, size_t pattern_size, BUF *discard, size_t *n_discarded)
 
EIO_Status BUF_StripToPattern (BUF buffer, const void *pattern, size_t pattern_size, BUF *discard, size_t *n_discarded)
 
void URL_Encode (const void *src_buf, size_t src_size, size_t *src_read, void *dst_buf, size_t dst_size, size_t *dst_written)
 
void URL_EncodeEx (const void *src_buf, size_t src_size, size_t *src_read, void *dst_buf, size_t dst_size, size_t *dst_written, const char *allow_symbols)
 
int URL_Decode (const void *src_buf, size_t src_size, size_t *src_read, void *dst_buf, size_t dst_size, size_t *dst_written)
 
int URL_DecodeEx (const void *src_buf, size_t src_size, size_t *src_read, void *dst_buf, size_t dst_size, size_t *dst_written, const char *allow_symbols)
 
char * MIME_ComposeContentTypeEx (EMIME_Type type, EMIME_SubType subtype, EMIME_Encoding encoding, char *buf, size_t bufsize)
 
int MIME_ParseContentTypeEx (const char *str, EMIME_Type *type, EMIME_SubType *subtype, EMIME_Encoding *encoding)
 

Macro Definition Documentation

◆ CONN_HOST_LEN

#define CONN_HOST_LEN   255

Definition at line 101 of file ncbi_connutil.h.

◆ CONN_PASS_LEN

#define CONN_PASS_LEN   63

Definition at line 100 of file ncbi_connutil.h.

◆ CONN_PATH_LEN

#define CONN_PATH_LEN   4095 /* including arguments and a fragment */

Definition at line 102 of file ncbi_connutil.h.

◆ CONN_PORT_FTP

#define CONN_PORT_FTP   21

Definition at line 92 of file ncbi_connutil.h.

◆ CONN_PORT_HTTP

#define CONN_PORT_HTTP   80

Definition at line 95 of file ncbi_connutil.h.

◆ CONN_PORT_HTTPS

#define CONN_PORT_HTTPS   443

Definition at line 96 of file ncbi_connutil.h.

◆ CONN_PORT_SMTP

#define CONN_PORT_SMTP   25

Definition at line 94 of file ncbi_connutil.h.

◆ CONN_PORT_SSH

#define CONN_PORT_SSH   22

Definition at line 93 of file ncbi_connutil.h.

◆ CONN_USER_LEN

#define CONN_USER_LEN   63

Definition at line 99 of file ncbi_connutil.h.

Modified on Sat Apr 20 12:20:47 2024 by modify_doxy.py rev. 669887