PageRenderTime 26ms CodeModel.GetById 12ms app.highlight 12ms RepoModel.GetById 1ms app.codeStats 0ms

/core/externals/update-engine/externals/gdata-objectivec-client/Source/Clients/Docs/GDataDocTransferFormat.m

http://macfuse.googlecode.com/
Objective C | 70 lines | 37 code | 16 blank | 17 comment | 1 complexity | f17b3b7bdbb324fa03d80f3f4dec6757 MD5 | raw file
 1/* Copyright (c) 2010 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//  GDataDocTransferFormat.m
18//
19
20#if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_DOCS_SERVICE
21
22#import "GDataDocTransferFormat.h"
23#import "GDataDocConstants.h"
24#import "GDataValueConstruct.h"
25
26@implementation GDataDocImportFormat
27+ (NSString *)extensionElementURI       { return kGDataNamespaceDocuments; }
28+ (NSString *)extensionElementPrefix    { return kGDataNamespaceDocumentsPrefix; }
29+ (NSString *)extensionElementLocalName { return @"importFormat"; }
30@end
31
32@implementation GDataDocExportFormat
33+ (NSString *)extensionElementURI       { return kGDataNamespaceDocuments; }
34+ (NSString *)extensionElementPrefix    { return kGDataNamespaceDocumentsPrefix; }
35+ (NSString *)extensionElementLocalName { return @"exportFormat"; }
36@end
37
38static NSString* const kSourceAttr = @"source";
39static NSString* const kTargetAttr = @"target";
40
41@implementation GDataDocTransferFormat
42
43- (void)addParseDeclarations {
44  NSArray *attrs = [NSArray arrayWithObjects:
45                    kSourceAttr, kTargetAttr, nil];
46
47  [self addLocalAttributeDeclarations:attrs];
48}
49
50#pragma mark -
51
52- (NSString *)source {
53  return [self stringValueForAttribute:kSourceAttr];
54}
55
56- (void)setSource:(NSString *)str {
57  [self setStringValue:str forAttribute:kSourceAttr];
58}
59
60- (NSString *)target {
61  return [self stringValueForAttribute:kTargetAttr];
62}
63
64- (void)setTarget:(NSString *)str {
65  [self setStringValue:str forAttribute:kTargetAttr];
66}
67
68@end
69
70#endif // !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_DOCS_SERVICE