PageRenderTime 66ms CodeModel.GetById 41ms app.highlight 21ms RepoModel.GetById 1ms app.codeStats 0ms

/core/externals/update-engine/externals/gdata-objectivec-client/Source/Clients/Spreadsheets/GDataFeedSpreadsheetList.m

http://macfuse.googlecode.com/
Objective C | 78 lines | 42 code | 15 blank | 21 comment | 2 complexity | 3e846d89aefb132a4073ae2ca5d5fd1e MD5 | raw file
 1/* Copyright (c) 2007 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//
17//  GDataFeedSpreadsheetList.m
18//
19
20#if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_SPREADSHEET_SERVICE
21
22#import "GDataEntrySpreadsheetList.h"
23#import "GDataSpreadsheetConstants.h"
24#import "GDataFeedSpreadsheetList.h"
25#import "GDataCategory.h"
26
27@implementation GDataFeedSpreadsheetList
28
29+ (NSString *)coreProtocolVersionForServiceVersion:(NSString *)serviceVersion {
30  return [GDataSpreadsheetConstants coreProtocolVersionForServiceVersion:serviceVersion];
31}
32
33+ (GDataFeedSpreadsheetList *)spreadsheetListFeedWithXMLData:(NSData *)data {
34  return [self feedWithXMLData:data];
35}
36
37+ (GDataFeedSpreadsheetList *)spreadsheetListFeed {
38  GDataFeedSpreadsheetList *feed = [self object];
39  [feed setNamespaces:[GDataSpreadsheetConstants spreadsheetNamespaces]];
40  return feed;
41}
42
43#pragma mark -
44
45+ (NSString *)standardEntryKind {
46  // spreadsheet categories do not use the standard Kind scheme
47  // (kGDataCategoryScheme) so cannot be init'd by GDataEntryBase
48  return nil;
49}
50
51+ (void)load {
52  // spreadsheet categories do not use the standard Kind scheme
53  // (kGDataCategoryScheme) so cannot be registered with +registerEntryClass
54  [GDataFeedBase registerFeedClass:[self class]
55             forCategoryWithScheme:nil
56                              term:kGDataCategorySpreadsheetList];
57}
58
59- (id)init {
60  self = [super init];
61  if (self) {
62    [self addCategory:[GDataCategory categoryWithScheme:kGDataCategorySchemeSpreadsheet
63                                                   term:kGDataCategorySpreadsheetList]];
64  }
65  return self;
66}
67
68- (Class)classForEntries {
69  return [GDataEntrySpreadsheetList class];
70}
71
72+ (NSString *)defaultServiceVersion {
73  return kGDataSpreadsheetDefaultServiceVersion;
74}
75
76@end
77
78#endif // !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_SPREADSHEET_SERVICE