// file: $ISIP_BASE/app/communicator/servers/dialogue/task_globals.h
// version: $Id: task_globals.cc 10019 2005-04-22 15:15:22Z elliott $
//

#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include <ctype.h>
#include <malloc.h>
#include <parse.h>
#include <dm.h>

int server_state_d;
char    global_debug_msg[1024];

// Global Context Variables 
char	*task;		// current task 
char	*action;	// last action taken 
char	*nl_task;	// speech act that will apply to data 

int	no_changes;	// lock all frame values and don't allow changes 
int	session_done;	// flag to log session done 
int     session_done_logged;

int     row_in_focus;	// row in focus in current data 
int     db_rows;	// number of rows in current data 
int     row_abs;	// user specified row number 
int     row_rel;	// user specified relative row 
int     backoff_cnt;	// number of iterations of backoff tried 
int     backoff_tried;

aFrame *data_current;	// pointer to frame data generated from 

// Buffers 
char	prompt_text[5000];
char	db_buf[10000];

//not used globally
//struct	parse_item parse_result;   // global for storing parse results   

void	*main_server_data;

struct db_row *one_row;

// for retry 
int	retry;
int     campus_depart;
int     campus_arrive;
char	*save_task;
char	*save_sql;
aFrame	*save_frame;
Prompt  save_prompted;

// Flags 
int     PRINT_SQL = 1;
int    	dm_verbose = 5;
int	wait_for_parse = 0;

//char    *init_city = "number of paths ending at word position\n 0 0 0 0 3 0\n best_wp= 4\n;;;1 I'M IN STARKVILLE\nPARSE_0:\nQuery_General:[Depart_Loc].[City_Name].STARKVILLE \nEND_PARSE\nPARSE_1:\nQuery_General:[City_Name].STARKVILLE \nEND_PARSE\nPARSE_2:\nQuery_General:[Depart_Loc].[City_Name].STARKVILLE \nEND_PARSE\n";

// drive frame
//
aFrame *drive_frame = NULL;

// #define is_debug 0

