2012-08-20 21:34:54 +02:00
|
|
|
//
|
|
|
|
|
// SUAppcast.h
|
|
|
|
|
// Sparkle
|
|
|
|
|
//
|
|
|
|
|
// Created by Andy Matuschak on 3/12/06.
|
|
|
|
|
// Copyright 2006 Andy Matuschak. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
|
2014-10-21 17:57:58 +02:00
|
|
|
#ifndef SUAPPCAST_H
|
|
|
|
|
#define SUAPPCAST_H
|
2012-08-20 21:34:54 +02:00
|
|
|
|
2014-10-21 17:57:58 +02:00
|
|
|
@protocol SUAppcastDelegate;
|
|
|
|
|
|
|
|
|
|
@class SUAppcastItem;
|
|
|
|
|
@interface SUAppcast : NSObject<NSURLDownloadDelegate>
|
|
|
|
|
{
|
|
|
|
|
@private
|
2012-08-20 21:34:54 +02:00
|
|
|
NSArray *items;
|
2014-10-21 17:57:58 +02:00
|
|
|
NSString *userAgentString;
|
|
|
|
|
id<SUAppcastDelegate> delegate;
|
|
|
|
|
NSString *downloadFilename;
|
|
|
|
|
NSURLDownload *download;
|
2012-08-20 21:34:54 +02:00
|
|
|
}
|
2014-10-21 17:57:58 +02:00
|
|
|
@property (assign) id<SUAppcastDelegate> delegate;
|
|
|
|
|
@property (copy) NSString *userAgentString;
|
2012-08-20 21:34:54 +02:00
|
|
|
|
|
|
|
|
- (void)fetchAppcastFromURL:(NSURL *)url;
|
|
|
|
|
|
|
|
|
|
- (NSArray *)items;
|
2014-10-21 17:57:58 +02:00
|
|
|
@end
|
2012-08-20 21:34:54 +02:00
|
|
|
|
2014-10-21 17:57:58 +02:00
|
|
|
@protocol SUAppcastDelegate <NSObject>
|
|
|
|
|
- (void)appcastDidFinishLoading:(SUAppcast *)appcast;
|
|
|
|
|
- (void)appcast:(SUAppcast *)appcast failedToLoadWithError:(NSError *)error;
|
2012-08-20 21:34:54 +02:00
|
|
|
@end
|
|
|
|
|
|
2014-10-21 17:57:58 +02:00
|
|
|
#endif
|