NCBI C++ ToolKit
Classes | Macros | Functions
ncbi_servicep.h File Reference
#include "ncbi_comm.h"
#include "ncbi_server_infop.h"
#include <connect/ncbi_service.h>
+ Include dependency graph for ncbi_servicep.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  SSERV_VTable
 
struct  SSERV_IterTag
 

Macros

#define SERV_IfSuppressed(i)
 
#define SERV_IsActive(i)   ( (i)->time && (i)->rate > 0.0)
 
#define SERV_IsStandby(i)   ( (i)->time && (i)->rate < 0.0)
 
#define SERV_IsReserved(i)   ( !(i)->time && (i)->rate)
 
#define SERV_IsDown(i)   ( !(i)->rate)
 
#define SERV_IsUp(i)   (SERV_IsActive(i) && !SERV_IfSuppressed(i))
 

Functions

ESwitch SERV_DoFastOpens (ESwitch on)
 
SSERV_InfoSERV_GetInfoP (const char *service, TSERV_Type types, unsigned int preferred_host, unsigned short preferred_port, double preference, const SConnNetInfo *net_info, SSERV_InfoCPtr skip[], size_t n_skip, int external, const char *arg, const char *val, HOST_INFO *hinfo)
 
SERV_ITER SERV_OpenP (const char *service, TSERV_Type types, unsigned int preferred_host, unsigned short preferred_port, double preference, const SConnNetInfo *net_info, SSERV_InfoCPtr skip[], size_t n_skip, int external, const char *arg, const char *val)
 
const char * SERV_CurrentName (SERV_ITER iter)
 
int SERV_PenalizeEx (SERV_ITER iter, double fine, TNCBI_Time time)
 
const char * SERV_MapperName (SERV_ITER iter)
 
int SERV_Update (SERV_ITER iter, const char *text, int code)
 
char * SERV_Print (SERV_ITER iter, const SConnNetInfo *net_info, int but_last)
 
char * SERV_ServiceName (const char *service)
 
SConnNetInfoConnNetInfo_CreateInternal (const char *service)
 
SConnNetInfoConnNetInfo_CloneInternal (const SConnNetInfo *info)
 
const char * ConnNetInfo_GetValueInternal (const char *service, const char *param, char *value, size_t value_size, const char *def_value)
 
const char * ConnNetInfo_GetValueService (const char *service, const char *param, char *value, size_t value_size, const char *def_value)
 
void ConnNetInfo_ResetHttpProxyInternal (void)
 
int SERV_IsMapperConfiguredInternal (const char *svc, const char *key)
 
void SERV_InitFirewallPorts (void)
 
int SERV_AddFirewallPort (unsigned short port)
 
int SERV_IsFirewallPort (unsigned short port)
 
void SERV_PrintFirewallPorts (char *buf, size_t bufsize, EFWMode mode)
 
ESERV_Type SERV_GetImplicitServerTypeDefault (void)
 
ESERV_Type SERV_GetImplicitServerTypeInternal (const char *service)
 

Macro Definition Documentation

◆ SERV_IfSuppressed

#define SERV_IfSuppressed (   i)
Value:
( (i)->time == NCBI_TIME_INFINITE || \
(!(i)->time && (i)->rate < 0.0))
#define NCBI_TIME_INFINITE
Definition: ncbi_types.h:147
int i

Definition at line 58 of file ncbi_servicep.h.

◆ SERV_IsActive

#define SERV_IsActive (   i)    ( (i)->time && (i)->rate > 0.0)

Definition at line 60 of file ncbi_servicep.h.

◆ SERV_IsDown

#define SERV_IsDown (   i)    ( !(i)->rate)

Definition at line 63 of file ncbi_servicep.h.

◆ SERV_IsReserved

#define SERV_IsReserved (   i)    ( !(i)->time && (i)->rate)

Definition at line 62 of file ncbi_servicep.h.

◆ SERV_IsStandby

#define SERV_IsStandby (   i)    ( (i)->time && (i)->rate < 0.0)

