2006-06-15 21:34:10 +02:00
|
|
|
/*
|
2010-04-09 20:45:14 +02:00
|
|
|
Copyright (C) 2010 Inverse
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2010-04-09 20:45:14 +02:00
|
|
|
This file is part of SOGo
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2010-04-09 20:45:14 +02:00
|
|
|
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 <SOGo/NSDictionary+Utilities.h>
|
|
|
|
#import <SOGo/NSObject+Utilities.h>
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2010-04-09 20:45:14 +02:00
|
|
|
#import "SOGoAptMailNotification.h"
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2010-04-09 20:45:14 +02:00
|
|
|
@interface SOGoAptMailDeletion : SOGoAptMailNotification
|
2006-06-15 21:34:10 +02:00
|
|
|
@end
|
2007-08-23 18:13:24 +02:00
|
|
|
|
2010-04-09 20:45:14 +02:00
|
|
|
@implementation SOGoAptMailDeletion
|
2007-08-23 18:13:24 +02: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-07-30 04:12:53 +02:00
|
|
|
|
2010-04-09 20:45:14 +02:00
|
|
|
subjectFormat = [self labelForKey: @"Event Cancelled: \"%{Summary}\""
|
|
|
|
inContext: context];
|
2009-07-30 04:12:53 +02:00
|
|
|
|
2010-04-09 20:45:14 +02:00
|
|
|
return [values keysWithFormat: subjectFormat];
|
|
|
|
}
|
2008-03-20 14:48:17 +01:00
|
|
|
|
2010-04-09 20:45:14 +02:00
|
|
|
- (NSString *) getBody
|
|
|
|
{
|
|
|
|
NSString *bodyFormat;
|
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-11-01 22:03:00 +01:00
|
|
|
bodyFormat = [self labelForKey: (@"%{Organizer} %{SentByText}has cancelled"
|
|
|
|
@" this event: %{Summary}.\n\n"
|
|
|
|
@"Start: %{StartDate} at %{StartTime}\n"
|
|
|
|
@"End: %{EndDate} at %{EndTime}\n"
|
|
|
|
@"Description: %{Description}")
|
2010-04-09 20:45:14 +02:00
|
|
|
inContext: context];
|
2009-05-23 13:12:34 +02:00
|
|
|
|
2010-04-09 20:45:14 +02:00
|
|
|
return [values keysWithFormat: bodyFormat];
|
|
|
|
}
|
2009-10-05 02:47:18 +02:00
|
|
|
|
|
|
|
@end
|