iro/model/message.py
branchdevel
changeset 244 48fba7b4afe9
parent 235 c5d8384caf68
child 258 0a5eb5aac0be
equal deleted inserted replaced
243:b348d8f15b0a 244:48fba7b4afe9
    19     def __ne__(self,other):
    19     def __ne__(self,other):
    20         return not self.__eq__(other)
    20         return not self.__eq__(other)
    21 
    21 
    22 class SMS(Message):
    22 class SMS(Message):
    23     def __init__(self, cont, from_ = None):
    23     def __init__(self, cont, from_ = None):
    24         Message.__init__(self, cont, typ="sms")
    24         Message.__init__(self, cont.encode("utf-8"), typ="sms")
    25         self.from_ = from_
    25         self.from_ = from_
    26 
       
    27     def sendto(self,anbieter,recipients):
       
    28         anbieter.sendSMS(self,recipients)
       
    29 
       
    30 
    26 
    31 class Fax(Message):
    27 class Fax(Message):
    32     def __init__(self,header,cont,attachments=[]):
    28     def __init__(self,header,cont,attachments=[]):
    33         Message.__init__(self,cont, typ="fax")
    29         Message.__init__(self,cont.encode("utf-8"),typ="fax")
    34         self.header=header
    30         self.header=header
    35         self.attachments=attachments
    31         self.attachments=attachments
    36 
    32 
    37     def getAttachment(self,i):
    33     def getAttachment(self,i):
    38         return self.attachments[i]
    34         return self.attachments[i]