Definition at line 61 of file ncbi_servicep.h.

◆ SERV_IsUp

#define SERV_IsUp (   i)    (SERV_IsActive(i) && !SERV_IfSuppressed(i))

Definition at line 66 of file ncbi_servicep.h.

Function Documentation

◆ ConnNetInfo_CloneInternal()

SConnNetInfo* ConnNetInfo_CloneInternal ( const SConnNetInfo info)

◆ ConnNetInfo_CreateInternal()

SConnNetInfo* ConnNetInfo_CreateInternal ( const char *  service)

Definition at line 760 of file ncbi_connutil.c.

References assert, CONN_NET_INFO_MAGIC, CONN_PATH_LEN, ConnNetInfo_Boolean(), CORE_LOGF_X, DEF_CONN_ARGS, DEF_CONN_DEBUG_PRINTOUT, DEF_CONN_EXTERNAL, DEF_CONN_FIREWALL, DEF_CONN_HOST, DEF_CONN_HTTP_PROXY_HOST, DEF_CONN_HTTP_PROXY_LEAK, DEF_CONN_HTTP_PROXY_PASS, DEF_CONN_HTTP_PROXY_PORT, DEF_CONN_HTTP_PROXY_SKIP, DEF_CONN_HTTP_PROXY_USER, DEF_CONN_HTTP_PUSH_AUTH, DEF_CONN_HTTP_USER_HEADER, DEF_CONN_HTTP_VERSION, DEF_CONN_LB_DISABLE, DEF_CONN_MAX_TRY, DEF_CONN_PASS, DEF_CONN_PATH, DEF_CONN_PORT, DEF_CONN_REQ_METHOD, DEF_CONN_STATELESS, DEF_CONN_USER, eDebugPrintout_Data, eDebugPrintout_None, eDebugPrintout_Some, eLOG_Error, eLOG_Warning, eReqMethod_Any, eReqMethod_Get, eReqMethod_Post, eURL_Unspec, fProxy_None, g_NcbiDefConnTimeout, info, int, kInfiniteTimeout, len, malloc(), NCBI_HasSpaces(), NCBI_simple_atof(), REG_CONN_ARGS, REG_CONN_DEBUG_PRINTOUT, REG_CONN_EXTERNAL, REG_CONN_FIREWALL, REG_CONN_HOST, REG_CONN_HTTP_PROXY_HOST, REG_CONN_HTTP_PROXY_LEAK, REG_CONN_HTTP_PROXY_PASS, REG_CONN_HTTP_PROXY_PORT, REG_CONN_HTTP_PROXY_SKIP, REG_CONN_HTTP_PROXY_USER, REG_CONN_HTTP_PUSH_AUTH, REG_CONN_HTTP_USER_HEADER, REG_CONN_HTTP_VERSION, REG_CONN_LB_DISABLE, REG_CONN_MAX_TRY, REG_CONN_PASS, REG_CONN_PATH, REG_CONN_PORT, REG_CONN_REQ_METHOD, REG_CONN_STATELESS, REG_CONN_TIMEOUT, REG_CONN_USER, REG_VALUE, str(), strcasecmp, strncasecmp, val, x_DestroyNetInfo(), x_GetReferer(), x_ParseFirewall(), x_SetArgs(), x_SetupSystemHttpProxy(), and x_StrcatCRLF().

Referenced by ConnNetInfo_Create(), NcbiOpenURL(), s_CreateConnector(), s_CreateHttpConnector(), s_HttpConnectorBuilder(), and SERVICE_CreateConnectorEx().

◆ ConnNetInfo_GetValueInternal()

const char* ConnNetInfo_GetValueInternal ( const char *  service,
const char *  param,
char *  value,
size_t  value_size,
const char *  def_value 
)

◆ ConnNetInfo_GetValueService()

const char* ConnNetInfo_GetValueService ( const char *  service,
const char *  param,
char *  value,
size_t  value_size,
const char *  def_value 
)

◆ ConnNetInfo_ResetHttpProxyInternal()

