// maximum size of a Title(s) argument (check project specification)
#define MAX_TITLES_SIZE 1024

// maximum size for username
#define MAX_USERNAME_SIZE 64

// maximum size for password
#define MAX_PASSWORD_SIZE 64

// maximum book name size
#define MAX_BOOKNAME_SIZE 3

// maximum counter id size
#define MAX_COUNTER_ID_SIZE 2

// maximum port size
#define MAX_PORT_SIZE 6

// maximum number of servers
#define MAX_NR_SERVERS 10

// maximum counter id plus address plus port size
#define MAX_COUNTER_SIZE ((MAX_COUNTER_ID_SIZE) + (MAX_ADDRESS_SIZE) + (MAX_PORT_SIZE))

// maximum server address size
#define MAX_ADDRESS_SIZE 64

// maximum book id size
#define MAX_BOOK_ID_SIZE ((MAX_COUNTER_ID_SIZE) + 1 + (MAX_BOOKNAME_SIZE))

// maximum reason size
#define MAX_REASON_SIZE 1024

// maximum neighbours list size
#define MAX_NEIGHBOURS_SIZE 1024

// maximum neighbour size
#define MAX_NEIGHBOUR_SIZE 512

// maximum file name
#define MAX_FILENAME_SIZE 256

// predefined username
#define DEFAULT_USERNAME "U1"

// predefined password
#define DEFAULT_PASSWORD "P1"

// predefined counter
#define DEFAULT_COUNTER "../config/MyBalcony.dat"

// predefined server list
#define SERVER_LIST "../config/Servers.dat"

// cover path
#define COVER_PATH "../covers/"

// covers image extension
#define COVER_EXTENSION ".jpg"

// null string
#define NOSTR ""

/*
 * Client Config
 */

// maximum number of seconds before a search is canceled at the client
#define TIMEOUT_SEARCH 5

// maximum number of seconds before a sub search is canceled at the client
#define TIMEOUT_WATCH 1

// maximum number of seconds before a take is canceled at the client
#define TIMEOUT_TAKE 5

// maximum number of seconds before a release is canceled at the client
#define TIMEOUT_RELEASE 5

// v_flag
#define vprintf if(V_flag) printf


/*
 * Server Config
 */

// server id
#define SERVER_ID "A"

// server host
#define SERVER_HOST "localhost"

// server port
#define SERVER_PORT 20000

// number of server handling threads
#define NUM_HANDLER_THR 5

// number of server slots at the buffer
#define NUM_REQ_SLOTS 10

// number of server request handlers
#define NUM_REQ_HANDLERS 6

// number of server tcp connections
#define NUM_TCP_CONNECTIONS 5

// predefined server users
#define DEFAULT_USERS "../config/Users.dat"

// predefined server titles
#define DEFAULT_TITLES "../config/Titles.dat"

// predefined server neighbours
#define DEFAULT_NEIGHBOURS "../config/Neighbours.dat"

// predefined server servers
#define DEFAULT_SERVERS "../config/Servers.dat"

// maximum number of seconds before a reserve is canceled at the server
#define TIMEOUT_RESERVE 3600

// maximum number of seconds for a TCP connections
#define TIMEOUT_KEEPOPEN 60
