--- /dev/null
+/*
+ * Copyright (C) 2008 Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+
+#include <atompub/atom.h>
+
+#include <glib.h>
+
+struct _atom_person
+{
+ char *name;
+ IRI *uri;
+ char *email;
+};
+
+AtomPerson *
+atom_person_new (char *name)
+{
+ AtomPerson *person;
+ person = g_slice_new (AtomPerson);
+ person->name = g_strdup (name);
+ person->uri = NULL;
+ person->email = NULL;
+ return person;
+}
+
+void
+atom_person_delete (AtomPerson *person)
+{
+ if (person->name)
+ g_free (person->name);
+ if (person->uri)
+ iri_delete (person->uri);
+ if (person->email)
+ g_free (person->email);
+ g_slice_free (AtomPerson, person);
+}
+
+char *
+atom_person_name (AtomPerson *person)
+{
+ return person->name;
+}
+
+void
+atom_person_name_set (AtomPerson *person, char *name)
+{
+ if (person->name)
+ g_free (person->name);
+ person->name = g_strdup (name);
+}
+
+IRI *
+atom_person_uri (AtomPerson *person)
+{
+ return person->uri;
+}
+
+void
+atom_person_uri_set (AtomPerson *person, IRI *uri)
+{
+ if (person->uri)
+ iri_delete (person->uri);
+ person->uri = uri;
+}
+
+char *
+atom_person_email (AtomPerson *person)
+{
+ return person->email;
+}
+
+void
+atom_person_email_set (AtomPerson *person, char *email)
+{
+ if (person->email)
+ g_free (person->email);
+ person->email = g_strdup (email);
+}
--- /dev/null
+/*
+ * Copyright (C) 2008 Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+
+#ifndef ATOM_PERSON_H
+#define ATOM_PERSON_H
+
+typedef struct _atom_person AtomPerson;
+
+AtomPerson * atom_person_new (char *);
+void atom_person_delete (AtomPerson *);
+char * atom_person_name (AtomPerson *);
+void atom_person_name_set (AtomPerson *, char *);
+IRI * atom_person_uri (AtomPerson *);
+void atom_person_uri_set (AtomPerson *, char *);
+char * atom_person_email (AtomPerson *);
+void atom_person_email_set (AtomPerson *, char *);
+
+#endif