shithub: vcardfs

ref: 5e39bdc9f4f8117890494e8a8ce632e77c6aaf46
dir: /libvcard/vcard.h/

View raw version
typedef struct Vcard Vcard;
typedef struct Vline Vline;
typedef struct Vparam Vparam;
typedef struct Vstate Vstate;

struct Vcard {
	Vline *content;
	Vcard *next;
};

struct Vline {
	char *name;
	char *value;
	char *group;
	Vparam *params;
	Vline *next;
};

struct Vparam {
	char *name;
	char *value;
	Vparam *next;
};

struct Vstate {
	char *str;
	char *s;
	int invalue;
	int inquote;
	int haspropname;
};

extern Vstate vcstate;

Vcard* vcparse(char*);
Vcard* vcparsefile(char*);
char* vcmserialize(Vcard*);

void vcfreeparams(Vparam*);
void vcfreelines(Vline*);
void vcfreecards(Vcard*);