PageRenderTime 62ms CodeModel.GetById 57ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/core/externals/update-engine/externals/gdata-objectivec-client/Source/Clients/Blogger/GDataThreadingElements.h

http://macfuse.googlecode.com/
C++ Header | 97 lines | 41 code | 21 blank | 35 comment | 1 complexity | a63fe53b9a3525215ede81ca6cc71e76 MD5 | raw file
 1/* Copyright (c) 2009 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#if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_BLOGGER_SERVICE
17
18//
19//  GDataThreadingElements.h
20//
21// Implements extensions described in http://www.ietf.org/rfc/rfc4685.txt
22//
23// There are several "thr" threading element extensions:
24//   1. The simple <thr:total> value element
25//   2. The custom <thr:in-reply-to> element
26//   3. The thr:count and thr:updated attribute extensions added to atom:link
27//
28
29#import "GDataObject.h"
30#import "GDataValueConstruct.h"
31#import "GDataLink.h"
32
33#undef _EXTERN
34#undef _INITIALIZE_AS
35#ifdef GDATATHREADINGELEMENTS_DEFINE_GLOBALS
36#define _EXTERN
37#define _INITIALIZE_AS(x) =x
38#else
39#define _EXTERN GDATA_EXTERN
40#define _INITIALIZE_AS(x)
41#endif
42
43_EXTERN NSString* const kGDataNamespaceAtomThreading _INITIALIZE_AS(@"http://purl.org/syndication/thread/1.0");
44_EXTERN NSString* const kGDataNamespaceAtomThreadingPrefix _INITIALIZE_AS(@"thr");
45
46
47@interface GDataThreadingTotal : GDataValueElementConstruct <GDataExtension>
48// thr:total extension element
49//
50// allocate with [GDataThreadingTotal valueWithInt:x]
51@end
52
53
54// for in-reply-to elements, like
55//
56// <thr:in-reply-to
57//   href="http://blogName.blogspot.com/2007/04/first-post.html"
58//   ref="tag:blogger.com,1999:blog-blogID.post-postID"
59//   type="text/html"/>
60
61@interface GDataInReplyTo : GDataObject <GDataExtension>
62
63+ (GDataInReplyTo *)inReplyToWithHref:(NSString *)href
64                                  ref:(NSString *)ref
65                               source:(NSString *)source
66                                 type:(NSString *)type;
67
68- (NSString *)href;
69- (void)setHref:(NSString *)str;
70
71- (NSString *)ref;
72- (void)setRef:(NSString *)str;
73
74- (NSString *)source;
75- (void)setSource:(NSString *)str;
76
77- (NSString *)type;
78- (void)setType:(NSString *)str;
79
80@end
81
82
83@interface GDataThreadingLink : NSObject
84// This utility class has class methods for adding and accessing threading
85// attribute extensions on atom:link elements
86+ (void)addThreadingLinkExtensionDeclarationsToObject:(GDataObject *)object;
87
88+ (NSNumber *)threadingCountForLink:(GDataLink *)link;
89+ (void)setThreadingCount:(NSNumber *)number
90                  forLink:(GDataLink *)link;
91
92+ (GDataDateTime *)threadingUpdatedDateForLink:(GDataLink *)link;
93+ (void)setThreadingUpdatedDate:(GDataDateTime *)dateTime
94                        forLink:(GDataLink *)link;
95@end
96
97#endif // !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_BLOGGER_SERVICE