2006-06-15 21:34:10 +02:00
/ *
2010-04-09 20:45:14 +02:00
Copyright ( C ) 2010 Inverse
This file is part of SOGo
SOGo is free software ; you can redistribute it and / or modify it under
2006-06-15 21:34:10 +02:00
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation ; either version 2 , or ( at your option ) any
later version .
2010-04-09 20:45:14 +02:00
SOGo is distributed in the hope that it will be useful , but WITHOUT ANY
2006-06-15 21:34:10 +02:00
WARRANTY ; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE . See the GNU Lesser General Public
License for more details .
You should have received a copy of the GNU Lesser General Public
2010-04-09 20:45:14 +02:00
License along with SOGo ; see the file COPYING . If not , write to the
2006-06-15 21:34:10 +02:00
Free Software Foundation , 59 Temple Place - Suite 330 , Boston , MA
02111 -1307 , USA .
* /
2010-04-09 20:45:14 +02:00
# import < NGCards / iCalEvent . h >
2009-10-05 02:47:18 +02:00
2010-10-21 22:12:47 +02:00
# import < NGObjWeb / WOContext + SoObjects . h >
2010-04-09 20:45:14 +02:00
# import < SOGo / NSDictionary + Utilities . h >
# import < SOGo / NSObject + Utilities . h >
2010-10-21 22:12:47 +02:00
# import < SOGo / SOGoUser . h >
2010-04-09 20:45:14 +02:00
# import "iCalPerson+SOGo.h"
2007-08-23 18:13:24 +02:00
2010-04-09 20:45:14 +02:00
# import "SOGoAptMailNotification.h"
2009-07-30 04:12:53 +02:00
2010-04-09 20:45:14 +02:00
@ interface SOGoAptMailInvitation : SOGoAptMailNotification
2009-07-30 04:12:53 +02:00
@ end
2010-04-09 20:45:14 +02:00
@ implementation SOGoAptMailInvitation
2008-03-20 14:48:17 +01:00
2010-04-09 20:45:14 +02:00
- ( NSString * ) getSubject
{
NSString * subjectFormat ;
2008-03-20 14:48:17 +01:00
2010-04-09 20:45:14 +02:00
if ( ! values )
[ self setupValues ] ;
2009-05-23 13:12:34 +02:00
2010-04-09 20:45:14 +02:00
subjectFormat = [ self labelForKey : @ "Event Invitation: \" % { Summary } \ ""
inContext : context ] ;
2009-05-23 13:12:34 +02:00
2010-04-09 20:45:14 +02:00
return [ values keysWithFormat : subjectFormat ] ;
}
2009-09-28 15:54:28 +02:00
2010-04-09 20:45:14 +02:00
- ( NSString * ) getBody
{
NSString * bodyFormat ;
2009-09-28 15:54:28 +02:00
2010-04-09 20:45:14 +02:00
if ( ! values )
[ self setupValues ] ;
2009-11-18 23:54:12 +01:00
2010-10-21 22:12:47 +02:00
bodyFormat = [ self labelForKey : @ "%{Organizer} %{SentByText}has invited you to %{Summary}.\n\nStart: %{StartDate} at %{StartTime}\nEnd: %{EndDate} at %{EndTime}\nDescription: %{Description}"
2010-04-09 20:45:14 +02:00
inContext : context ] ;
2009-11-18 23:54:12 +01:00
2010-04-09 20:45:14 +02:00
return [ values keysWithFormat : bodyFormat ] ;
}
2009-10-05 02:47:18 +02:00
@ end