/* 
 * Book Share Process Layer
 * 
 * process.h
 *
 * Interface to the book share system layer implemented at the client side.
 * 
 * Processes an command line, according to each type.
 * 
 */

#ifndef _PROCESS_H_
#define _PROCESS_H_


typedef struct {
	char booktitle[MAX_BOOKNAME_SIZE];
 	int weight;
	char address[MAX_ADDRESS_SIZE];
	int port;
	int book_thread;
	
	char id[MAX_COUNTER_ID_SIZE];
	char neighbour[MAX_COUNTER_SIZE];
} thread_search_arg_t;

typedef struct {
	char* titlecs;
	char* address;
	int port;
} thread_take_arg_t;


void process_init(char* username, char* password, int v_flag);

void process_give(char* command);

void process_search(char* command);

void process_take(char* command);

void process_cancel(char* command);

void process_release(char* command);

void process_quit(char* command);


#endif
