/* 
 * BS API Layer
 * 
 * bs_api.h
 *
 * Interface of the BS API layer of the client side Book Share library.
 * 
 * Read the project specification for futher information about
 * the description of the services.
 *
 */

#ifndef _BS_API_H_
#define _BS_API_H_

#include <bs_proto.h>
#include <system_list.h>


// status of service invocation
typedef enum {STAT_OK = 0, STAT_ERROR = -1} bs_call_status_t;


void bs_init(int v);


bs_call_status_t bs_give(char *address, int port, char *titles);


bs_call_status_t bs_search(char *address, int port, char *username, char *password,
	char* titles, int weight, sys_list_t **response);


bs_call_status_t bs_cancel(char *address, int port, char *username, char *ids);


bs_call_status_t bs_take(char *address, int port, char *username, char *ids,
	sys_list_t **response);


bs_call_status_t bs_release(char *address, int port, char *username, char *titles,
	int makeavailable, sys_list_t **response);


bs_call_status_t bs_return(char *address, int port, char *titles, sys_list_t **response);


#endif
