diff options
author | JP Rosevear <jpr@src.gnome.org> | 2003-11-19 00:33:30 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2003-11-19 00:33:30 +0800 |
commit | 58f1b46675ef29528f51e5c44fe0e087bda5d82d (patch) | |
tree | 725648cf84182762d9dc2ac5846b233203411d59 /libical/src/libicalcap/icalcap_utils.c | |
parent | b47685534d7e5738d712962334537bb329831b9e (diff) | |
download | gsoc2013-evolution-58f1b46675ef29528f51e5c44fe0e087bda5d82d.tar gsoc2013-evolution-58f1b46675ef29528f51e5c44fe0e087bda5d82d.tar.gz gsoc2013-evolution-58f1b46675ef29528f51e5c44fe0e087bda5d82d.tar.bz2 gsoc2013-evolution-58f1b46675ef29528f51e5c44fe0e087bda5d82d.tar.lz gsoc2013-evolution-58f1b46675ef29528f51e5c44fe0e087bda5d82d.tar.xz gsoc2013-evolution-58f1b46675ef29528f51e5c44fe0e087bda5d82d.tar.zst gsoc2013-evolution-58f1b46675ef29528f51e5c44fe0e087bda5d82d.zip |
Remove libical from this tree, it resides in e-d-s now.
svn path=/trunk/; revision=23417
Diffstat (limited to 'libical/src/libicalcap/icalcap_utils.c')
-rw-r--r-- | libical/src/libicalcap/icalcap_utils.c | 134 |
1 files changed, 0 insertions, 134 deletions
diff --git a/libical/src/libicalcap/icalcap_utils.c b/libical/src/libicalcap/icalcap_utils.c deleted file mode 100644 index b676f6272d..0000000000 --- a/libical/src/libicalcap/icalcap_utils.c +++ /dev/null @@ -1,134 +0,0 @@ -/*- - * $Id$ - * - * See the file LICENSE for redistribution information. - * - * Copyright (c) 2002 Andrea Campi <a.campi@inet.it> - */ - -#include "config.h" - -#ifdef HAVE_STRING_H -#include <string.h> -#endif - -#include "icalcap.h" - -#define CONTENT_TYPE "Content-Type: text/calendar" - - -icalcomponent * -icalcap_component_new_from_string(const char *data) { - - icalcomponent *ret = NULL; - char *mtype; - - /* FIXME split the check */ - if (strncmp(data, CONTENT_TYPE, strlen(CONTENT_TYPE))) { - return NULL; - } - - mtype = (char *)data+strlen(CONTENT_TYPE); - - ret = icalcomponent_new_from_string(mtype); - if (ret == NULL) { - return NULL; - } - -#ifdef DEBUG - g_message("icalcap_component_new_from_string icalcomponent_new_from_string = %p", ret); -#endif - - /* FIXME - * Validate here: should check at least the version - */ - if (icalcomponent_isa(ret) != ICAL_VCALENDAR_COMPONENT && - icalcomponent_isa(ret) != ICAL_XROOT_COMPONENT) { - icalcomponent_free(ret); - - return NULL; - } - - return ret; -} - -#if 0 -RRCAPCmdArgs * -msg_parse(RRCAP *cap, icalcomponent *comp) { - - icalproperty *prop; - icalparameter *param; - icalvalue *value; - RRCAPCmdArgs *ret = g_new0(RRCAPCmdArgs, 1); - - ret->comp = comp; - - /* Find the command */ - if ((prop = icalcomponent_get_first_property(comp, ICAL_CMD_PROPERTY)) == NULL) { - rr_cap_send_error(cap, NULL, ICAL_9_0_UNRECOGNIZED_COMMAND, - "No CMD sent", NULL); - goto FAILED; - } - if ((value = icalproperty_get_value(prop)) == NULL) { - rr_cap_send_error(cap, NULL, ICAL_9_0_UNRECOGNIZED_COMMAND, - "CMD has no value", icalproperty_as_ical_string(prop)); - goto FAILED; - } - ret->cmd = icalvalue_get_cmd(value); - - /* Look for params */ - - /* ID */ - if ((param = icalproperty_get_first_parameter(prop, - ICAL_ID_PARAMETER)) != NULL) { - if ((ret->id = icalparameter_get_id(param)) == NULL) { - rr_cap_send_error(cap, NULL, - ICAL_9_0_UNRECOGNIZED_COMMAND, - "ID param is garbled", - icalproperty_as_ical_string(prop)); - goto FAILED; - } - } - - /* LATENCY */ - if ((param = icalproperty_get_first_parameter(prop, - ICAL_LATENCY_PARAMETER)) != NULL) { - const char *tmp; - if ((tmp = icalparameter_get_latency(param)) == NULL) { - rr_cap_send_error(cap, NULL, - ICAL_9_0_UNRECOGNIZED_COMMAND, - "LATENCY is garbled", - icalproperty_as_ical_string(prop)); - goto FAILED; - } - - ret->latency = atoi(tmp); - } - - /* ACTION */ - if ((param = icalproperty_get_first_parameter(prop, - ICAL_ACTIONPARAM_PARAMETER)) != NULL) { - if ((ret->action = icalparameter_get_actionparam(param)) - == NULL) { - rr_cap_send_error(cap, NULL, - ICAL_9_0_UNRECOGNIZED_COMMAND, - "ACTION is garbled", - icalproperty_as_ical_string(prop)); - goto FAILED; - } - } - - if ((ret->latency >= 0) ^ (ret->action != ICAL_ACTIONPARAM_NONE)) { - rr_cap_send_error(cap, NULL, ICAL_9_0_UNRECOGNIZED_COMMAND, - "LATENCY and ACTION must be both present", - icalproperty_as_ical_string(prop)); - goto FAILED; - } - - return ret; - -FAILED: - g_free(ret); - return NULL; -} -#endif |