Package flumotion :: Package common :: Module eventcalendar :: Class Calendar
[hide private]

Class Calendar

source code

extern.log.log.Loggable --+
                          |
                         Calendar

I represent a parsed iCalendar resource. I have a list of VEVENT sets from which I can be asked to schedule points marking the start or end of event instances.

Instance Methods [hide private]
 
__init__(self) source code
 
addEvent(self, event)
Add a parsed VEVENT definition.
source code
list of Point
getPoints(self, start=None, delta=None)
Get all points from the given start time within the given delta.
source code
list of EventInstance
getActiveEventInstances(self, when=None)
Get a list of active event instances at the given time.
source code

Inherited from extern.log.log.Loggable: __providedBy__, __provides__, debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure, writeMarker

Class Variables [hide private]
  logCategory = 'calendar'
Implementors can provide a category to log their messages under.

Inherited from extern.log.log.Loggable: __implemented__

Method Details [hide private]

addEvent(self, event)

source code 

Add a parsed VEVENT definition.

Parameters:

getPoints(self, start=None, delta=None)

source code 

Get all points from the given start time within the given delta. End Points will be ordered before Start Points with the same time.

All points have a dt in the timezone as specified in the calendar.

start defaults to now. delta defaults to 0, effectively returning all points at this time.

Parameters:
  • start (datetime.datetime)
  • delta (datetime.timedelta)
Returns: list of Point

getActiveEventInstances(self, when=None)

source code 

Get a list of active event instances at the given time.

Parameters:
  • when (datetime.datetime) - the time to check; defaults to right now
Returns: list of EventInstance