summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/UsingLibical.txt3
-rwxr-xr-xscripts/mkparameterrestrictions.pl83
-rw-r--r--src/libical/icalerror.h1
-rw-r--r--src/libical/icallangbind.h9
-rw-r--r--src/libical/icalparser.h4
-rw-r--r--src/libical/icaltime.h11
-rw-r--r--src/libical/icaltypes.h2
-rw-r--r--src/libicalss/icalclassify.h2
-rw-r--r--src/libicalss/icalfileset.h3
-rw-r--r--src/libicalss/icalgauge.h6
-rw-r--r--src/libicalss/icalmessage.h11
-rw-r--r--src/libicalss/icalset.h3
-rw-r--r--src/python/Gauge.py64
-rw-r--r--src/python/LibicalWrap.i37
14 files changed, 23 insertions, 216 deletions
diff --git a/doc/UsingLibical.txt b/doc/UsingLibical.txt
index 92a766b0..97a771c0 100644
--- a/doc/UsingLibical.txt
+++ b/doc/UsingLibical.txt
@@ -913,9 +913,6 @@ short icaltime_start_doy_of_week(struct icaltimetype t);
short icaltime_week_number(short day_of_month, short month, short year);
-struct icaltimetype icaltime_from_week_number(short week_number, short
-year);
-
short icaltime_days_in_month(short month,short year);
Two routines convert time structures to and from the number of seconds
diff --git a/scripts/mkparameterrestrictions.pl b/scripts/mkparameterrestrictions.pl
deleted file mode 100755
index 12b9c8ab..00000000
--- a/scripts/mkparameterrestrictions.pl
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/usr/bin/perl
-
-# Version: 1.0
-# Script last updated: 30May1999 GMD
-# Change log:
-# <none>
-
-# usually open params-in-prop.txt
-open(F, "$ARGV[0]") || die "Can't open restriction file $ARGV[0]:$!";
-
-print <<EOM;
-/*
- ======================================================================
- File: parameterrestrictions.c
-
- (C) COPYRIGHT 1999 Graham Davison
- mailto:g.m.davison\@computer.org
-
- The contents of this file are subject to the Mozilla Public License
- Version 1.0 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and
- limitations under the License.
-
-
- ======================================================================*/
-
-/*
- * THIS FILE IS MACHINE GENERATED DO NOT EDIT
- */
-
-
-int icalrestriction_is_parameter_allowed(icalproperty_kind prop,icalparameter_kind param)
-{
- switch (prop)
- {
-EOM
-
-while (<F>) {
- chop;
-
- # split line by whitespace
- my @v = split(/\s+/, $_);
-
- # property is first item on line
- my $prop = shift @v;
- my $prop_name = $prop;
- if (substr($prop, 0, 1) eq "X") {$prop = "X";}
- $prop = join("", split(/-/, $prop));
-
- print <<EOM;
-
- /* ${prop_name} */
- case ICAL_${prop}_PROPERTY:
- switch (param)
- {
-EOM
-
- foreach $param (@v) {
- $param = join("", split(/-/, $param));
- print "\t\t\t\tcase ICAL_${param}_PARAMETER:\n";
- }
-
- print <<EOM;
- return 1;
- default:
- return 0;
- }
-
-EOM
-
-}
-
-print <<EOM;
- }
-
- return 0;
-}
-EOM
diff --git a/src/libical/icalerror.h b/src/libical/icalerror.h
index ca4c48c9..a13e425e 100644
--- a/src/libical/icalerror.h
+++ b/src/libical/icalerror.h
@@ -75,7 +75,6 @@ LIBICAL_ICAL_EXPORT int icalerror_get_errors_are_fatal(void);
#endif /* __GNU_C__ */
LIBICAL_ICAL_EXPORT void icalerror_clear_errno(void);
-LIBICAL_ICAL_EXPORT void _icalerror_set_errno(icalerrorenum);
/* Make an individual error fatal or non-fatal. */
typedef enum icalerrorstate
diff --git a/src/libical/icallangbind.h b/src/libical/icallangbind.h
index 73fbfca5..b88b0fc5 100644
--- a/src/libical/icallangbind.h
+++ b/src/libical/icallangbind.h
@@ -30,15 +30,6 @@ LIBICAL_ICAL_EXPORT void icallangbind_free_array(int *array);
LIBICAL_ICAL_EXPORT int icallangbind_access_array(int *array, int index);
-LIBICAL_ICAL_EXPORT icalproperty *icallangbind_get_property(icalcomponent *c,
- int n, const char *prop);
-
-LIBICAL_ICAL_EXPORT const char *icallangbind_get_property_val(icalproperty *p);
-
-LIBICAL_ICAL_EXPORT const char *icallangbind_get_parameter(icalproperty *p, const char *parameter);
-
-LIBICAL_ICAL_EXPORT icalcomponent *icallangbind_get_component(icalcomponent *c, const char *comp);
-
LIBICAL_ICAL_EXPORT icalproperty *icallangbind_get_first_property(icalcomponent *c,
const char *prop);
diff --git a/src/libical/icalparser.h b/src/libical/icalparser.h
index 29c65c7b..4f66d34e 100644
--- a/src/libical/icalparser.h
+++ b/src/libical/icalparser.h
@@ -78,10 +78,6 @@ LIBICAL_ICAL_EXPORT icalcomponent *icalparser_parse_string(const char *str);
* Parser support functions
***********************************************************************/
-/** Use the flex/bison parser to turn a string into a value type */
-LIBICAL_ICAL_EXPORT icalvalue *icalparser_parse_value(icalvalue_kind kind,
- const char *str, icalcomponent ** errors);
-
/** Given a line generator function, return a single iCal content line.*/
LIBICAL_ICAL_EXPORT char *icalparser_get_line(icalparser *parser,
char *(*line_gen_func) (char *s,
diff --git a/src/libical/icaltime.h b/src/libical/icaltime.h
index 8fdfd2f8..e3039055 100644
--- a/src/libical/icaltime.h
+++ b/src/libical/icaltime.h
@@ -40,9 +40,7 @@
* - icaltime_today()
* - icaltime_from_timet_with_zone(time_t tm, int is_date,
* icaltimezone *zone)
- * - icaltime_from_string_with_zone(const char* str, icaltimezone *zone)
* - icaltime_from_day_of_year(int doy, int year)
- * - icaltime_from_week_number(int week_number, int year)
*
* italtimetype objects can be converted to different formats:
*
@@ -154,18 +152,9 @@ LIBICAL_ICAL_EXPORT struct icaltimetype icaltime_from_timet_with_zone(const time
/** create a time from an ISO format string */
LIBICAL_ICAL_EXPORT struct icaltimetype icaltime_from_string(const char *str);
-/** create a time from an ISO format string */
-LIBICAL_ICAL_EXPORT struct icaltimetype icaltime_from_string_with_zone(const char *str,
- const icaltimezone *zone);
-
/** Create a new time, given a day of year and a year. */
LIBICAL_ICAL_EXPORT struct icaltimetype icaltime_from_day_of_year(const int doy, const int year);
-/** @brief Contructor (TODO).
- * Create a new time from a weeknumber and a year. */
-LIBICAL_ICAL_EXPORT struct icaltimetype icaltime_from_week_number(const int week_number,
- const int year);
-
/** Return the time as seconds past the UNIX epoch */
LIBICAL_ICAL_EXPORT time_t icaltime_as_timet(const struct icaltimetype);
diff --git a/src/libical/icaltypes.h b/src/libical/icaltypes.h
index 4ad408f8..b7590c33 100644
--- a/src/libical/icaltypes.h
+++ b/src/libical/icaltypes.h
@@ -97,8 +97,6 @@ struct icaltimezonetype
struct icaltimezonephase *phases;
};
-LIBICAL_ICAL_EXPORT void icaltimezonetype_free(struct icaltimezonetype tzt);
-
/* ical_unknown_token_handling :
* How should the ICAL library handle components, properties and parameters with
* unknown names?
diff --git a/src/libicalss/icalclassify.h b/src/libicalss/icalclassify.h
index d1ddacdc..e394fdcf 100644
--- a/src/libicalss/icalclassify.h
+++ b/src/libicalss/icalclassify.h
@@ -31,6 +31,4 @@ LIBICAL_ICALSS_EXPORT icalproperty_xlicclass icalclassify(icalcomponent *c,
LIBICAL_ICALSS_EXPORT icalcomponent *icalclassify_find_overlaps(icalset *set,
icalcomponent *comp);
-LIBICAL_ICALSS_EXPORT char *icalclassify_class_to_string(icalproperty_xlicclass c);
-
#endif /* ICALCLASSIFY_H */
diff --git a/src/libicalss/icalfileset.h b/src/libicalss/icalfileset.h
index 7a1c6fe3..e4121bae 100644
--- a/src/libicalss/icalfileset.h
+++ b/src/libicalss/icalfileset.h
@@ -36,9 +36,6 @@ LIBICAL_ICALSS_EXPORT icalset *icalfileset_new_writer(const char *path);
LIBICAL_ICALSS_EXPORT icalset *icalfileset_init(icalset *set, const char *dsn, void *options);
-LIBICAL_ICALSS_EXPORT icalfileset *icalfileset_new_from_cluster(const char *path,
- icalcluster *cluster);
-
LIBICAL_ICALSS_EXPORT icalcluster *icalfileset_produce_icalcluster(const char *path);
LIBICAL_ICALSS_EXPORT void icalfileset_free(icalset *cluster);
diff --git a/src/libicalss/icalgauge.h b/src/libicalss/icalgauge.h
index 3ddbb387..cece3e21 100644
--- a/src/libicalss/icalgauge.h
+++ b/src/libicalss/icalgauge.h
@@ -40,8 +40,6 @@ LIBICAL_ICALSS_EXPORT int icalgauge_get_expand(icalgauge *gauge);
LIBICAL_ICALSS_EXPORT void icalgauge_free(icalgauge *gauge);
-LIBICAL_ICALSS_EXPORT char *icalgauge_as_sql(icalcomponent *gauge);
-
LIBICAL_ICALSS_EXPORT void icalgauge_dump(icalgauge *gauge);
/** @brief Return true if comp matches the gauge.
@@ -52,8 +50,4 @@ LIBICAL_ICALSS_EXPORT void icalgauge_dump(icalgauge *gauge);
*/
LIBICAL_ICALSS_EXPORT int icalgauge_compare(icalgauge *g, icalcomponent *comp);
-/** Clone the component, but only return the properties
- * specified in the gauge */
-LIBICAL_ICALSS_EXPORT icalcomponent *icalgauge_new_clone(icalgauge *g, icalcomponent *comp);
-
#endif /* ICALGAUGE_H */
diff --git a/src/libicalss/icalmessage.h b/src/libicalss/icalmessage.h
index 45e50e21..2f107d97 100644
--- a/src/libicalss/icalmessage.h
+++ b/src/libicalss/icalmessage.h
@@ -41,17 +41,6 @@ LIBICAL_ICALSS_EXPORT icalcomponent *icalmessage_new_delegate_reply(icalcomponen
const char *delegatee,
const char *msg);
-LIBICAL_ICALSS_EXPORT icalcomponent *icalmessage_new_cancel_event(icalcomponent *c,
- const char *user,
- const char *msg);
-
-LIBICAL_ICALSS_EXPORT icalcomponent *icalmessage_new_cancel_instance(icalcomponent *c,
- const char *user,
- const char *msg);
-
-LIBICAL_ICALSS_EXPORT icalcomponent *icalmessage_new_cancel_all(icalcomponent *c,
- const char *user, const char *msg);
-
LIBICAL_ICALSS_EXPORT icalcomponent *icalmessage_new_error_reply(icalcomponent *c,
const char *user,
const char *msg,
diff --git a/src/libicalss/icalset.h b/src/libicalss/icalset.h
index 16e1bd3e..24f219f7 100644
--- a/src/libicalss/icalset.h
+++ b/src/libicalss/icalset.h
@@ -131,9 +131,6 @@ LIBICAL_ICALSS_EXPORT int icalset_count_components(icalset *set, icalcomponent_k
that pass the gauge. */
LIBICAL_ICALSS_EXPORT icalerrorenum icalset_select(icalset *set, icalgauge *gauge);
-/** Clears the gauge defined by icalset_select() */
-LIBICAL_ICALSS_EXPORT void icalset_clear_select(icalset *set);
-
/** Get a component by uid */
LIBICAL_ICALSS_EXPORT icalcomponent *icalset_fetch(icalset *set, const char *uid);
diff --git a/src/python/Gauge.py b/src/python/Gauge.py
index c300232d..d016cfea 100644
--- a/src/python/Gauge.py
+++ b/src/python/Gauge.py
@@ -1,20 +1,20 @@
-#!/usr/bin/env python
+#!/usr/bin/env python
# -*- Mode: python -*-
#======================================================================
# FILE: Gauge.py
-# CREATOR: mtearle
+# CREATOR: mtearle
#
# DESCRIPTION:
-#
+#
#
# $Id: Gauge.py,v 1.2 2002-07-08 17:56:11 acampi Exp $
# $Locker: $
#
# (C) COPYRIGHT 2001, Eric Busboom <eric@softwarestudio.org>
-# (C) COPYRIGHT 2001, Patrick Lewis <plewis@inetarena.com>
+# (C) COPYRIGHT 2001, Patrick Lewis <plewis@inetarena.com>
#
# This program is free software; you can redistribute it and/or modify
-# it under the terms of either:
+# it under the terms of either:
#
# The LGPL as published by the Free Software Foundation, version
# 2.1, available at: http://www.fsf.org/copyleft/lesser.html
@@ -30,59 +30,41 @@ from Error import LibicalError
from Component import Component
class Gauge:
- """
+ """
Base class for gauge
"""
class ConstructorFailedError(LibicalError):
"Failed to create a Guage "
-
+
class CloneFailedError(LibicalError):
"Failed to clone a component given Gauge "
-
+
class CompareFailedError(LibicalError):
"Failed to compare a component given Gauge "
def __init__(self,ref=None,sql=None,expand=0):
- if ref != None:
- self._ref = ref
- elif sql != None:
+ if ref != None:
+ self._ref = ref
+ elif sql != None:
s = str(sql)
- self._ref = icalgauge_new_from_sql(s,expand)
- else:
- Gauge.ConstructorFailedError("No SQL Specified")
+ self._ref = icalgauge_new_from_sql(s,expand)
+ else:
+ Gauge.ConstructorFailedError("No SQL Specified")
def __del__(self):
- if self._ref != None:
- icalgauge_free(self._ref)
- self._ref = None
+ if self._ref != None:
+ icalgauge_free(self._ref)
+ self._ref = None
def ref(self):
- return self._ref
+ return self._ref
def compare(self, comp):
- if not isinstance(comp,Component):
- raise Gauge.CompareFailedError("Argument is not a component")
-
- if comp.ref() == None:
- raise Gauge.CompareFailedError("Argument is not a component")
+ if not isinstance(comp,Component):
+ raise Gauge.CompareFailedError("Argument is not a component")
- return icalgauge_compare(self._ref, comp.ref())
+ if comp.ref() == None:
+ raise Gauge.CompareFailedError("Argument is not a component")
- # Pending Implementation
- #def as_sql_string(self):
- # return self.__str__()
-
- #def __str__(self):
- # return icalgauge_as_sql(self._ref)
-
- #def clone(self, comp):
-# if not isinstance(comp,Component):
-# raise Gauge.CloneFailedError("Argument is not a component")
-#
-# comp_ref = icalgauge_new_clone(self._ref, comp)
-#
-# if comp_ref == None:
-# return None
-#
-# return Component(ref=comp_ref)
+ return icalgauge_compare(self._ref, comp.ref())
diff --git a/src/python/LibicalWrap.i b/src/python/LibicalWrap.i
index 8452b05d..dfe24b0b 100644
--- a/src/python/LibicalWrap.i
+++ b/src/python/LibicalWrap.i
@@ -43,43 +43,6 @@ import Error
typedef int time_t;
-
-// This is declared as an extern, but never used in the library.
-%ignore icalfileset_safe_saves;
-
-
-// Ignore these declarations because there does not exist a definition for them
-%ignore _icalerror_set_errno(icalerrorenum);
-%ignore icalclassify_class_to_string(icalproperty_xlicclass c);
-%ignore icalfileset_new_from_cluster(const char* path, icalcluster *cluster);
-%ignore icalgauge_as_sql(icalcomponent* gauge);
-%ignore icalgauge_new_clone(icalgauge* g, icalcomponent* comp);
-%ignore icallangbind_get_component(icalcomponent *c, const char* comp);
-%ignore icallangbind_get_parameter(icalproperty *p, const char* parameter);
-%ignore icallangbind_get_property(icalcomponent *c, int n, const char* prop);
-%ignore icallangbind_get_property_val(icalproperty* p);
-%ignore icalmessage_new_cancel_all(icalcomponent* c,
- const char* user,
- const char* msg);
-%ignore icalmessage_new_cancel_event(icalcomponent* c,
- const char* user,
- const char* msg);
-%ignore icalmessage_new_cancel_instance(icalcomponent* c,
- const char* user,
- const char* msg);
-%ignore icalparser_parse_value(icalvalue_kind kind,
- const char* str, icalcomponent** errors);
-%ignore icalrestriction_is_parameter_allowed(icalproperty_kind property,
- icalparameter_kind parameter);
-%ignore icalset_clear_select(icalset* set);
-%ignore icaltime_days_in_year (const int year);
-%ignore icaltime_from_string_with_zone(const char* str,
- const icaltimezone *zone);
-%ignore icaltime_from_week_number(const int week_number,
- const int year);
-%ignore icaltimezonetype_free(struct icaltimezonetype tzt);
-
-
// Remove depreciated functions
%ignore icalproperty_string_to_enum(const char* str);
%ignore icaltimezone_get_utc_offset(icaltimezone *zone,