# HG changeset patch # User Sandro Knauß # Date 1257692965 -3600 # Node ID a9a302db64f3587120e33e55e847a16856782a3f # Parent 2da41f4598e1134565ee9650121fcb0794960361 content wirklich verschoben ;) diff -r 2da41f4598e1 -r a9a302db64f3 iro/anbieter/content.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/iro/anbieter/content.py Sun Nov 08 16:09:25 2009 +0100 @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +#Copyright (C) 2009 Sandro Knauß + +#This program is free software; you can redistribute it and/or modify it under the terms +#of the GNU General Public License as published by the Free Software Foundation; +#either version 3 of the License, or any later version. +#This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +#without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +#See the GNU General Public License for more details. + +#You should have received a copy of the GNU General Public License +#along with this program; if not, see . + +from email.mime.text import MIMEText + +class content: + def __init__(self,content): + self.content=content + + def sendto(self,anbieter,recipients): + pass + +class SMS(content): + def __init__(self,cont): + content.__init__(self,cont) + + def sendto(self,anbieter,recipients): + anbieter.sendSMS(self,recipients) + +class FAX(content): + def __init__(self,header,cont,attachments): + content.__init__(self,cont) + self.header=header + self.attachments=attachments + + def sendto(self,anbieter,recipients): + anbieter.sendFAX(self,recipients) + +class Mail(content): + def __init__(self, subject, body): + con=MIMEText(body) + con['Subject']=subject + content.__init__(self, con) + + def sendto(self,anbieter,recipients): + anbieter.sendMail(self,recipients) + + def as_string(self): + return self.content.as_string() + diff -r 2da41f4598e1 -r a9a302db64f3 iro/content.py --- a/iro/content.py Sun Nov 08 15:50:29 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -# -*- coding: utf-8 -*- -#Copyright (C) 2009 Sandro Knauß - -#This program is free software; you can redistribute it and/or modify it under the terms -#of the GNU General Public License as published by the Free Software Foundation; -#either version 3 of the License, or any later version. -#This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; -#without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -#See the GNU General Public License for more details. - -#You should have received a copy of the GNU General Public License -#along with this program; if not, see . - -from email.mime.text import MIMEText - -class content: - def __init__(self,content): - self.content=content - - def sendto(self,anbieter,recipients): - pass - -class SMS(content): - def __init__(self,cont): - content.__init__(self,cont) - - def sendto(self,anbieter,recipients): - anbieter.sendSMS(self,recipients) - -class FAX(content): - def __init__(self,header,cont,attachments): - content.__init__(self,cont) - self.header=header - self.attachments=attachments - - def sendto(self,anbieter,recipients): - anbieter.sendFAX(self,recipients) - -class Mail(content): - def __init__(self, subject, body): - con=MIMEText(body) - con['Subject']=subject - content.__init__(self, con) - - def sendto(self,anbieter,recipients): - anbieter.sendMail(self,recipients) - - def as_string(self): - return self.content.as_string() -