/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. #import <Foundation/Foundation.h>
  19. #import "GTMDefines.h"
  20. // A class for getting information about what system we are running on
  21. @interface GTMSystemVersion : NSObject
  22. // Returns the current system version major.minor.bugFix
  23. + (void)getMajor:(SInt32*)major minor:(SInt32*)minor bugFix:(SInt32*)bugFix;
  24. // Returns the build number of the OS. Useful when looking for bug fixes
  25. // in new OSes which all have a set system version.
  26. // eg 10.5.5's build number is 9F33. Easy way to check the build number
  27. // is to choose "About this Mac" from the Apple menu and click on the version
  28. // number.
  29. + (NSString*)build;
  30. + (BOOL)isBuildLessThan:(NSString*)build;
  31. + (BOOL)isBuildLessThanOrEqualTo:(NSString*)build;
  32. + (BOOL)isBuildGreaterThan:(NSString*)build;
  33. + (BOOL)isBuildGreaterThanOrEqualTo:(NSString*)build;
  34. + (BOOL)isBuildEqualTo:(NSString *)build;
  35. #if GTM_MACOS_SDK
  36. // Returns YES if running on 10.3, NO otherwise.
  37. + (BOOL)isPanther;
  38. // Returns YES if running on 10.4, NO otherwise.
  39. + (BOOL)isTiger;
  40. // Returns YES if running on 10.5, NO otherwise.
  41. + (BOOL)isLeopard;
  42. // Returns YES if running on 10.6, NO otherwise.
  43. + (BOOL)isSnowLeopard;
  44. // Returns a YES/NO if the system is 10.3 or better
  45. + (BOOL)isPantherOrGreater;
  46. // Returns a YES/NO if the system is 10.4 or better
  47. + (BOOL)isTigerOrGreater;
  48. // Returns a YES/NO if the system is 10.5 or better
  49. + (BOOL)isLeopardOrGreater;
  50. // Returns a YES/NO if the system is 10.6 or better
  51. + (BOOL)isSnowLeopardOrGreater;
  52. #endif // GTM_MACOS_SDK
  53. // Returns one of the achitecture strings below. Note that this is the
  54. // architecture that we are currently running as, not the hardware architecture.
  55. + (NSString *)runtimeArchitecture;
  56. @end
  57. // Architecture Strings
  58. // TODO: Should probably break iPhone up into iPhone_ARM and iPhone_Simulator
  59. // but haven't found a need yet.
  60. GTM_EXTERN NSString *const kGTMArch_iPhone;
  61. GTM_EXTERN NSString *const kGTMArch_ppc;
  62. GTM_EXTERN NSString *const kGTMArch_ppc64;
  63. GTM_EXTERN NSString *const kGTMArch_x86_64;
  64. GTM_EXTERN NSString *const kGTMArch_i386;