// ------------------------------------------------------------------------------------------------
// DESCRIPTION  Multiple identity code as used by surgeweb and surgealert
// ------------------------------------------------------------------------------------------------
// NOTES  
// ------------------------------------------------------------------------------------------------
#ifndef IDENTITY_DONE
#define IDENTITY_DONE 1

typedef struct IDENTITY{ int id; char *type; char *email; char *name; Pair *param; char *data; int move; int del; struct IDENTITY *next;} Identity;

Identity *identity_new(char *name);
void identity_free(Identity **l);
void identity_freeall(Identity** list);
int identity_add_atend(Identity **list, Identity *ident);
Identity *identity_find(Identity *identities, int id);
Identity *identity_find_email(Identity *identities, char* email);
Identity *identity_blank(Identity* identities);
int identity_load(Identity** list, char* fname);
int identity_save(Identity* identities, char *fname);
int identity_findmove(Identity *identities);
int identity_move(Identity *identities, int ident, int dir);
int identity_count(Identity *identites);



#endif
