aboutsummaryrefslogtreecommitdiffstats
path: root/libical/src/python/DerivedProperties.py
diff options
context:
space:
mode:
authorJP Rosevear <jpr@src.gnome.org>2001-04-18 01:23:25 +0800
committerJP Rosevear <jpr@src.gnome.org>2001-04-18 01:23:25 +0800
commit0d90c71a6a7960e6220958883885b8486eb2d43a (patch)
treed4ae4f4e49d5a27ce5b4b20eaad805068de51eab /libical/src/python/DerivedProperties.py
parenta8ed26a0d30ee93b457da41c1aa0fb04f44db50e (diff)
downloadgsoc2013-evolution-0d90c71a6a7960e6220958883885b8486eb2d43a.tar
gsoc2013-evolution-0d90c71a6a7960e6220958883885b8486eb2d43a.tar.gz
gsoc2013-evolution-0d90c71a6a7960e6220958883885b8486eb2d43a.tar.bz2
gsoc2013-evolution-0d90c71a6a7960e6220958883885b8486eb2d43a.tar.lz
gsoc2013-evolution-0d90c71a6a7960e6220958883885b8486eb2d43a.tar.xz
gsoc2013-evolution-0d90c71a6a7960e6220958883885b8486eb2d43a.tar.zst
gsoc2013-evolution-0d90c71a6a7960e6220958883885b8486eb2d43a.zip
Initial revision
svn path=/trunk/; revision=9413
Diffstat (limited to 'libical/src/python/DerivedProperties.py')
-rw-r--r--libical/src/python/DerivedProperties.py59
1 files changed, 59 insertions, 0 deletions
diff --git a/libical/src/python/DerivedProperties.py b/libical/src/python/DerivedProperties.py
new file mode 100644
index 0000000000..b557a1f7d7
--- /dev/null
+++ b/libical/src/python/DerivedProperties.py
@@ -0,0 +1,59 @@
+#!/usr/bin/env python
+# -*- Mode: python -*-
+#======================================================================
+# FILE: DerivedProperties.py
+# CREATOR: eric
+#
+# DESCRIPTION:
+#
+#
+# $Id$
+# $Locker$
+#
+# (C) COPYRIGHT 2001, Eric Busboom <eric@softwarestudio.org>
+# (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:
+#
+# The LGPL as published by the Free Software Foundation, version
+# 2.1, available at: http://www.fsf.org/copyleft/lesser.html
+#
+# Or:
+#
+# The Mozilla Public License Version 1.0. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#======================================================================
+
+from Property import Time, Period, Duration
+
+def RDate(arg):
+
+ class RDate_Time(Time):
+ def __init__(self,arg): Time.__init__(self,arg,"RDATE")
+
+ class RDate_Period(Period):
+ def __init__(self,arg): Period.__init__(self,arg,"RDATE")
+
+ p = None
+ for c in [RDate_Time, RDate_Period]:
+ try: return c(arg)
+ except Property.ConstructorFailedError, d: pass
+ raise Property.ConstructorFailedError("Failed to construct RDATE from "+str(arg))
+
+
+def Trigger(arg):
+ class Trigger_Time(Time):
+ def __init__(self,arg): Time.__init__(self,arg,"TRIGGER")
+
+ class Trigger_Duration(Duration):
+ def __init__(self,arg): Duration.__init__(self,arg,"TRIGGER")
+
+ p = None
+ for c in [Trigger_Duration, Trigger_Time]:
+ try: return c(arg)
+ except Property.ConstructorFailedError, d: pass
+ raise Property.ConstructorFailedError("Failed to construct TRIGGER from "+str(arg))
+
+
+