3 #======================================================================
10 # $Id: Attendee.py,v 1.1 2001-04-03 15:18:42 ebusboom Exp $
13 # (C) COPYRIGHT 2001, Eric Busboom <eric@softwarestudio.org>
14 # (C) COPYRIGHT 2001, Patrick Lewis <plewis@inetarena.com>
16 # This program is free software; you can redistribute it and/or modify
17 # it under the terms of either:
19 # The LGPL as published by the Free Software Foundation, version
20 # 2.1, available at: http://www.fsf.org/copyleft/lesser.html
24 # The Mozilla Public License Version 1.0. You may obtain a copy of
25 # the License at http://www.mozilla.org/MPL/
26 #======================================================================
28 from LibicalWrap import *
29 from Property import Property
30 from types import DictType, StringType, IntType
32 class Attendee(Property):
33 """Class for Attendee properties.
40 dict is an optional dictionary with keys of
41 'value': CAL-ADDRESS string and any parameter: parameter_value entries.
42 'name' and 'value_type' entries in dict are ignored and automatically set
43 with the appropriate values.
44 address is the CAL-ADDRESS (string) of the Attendee
47 def __init__(self, arg={}):
49 assert(isinstance(arg,DictType))
56 Property.__init__(self,type='ATTENDEE',ref=ref)
58 def _doParam(self, parameter, v):
61 return self[parameter]
63 # Methods for accessing enumerated parameters
64 def cn(self, v=None): self._doParam('CN', v)
65 def cutype(self, v=None): self._doParam('CUTYPE', v)
66 def dir(self, v=None): self._doParam('DIR', v)
67 def delegated_from(self, v=None): self._doParam('DELEGATED-FROM', v)
68 def delegated_to(self, v=None): self._doParam('DELEGATED-TO', v)
69 def language(self, v=None): self._doParam('LANGUAGE', v)
70 def member(self, v=None): self._doParam('MEMBER', v)
71 def partstat(self, v=None): self._doParam('PARTSTAT', v)
72 def role(self, v=None): self._doParam('ROLE', v)
73 def rsvp(self, v=None): self._doParam('RSVP', v)
74 def sent_by(self, v=None): self._doParam('SENT-BY', v)
77 class Organizer(Property):
78 """Class for Organizer property.
81 def __init__(self, arg={}):
83 assert(isinstance(arg, DictType))
88 Property.__init__(self, type='ORGANIZER', ref=ref)
90 ## param_t = ( 'CN', 'DIR', 'SENT-BY', 'LANGUAGE' )
91 ## for param in param_t:
97 def _doParam(self, parameter, v):
100 return self[parameter]
103 "Return the name of the property."
104 return Property.name(self)
106 def value_type(self):
107 "Return the value type of the property."
108 return self._desc['value_type']
110 # Methods for accessing enumerated parameters
111 def cn(self, v=None): self._doParam('CN', v)
112 def dir(self, v=None): self._doParam('DIR', v)
113 def language(self, v=None): self._doParam('LANGUAGE', v)
114 def sent_by(self, v=None): self._doParam('SENT-BY', v)