void ConnNetInfo_ResetHttpProxyInternal ( void  )

Definition at line 983 of file ncbi_connutil.c.

References x_SetupSystemHttpProxy().

◆ SERV_AddFirewallPort()

int SERV_AddFirewallPort ( unsigned short  port)

Definition at line 3426 of file ncbi_connutil.c.

References n, s_FWPorts, and SizeOf.

Referenced by CConnTest::CheckFWConnections(), and x_ParseFirewall().

◆ SERV_CurrentName()

const char* SERV_CurrentName ( SERV_ITER  iter)

Definition at line 950 of file ncbi_service.c.

References SSERV_IterTag::last, SSERV_IterTag::name, and SERV_NameOfInfo().

Referenced by s_Feedback().

◆ SERV_DoFastOpens()

ESwitch SERV_DoFastOpens ( ESwitch  on)

Definition at line 1333 of file ncbi_service.c.

References eDefault, and s_Fast.

◆ SERV_GetImplicitServerTypeDefault()

ESERV_Type SERV_GetImplicitServerTypeDefault ( void  )

Definition at line 1313 of file ncbi_service.c.

References fSERV_Http.

◆ SERV_GetImplicitServerTypeInternal()

ESERV_Type SERV_GetImplicitServerTypeInternal ( const char *  service)

Definition at line 1305 of file ncbi_service.c.

Referenced by s_ParseResponse(), and s_Resolve().

◆ SERV_GetInfoP()

SSERV_Info* SERV_GetInfoP ( const char *  service,
TSERV_Type  types,
unsigned int  preferred_host,
unsigned short  preferred_port,
double  preference,
const SConnNetInfo net_info,
SSERV_InfoCPtr  skip[],
size_t  n_skip,
int  external,
const char *  arg,
const char *  val,
HOST_INFO hinfo 
)

◆ SERV_InitFirewallPorts()

void SERV_InitFirewallPorts ( void  )

Definition at line 3420 of file ncbi_connutil.c.

References s_FWPorts.

Referenced by CConnTest::CheckFWConnections().

◆ SERV_IsFirewallPort()

int SERV_IsFirewallPort ( unsigned short  port)

Definition at line 3441 of file ncbi_connutil.c.

References n, s_FWPorts, and SizeOf.

Referenced by s_Open(), and CConnTest::x_GetFirewallConfiguration().

◆ SERV_IsMapperConfiguredInternal()

int SERV_IsMapperConfiguredInternal ( const char *  svc,
const char *  key 
)

◆ SERV_MapperName()

const char* SERV_MapperName ( SERV_ITER  iter)

◆ SERV_OpenP()

SERV_ITER SERV_OpenP ( const char *  service,
TSERV_Type  types,
unsigned int  preferred_host,
unsigned short  preferred_port,
double  preference,
const SConnNetInfo net_info,
SSERV_InfoCPtr  skip[],
size_t  n_skip,
int  external,
const char *  arg,
const char *  val 
)

Definition at line 837 of file ncbi_service.c.

References s_Open(), types, and val.

Referenced by CServiceDiscovery::DiscoverImpl().

◆ SERV_PenalizeEx()

int SERV_PenalizeEx ( SERV_ITER  iter,
double  fine,
TNCBI_Time  time 
)

Definition at line 957 of file ncbi_service.c.

References assert, SSERV_VTable::Feedback, SSERV_IterTag::last, and SSERV_IterTag::op.

Referenced by SERV_Penalize().

◆ SERV_Print()

char* SERV_Print ( SERV_ITER  iter,
const SConnNetInfo net_info,
int  but_last 
)

◆ SERV_PrintFirewallPorts()

void SERV_PrintFirewallPorts ( char *  buf,
size_t  bufsize,
EFWMode  mode 
)

◆ SERV_ServiceName()

char* SERV_ServiceName ( const char *  service)

◆ SERV_Update()

int SERV_Update ( SERV_ITER  iter,
const char *  text,
int  code 
)
Modified on Wed Sep 04 15:05:13 2024 by modify_doxy.py rev. 669887