RSSKit
0.6.1
|
00001 /* -*-objc-*- 00002 * 00003 * GNUstep RSS Kit 00004 * Copyright (C) 2010-2011 The Free Software Foundation, Inc. 00005 * 2006 Guenther Noack 00006 * 00007 * This library is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public 00009 * License as published by the Free Software Foundation, in version 2.1 00010 * of the License 00011 * 00012 * This library is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public 00018 * License along with this library; if not, write to the Free Software 00019 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 */ 00021 00022 #import <Foundation/Foundation.h> 00023 00024 // --- Notifications --- 00025 00030 extern NSString *const RSSFeedFetchedNotification; 00031 00038 extern NSString *const RSSFeedFetchFailedNotification; 00039 00044 extern NSString *const RSSFeedWillFetchNotification; 00045 00046 // --------------------- 00047 00051 enum RSSFeedError 00052 { 00053 RSSFeedErrorNoError = 0, 00054 RSSFeedErrorNoFetcherError, 00055 RSSFeedErrorMalformedURL, 00056 RSSFeedErrorDomainNotKnown, 00057 RSSFeedErrorServerNotReachable, 00058 RSSFeedErrorDocumentNotPresent, 00059 RSSFeedErrorMalformedRSS 00060 }; 00061 00062 00067 @protocol RSSFeed 00068 00069 // Article access 00070 00074 - (NSEnumerator*) articleEnumerator; 00075 00079 - (NSSet*) articleSet; 00080 00084 - (int) articleCount; 00085 00089 - (BOOL)isFetching; 00090 00094 - (NSString*) feedName; 00095 00100 - (NSURL*) feedURL; 00101 00109 - (enum RSSFeedError) fetch; 00110 00118 - (void) fetchInBackground; 00119 00123 - (enum RSSFeedError) lastError; 00124 00129 - (BOOL) autoClear; 00130 00131 00132 @end 00133 00134 @protocol RSSMutableFeed <RSSFeed> 00140 - (void) removeArticle: (id) article; 00141 00142 00146 - (void) setFeedName: (NSString*) aFeedName; 00147 00148 00156 - (void) setAutoClear: (BOOL) autoClear; 00157 00158 00159 @end 00160