#ifndef ADDRESSBOOK_H
#define ADDRESSBOOK_H

typedef struct {
    char name[64];
    char server[128];
    int port;
    char nickname[64];
    char channel[64];
    int use_ssl;
} address_book_entry_t;

typedef struct {
    address_book_entry_t entries[50];
    int entry_count;
} address_book_t;

address_book_t *addressbook_create(void);
void addressbook_destroy(address_book_t *ab);
int addressbook_add(address_book_t *ab, const char *name, const char *server, 
                    int port, const char *nick, const char *channel, int ssl);
int addressbook_remove(address_book_t *ab, int index);
int addressbook_get(address_book_t *ab, int index, address_book_entry_t *entry);
void addressbook_list(address_book_t *ab);
int addressbook_load(address_book_t *ab);
int addressbook_save(address_book_t *ab);

#endif