RSSKit  0.6.1
RSSArticleCreationListener.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 
00022 #import "RSSFeed.h"
00023 
00024 /*
00025  * The RSSArticleCreationListener is a object which collects things
00026  * to put into a new article and puts the articles together.
00027  * It does what otherwise every individual RSS-style parser had to do
00028  * for itself.
00029  */
00030 @interface RSSArticleComposer : NSObject
00031 {
00032   //RSSFeed* currentFeed;
00033   id delegate;
00034   
00035   NSString* headline;
00036   NSString* url;
00037   NSString* summary;
00038   NSString* content;
00039   NSDate* date;
00040   
00041   NSMutableArray* links;
00042   
00043   //NSMutableArray* currentArticleList;
00044 }
00045 
00046 // Initializers & Deallocation
00047 //-(id) initWithFeed: (RSSFeed*) aFeed;
00048 -(id) init;
00049 -(void) dealloc;
00050 
00051 // delegate accessors
00052 -(void) setDelegate: (id)aDelegate;
00053 -(id) delegate;
00054 
00055 // Basic control
00056 -(void) nextArticle;
00057 -(void) startArticle;
00058 -(void) commitArticle;
00059 -(void) finished;
00060 
00061 //-(void) setFeed: (RSSFeed*) aFeed;
00062 
00063 // Collecting of article content
00064 -(void) setHeadline: (NSString*) aHeadline;
00065 -(void) addLinkWithURL: (NSString*) anURL;
00066 -(void) addLinkWithURL: (NSString*) anURL
00067                 andRel: (NSString*) aRelation;
00068 -(void) addLinkWithURL: (NSString*) anURL
00069                 andRel: (NSString*) aRelation
00070                andType: (NSString*) aType;
00071 -(void) setContent: (NSString*) aContent;
00072 -(void) setSummary: (NSString*) aSummary;
00073 -(void) setDate: (NSDate*) aDate;
00074 
00075 // setDate:, but also converts date.
00076 -(void) setDateFromString: (NSString*) str;
00077 
00078 
00079 @end
00080