2010-01-15 00:19:19 +01:00
|
|
|
/* SOGoUser+Appointments.m - this file is part of SOGo
|
|
|
|
*
|
2016-09-26 21:22:49 +02:00
|
|
|
* Copyright (C) 2010-2016 Inverse inc.
|
2010-01-15 00:19:19 +01:00
|
|
|
*
|
|
|
|
* This file 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 2, or (at your option)
|
|
|
|
* any later version.
|
|
|
|
*
|
|
|
|
* This file 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; see the file COPYING. If not, write to
|
|
|
|
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#import <SOGo/NSArray+Utilities.h>
|
|
|
|
#import <SOGo/SOGoUserSettings.h>
|
|
|
|
|
2010-01-19 13:28:10 +01:00
|
|
|
#import "SOGoAppointmentFolder.h"
|
|
|
|
|
2010-01-15 00:19:19 +01:00
|
|
|
#import "SOGoUser+Appointments.h"
|
|
|
|
|
|
|
|
@implementation SOGoUser (SOGoCalDAVSupport)
|
|
|
|
|
2010-01-19 13:28:10 +01:00
|
|
|
#warning duplicate of [SOGoGCSFolder userIsSubscriber:]
|
|
|
|
- (BOOL) hasSubscribedToCalendar: (SOGoAppointmentFolder *) calendar
|
2010-01-15 00:19:19 +01:00
|
|
|
{
|
2010-01-19 13:28:10 +01:00
|
|
|
NSArray *subscriptions;
|
|
|
|
NSString *reference;
|
2010-01-15 00:19:19 +01:00
|
|
|
|
2010-01-19 13:28:10 +01:00
|
|
|
subscriptions = [[self userSettings] subscribedCalendars];
|
|
|
|
reference = [calendar folderReference];
|
2010-01-15 00:19:19 +01:00
|
|
|
|
2010-01-19 13:28:10 +01:00
|
|
|
return [subscriptions containsObject: reference];
|
2010-01-15 00:19:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@end
|