imip-agent

Change of imip_agent.py

6:e37180aa68db
imip_agent.py
     1.1 --- a/imip_agent.py	Mon Sep 22 17:10:51 2014 +0200
     1.2 +++ b/imip_agent.py	Mon Sep 22 17:41:04 2014 +0200
     1.3 @@ -113,9 +113,6 @@
     1.4          self.sequence = get_value(details, "SEQUENCE")
     1.5          self.store = imip_store.FileStore()
     1.6  
     1.7 -    def publish(self):
     1.8 -        pass
     1.9 -
    1.10      def get_attr_value(self, name, single=True):
    1.11          return get_attr_value(self.details, name, single)
    1.12  
    1.13 @@ -123,6 +120,9 @@
    1.14          return get_value(self.details, name, single)
    1.15  
    1.16  class Event(Handler):
    1.17 +
    1.18 +    "An event handler."
    1.19 +
    1.20      def add(self):
    1.21          pass
    1.22  
    1.23 @@ -135,25 +135,41 @@
    1.24      def declinecounter(self):
    1.25          pass
    1.26  
    1.27 +    def publish(self):
    1.28 +        pass
    1.29 +
    1.30      def refresh(self):
    1.31          pass
    1.32  
    1.33      def reply(self):
    1.34 +
    1.35 +        "Since this handler does not send requests, it will not handle replies."
    1.36 +
    1.37          pass
    1.38  
    1.39      def request(self):
    1.40          pass
    1.41  
    1.42  class Freebusy(Handler):
    1.43 +
    1.44 +    "A free/busy handler."
    1.45 +
    1.46 +    def publish(self):
    1.47 +        pass
    1.48 +
    1.49      def reply(self):
    1.50 -        attendees = self.get_value("ATTENDEE", False)
    1.51 -        organiser = self.get_value("ORGANIZER")
    1.52 -        if not attendees and not organiser:
    1.53 -            return
    1.54  
    1.55 -        # Store the reply details for the attendee.
    1.56 +        "Since this handler does not send requests, it will not handle replies."
    1.57 +
    1.58 +        pass
    1.59  
    1.60      def request(self):
    1.61 +
    1.62 +        """
    1.63 +        Respond to a request by sending a reply containing free/busy information
    1.64 +        for each indicated attendee.
    1.65 +        """
    1.66 +
    1.67          attendees = self.get_attr_value("ATTENDEE", False)
    1.68          organiser = self.get_attr_value("ORGANIZER")
    1.69  
    1.70 @@ -195,13 +211,22 @@
    1.71              out.close()
    1.72  
    1.73  class Journal(Handler):
    1.74 +
    1.75 +    "A journal entry handler."
    1.76 +
    1.77      def add(self):
    1.78          pass
    1.79  
    1.80      def cancel(self):
    1.81          pass
    1.82  
    1.83 +    def publish(self):
    1.84 +        pass
    1.85 +
    1.86  class Todo(Handler):
    1.87 +
    1.88 +    "A to-do item handler."
    1.89 +
    1.90      def add(self):
    1.91          pass
    1.92  
    1.93 @@ -214,10 +239,16 @@
    1.94      def declinecounter(self):
    1.95          pass
    1.96  
    1.97 +    def publish(self):
    1.98 +        pass
    1.99 +
   1.100      def refresh(self):
   1.101          pass
   1.102  
   1.103      def reply(self):
   1.104 +
   1.105 +        "Since this handler does not send requests, it will not handle replies."
   1.106 +
   1.107          pass
   1.108  
   1.109      def request(self):