'''
Created on Dec 14, 2011

@author: t4aalton
'''
from socialDevices.deviceInterfaces.talkingDevice import IsSilent
from talkingDevices.conversationOfThree import ConversationOfThree
from talkingDevices.dialog import Dialog
from socialDevices.misc  import AnyValue
import socialDevices.scheduling as scheduling
from socialDevices.scheduling import schedulingFunction

# Scheduling function takes a triggering event as its parameter, and returns
# am array of action instances.
@schedulingFunction
def talkingDevicesSCH(triggeringEvent):

    triggerFrom = triggeringEvent.messFrom

    d = Dialog(triggerFrom, AnyValue())
    d = Dialog(triggerFrom, AnyValue())

    return [d, cof]

if __name__ == "__main__":

    scheduling.addSchedule(IsSilent, talkingDevicesSCH)
    
from socialDevices.deviceInterfaces.calendarSource import EventApproaching
from calendarReminders.fakeCall import FakeCall
from calendarReminders.conversation import Conversation
from socialDevices.misc  import AnyValue
import socialDevices.scheduling as scheduling
from socialDevices.scheduling import schedulingFunction

        
# Scheduling function takes a triggering event as its parameter, and returns
# am array of action instances.
@schedulingFunction
def calendarReminder(triggeringEvent):

    triggerFrom = triggeringEvent.messFrom
    triggerEid = triggeringEvent.eid
    
    fc = FakeCall(triggerFrom, AnyValue(), triggerEid)
    conv = Conversation(triggerFrom, AnyValue(), AnyValue(), triggerEid)
    return [fc, conv]

    
       
    
if __name__ == "__main__":
    
    ea = EventApproaching(10, 20)
    scheduling.addSchedule(EventApproaching, calendarReminder)
    print scheduling.getSchedule(EventApproaching)(ea)