diff options
author | Arturo Espinosa <unammx@src.gnome.org> | 1998-04-01 08:30:46 +0800 |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 1998-04-01 08:30:46 +0800 |
commit | 65e2dca7eb2786ea75ae3f07171281896334d7e2 (patch) | |
tree | 1cfe66f4c3180a721afba86693517a330b65a256 /calendar/pcs/calobj.c | |
parent | 0d8c9252ca14c3aa0e63ca7d807d5a569597e247 (diff) | |
download | gsoc2013-evolution-65e2dca7eb2786ea75ae3f07171281896334d7e2.tar gsoc2013-evolution-65e2dca7eb2786ea75ae3f07171281896334d7e2.tar.gz gsoc2013-evolution-65e2dca7eb2786ea75ae3f07171281896334d7e2.tar.bz2 gsoc2013-evolution-65e2dca7eb2786ea75ae3f07171281896334d7e2.tar.lz gsoc2013-evolution-65e2dca7eb2786ea75ae3f07171281896334d7e2.tar.xz gsoc2013-evolution-65e2dca7eb2786ea75ae3f07171281896334d7e2.tar.zst gsoc2013-evolution-65e2dca7eb2786ea75ae3f07171281896334d7e2.zip |
Calendar objects as defined by the iCalendar IETF draft. Calendar holder
Calendar objects as defined by the iCalendar IETF draft.
Calendar holder for Calendar Objects.
-mig&fed
svn path=/trunk/; revision=79
Diffstat (limited to 'calendar/pcs/calobj.c')
-rw-r--r-- | calendar/pcs/calobj.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/calendar/pcs/calobj.c b/calendar/pcs/calobj.c new file mode 100644 index 0000000000..87dd8db78d --- /dev/null +++ b/calendar/pcs/calobj.c @@ -0,0 +1,48 @@ +/* + * Calendar objects implementations. + * Copyright (C) 1998 the Free Software Foundation + * + * Authors: + * Miguel de Icaza (miguel@gnu.org) + * Federico Mena (federico@gimp.org) + */ +#include "calobj.h" + +iCalObject * +ical_object_new (void) +{ + iCalObject *ico; + + ico = g_new0 (iCalObject); + + ico->seq = -1; + ico->dtstamp = time (NULL); + + return ico; +} + +iCalObject * +ical_new (char *comment, char *organizer, char *summary) +{ + iCalObject *ico; + + ico = ical_object_new (); + + ico->comment = g_strdup (comment); + ico->organizer = g_strdup (organizer); + ico->summary = g_strdup (summary); + + return ico; +} + +#define free_if_defined(x) if (x){ g_free (x); x = 0; } + +void +ical_object_destroy (iCalObject *ico) +{ + free_if_defined (ico->comment); + free_if_defined (ico->organizer); + free_if_defined (ico->summary); + + g_free (ico); +} |