RSSKit  0.6.1
RSSFactory.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/NSObject.h>
00022 #import "RSSArticleProtocol.h"
00023 
00024 @protocol RSSFactory <NSObject>
00025 
00029 - (id<RSSFeed>) feedWithURL: (NSURL*) aURL;
00030 
00040 - (id<RSSArticle>) articleWithHeadline: (NSString*) aHeadline
00041                                    URL: (NSString*) aURL
00042                                content: (NSString*) aContent
00043                                   date: (NSDate*) aDate;
00044 
00049 - (id<RSSMutableArticle>) articleFromStorageWithURL: (NSString*) aURL;
00050 
00054 - (id<RSSMutableArticle>) articleFromDictionary: (NSDictionary*) aDictionary;
00055 
00059 - (NSString*) storagePathForURL: (NSString*) anURL;
00060 
00061 @end
00062 
00067 @interface RSSFactory : NSObject <RSSFactory>
00068 
00072 + (id<RSSFactory>) sharedFactory;
00073 
00077 + (void) setFactory: (id<RSSFactory>) aFactory;
00078 
00079 
00083 -(NSString*) storagePathForURL: (NSString*) anURL;
00084 
00085 
00086 - (id<RSSArticle>) articleWithHeadline: (NSString*) aHeadline
00087                                    URL: (NSString*) aURL
00088                                content: (NSString*) aContent
00089                                   date: (NSDate*) aDate;
00090 
00091 - (id<RSSMutableArticle>) articleFromStorageWithURL: (NSString*) aURL;
00092 
00093 - (id<RSSMutableArticle>) articleFromDictionary: (NSDictionary*) aDictionary;
00094 
00095 @end