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

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

http://macfuse.googlecode.com/
Objective C | 63 lines | 29 code | 13 blank | 21 comment | 3 complexity | a675821533b0f9169e55281297045060 MD5 | raw file
 1/* Copyright (c) 2007-2008 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//  GDataACLRole.m
18//
19
20#if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_ACLS \
21  || GDATA_INCLUDE_CALENDAR_SERVICE || GDATA_INCLUDE_DOCS_SERVICE
22
23#define GDATAACLROLE_DEFINE_GLOBALS 1
24
25#import "GDataACLRole.h"
26#import "GDataEntryACL.h" // for namespace
27
28@implementation GDataACLRole
29// an element with a value attribute, as in
30//  <gAcl:role value='owner'></gAcl:role>
31//
32//  http://code.google.com/apis/calendar/reference.html#gacl_reference
33
34+ (NSString *)extensionElementURI       { return kGDataNamespaceACL; }
35+ (NSString *)extensionElementPrefix    { return kGDataNamespaceACLPrefix; }
36+ (NSString *)extensionElementLocalName { return @"role"; }
37@end
38
39@implementation GDataACLAdditionalRole
40+ (NSString *)extensionElementURI       { return kGDataNamespaceACL; }
41+ (NSString *)extensionElementPrefix    { return kGDataNamespaceACLPrefix; }
42+ (NSString *)extensionElementLocalName { return @"additionalRole"; }
43@end
44
45@implementation GDataACLRoleBase
46
47+ (id)roleWithValue:(NSString *)value {
48  GDataACLRole *obj = [self object];
49  [obj setStringValue:value];
50  return obj;
51}
52
53- (NSString *)value {
54  return [self stringValue];
55}
56
57- (void)setValue:(NSString *)str {
58  [self setStringValue:str];
59}
60
61@end
62
63#endif // !GDATA_REQUIRE_SERVICE_INCLUDE || GDATA_INCLUDE_*