diff options
author | nobody <nobody@localhost> | 2001-12-14 12:59:04 +0800 |
---|---|---|
committer | nobody <nobody@localhost> | 2001-12-14 12:59:04 +0800 |
commit | dcc8171fd4c8df52faff322827876acf30c35a4a (patch) | |
tree | 32cb6f4702fe446ea804947fa4479b5431a3d24a /libical/src/python/Store.py | |
parent | 969ffa703d70be312a9b9b2f7a6d2b7a8ac87c17 (diff) | |
download | gsoc2013-evolution-EOG_0_109_1.tar gsoc2013-evolution-EOG_0_109_1.tar.gz gsoc2013-evolution-EOG_0_109_1.tar.bz2 gsoc2013-evolution-EOG_0_109_1.tar.lz gsoc2013-evolution-EOG_0_109_1.tar.xz gsoc2013-evolution-EOG_0_109_1.tar.zst gsoc2013-evolution-EOG_0_109_1.zip |
This commit was manufactured by cvs2svn to create tag 'EOG_0_109_1'.EOG_0_109_1
svn path=/tags/EOG_0_109_1/; revision=15041
Diffstat (limited to 'libical/src/python/Store.py')
-rw-r--r-- | libical/src/python/Store.py | 176 |
1 files changed, 0 insertions, 176 deletions
diff --git a/libical/src/python/Store.py b/libical/src/python/Store.py deleted file mode 100644 index 6d13bd5211..0000000000 --- a/libical/src/python/Store.py +++ /dev/null @@ -1,176 +0,0 @@ -#!/usr/bin/env python -# -*- Mode: python -*- -#====================================================================== -# FILE: Store.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 LibicalWrap import * -from Error import LibicalError -from Component import Component - -class Store: - """ - Base class for several component storage methods - """ - - class AddFailedError(LibicalError): - "Failed to add a property to the file store" - - class ConstructorFailedError(LibicalError): - "Failed to create a Store " - - def __init__(self): - pass - - def path(self): - pass - - def mark(self): - pass - - def commit(self): - pass - - def add_component(self, comp): - pass - - def remove_component(self, comp): - pass - - def count_components(self, kind): - pass - - def select(self, gauge): - pass - - def clearSelect(self): - pass - - def fetch(self, uid): - pass - - def fetchMatch(self, comp): - pass - - def modify(self, oldc, newc): - pass - - def current_component(self): - pass - - def first_component(self): - pass - - def next_component(self): - pass - - -class FileStore(Store): - - def __init__(self, file,mode="r",flags=0664): - - _flags = icallangbind_string_to_open_flag(mode) - - - if _flags == -1: - raise Store.ConstructorFailedError("Illegal value for mode: "+mode) - - e1=icalerror_supress("FILE") - self._ref = icalfileset_new_open(file,_flags,flags) - icalerror_restore("FILE",e1) - - print self._ref - - if self._ref == None or self._ref == 'NULL': - raise Store.ConstructorFailedError(file) - - def __del__(self): - icalfileset_free(self._ref) - - def path(self): - return icalfileset_path(self._ref) - - def mark(self): - icalfileset_mark(self._ref) - - def commit(self): - icalfileset_commit(self._ref) - - def add_component(self, comp): - if not isinstance(comp,Component): - raise Store.AddFailedError("Argument is not a component") - - error = icalfileset_add_component(self._ref,comp) - - def remove_component(self, comp): - if not isinstance(comp,Component): - raise Store.AddFailedError("Argument is not a component") - - error = icalfileset_remove_component(self._ref,comp) - - - - def count_components(self, kind): - pass - - def select(self, gauge): - pass - - def clearSelect(self): - pass - - def fetch(self, uid): - pass - - def fetchMatch(self, comp): - pass - - def modify(self, oldc, newc): - pass - - def current_component(self): - comp_ref = icalfileset_get_current_component(self._ref) - - if comp_ref == None: - return None - - return Component(ref=comp_ref) - - def first_component(self): - comp_ref = icalfileset_get_first_component(self._ref) - - if comp_ref == None: - return None - - return Component(ref=comp_ref) - - def next_component(self): - - comp_ref = icalfileset_get_next_component(self._ref) - - if comp_ref == None: - return None - - return Component(ref=comp_ref) - |