Collaboration diagram for Utility Functions:
|
Classes | |
| struct | SConnNetInfo |
| struct | SLOG_Handler |
| Message and miscellaneous data to pass to log post callback FLOG_Handler. More... | |
| class | CConnIniter |
| Helper hook-up class that installs default logging/registry/locking (but only if they have not yet been installed explicitly by user). More... | |
| struct | STimeoutTag |
| Timeout structure. More... | |
Defines | |
| #define | DEF_CONN_REG_SECTION "CONN" |
| #define | REG_CONN_SCHEME "SCHEME" |
| #define | DEF_CONN_SCHEME 0 |
| #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 |
| #define | REG_CONN_PATH "PATH" |
| #define | DEF_CONN_PATH "/Service/dispd.cgi" |
| #define | REG_CONN_ARGS "ARGS" |
| #define | DEF_CONN_ARGS "" |
| #define | REG_CONN_REQ_METHOD "REQ_METHOD" |
| #define | DEF_CONN_REQ_METHOD "ANY" |
| #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_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_PROXY_HOST "PROXY_HOST" |
| #define | DEF_CONN_PROXY_HOST "" |
| #define | REG_CONN_DEBUG_PRINTOUT "DEBUG_PRINTOUT" |
| #define | DEF_CONN_DEBUG_PRINTOUT "" |
| #define | REG_CONN_STATELESS "STATELESS" |
| #define | DEF_CONN_STATELESS "" |
| #define | REG_CONN_FIREWALL "FIREWALL" |
| #define | DEF_CONN_FIREWALL "" |
| #define | REG_CONN_LB_DISABLE "LB_DISABLE" |
| #define | DEF_CONN_LB_DISABLE "" |
| #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_SERVICE_NAME "SERVICE_NAME" |
| #define | REG_CONN_LOCAL_ENABLE "LOCAL_ENABLE" |
| #define | REG_CONN_LBSMD_DISABLE "LBSMD_DISABLE" |
| #define | REG_CONN_DISPD_DISABLE "DISPD_DISABLE" |
| #define | REG_CONN_LOCAL_SERVICES "LOCAL_SERVICES" |
| #define | REG_CONN_LOCAL_SERVER DEF_CONN_REG_SECTION "_LOCAL_SERVER" |
| #define | MAX_CONTENT_TYPE_LEN 64 |
| #define | NCBI_CONNUTIL_DEPRECATED |
| #define | MT_LOCK_Do(lk, how) (lk ? MT_LOCK_DoInternal(lk, how) : -1) |
| Call "lk->handler(lk->user_data, how)". | |
| #define | kDefaultTimeout ((const STimeout*)(-1)) |
| #define | kInfiniteTimeout ((const STimeout*)( 0)) |
| #define | NCBI_TIME_INFINITE ((TNCBI_Time)(-1)) |
| #define | LOG_WRITE(lg, code, subcode, level, message) |
| Auxiliary plain macros to write message (maybe, with raw data) to the log. | |
| #define | LOG_DATA(lg, code, subcode, level, data, size, message) |
| #define | THIS_FILE __FILE__ |
| Defaults for the THIS_FILE and THIS_MODULE macros (used by LOG_WRITE). | |
| #define | THIS_MODULE 0 |
| #define | fLOG_Short fLOG_Level |
| #define | fLOG_Full (fLOG_Level | fLOG_Module | fLOG_FileLine) |
| #define | NCBI_C_DEFINE_ERRCODE_X(name, err_code, max_err_subcode) |
| Defines global error code name with given value (err_code). | |
| #define | NCBI_C_CONCAT_IDENTIFIER(prefix, postfix) prefix##postfix |
| Makes one identifier from 2 parts. | |
| #define | NCBI_C_ERRCODE_X_NAME(name) NCBI_C_CONCAT_IDENTIFIER(eErrCodeX_, name) |
| Returns value of error code by its name defined by NCBI_DEFINE_ERRCODE_X. | |
| #define | NCBI_C_ERRCODE_X NCBI_C_ERRCODE_X_NAME(NCBI_USE_ERRCODE_X) |
| Returns currently set default error code. | |
Typedefs | |
| typedef MT_LOCK_tag * | MT_LOCK |
| typedef int(* | FMT_LOCK_Handler )(void *user_data, EMT_Lock how) |
| MT locking callback (operates like a [recursive] mutex or RW-lock). | |
| typedef void(* | FMT_LOCK_Cleanup )(void *user_data) |
| MT lock cleanup callback. | |
| typedef LOG_tag * | LOG |
| typedef void(* | FLOG_Handler )(void *user_data, SLOG_Handler *call_data) |
| Log post callback. | |
| typedef void(* | FLOG_Cleanup )(void *user_data) |
| Log cleanup callback. | |
| typedef REG_tag * | REG |
| typedef void(* | FREG_Get )(void *user_data, const char *section, const char *name, char *value, size_t value_size) |
| Registry getter callback. | |
| typedef int(* | FREG_Set )(void *user_data, const char *section, const char *name, const char *value, EREG_Storage storage) |
| Registry setter callback. | |
| typedef void(* | FREG_Cleanup )(void *user_data) |
| Registry cleanup callback. | |
| typedef unsigned int | FConnectInitFlags |
| typedef STimeoutTag | STimeout |
| Timeout structure. | |
| typedef unsigned int | TNCBI_Size |
| Fixed size analogs of size_t and time_t (mainly for IPC). | |
| typedef unsigned int | TNCBI_Time |
| typedef unsigned int | TLOG_FormatFlags |
| binary OR of "ELOG_FormatFlags" | |
Enumerations | |
| enum | EURLScheme { eURL_Unspec = 0, eURL_Https, eURL_Http, eURL_File, eURL_Ftp } |
| enum | EReqMethod { eReqMethod_Any = 0, eReqMethod_Post, eReqMethod_Get } |
| enum | EDebugPrintout { eDebugPrintout_None = 0, eDebugPrintout_Some, eDebugPrintout_Data } |
| 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 } |
| enum | EIO_ReadMethod { eIO_ReadPlain, eIO_ReadPeek, eIO_ReadPersist, eIO_Plain = eIO_ReadPlain, eIO_Peek = eIO_ReadPeek, eIO_Persist = eIO_ReadPersist } |
| I/O read method. More... | |
| enum | EIO_WriteMethod { eIO_WritePlain, eIO_WritePersist, eIO_WriteOutOfBand } |
| I/O write method. More... | |
| enum | EIO_Event { eIO_Open = 0x0, eIO_Read = 0x1, eIO_Write = 0x2, eIO_ReadWrite = 0x3, eIO_Close = 0x4 } |
| I/O event (or direction). More... | |
| enum | EIO_Status { eIO_Success = 0, eIO_Timeout, eIO_Closed, eIO_Interrupt, eIO_InvalidArg, eIO_NotSupported, eIO_Unknown } |
| I/O status. More... | |
| enum | EMT_Lock { eMT_Lock, eMT_LockRead, eMT_Unlock, eMT_TryLock, eMT_TryLockRead } |
| Set the lock/unlock callback function and its data for MT critical section. More... | |
| enum | ELOG_Level { eLOG_Trace = 0, eLOG_Note, eLOG_Warning, eLOG_Error, eLOG_Critical, eLOG_Fatal } |
| Log severity level. More... | |
| enum | EREG_Storage { eREG_Transient = 0, eREG_Persistent } |
| Transient/Persistent storage. More... | |
| enum | EConnectInitFlags { eConnectInit_OwnNothing = 0, eConnectInit_OwnRegistry = 0x01, eConnectInit_OwnLock = 0x02 } |
| enum | ESwitch { eOff = 0, eOn, eDefault } |
| Aux. More... | |
| enum | ELOG_Format { fLOG_Default = 0x0, fLOG_Level = 0x1, fLOG_Module = 0x2, fLOG_FileLine = 0x4, fLOG_DateTime = 0x8, fLOG_FullOctal = 0x2000, fLOG_OmitNoteLevel = 0x4000, fLOG_None = 0x8000 } |
| LOG formatting flags: what parts of the message to actually appear. More... | |
Functions | |
| const char * | ConnNetInfo_GetValue (const char *service, const char *param, char *value, size_t value_size, const char *def_value) |
| SConnNetInfo * | ConnNetInfo_Create (const char *service) |
| int | ConnNetInfo_AdjustForHttpProxy (SConnNetInfo *info) |
| SConnNetInfo * | ConnNetInfo_Clone (const SConnNetInfo *info) |
| int | ConnNetInfo_AppendArg (SConnNetInfo *info, const char *arg, const char *val) |
| int | ConnNetInfo_PrependArg (SConnNetInfo *info, const char *arg, const char *val) |
| void | ConnNetInfo_DeleteArg (SConnNetInfo *info, const char *arg) |
| void | ConnNetInfo_DeleteAllArgs (SConnNetInfo *info, const char *args) |
| int | ConnNetInfo_PreOverrideArg (SConnNetInfo *info, const char *arg, const char *val) |
| int | ConnNetInfo_PostOverrideArg (SConnNetInfo *info, const char *arg, const char *val) |
| int | ConnNetInfo_SetUserHeader (SConnNetInfo *info, const char *header) |
| int | ConnNetInfo_AppendUserHeader (SConnNetInfo *info, const char *header) |
| int | ConnNetInfo_OverrideUserHeader (SConnNetInfo *info, const char *header) |
| int | ConnNetInfo_ExtendUserHeader (SConnNetInfo *info, const char *header) |
| void | ConnNetInfo_DeleteUserHeader (SConnNetInfo *info, const char *hdr) |
| int | ConnNetInfo_ParseURL (SConnNetInfo *info, const char *url) |
| int | ConnNetInfo_SetupStandardArgs (SConnNetInfo *info, const char *service) |
| void | ConnNetInfo_Log (const SConnNetInfo *info, LOG log) |
| char * | ConnNetInfo_URL (const SConnNetInfo *info) |
| void | ConnNetInfo_Destroy (SConnNetInfo *info) |
| EIO_Status | URL_ConnectEx (const char *host, unsigned short port, const char *path, const char *args, EReqMethod req_method, size_t content_length, const STimeout *c_timeout, const STimeout *rw_timeout, const char *user_header, int encode_args, 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 *c_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 *buf, size_t *n_discarded) |
| EIO_Status | SOCK_StripToPattern (SOCK sock, const void *pattern, size_t pattern_size, BUF *buf, size_t *n_discarded) |
| EIO_Status | BUF_StripToPattern (BUF buffer, const void *pattern, size_t pattern_size, BUF *buf, 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) |
| 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 buflen) |
| int | MIME_ParseContentTypeEx (const char *str, EMIME_Type *type, EMIME_SubType *subtype, EMIME_Encoding *encoding) |
| char * | MIME_ComposeContentType (EMIME_SubType subtype, EMIME_Encoding encoding, char *buf, size_t buflen) |
| int | MIME_ParseContentType (const char *str, EMIME_SubType *subtype, EMIME_Encoding *encoding) |
| const char * | IO_StatusStr (EIO_Status status) |
| Get the text form of an enum status value. | |
| MT_LOCK | MT_LOCK_Create (void *user_data, FMT_LOCK_Handler handler, FMT_LOCK_Cleanup cleanup) |
| Create new MT lock (with an internal reference counter set to 1). | |
| MT_LOCK | MT_LOCK_AddRef (MT_LOCK lk) |
| Increment internal reference counter by 1, then return "lk". | |
| MT_LOCK | MT_LOCK_Delete (MT_LOCK lk) |
| Decrement internal reference counter by 1, and if it reaches 0, then destroy the handle, call "lk->cleanup(lk->user_data)", and return NULL; otherwise (if the reference counter is still > 0), return "lk". | |
| int | MT_LOCK_DoInternal (MT_LOCK lk, EMT_Lock how) |
| const char * | LOG_LevelStr (ELOG_Level level) |
| Obtain verbal representation of an enum level value. | |
| LOG | LOG_Create (void *user_data, FLOG_Handler handler, FLOG_Cleanup cleanup, MT_LOCK mt_lock) |
| Create new LOG (with an internal reference counter set to 1). | |
| LOG | LOG_Reset (LOG lg, void *user_data, FLOG_Handler handler, FLOG_Cleanup cleanup) |
| Reset the "lg" to use the new "user_data", "handler" and "cleanup". | |
| LOG | LOG_AddRef (LOG lg) |
| Increment internal reference counter by 1, then return "lg". | |
| LOG | LOG_Delete (LOG lg) |
| Decrement internal reference counter by 1, and if it reaches 0, then call "lg->cleanup(lg->user_data)", destroy the handle, and return NULL; otherwise (if reference counter is still > 0), return "lg". | |
| void | LOG_WriteInternal (LOG lg, SLOG_Handler *call_data) |
| Write message (perhaps with raw data attached) to the log by calling "lg->handler(lg->user_data, call_data)". | |
| void | LOG_Write (LOG lg, int code, int subcode, ELOG_Level level, const char *module, const char *file, int line, const char *message, const void *raw_data, size_t raw_size) |
| Write message (perhaps with raw data attached) to the log by calling LOG_WriteInternal() upon filling up SLOG_Handler data from parameters. | |
| REG | REG_Create (void *user_data, FREG_Get get, FREG_Set set, FREG_Cleanup cleanup, MT_LOCK mt_lock) |
| Create new registry (with an internal reference counter set to 1). | |
| void | REG_Reset (REG rg, void *user_data, FREG_Get get, FREG_Set set, FREG_Cleanup cleanup, int do_cleanup) |
| Reset the registry handle to use the new "user_data", "set", "get", and "cleanup". | |
| REG | REG_AddRef (REG rg) |
| Increment internal reference counter by 1, then return "rg". | |
| REG | REG_Delete (REG rg) |
| Decrement internal referecne counter by 1, and if it reaches 0, then call "rg->cleanup(rg->user_data)", destroy the handle, and return NULL; otherwise (if the reference counter is still > 0), return "rg". | |
| const char * | REG_Get (REG rg, const char *section, const char *name, char *value, size_t value_size, const char *def_value) |
| Copy the registry value stored in "section" under name "name" to buffer "value"; if the entry is found in both transient and persistent storages, then copy the one from the transient storage. | |
| int | REG_Set (REG rg, const char *section, const char *name, const char *value, EREG_Storage storage) |
| Store the "value" to the registry section "section" under name "name", and according with "storage". | |
| REG | REG_cxx2c (IRWRegistry *reg, bool pass_ownership=false) |
| NB: now that registries are CObjects, any we "own" will be deleted if and only if nothing else still holds a reference to them. | |
| LOG | LOG_cxx2c (void) |
| MT_LOCK | MT_LOCK_cxx2c (CRWLock *lock=0, bool pass_ownership=false) |
| void | CONNECT_Init (IRWRegistry *reg=0, CRWLock *lock=0, FConnectInitFlags flag=eConnectInit_OwnNothing) |
| const STimeout * | g_CTimeoutToSTimeout (const CTimeout &cto, STimeout &sto) |
| Convert CTimeout to STimeout. | |
| CTimeout | g_STimeoutToCTimeout (const STimeout *sto) |
| Convert STimeout to CTimeout. | |
| unsigned long | NcbiTimeoutToMs (const STimeout *timeout) |
| STimeout * | NcbiMsToTimeout (STimeout *timeout, unsigned long ms) |
| void | CORE_SetLOCK (MT_LOCK lk) |
| Set the MT critical section lock/unlock handler -- to be used by the core internals for protection of internal static variables and other MT-sensitive code from being accessed/changed by several threads simultaneously. | |
| MT_LOCK | CORE_GetLOCK (void) |
| void | CORE_SetLOG (LOG lg) |
| Set the log handle (no logging if "lg" is passed zero) -- to be used by the core internals. | |
| LOG | CORE_GetLOG (void) |
| Get the log handle which is be used by the core internals. | |
| void | CORE_SetLOGFILE_Ex (FILE *fp, ELOG_Level cut_off, int auto_close) |
| Standard logging to the specified file stream. | |
| void | CORE_SetLOGFILE (FILE *fp, int auto_close) |
| Same as CORE_SetLOGFILE_Ex() with last parameter passed as 0 (all messages pass). | |
| int | CORE_SetLOGFILE_NAME_Ex (const char *filename, ELOG_Level cut_off) |
| Same as CORE_SetLOGFILE_Ex(fopen(filename, "a"), cut_off, TRUE). | |
| int | CORE_SetLOGFILE_NAME (const char *filename) |
| Same as CORE_SetLOGFILE_NAME_Ex with last parameter passed as 0 (all messages pass). | |
| TLOG_FormatFlags | CORE_SetLOGFormatFlags (TLOG_FormatFlags) |
| char * | LOG_ComposeMessage (const SLOG_Handler *call_data, TLOG_FormatFlags format_flags) |
| Compose message using the "call_data" info. | |
| void | LOG_ToFILE_Ex (LOG lg, FILE *fp, ELOG_Level cut_off, int auto_close) |
| LOG_Reset specialized to log to a "FILE*" stream using LOG_ComposeMessage. | |
| void | LOG_ToFILE (LOG lg, FILE *fp, int auto_close) |
| Same as LOG_ToFILEx with "cut_off" parameter passed as 0 (all messages pass). | |
| const char * | NcbiMessagePlusError (int *dynamic, const char *message, int error, const char *descr) |
| Add current "error" (and maybe its description) to the message: <message>[ {error=[[<error>][,]][<descr>]}]. | |
| void | CORE_SetREG (REG rg) |
| Set the registry (no registry if "rg" is passed zero) -- to be used by the core internals. | |
| REG | CORE_GetREG (void) |
| Get the registry previously set by CORE_SetREG(). | |
| const char * | CORE_GetPlatform (void) |
| const char * | CORE_GetUsername (char *buf, size_t bufsize) |
| Obtain and store current user's name in the buffer provided. | |
| size_t | CORE_GetVMPageSize (void) |
| Obtain virtual memory page size. | |
| unsigned int | CRC32_Update (unsigned int checksum, const void *ptr, size_t count) |
| Calculate/Update CRC32. | |
| int | UTIL_MatchesMaskEx (const char *name, const char *mask, int ignore_case) |
| int | UTIL_MatchesMask (const char *name, const char *mask) |
| Same as UTIL_MatchesMaskEx(name, mask, 1). | |
| char * | UTIL_NcbiLocalHostName (char *hostname) |
| Cut off well-known NCBI domain suffix out of the passed "hostname". | |
| size_t | UTIL_PrintableStringSize (const char *data, size_t size) |
| Calculate size of buffer needed to store printable representation of the block of data of the specified size (or, if size is 0, strlen(data)). | |
| char * | UTIL_PrintableString (const char *data, size_t size, char *buf, int full) |
| Create printable representation of the block of data of the specified size (or, if size is 0, strlen(data), and return buffer pointer past the last stored character (non ''-terminated). | |
|
|
Definition at line 175 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 196 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 202 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 166 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 187 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 190 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 211 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 208 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 205 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 184 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 163 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 172 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 169 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 193 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 154 of file ncbi_connutil.h. Referenced by ConnNetInfo_GetValue(), CDebugArgs::ExtractAlgorithmOptions(), and GetAsnDataViaHTTP(). |
|
|
Definition at line 178 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 157 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 199 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 181 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 160 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 229 of file ncbi_util.h. Referenced by LOG_ComposeMessage(). |
|
|
Definition at line 228 of file ncbi_util.h. Referenced by LOG_ComposeMessage(). |
|
|
|
Definition at line 75 of file ncbi_types.h. Referenced by g_CTimeoutToSTimeout(), g_STimeoutToCTimeout(), CThreadedServer::Run(), CServer::Run(), s_SetTimeout(), CServer_ConnectionPool::SPerConnInfo::UpdateExpiration(), and CRPCClient< CGBenchServiceRequest, CGBenchServiceReply >::x_IsSpecial(). |
|
|
Value: LOG_Write(lg, code, subcode, level, THIS_MODULE, THIS_FILE, __LINE__, \ message, data, size) Definition at line 119 of file ncbi_util.h. |
|
|
Value: LOG_Write(lg, code, subcode, level, THIS_MODULE, THIS_FILE, __LINE__, \ message, 0, 0)
Definition at line 110 of file ncbi_util.h. Referenced by ConnNetInfo_Log(). |
|
|
Definition at line 669 of file ncbi_connutil.h. Referenced by MIME_ComposeContentTypeEx(), s_AdjustNetParams(), s_IsContentTypeDefined(), and SERV_WriteInfo(). |
|
|
Call "lk->handler(lk->user_data, how)".
Definition at line 267 of file ncbi_core.h. Referenced by Blast_DiagnosticsUpdate(), and BlastHSPStreamWrite(). |
|
|
Makes one identifier from 2 parts.
Definition at line 330 of file ncbi_util.h. |
|
|
Value: enum enum##name { \ eErrCodeX_##name = err_code \ /* automatic subcode checking is not implemented in C code */ \ }
Definition at line 322 of file ncbi_util.h. |
|
|
Returns currently set default error code. Default error code is set by definition of NCBI_USE_ERRCODE_X with name of error code as its value.
Definition at line 344 of file ncbi_util.h. Referenced by ConnNetInfo_Log(). |
|
|
Returns value of error code by its name defined by NCBI_DEFINE_ERRCODE_X.
Definition at line 336 of file ncbi_util.h. |
|
|
Definition at line 704 of file ncbi_connutil.h. |
|
|
Definition at line 116 of file ncbi_types.h. Referenced by SNetServiceImpl::DiscoverServers(), s_Open(), s_SkipSkip(), and s_Update(). |
|
|
Definition at line 174 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 195 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(), and GetAsnDataViaHTTP(). |
|
|
Definition at line 217 of file ncbi_connutil.h. |
|
|
Definition at line 201 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 165 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 186 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 189 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 210 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 207 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 204 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 216 of file ncbi_connutil.h. |
|
|
Definition at line 215 of file ncbi_connutil.h. |
|
|
Definition at line 221 of file ncbi_connutil.h. Referenced by s_LoadSingleService(). |
|
|
Definition at line 220 of file ncbi_connutil.h. Referenced by s_LoadServices(). |
|
|
Definition at line 183 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 162 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 171 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 168 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 192 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 177 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(), and GetAsnDataViaHTTP(). |
|
|
Definition at line 156 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 214 of file ncbi_connutil.h. Referenced by CDebugArgs::ExtractAlgorithmOptions(). |
|
|
Definition at line 198 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 180 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Definition at line 159 of file ncbi_connutil.h. Referenced by ConnNetInfo_Create(). |
|
|
Defaults for the THIS_FILE and THIS_MODULE macros (used by LOG_WRITE).
Definition at line 127 of file ncbi_util.h. |
|
|
Definition at line 131 of file ncbi_util.h. |
|
|
Definition at line 76 of file ncbi_core_cxx.hpp. |
|
|
Log cleanup callback.
Definition at line 368 of file ncbi_core.h. |
|
|
Log post callback.
Definition at line 355 of file ncbi_core.h. |
|
|
MT lock cleanup callback.
Definition at line 213 of file ncbi_core.h. |
|
|
MT locking callback (operates like a [recursive] mutex or RW-lock).
Definition at line 202 of file ncbi_core.h. |
|
|
Registry cleanup callback.
Definition at line 583 of file ncbi_core.h. |
|
|
Registry getter callback. Copy registry value stored in "section" under name "name" to buffer "value". Look for the matching entry first in the transient storage, and then in the persistent storage. Do not modify the "value" (leave it "as is", i.e. default) if the requested entry is not found in the registry.
Definition at line 541 of file ncbi_core.h. |
|
|
Registry setter callback. Store the "value" to the registry section "section" under name "name", and according to "storage".
Definition at line 568 of file ncbi_core.h. |
|
|
Definition at line 282 of file ncbi_core.h. |
|
|
Definition at line 168 of file ncbi_core.h. |
|
|
Definition at line 505 of file ncbi_core.h. |
|
|
Timeout structure.
|
|
|
binary OR of "ELOG_FormatFlags"
Definition at line 227 of file ncbi_util.h. |
|
|
Fixed size analogs of size_t and time_t (mainly for IPC).
Definition at line 113 of file ncbi_types.h. |
|
|
Definition at line 114 of file ncbi_types.h. |
|
|
Definition at line 70 of file ncbi_core_cxx.hpp. |
|
|
Definition at line 110 of file ncbi_connutil.h. |
|
|
I/O event (or direction).
Definition at line 118 of file ncbi_core.h. |
|
|
I/O read method.
Definition at line 88 of file ncbi_core.h. |
|
|
I/O status.
Definition at line 129 of file ncbi_core.h. |
|
|
I/O write method.
Definition at line 103 of file ncbi_core.h. |
|
|
LOG formatting flags: what parts of the message to actually appear.
Definition at line 216 of file ncbi_util.h. |
|
|
Log severity level.
Definition at line 287 of file ncbi_core.h. |
|
|
Definition at line 657 of file ncbi_connutil.h. |
|
|
Definition at line 637 of file ncbi_connutil.h. |
|
|
Definition at line 625 of file ncbi_connutil.h. |
|
|
Set the lock/unlock callback function and its data for MT critical section.
Definition at line 177 of file ncbi_core.h. |
|
|
Transient/Persistent storage.
Definition at line 512 of file ncbi_core.h. |
|
|
Definition at line 103 of file ncbi_connutil.h. |
|
|
Aux. enum to set/unset/default various features Definition at line 102 of file ncbi_types.h. |
|
|
Definition at line 94 of file ncbi_connutil.h. |
|
||||||||||||||||||||||||
|
Definition at line 1543 of file ncbi_connutil.c. References buf, buffer, s_BUF_IO(), and s_StripToPattern(). |
|
||||||||||||||||||||||||
|
Definition at line 1479 of file ncbi_connutil.c. References buf, s_CONN_IO(), and s_StripToPattern(). |
|
||||||||||||||||
|
|
Definition at line 304 of file ncbi_connutil.c. References CORE_LOGF_X, eLOG_Error, eURL_Http, eURL_Unspec, SConnNetInfo::host, SConnNetInfo::http_proxy_adjusted, SConnNetInfo::http_proxy_host, SConnNetInfo::http_proxy_port, len, memmove, SConnNetInfo::path, SConnNetInfo::port, s_Scheme(), SConnNetInfo::scheme, and strncpy0(). Referenced by s_CreateConnector(). |
|
||||||||||||||||
|
Definition at line 728 of file ncbi_connutil.c. References SConnNetInfo::args, and len. Referenced by ConnNetInfo_PostOverrideArg(). |
|
||||||||||||
|
Definition at line 529 of file ncbi_connutil.c. References ConnNetInfo_SetUserHeader(), SConnNetInfo::http_user_header, and realloc(). |
|
|
Definition at line 941 of file ncbi_connutil.c. References ConnNetInfo_SetUserHeader(), SConnNetInfo::http_referer, SConnNetInfo::http_user_header, kDefaultTimeout, malloc(), SConnNetInfo::service, strdup, SConnNetInfo::timeout, and SConnNetInfo::tmo. Referenced by s_CreateConnector(), s_HttpConnectorBuilder(), s_ServiceConnectorBuilder(), s_VT_Open(), SERV_DISPD_Open(), and SERVICE_CreateConnectorEx(). |
|
|
||||||||||||
|
Definition at line 815 of file ncbi_connutil.c. References SConnNetInfo::args, ConnNetInfo_DeleteArg(), free(), and strdup. Referenced by ConnNetInfo_PostOverrideArg(), ConnNetInfo_PreOverrideArg(), and s_AdjustNetParams(). |
|
||||||||||||
|
Definition at line 786 of file ncbi_connutil.c. References SConnNetInfo::args, memmove, and strncasecmp. Referenced by ConnNetInfo_DeleteAllArgs(), and ConnNetInfo_SetupStandardArgs(). |
|
||||||||||||
|
Definition at line 714 of file ncbi_connutil.c. References eUserHeaderOp_Delete, s_ModifyUserHeader(), and verify. Referenced by s_Open(), and s_Resolve(). |
|
|
Definition at line 1151 of file ncbi_connutil.c. References ConnNetInfo_SetUserHeader(), free(), and SConnNetInfo::http_referer. Referenced by ConnNetInfo_ParseURL(), ConnNetInfoDeleter::Delete(), ConnInfoDeleter2::Delete(), SNetServiceImpl::DiscoverServers(), s_Close(), s_CreateConnector(), s_Destroy(), s_HttpConnectorBuilder(), s_ServiceConnectorBuilder(), s_VT_Open(), and SERV_OpenSimple(). |
|
||||||||||||
|
Definition at line 721 of file ncbi_connutil.c. References eUserHeaderOp_Extend, and s_ModifyUserHeader(). Referenced by s_Connect(), s_Open(), SERV_DISPD_Open(), and x_SetupUserAgent(). |
|
||||||||||||||||||||||||
|
Definition at line 44 of file ncbi_connutil.c. References buf, CORE_REG_GET, DEF_CONN_REG_SECTION, strncpy0(), and strupr. Referenced by ConnNetInfo_Create(), s_CreateConnector(), s_IsMapperConfigured(), s_LoadServices(), and s_Open(). |
|
||||||||||||
|
Definition at line 1037 of file ncbi_connutil.c. References eDebugPrintout_Data, eDebugPrintout_None, eDebugPrintout_Some, eLOG_Error, eLOG_Trace, eReqMethod_Any, eReqMethod_Get, eReqMethod_Post, free(), SConnNetInfo::http_user_header, LOG_Write(), LOG_WRITE, malloc(), NCBI_C_ERRCODE_X, s_PortStr(), s_SaveBool(), s_SaveKeyval(), s_SaveString(), s_SaveULong(), s_SaveUserHeader(), s_SchemeStr(), and UTIL_PrintableStringSize(). Referenced by s_Connect(). |
|
||||||||||||
|
Definition at line 707 of file ncbi_connutil.c. References eUserHeaderOp_Override, and s_ModifyUserHeader(). Referenced by s_CreateConnector(), s_HttpConnectorBuilder(), s_Open(), and s_Resolve(). |
|
||||||||||||
|
Definition at line 360 of file ncbi_connutil.c. References SConnNetInfo::args, ConnNetInfo_Create(), ConnNetInfo_Destroy(), ConnNetInfo_ParseURL(), eURL_Unspec, SConnNetInfo::host, SConnNetInfo::http_proxy_adjusted, len, memmove, SConnNetInfo::pass, SConnNetInfo::path, SConnNetInfo::port, s_ParseScheme(), SConnNetInfo::scheme, SConnNetInfo::service, strncpy0(), and SConnNetInfo::user. Referenced by ConnNetInfo_ParseURL(), s_Adjust(), and s_HttpConnectorBuilder(). |
|
||||||||||||||||
|
Definition at line 850 of file ncbi_connutil.c. References ConnNetInfo_AppendArg(), and ConnNetInfo_DeleteAllArgs(). Referenced by CRPCClient< TRequest, TReply >::x_Connect(). |
|
||||||||||||||||
|
Definition at line 839 of file ncbi_connutil.c. References ConnNetInfo_DeleteAllArgs(), and ConnNetInfo_PrependArg(). Referenced by ConnNetInfo_SetupStandardArgs(). |
|
||||||||||||||||
|
Definition at line 757 of file ncbi_connutil.c. References SConnNetInfo::args, len, and memmove. Referenced by ConnNetInfo_PreOverrideArg(), and s_AdjustNetParams(). |
|
||||||||||||
|
Definition at line 897 of file ncbi_connutil.c. References ConnNetInfo_DeleteArg(), ConnNetInfo_PreOverrideArg(), CORE_GetPlatform(), free(), s_ClientAddress(), SOCK_gethostbyaddr(), and SOCK_gethostname(). Referenced by SERV_DISPD_Open(), and SERVICE_CreateConnectorEx(). |
|
||||||||||||
|
Definition at line 515 of file ncbi_connutil.c. References free(), SConnNetInfo::http_user_header, and strdup. Referenced by ConnNetInfo_AppendUserHeader(), ConnNetInfo_Clone(), ConnNetInfo_Destroy(), and s_Connect(). |
|
|
Definition at line 1120 of file ncbi_connutil.c. References SConnNetInfo::args, eURL_Unspec, SConnNetInfo::host, SConnNetInfo::http_proxy_adjusted, len, malloc(), SConnNetInfo::path, SConnNetInfo::port, s_Scheme(), and SConnNetInfo::scheme. Referenced by s_SetDefaultReferer(), and s_VT_Descr(). |
|
|
Definition at line 90 of file ncbi_util.c. References g_CORE_MT_Lock. |
|
|
Get the log handle which is be used by the core internals.
Definition at line 115 of file ncbi_util.c. References g_CORE_Log. Referenced by s_Connect(), and s_DoLog(). |
|
|
Definition at line 589 of file ncbi_util.c. References HOST. Referenced by ConnNetInfo_SetupStandardArgs(). |
|
|
Get the registry previously set by CORE_SetREG().
Definition at line 578 of file ncbi_util.c. References g_CORE_Registry. Referenced by GetAsnDataViaHTTP(). |
|
||||||||||||
|
Obtain and store current user's name in the buffer provided. NCBI_OS_UNIX Definition at line 604 of file ncbi_util.c. References CORE_LOCK_WRITE, CORE_UNLOCK, and strncpy0(). Referenced by s_MakeFrom(), and SetDiagUserAndHost(). |
|
|
Obtain virtual memory page size.
Definition at line 718 of file ncbi_util.c. References NCBI_OS_UNIX, and si. |
|
|
Set the MT critical section lock/unlock handler -- to be used by the core internals for protection of internal static variables and other MT-sensitive code from being accessed/changed by several threads simultaneously. It is also to fully protect the core log handler, including its setting up, and its callback and cleanup functions.
Definition at line 80 of file ncbi_util.c. References g_CORE_MT_Lock, and MT_LOCK_Delete(). |
|
|
Set the log handle (no logging if "lg" is passed zero) -- to be used by the core internals. If there is an active log handler set already, and it is different from the new one, then LOG_Delete is called for the old logger (that is, the one being replaced).
Definition at line 102 of file ncbi_util.c. References CORE_LOCK_WRITE, CORE_UNLOCK, g_CORE_Log, and LOG_Delete(). Referenced by CORE_SetLOGFILE_Ex(), s_Fini(), s_Init(), and CAsnvalApp::Setup(). |
|
||||||||||||
|
Same as CORE_SetLOGFILE_Ex() with last parameter passed as 0 (all messages pass).
Definition at line 134 of file ncbi_util.c. References CORE_SetLOGFILE_Ex(), and eLOG_Trace. |
|
||||||||||||||||
|
Standard logging to the specified file stream.
Definition at line 122 of file ncbi_util.c. References CORE_SetLOG(), LOG_Create(), and LOG_ToFILE_Ex(). Referenced by CORE_SetLOGFILE(), and CORE_SetLOGFILE_NAME_Ex(). |
|
|
Same as CORE_SetLOGFILE_NAME_Ex with last parameter passed as 0 (all messages pass).
Definition at line 158 of file ncbi_util.c. References CORE_SetLOGFILE_NAME_Ex(), and eLOG_Trace. |
|
||||||||||||
|
Same as CORE_SetLOGFILE_Ex(fopen(filename, "a"), cut_off, TRUE).
Definition at line 142 of file ncbi_util.c. References CORE_LOGF_ERRNO_X, CORE_SetLOGFILE_Ex(), eLOG_Error, and errno. Referenced by CORE_SetLOGFILE_NAME(). |
|
|
Definition at line 167 of file ncbi_util.c. |
|
|
Set the registry (no registry if "rg" is passed zero) -- to be used by the core internals. If there is an active registry set already, and it is different from the new one, then REG_Delete() is called for the old(replaced) registry.
Definition at line 565 of file ncbi_util.c. References CORE_LOCK_WRITE, CORE_UNLOCK, g_CORE_Registry, and REG_Delete(). Referenced by GetAsnDataViaHTTP(), s_Fini(), s_Init(), and CAsnvalApp::Setup(). |
|
||||||||||||||||
|
Calculate/Update CRC32.
Definition at line 862 of file ncbi_util.c. |
|
||||||||||||
|
Convert CTimeout to STimeout.
Definition at line 125 of file ncbi_core_cxx.hpp. References CTimeout::Get(), CTimeout::IsDefault(), CTimeout::IsInfinite(), kDefaultTimeout, kInfiniteTimeout, STimeoutTag::sec, and STimeoutTag::usec. Referenced by CEUtils_Request::Connect(). |
|
|
Convert STimeout to CTimeout.
Definition at line 138 of file ncbi_core_cxx.hpp. References CTimeout::eDefault, CTimeout::eInfinite, kDefaultTimeout, kInfiniteTimeout, STimeoutTag::sec, and STimeoutTag::usec. |
|
|
Get the text form of an enum status value.
Definition at line 43 of file ncbi_core.c. References eIO_Success, and eIO_Unknown. Referenced by SNetServerImpl::Connect(), CThreadedServer::Run(), s_Close(), s_Open(), s_Resolve(), s_Shutdown(), s_VT_Open(), s_WritePending(), URL_ConnectEx(), CConn_Streambuf::x_Cleanup(), and CConn_Streambuf::x_LogIfError(). |
|
|
Increment internal reference counter by 1, then return "lg".
Definition at line 222 of file ncbi_core.c. References LOG_LOCK_WRITE, LOG_UNLOCK, LOG_VALID, and LOG_tag::ref_count. |
|
||||||||||||
|
Compose message using the "call_data" info.
Full log record format: mm/dd/yy HH:MM:SS "<file>", line <line>: [<module>] <level>: <message>
Definition at line 347 of file ncbi_util.c. References eLOG_Note, eLOG_Trace, SLOG_Handler::file, fLOG_DateTime, fLOG_Default, fLOG_FileLine, fLOG_Full, fLOG_Level, fLOG_Module, fLOG_None, fLOG_OmitNoteLevel, fLOG_Short, SLOG_Handler::level, LOG_LevelStr(), malloc(), SLOG_Handler::message, SLOG_Handler::module, SLOG_Handler::raw_data, SLOG_Handler::raw_size, and UTIL_PrintableStringSize(). Referenced by s_LOG_FileHandler(). |
|
||||||||||||||||||||
|
Create new LOG (with an internal reference counter set to 1).
Definition at line 182 of file ncbi_core.c. References LOG_tag::cleanup, LOG_tag::handler, LOG_tag::magic_number, malloc(), LOG_tag::mt_lock, LOG_tag::ref_count, and LOG_tag::user_data. Referenced by CORE_SetLOGFILE_Ex(), and LOG_cxx2c(). |
|
|
Definition at line 177 of file ncbi_core_cxx.cpp. References LOG_Create(), and s_LOG_Handler(). Referenced by s_Init(), and CAsnvalApp::Setup(). |
|
|
Decrement internal reference counter by 1, and if it reaches 0, then call "lg->cleanup(lg->user_data)", destroy the handle, and return NULL; otherwise (if reference counter is still > 0), return "lg".
Definition at line 234 of file ncbi_core.c. References free(), LOG_LOCK_WRITE, LOG_Reset(), LOG_UNLOCK, LOG_VALID, LOG_tag::magic_number, LOG_tag::mt_lock, MT_LOCK_Delete(), and LOG_tag::ref_count. Referenced by CORE_SetLOG(). |
|
|
Obtain verbal representation of an enum level value.
Definition at line 167 of file ncbi_core.c. References eLOG_Fatal. Referenced by LOG_ComposeMessage(). |
|
||||||||||||||||||||
|
Reset the "lg" to use the new "user_data", "handler" and "cleanup".
Definition at line 202 of file ncbi_core.c. References LOG_tag::cleanup, LOG_tag::handler, LOG_LOCK_WRITE, LOG_UNLOCK, LOG_VALID, and LOG_tag::user_data. Referenced by LOG_Delete(), and LOG_ToFILE_Ex(). |
|
||||||||||||||||
|
Same as LOG_ToFILEx with "cut_off" parameter passed as 0 (all messages pass).
Definition at line 551 of file ncbi_util.c. References eLOG_Trace, and LOG_ToFILE_Ex(). |
|
||||||||||||||||||||
|
LOG_Reset specialized to log to a "FILE*" stream using LOG_ComposeMessage.
Definition at line 532 of file ncbi_util.c. References LOG_Reset(), malloc(), s_LOG_FileCleanup(), and s_LOG_FileHandler(). Referenced by CORE_SetLOGFILE_Ex(), and LOG_ToFILE(). |
|
||||||||||||||||||||||||||||||||||||||||||||
|
Write message (perhaps with raw data attached) to the log by calling LOG_WriteInternal() upon filling up SLOG_Handler data from parameters.
Definition at line 292 of file ncbi_core.c. References SLOG_Handler::dynamic, SLOG_Handler::err_code, SLOG_Handler::err_subcode, SLOG_Handler::file, SLOG_Handler::level, SLOG_Handler::line, LOG_WriteInternal(), SLOG_Handler::message, SLOG_Handler::module, SLOG_Handler::raw_data, and SLOG_Handler::raw_size. Referenced by ConnNetInfo_Log(). |
|
||||||||||||
|
Write message (perhaps with raw data attached) to the log by calling "lg->handler(lg->user_data, call_data)".
Definition at line 261 of file ncbi_core.c. References SLOG_Handler::dynamic, eLOG_Fatal, free(), LOG_tag::handler, SLOG_Handler::level, LOG_LOCK_READ, LOG_UNLOCK, LOG_VALID, SLOG_Handler::message, SLOG_Handler::raw_data, SLOG_Handler::raw_size, and LOG_tag::user_data. Referenced by LOG_Write(). |
|
||||||||||||||||||||
|
Definition at line 1872 of file ncbi_connutil.c. References eMIME_T_NcbiData, and MIME_ComposeContentTypeEx(). |
|
||||||||||||||||||||||||
|
Definition at line 1751 of file ncbi_connutil.c. References eENCOD_Unknown, eMIME_T_Undefined, eMIME_T_Unknown, eMIME_Undefined, eMIME_Unknown, MAX_CONTENT_TYPE_LEN, and strncpy0(). Referenced by MIME_ComposeContentType(), s_AdjustNetParams(), s_IsContentTypeDefined(), and SERV_WriteInfo(). |
|
||||||||||||||||
|
Definition at line 1884 of file ncbi_connutil.c. References eENCOD_Unknown, eMIME_T_NcbiData, eMIME_Unknown, and MIME_ParseContentTypeEx(). |
|
||||||||||||||||||||
|
Definition at line 1796 of file ncbi_connutil.c. References eENCOD_None, eMIME_T_Undefined, eMIME_T_Unknown, eMIME_Undefined, free(), malloc(), util::strcmp(), and strlwr. Referenced by MIME_ParseContentType(), s_IsContentTypeDefined(), and SERV_ReadInfoEx(). |
|
|
Increment internal reference counter by 1, then return "lk".
Definition at line 99 of file ncbi_core.c. References MT_LOCK_VALID, and MT_LOCK_tag::ref_count. |
|
||||||||||||||||
|
Create new MT lock (with an internal reference counter set to 1).
Definition at line 82 of file ncbi_core.c. References MT_LOCK_tag::cleanup, MT_LOCK_tag::handler, kMT_LOCK_magic_number, MT_LOCK_tag::magic_number, malloc(), MT_LOCK_tag::ref_count, and MT_LOCK_tag::user_data. Referenced by Blast_CMT_LOCKInit(), and MT_LOCK_cxx2c(). |
|
||||||||||||
|
Definition at line 236 of file ncbi_core_cxx.cpp. References MT_LOCK_Create(), s_LOCK_Cleanup(), and s_LOCK_Handler(). Referenced by s_Init(). |
|
|
Decrement internal reference counter by 1, and if it reaches 0, then destroy the handle, call "lk->cleanup(lk->user_data)", and return NULL; otherwise (if the reference counter is still > 0), return "lk".
Definition at line 107 of file ncbi_core.c. References MT_LOCK_tag::cleanup, eMT_Lock, eMT_Unlock, free(), MT_LOCK_tag::handler, MT_LOCK_tag::magic_number, MT_LOCK_VALID, MT_LOCK_tag::ref_count, MT_LOCK_tag::user_data, and verify. Referenced by Blast_DiagnosticsFree(), BlastHSPStreamClose(), BlastHSPStreamFree(), BlastHSPStreamRegisterMTLock(), CORE_SetLOCK(), LOG_Delete(), and REG_Delete(). |
|
||||||||||||
|
Definition at line 130 of file ncbi_core.c. References MT_LOCK_tag::handler, MT_LOCK_VALID, and MT_LOCK_tag::user_data. |
|
||||||||||||||||||||
|
Add current "error" (and maybe its description) to the message: <message>[ {error=[[<error>][,]][<descr>]}].
Definition at line 289 of file ncbi_util.c. References buf, free(), malloc(), realloc(), and strerror(). |
|
||||||||||||
|
Definition at line 48 of file ncbi_types.c. References STimeoutTag::sec, and STimeoutTag::usec. Referenced by CPipe::ExecWait(), and s_GetDefaultCommTimeout(). |
|
|
Definition at line 40 of file ncbi_types.c. References STimeoutTag::sec, and STimeoutTag::usec. Referenced by s_Close(). |
|
|
Increment internal reference counter by 1, then return "rg".
Definition at line 395 of file ncbi_core.c. References REG_tag::ref_count, REG_LOCK_WRITE, REG_UNLOCK, and REG_VALID. |
|
||||||||||||||||||||||||
|
Create new registry (with an internal reference counter set to 1).
Definition at line 351 of file ncbi_core.c. References REG_tag::cleanup, REG_tag::get, REG_tag::magic_number, malloc(), REG_tag::mt_lock, REG_tag::ref_count, REG_tag::set, and REG_tag::user_data. Referenced by REG_cxx2c(). |
|
||||||||||||
|
NB: now that registries are CObjects, any we "own" will be deleted if and only if nothing else still holds a reference to them.
Definition at line 104 of file ncbi_core_cxx.cpp. References CObject::AddReference(), REG_Create(), s_REG_Cleanup(), s_REG_Get(), and s_REG_Set(). Referenced by GetAsnDataViaHTTP(), s_Init(), and CAsnvalApp::Setup(). |
|
|
Decrement internal referecne counter by 1, and if it reaches 0, then call "rg->cleanup(rg->user_data)", destroy the handle, and return NULL; otherwise (if the reference counter is still > 0), return "rg".
Definition at line 407 of file ncbi_core.c. References free(), REG_tag::magic_number, REG_tag::mt_lock, MT_LOCK_Delete(), REG_tag::ref_count, REG_LOCK_WRITE, REG_Reset(), REG_UNLOCK, and REG_VALID. Referenced by CORE_SetREG(). |
|
||||||||||||||||||||||||||||
|
Copy the registry value stored in "section" under name "name" to buffer "value"; if the entry is found in both transient and persistent storages, then copy the one from the transient storage. If the specified entry is not found in the registry (or if there is no registry defined), and "def_value" is not NULL, then copy "def_value" to "value" (although, only up to "value_size" characters).
Definition at line 434 of file ncbi_core.c. References REG_tag::get, REG_LOCK_READ, REG_UNLOCK, REG_VALID, strncpy0(), and REG_tag::user_data. Referenced by g_CORE_RegistryGET(). |
|
||||||||||||||||||||||||||||
|
Reset the registry handle to use the new "user_data", "set", "get", and "cleanup".
Definition at line 373 of file ncbi_core.c. References REG_tag::cleanup, REG_tag::get, REG_LOCK_WRITE, REG_UNLOCK, REG_VALID, REG_tag::set, and REG_tag::user_data. Referenced by REG_Delete(). |
|
||||||||||||||||||||||||
|
Store the "value" to the registry section "section" under name "name", and according with "storage".
Definition at line 464 of file ncbi_core.c. References REG_LOCK_READ, REG_UNLOCK, REG_VALID, REG_tag::set, and REG_tag::user_data. |
|
||||||||||||||||||||||||
|
Definition at line 1509 of file ncbi_connutil.c. References buf, s_SOCK_IO(), and s_StripToPattern(). |
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
Definition at line 1330 of file ncbi_connutil.c. References eIO_Success, and URL_ConnectEx(). |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Definition at line 1171 of file ncbi_connutil.c. References buf, BUF_Destroy(), BUF_Read(), BUF_Size(), BUF_Write(), CORE_LOG_X, CORE_LOGF_ERRNO_X, CORE_LOGF_X, eIO_InvalidArg, eIO_ReadWrite, eIO_Success, eIO_Timeout, eIO_Unknown, eLOG_Error, eLOG_Warning, eReqMethod_Any, eReqMethod_Get, eReqMethod_Post, errno, free(), fSOCK_Secure, IO_StatusStr(), malloc(), STimeoutTag::sec, size, SOCK_CreateEx(), SOCK_SetTimeout(), URL_Encode(), STimeoutTag::usec, and verify. Referenced by s_Connect(), and URL_Connect(). |
|
||||||||||||||||||||||||||||
|
Definition at line 1670 of file ncbi_connutil.c. References URL_DecodeEx(). Referenced by s_Read(). |
|
||||||||||||||||||||||||||||||||
|
Definition at line 1615 of file ncbi_connutil.c. References s_HexChar(). Referenced by URL_Decode(). |
|
||||||||||||||||||||||||||||
|
Definition at line 1683 of file ncbi_connutil.c. Referenced by s_VT_Write(), and URL_ConnectEx(). |
|
||||||||||||
|
Same as UTIL_MatchesMaskEx(name, mask, 1).
Definition at line 924 of file ncbi_util.c. References UTIL_MatchesMaskEx(). Referenced by s_LoadServices(). |
|
||||||||||||||||
|
Definition at line 887 of file ncbi_util.c. Referenced by UTIL_MatchesMask(). |
|
|
Cut off well-known NCBI domain suffix out of the passed "hostname".
Definition at line 930 of file ncbi_util.c. References len, prefix, and strcasecmp. Referenced by s_ClientAddress(). |
|
||||||||||||||||||||
|
Create printable representation of the block of data of the specified size (or, if size is 0, strlen(data), and return buffer pointer past the last stored character (non ''-terminated). NOTE: The input buffer "buf" where to store the printable representation is assumed to be of adequate size to hold the resultant string. Non-printable characters can be represented in a reduced octal form as long as the result is unambiguous (unless "full" passed true (non-zero), in which case all non-printable characters get represented by full octal tetrads). NB: Hexadecimal output is not used because it is ambiguous by the standard (can contain undefined number of hex digits).
Definition at line 209 of file ncbi_util.c. References s_IsQuoted(). Referenced by s_SaveUserHeader(). |
|
||||||||||||
|
Calculate size of buffer needed to store printable representation of the block of data of the specified size (or, if size is 0, strlen(data)). NOTE: The calculated size does not include terminating ''.
Definition at line 188 of file ncbi_util.c. References s_IsQuoted(). Referenced by ConnNetInfo_Log(), and LOG_ComposeMessage(). |
1.4.6
Modified on Wed Dec 09 08:20:18 2009 by modify_doxy.py rev. 173732