PageRenderTime 23ms CodeModel.GetById 14ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 1ms

/core/externals/update-engine/externals/google-toolbox-for-mac/Foundation/GTMSystemVersion.h

http://macfuse.googlecode.com/
C++ Header | 79 lines | 27 code | 15 blank | 37 comment | 0 complexity | 262ab66896829d8dbb68a41985b5ee37 MD5 | raw file
 1//
 2//  GTMSystemVersion.h
 3//
 4//  Copyright 2007-2008 Google Inc.
 5//
 6//  Licensed under the Apache License, Version 2.0 (the "License"); you may not
 7//  use this file except in compliance with the License.  You may obtain a copy
 8//  of the License at
 9// 
10//  http://www.apache.org/licenses/LICENSE-2.0
11// 
12//  Unless required by applicable law or agreed to in writing, software
13//  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14//  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
15//  License for the specific language governing permissions and limitations under
16//  the License.
17//
18
19#import <Foundation/Foundation.h>
20#import "GTMDefines.h"
21
22// A class for getting information about what system we are running on
23@interface GTMSystemVersion : NSObject
24
25// Returns the current system version major.minor.bugFix
26+ (void)getMajor:(SInt32*)major minor:(SInt32*)minor bugFix:(SInt32*)bugFix;
27
28// Returns the build number of the OS. Useful when looking for bug fixes
29// in new OSes which all have a set system version.
30// eg 10.5.5's build number is 9F33. Easy way to check the build number
31// is to choose "About this Mac" from the Apple menu and click on the version
32// number.
33+ (NSString*)build;
34
35+ (BOOL)isBuildLessThan:(NSString*)build;
36+ (BOOL)isBuildLessThanOrEqualTo:(NSString*)build;
37+ (BOOL)isBuildGreaterThan:(NSString*)build;
38+ (BOOL)isBuildGreaterThanOrEqualTo:(NSString*)build;
39+ (BOOL)isBuildEqualTo:(NSString *)build;
40
41#if GTM_MACOS_SDK
42// Returns YES if running on 10.3, NO otherwise.
43+ (BOOL)isPanther;
44
45// Returns YES if running on 10.4, NO otherwise.
46+ (BOOL)isTiger;
47
48// Returns YES if running on 10.5, NO otherwise.
49+ (BOOL)isLeopard;
50
51// Returns YES if running on 10.6, NO otherwise.
52+ (BOOL)isSnowLeopard;
53
54// Returns a YES/NO if the system is 10.3 or better
55+ (BOOL)isPantherOrGreater;
56
57// Returns a YES/NO if the system is 10.4 or better
58+ (BOOL)isTigerOrGreater;
59
60// Returns a YES/NO if the system is 10.5 or better
61+ (BOOL)isLeopardOrGreater;
62
63// Returns a YES/NO if the system is 10.6 or better
64+ (BOOL)isSnowLeopardOrGreater;
65#endif  // GTM_MACOS_SDK
66
67// Returns one of the achitecture strings below. Note that this is the
68// architecture that we are currently running as, not the hardware architecture.
69+ (NSString *)runtimeArchitecture;
70@end
71
72// Architecture Strings
73// TODO: Should probably break iPhone up into iPhone_ARM and iPhone_Simulator
74//       but haven't found a need yet.
75GTM_EXTERN NSString *const kGTMArch_iPhone;
76GTM_EXTERN NSString *const kGTMArch_ppc;
77GTM_EXTERN NSString *const kGTMArch_ppc64;
78GTM_EXTERN NSString *const kGTMArch_x86_64;
79GTM_EXTERN NSString *const kGTMArch_i386;