RSSKit  0.6.1
RSSArticle.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 <objc/objc.h>
00023 #import <Foundation/Foundation.h>
00024 
00025 @class RSSArticle;
00026 
00027 #import "RSSFeed.h"
00028 #import "RSSArticleProtocol.h"
00029 
00030 
00031 
00035 @interface RSSArticle : NSObject <RSSMutableArticle>
00036 {
00037   @protected
00038   NSString*  headline;
00039   NSString*  url;
00040   NSString*  description;
00041   NSDate*    date;
00042 
00043   @private
00044   NSURL*     enclosure;
00045   
00047   NSMutableArray* links;
00048   
00049   id<RSSFeed> feed;
00050 }
00051 
00058 -init;
00059 
00073 -initWithHeadline: (NSString*) myHeadline
00074               url: (NSString*) myUrl
00075       description: (NSString*) myDescription
00076              date: (NSDate*)   myDate;
00077 
00078 
00079 
00080 -(void) dealloc;
00081 
00082 // Autoclear flag
00083 -(void) setAutoClear: (BOOL) autoClear;
00084 -(BOOL) autoClear;
00085 
00086 // Accessor methods (conformance to RSSArticle protocol)
00087 -(NSString*)headline;
00088 -(NSString*)url;
00089 -(NSString*)content;
00090 -(NSString*)description;
00091 -(NSArray*) links;
00092 -(NSDate*) date;
00093 -(NSURL*)enclosure;
00094 
00095 // Mutability methods (conformance to RSSMutableArticle protocol)
00096 -(void)addLink:(NSURL*) anURL;
00097 -(void)setLinks: (NSArray*) someLinks;
00098 -(void)setFeed: (id<RSSMutableFeed>) aFeed;
00099 -(void)setDate: (NSDate*) aDate;
00100 
00105 -(void)notifyChange;
00106 
00107 
00108 // Equality and hash codes
00109 - (BOOL) isEqual: (id)anObject;
00110 
00117 -(void)willBeReplacedByArticle: (id<RSSMutableArticle>) newArticle;
00118 
00119 @end