2014-10-21 17:57:58 +02:00
|
|
|
//
|
|
|
|
|
// SUVersionComparisonProtocol.h
|
|
|
|
|
// Sparkle
|
|
|
|
|
//
|
|
|
|
|
// Created by Andy Matuschak on 12/21/07.
|
|
|
|
|
// Copyright 2007 Andy Matuschak. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
#ifndef SUVERSIONCOMPARISONPROTOCOL_H
|
|
|
|
|
#define SUVERSIONCOMPARISONPROTOCOL_H
|
|
|
|
|
|
|
|
|
|
#import <Cocoa/Cocoa.h>
|
2016-03-21 14:34:34 +01:00
|
|
|
#import "SUExport.h"
|
2014-10-21 17:57:58 +02:00
|
|
|
|
|
|
|
|
/*!
|
2016-03-21 14:34:34 +01:00
|
|
|
Provides version comparison facilities for Sparkle.
|
2014-10-21 17:57:58 +02:00
|
|
|
*/
|
|
|
|
|
@protocol SUVersionComparison
|
|
|
|
|
|
|
|
|
|
/*!
|
2016-03-21 14:34:34 +01:00
|
|
|
An abstract method to compare two version strings.
|
|
|
|
|
|
|
|
|
|
Should return NSOrderedAscending if b > a, NSOrderedDescending if b < a,
|
|
|
|
|
and NSOrderedSame if they are equivalent.
|
2014-10-21 17:57:58 +02:00
|
|
|
*/
|
2016-03-21 14:34:34 +01:00
|
|
|
- (NSComparisonResult)compareVersion:(NSString *)versionA toVersion:(NSString *)versionB; // *** MAY BE CALLED ON NON-MAIN THREAD!
|
2014-10-21 17:57:58 +02:00
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
#endif
|