PageRenderTime 31ms CodeModel.GetById 16ms app.highlight 11ms RepoModel.GetById 2ms app.codeStats 0ms

/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
16#include "GDataFramework.h"
17
18void GDataFrameworkVersion(NSUInteger* major, NSUInteger* minor, NSUInteger* release) {
19  // version 1.12
20  if (major)   *major = 1;
21  if (minor)   *minor = 12;
22  if (release) *release = 0;
23}
24
25NSString *GDataFrameworkVersionString(void) {
26  NSUInteger major, minor, release;
27  NSString *libVersionString;
28
29  GDataFrameworkVersion(&major, &minor, &release);
30
31  // most library releases will have a release value of zero
32  if (release != 0) {
33    libVersionString = [NSString stringWithFormat:@"%d.%d.%d",
34                        (int)major, (int)minor, (int)release];
35  } else {
36    libVersionString = [NSString stringWithFormat:@"%d.%d",
37                        (int)major, (int)minor];
38  }
39  return libVersionString;
40}