/core/externals/update-engine/externals/gdata-objectivec-client/Source/GDataFramework.m

http://macfuse.googlecode.com/ · Objective C · 40 lines · 19 code · 5 blank · 16 comment · 6 complexity · 45e41f02a29382719b655445723aee48 MD5 · raw file

  1. /* Copyright (c) 2007-2009 Google Inc.
  2. *
  3. * Licensed under the Apache License, Version 2.0 (the "License");
  4. * you may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software
  10. * distributed under the License is distributed on an "AS IS" BASIS,
  11. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. * See the License for the specific language governing permissions and
  13. * limitations under the License.
  14. */
  15. #include "GDataFramework.h"
  16. void GDataFrameworkVersion(NSUInteger* major, NSUInteger* minor, NSUInteger* release) {
  17. // version 1.12
  18. if (major) *major = 1;
  19. if (minor) *minor = 12;
  20. if (release) *release = 0;
  21. }
  22. NSString *GDataFrameworkVersionString(void) {
  23. NSUInteger major, minor, release;
  24. NSString *libVersionString;
  25. GDataFrameworkVersion(&major, &minor, &release);
  26. // most library releases will have a release value of zero
  27. if (release != 0) {
  28. libVersionString = [NSString stringWithFormat:@"%d.%d.%d",
  29. (int)major, (int)minor, (int)release];
  30. } else {
  31. libVersionString = [NSString stringWithFormat:@"%d.%d",
  32. (int)major, (int)minor];
  33. }
  34. return libVersionString;
  35. }