RSSKit  0.6.1
RSSFeedProtocol.h
00001 /*  -*-objc-*-
00002  *
00003  *  GNUstep RSS Kit
00004  *  Copyright (C) 2006 Guenther Noack
00005  *
00006  *  This library is free software; you can redistribute it and/or
00007  *  modify it under the terms of the GNU Lesser General Public
00008  *  License as published by the Free Software Foundation, in version 2.1
00009  *  of the License
00010  * 
00011  *  This library is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00014  *  Lesser General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU Lesser General Public
00017  *  License along with this library; if not, write to the Free Software
00018  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  */
00020 
00021 #import <Foundation/Foundation.h>
00022 
00023 // --- Notifications ---
00024 
00029 extern NSString *const RSSFeedFetchedNotification;
00030 
00037 extern NSString *const RSSFeedFetchFailedNotification;
00038 
00043 extern NSString *const RSSFeedWillFetchNotification;
00044 
00045 // ---------------------
00046 
00050 enum RSSFeedError
00051   {
00052     RSSFeedErrorNoError = 0,         
00053     RSSFeedErrorNoFetcherError,      
00054     RSSFeedErrorMalformedURL,        
00055     RSSFeedErrorDomainNotKnown,      
00056     RSSFeedErrorServerNotReachable,  
00057     RSSFeedErrorDocumentNotPresent,  
00058     RSSFeedErrorMalformedRSS         
00059   };
00060 
00061 
00066 @protocol RSSFeed
00067 
00068 // Article access
00069 
00073 - (NSEnumerator*) articleEnumerator;
00074 
00078 - (NSSet*) articleSet;
00079 
00083 - (int) articleCount;
00084 
00088 - (BOOL)isFetching;
00089 
00093 - (NSString*) feedName;
00094 
00099 - (NSURL*) feedURL;
00100 
00108 - (enum RSSFeedError) fetch;
00109 
00117 - (void) fetchInBackground;
00118 
00122 - (enum RSSFeedError) lastError;
00123 
00128 - (NSMutableDictionary*) plistDictionary;
00129 @end
00130 
00131 @protocol RSSMutableFeed <RSSFeed>
00137 - (void) removeArticle: (id) article;
00138 
00139 
00143 - (void) setFeedName: (NSString*) aFeedName;
00144 
00145 @end
00146