RSSKit  0.6.1
RSSArticle.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 <objc/objc.h>
23 #import <Foundation/Foundation.h>
24 
25 @class RSSArticle;
26 
27 #import "RSSFeed.h"
28 #import "RSSArticleProtocol.h"
29 
30 
31 
35 @interface RSSArticle : NSObject <RSSMutableArticle>
36 {
37  @protected
38  NSString* headline;
39  NSString* url;
40  NSString* description;
41  NSDate* date;
42 
43  @private
44  NSURL* enclosure;
45 
47  NSMutableArray* links;
48 
49  id<RSSFeed> feed;
50 }
51 
58 -init;
59 
73 -initWithHeadline: (NSString*) myHeadline
74  url: (NSString*) myUrl
75  description: (NSString*) myDescription
76  date: (NSDate*) myDate;
77 
78 
79 
80 -(void) dealloc;
81 
82 // Autoclear flag
83 -(void) setAutoClear: (BOOL) autoClear;
84 -(BOOL) autoClear;
85 
86 // Accessor methods (conformance to RSSArticle protocol)
87 -(NSString*)headline;
88 -(NSString*)url;
89 -(NSString*)content;
90 -(NSString*)description;
91 -(NSArray*) links;
92 -(NSDate*) date;
93 -(NSURL*)enclosure;
94 
95 // Mutability methods (conformance to RSSMutableArticle protocol)
96 -(void)addLink:(NSURL*) anURL;
97 -(void)setLinks: (NSArray*) someLinks;
98 -(void)setFeed: (id<RSSMutableFeed>) aFeed;
99 -(void)setDate: (NSDate*) aDate;
100 
105 -(void)notifyChange;
106 
107 
108 // Equality and hash codes
109 - (BOOL) isEqual: (id)anObject;
110 
117 -(void)willBeReplacedByArticle: (id<RSSMutableArticle>) newArticle;
118 
119 @end