NCBI C++ ToolKit
Macros | Functions | Variables
common.c File Reference
#include <config.h>
#include <stdio.h>
#include "replacements.h"
#include <ctpublic.h>
#include "common.h"
#include <common/test_assert.h>
+ Include dependency graph for common.c:

Go to the source code of this file.

Go to the SVN repository for this file.

Macros

#define S(s)   case s: return #s;
 

Functions

static CS_RETCODE continue_logging_in (CS_CONTEXT **ctx, CS_CONNECTION **conn, CS_COMMAND **cmd, int verbose)
 
CS_RETCODE read_login_info (void)
 
static CS_RETCODE establish_login (int argc, char **argv)
 
CS_RETCODE try_ctlogin_with_options (int argc, char **argv, CS_CONTEXT **ctx, CS_CONNECTION **conn, CS_COMMAND **cmd, int verbose)
 
CS_RETCODE try_ctlogin (CS_CONTEXT **ctx, CS_CONNECTION **conn, CS_COMMAND **cmd, int verbose)
 
CS_RETCODE try_ctlogout (CS_CONTEXT *ctx, CS_CONNECTION *conn, CS_COMMAND *cmd, int verbose)
 
CS_RETCODE run_command (CS_COMMAND *cmd, const char *sql)
 
CS_INT cslibmsg_cb (CS_CONTEXT *connection, CS_CLIENTMSG *errmsg)
 
CS_RETCODE clientmsg_cb (CS_CONTEXT *context, CS_CONNECTION *connection, CS_CLIENTMSG *errmsg)
 
CS_RETCODE servermsg_cb (CS_CONTEXT *context, CS_CONNECTION *connection, CS_SERVERMSG *srvmsg)
 
const char * res_type_str (CS_RETCODE ret)
 

Variables

char USER [512]
 
char SERVER [512]
 
char PASSWORD [512]
 
char DATABASE [512]
 
COMMON_PWD common_pwd = {0}
 
static char * DIRNAME = NULL
 
static const char * BASENAME = NULL
 
static const char * PWD = "../../../PWD"
 
int cslibmsg_cb_invoked = 0
 
int clientmsg_cb_invoked = 0
 
int servermsg_cb_invoked = 0
 

Macro Definition Documentation

◆ S

#define S (   s)    case s: return #s;

Function Documentation

◆ clientmsg_cb()

CS_RETCODE clientmsg_cb ( CS_CONTEXT context,
CS_CONNECTION connection,
CS_CLIENTMSG errmsg 
)

Definition at line 397 of file common.c.

Referenced by continue_logging_in(), and main().

◆ continue_logging_in()

CS_RETCODE continue_logging_in ( CS_CONTEXT **  ctx,
CS_CONNECTION **  conn,
CS_COMMAND **  cmd,
int  verbose 
)
static

◆ cslibmsg_cb()

CS_INT cslibmsg_cb ( CS_CONTEXT connection,
CS_CLIENTMSG errmsg 
)

Definition at line 380 of file common.c.

Referenced by main().

◆ establish_login()

static CS_RETCODE establish_login ( int  argc,
char **  argv 
)
static

◆ read_login_info()

int read_login_info ( void  )

Definition at line 71 of file common.c.

Referenced by establish_login(), main(), test(), try_ctlogin(), and try_tds_login().

◆ res_type_str()

const char* res_type_str ( CS_RETCODE  ret)

Definition at line 432 of file common.c.

Referenced by ex_display_results(), and main().

◆ run_command()

CS_RETCODE run_command ( CS_COMMAND cmd,
const char *  sql 
)

Definition at line 330 of file common.c.

Referenced by continue_logging_in(), insert_test(), main(), test(), and update_second_table().

◆ servermsg_cb()

CS_RETCODE servermsg_cb ( CS_CONTEXT context,
CS_CONNECTION connection,
CS_SERVERMSG srvmsg 
)

Definition at line 412 of file common.c.

Referenced by continue_logging_in(), ex_servermsg_cb(), and main().

◆ try_ctlogin()

CS_RETCODE try_ctlogin ( CS_CONTEXT **  ctx,
CS_CONNECTION **  conn,
CS_COMMAND **  cmd,
int  verbose 
)

Definition at line 194 of file common.c.

Referenced by main().

◆ try_ctlogin_with_options()

CS_RETCODE try_ctlogin_with_options ( int  argc,
char **  argv,
CS_CONTEXT **  ctx,
CS_CONNECTION **  conn,
CS_COMMAND **  cmd,
int  verbose 
)

Definition at line 179 of file common.c.

Referenced by main().

◆ try_ctlogout()

CS_RETCODE try_ctlogout ( CS_CONTEXT ctx,
CS_CONNECTION conn,
CS_COMMAND cmd,
int  verbose 
)

Definition at line 308 of file common.c.

Referenced by cleanup(), and main().

Variable Documentation

◆ BASENAME

const char* BASENAME = NULL
static

Definition at line 37 of file common.c.

Referenced by establish_login().

◆ clientmsg_cb_invoked

int clientmsg_cb_invoked = 0

Definition at line 43 of file common.c.

Referenced by clientmsg_cb(), and main().

◆ common_pwd

COMMON_PWD common_pwd = {0}

Definition at line 34 of file common.c.

Referenced by establish_login(), main(), and read_login_info().

◆ cslibmsg_cb_invoked

int cslibmsg_cb_invoked = 0

Definition at line 42 of file common.c.

Referenced by cslibmsg_cb(), and main().

◆ DATABASE

char DATABASE[512]

Definition at line 32 of file common.c.

Referenced by continue_logging_in(), establish_login(), init(), main(), read_login_info(), and test().

◆ DIRNAME

char* DIRNAME = NULL
static

Definition at line 36 of file common.c.

Referenced by establish_login().

◆ PASSWORD

char PASSWORD[512]

◆ PWD

const char* PWD = "../../../PWD"
static

◆ SERVER

char SERVER[512]

◆ servermsg_cb_invoked

int servermsg_cb_invoked = 0

Definition at line 44 of file common.c.

Referenced by main(), and servermsg_cb().

◆ USER

char USER[512]

Definition at line 29 of file common.c.

Referenced by continue_logging_in(), establish_login(), read_login_info(), and try_tds_login().

Modified on Wed Jun 19 17:01:27 2024 by modify_doxy.py rev. 669887