Upgrade to Sparkle 1.21.3.
[macgdbp.git] / Sparkle.framework / Versions / A / Headers / SUStandardVersionComparator.h
1 //
2 // SUStandardVersionComparator.h
3 // Sparkle
4 //
5 // Created by Andy Matuschak on 12/21/07.
6 // Copyright 2007 Andy Matuschak. All rights reserved.
7 //
8
9 #ifndef SUSTANDARDVERSIONCOMPARATOR_H
10 #define SUSTANDARDVERSIONCOMPARATOR_H
11
12 #if __has_feature(modules)
13 @import Foundation;
14 #else
15 #import <Foundation/Foundation.h>
16 #endif
17 #import "SUExport.h"
18 #import "SUVersionComparisonProtocol.h"
19
20 NS_ASSUME_NONNULL_BEGIN
21
22 /*!
23 Sparkle's default version comparator.
24
25 This comparator is adapted from MacPAD, by Kevin Ballard.
26 It's "dumb" in that it does essentially string comparison,
27 in components split by character type.
28 */
29 SU_EXPORT @interface SUStandardVersionComparator : NSObject <SUVersionComparison>
30
31 /*!
32 Initializes a new instance of the standard version comparator.
33 */
34 - (instancetype)init;
35
36 /*!
37 Returns a singleton instance of the comparator.
38
39 It is usually preferred to alloc/init new a comparator instead.
40 */
41 + (SUStandardVersionComparator *)defaultComparator;
42
43 /*!
44 Compares version strings through textual analysis.
45
46 See the implementation for more details.
47 */
48 - (NSComparisonResult)compareVersion:(NSString *)versionA toVersion:(NSString *)versionB;
49 @end
50
51 NS_ASSUME_NONNULL_END
52 #endif