/*
 * str_list.h - definitions and declarations of the string list 
 */

#ifndef _STRING_LIST_H_
#define _STRING_LIST_H_


/* str_lst_iitem - each element of the list points to the next element */
typedef struct str_lst_iitem {
	char* value;
	struct str_lst_iitem *next;
} str_lst_iitem_t;


/* str_list_t */
typedef struct {
	str_lst_iitem_t * first;
} str_list_t;


/* str_lst_new - allocates memory for list_t and initializes it */
str_list_t* str_lst_new();


/* str_str_lst_destroy - free memory of list_t and all its items */
void str_lst_destroy(str_list_t *);


/* str_lst_insert - insert a new item with value 'value' in list 'list' */
void str_lst_insert(str_list_t *list, char *value);


/* str_lst_remove - remove the first item from the list 'list' and returns it's value */
char *str_lst_remove(str_list_t *list);

/* str_lst_find - finds item in list and returns a pointer to it. NULL if not */
str_lst_iitem_t* str_lst_find(str_list_t *list, char* item);

str_lst_iitem_t* neighbour_find(str_list_t *list, char* item);

/* str_lst_insert_quit */
int str_lst_insert_quit(str_list_t *list);

#endif
