RSSKit  0.6.1
RSSArticleCreationListener.h
1 /* -*-objc-*-
2  *
3  * GNUstep RSS Kit
4  * Copyright (C) 2006 Guenther Noack
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation, in version 2.1
9  * of the License
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 
21 
22 #import "RSSFeed.h"
23 
24 /*
25  * The RSSArticleCreationListener is a object which collects things
26  * to put into a new article and puts the articles together.
27  * It does what otherwise every individual RSS-style parser had to do
28  * for itself.
29  */
30 @interface RSSArticleComposer : NSObject
31 {
32  //RSSFeed* currentFeed;
33  id delegate;
34 
35  NSString* headline;
36  NSString* url;
37  NSString* summary;
38  NSString* content;
39  NSDate* date;
40 
41  NSMutableArray* links;
42 
43  //NSMutableArray* currentArticleList;
44 }
45 
46 // Initializers & Deallocation
47 //-(id) initWithFeed: (RSSFeed*) aFeed;
48 -(id) init;
49 -(void) dealloc;
50 
51 // delegate accessors
52 -(void) setDelegate: (id)aDelegate;
53 -(id) delegate;
54 
55 // Basic control
56 -(void) nextArticle;
57 -(void) startArticle;
58 -(void) commitArticle;
59 -(void) finished;
60 
61 //-(void) setFeed: (RSSFeed*) aFeed;
62 
63 // Collecting of article content
64 -(void) setHeadline: (NSString*) aHeadline;
65 -(void) addLinkWithURL: (NSString*) anURL;
66 -(void) addLinkWithURL: (NSString*) anURL
67  andRel: (NSString*) aRelation;
68 -(void) addLinkWithURL: (NSString*) anURL
69  andRel: (NSString*) aRelation
70  andType: (NSString*) aType;
71 -(void) setContent: (NSString*) aContent;
72 -(void) setSummary: (NSString*) aSummary;
73 -(void) setDate: (NSDate*) aDate;
74 
75 // setDate:, but also converts date.
76 -(void) setDateFromString: (NSString*) str;
77 
78 
79 @end
80