PageRenderTime 31ms CodeModel.GetById 22ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 1ms

/core/externals/update-engine/externals/gdata-objectivec-client/Source/Elements/GDataExtendedProperty.h

http://macfuse.googlecode.com/
C++ Header | 82 lines | 31 code | 18 blank | 33 comment | 2 complexity | 0ad4039a02f7eabef869484a1751ec21 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//  GDataExtendedProperty.h
18//
19
20#if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_CALENDAR_SERVICE \
21   || GDATA_INCLUDE_CONTACTS_SERVICE
22
23#import "GDataObject.h"
24
25#undef _EXTERN
26#undef _INITIALIZE_AS
27#ifdef GDATAEXTENDEDPROPERTY_DEFINE_GLOBALS
28#define _EXTERN
29#define _INITIALIZE_AS(x) =x
30#else
31#define _EXTERN GDATA_EXTERN
32#define _INITIALIZE_AS(x)
33#endif
34
35_EXTERN NSString* const kGDataExtendedPropertyRealmShared _INITIALIZE_AS(@"http://schemas.google.com/g/2005#shared");
36
37
38// an element with a name="" and a value="" attribute, as in
39//  <gd:extendedProperty name='X-MOZ-ALARM-LAST-ACK' value='2006-10-03T19:01:14Z'/>
40//
41// or an arbitrary XML blob, as in
42//  <gd:extendedProperty name='com.myCompany.myProperties'> <myXMLBlob /> </gd:extendedProperty>
43//
44// Servers may impose additional restrictions on names or on the size
45// or composition of the values.
46
47@interface GDataExtendedProperty : GDataObject <GDataExtension>
48
49+ (id)propertyWithName:(NSString *)name
50                 value:(NSString *)value;
51
52- (NSString *)value;
53- (void)setValue:(NSString *)str;
54
55- (NSString *)name;
56- (void)setName:(NSString *)str;
57
58- (NSString *)realm;
59- (void)setRealm:(NSString *)str;
60
61- (NSArray *)XMLValues;
62- (void)setXMLValues:(NSArray *)arr;
63- (void)addXMLValue:(NSXMLNode *)node;
64
65// Obj-C style interface to XML values storage
66//
67// keys are XMLValue node names, values are XMLValue node string values,
68// as in
69//   <key1>value1</key1>
70//   <key2>value2</key2>
71//
72// Behavior is undefined if child nodes are in some other format.
73
74- (void)setXMLValue:(NSString *)value forKey:(NSString *)key;
75- (NSString *)XMLValueForKey:(NSString *)key;
76
77- (NSDictionary *)XMLValuesDictionary;
78- (void)setXMLValuesDictionary:(NSDictionary *)dict;
79
80@end
81
82#endif // #if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_*_SERVICE