#include "isip_comm_dialog_navigation_db.h"
#include "isip_comm_dialog_navigation_db_globals.h"

int server_state_d = INITIAL_STATE;

char rowbuf[4048];
char rowhead[4048];
char *username;
char *passwd;
char *dbname;

char ambiguity_type_a[100];	
char ambiguity_poss_a[1024];
int ambiguity_leg_a;

int remove_output_files = 1;
int TIME_OUT_SECONDS = 60;

char empty_string[] = "";

// Database parameters
char *db_username = empty_string;
char *db_password = empty_string;
char *db_database = empty_string;
char *db_host = empty_string;
char *perlscript = empty_string;
char *output_path = NULL;

char clean_up_string[1024];

int server_max_rows;
int request_max_rows;

int unique_output_number = 0;

char *oas[] = {
   "-user <uid>",  "user ID for database login", "dialog",
   //"-user <uid>",  "user ID for database login", NULL,
   "-password <pwd>",  "password for database login", "pass123",
  //"-password <pwd>",  "password for database login", NULL,
  "-database <database>", "database in MySQL", "flatroute",
  //"-database <database>", "database in MySQL", NULL,
  "-host <ip_address>", "host for MySQL server", "127.0.0.1",
  //"-host <ip_address>", "host for MySQL server", NULL,
  "-perlscript <perl_path_and_file>", "path and file name of the perl script",
  //           "/tmp/perl.perl",
  // Below is the actual value that after pre-processing is
  //$ISIP_DEVEL/util/demo/isip_comm_server_dialog_navigation_db/web_access.perl
  //
  "$" PERL_PATH1 "/" PERL_PATH2 PERL_SCRIPT,
  "-unique_num <number>", "unique number for output files", "0",
  "-maxrows <mr>", "maximum number of rows to be returned", "1000",
  // TODO, use this
  "-clean <1/0>", "if 1, server deletes temporary output files", "1",
  NULL
};
