PageRenderTime 33ms CodeModel.GetById 19ms app.highlight 10ms RepoModel.GetById 1ms app.codeStats 0ms

/core/externals/update-engine/externals/gdata-objectivec-client/Source/Clients/Contacts/GDataGroupMembershipInfo.m

http://macfuse.googlecode.com/
Objective C | 73 lines | 33 code | 17 blank | 23 comment | 1 complexity | a4c17ca126104c2200931e29a5898e34 MD5 | raw file
 1/* Copyright (c) 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//  GDataGroupMembershipInfo.m
18//
19
20#if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_CONTACTS_SERVICE
21
22#import "GDataGroupMembershipInfo.h" 
23#import "GDataContactConstants.h"
24
25static NSString* const kHrefAttr = @"href";
26static NSString* const kDeletedAttr = @"deleted";
27
28@implementation GDataGroupMembershipInfo 
29//
30// group membership info 
31//
32// <gContact:groupMembershipInfo href="http://..." />
33//
34// http://code.google.com/apis/contacts/reference.html#groupMembershipInfo
35
36+ (NSString *)extensionElementURI       { return kGDataNamespaceContact; }
37+ (NSString *)extensionElementPrefix    { return kGDataNamespaceContactPrefix; }
38+ (NSString *)extensionElementLocalName { return @"groupMembershipInfo"; }
39
40+ (GDataGroupMembershipInfo *)groupMembershipInfoWithHref:(NSString *)str {
41  
42  GDataGroupMembershipInfo *obj = [self object];
43  [obj setHref:str];
44  return obj;
45}
46
47- (void)addParseDeclarations {
48  NSArray *attrs = [NSArray arrayWithObjects:kHrefAttr, kDeletedAttr, nil];
49  
50  [self addLocalAttributeDeclarations:attrs];
51}
52
53#pragma mark -
54
55- (NSString *)href {
56  return [self stringValueForAttribute:kHrefAttr]; 
57}
58
59- (void)setHref:(NSString *)str {
60  [self setStringValue:str forAttribute:kHrefAttr];
61}
62
63- (BOOL)isDeleted {
64  return [self boolValueForAttribute:kDeletedAttr defaultValue:NO]; 
65}
66
67- (void)setIsDeleted:(BOOL)flag {
68  [self setBoolValue:flag defaultValue:NO forAttribute:kDeletedAttr];
69}
70
71@end
72
73#endif // !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_CONTACTS_SERVICE