PageRenderTime 14ms CodeModel.GetById 9ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/core/externals/update-engine/externals/gdata-objectivec-client/Source/Networking/GDataServerError.h

http://macfuse.googlecode.com/
C++ Header | 94 lines | 41 code | 23 blank | 30 comment | 0 complexity | 1c5a20c0a496285812ce8cda543b73f7 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// GDataServerError.h
18//
19// Wrapper around the list of structured errors returned by GData servers
20//
21// See also the Java library's ErrorDomain.java, ServiceException.java, and
22// CoreErrorDomain.java
23//
24
25#import <Foundation/Foundation.h>
26
27#import "GDataDefines.h"
28
29#undef _EXTERN
30#undef _INITIALIZE_AS
31#ifdef GDATASERVERERROR_DEFINE_GLOBALS
32#define _EXTERN
33#define _INITIALIZE_AS(x) =x
34#else
35#define _EXTERN GDATA_EXTERN
36#define _INITIALIZE_AS(x)
37#endif
38
39_EXTERN NSString* const kGDataErrorDomainCore _INITIALIZE_AS(@"GData");
40
41
42@class GDataServerError;
43
44//
45// GDataServerErrorGroup represents an array of error objects
46//
47
48@interface GDataServerErrorGroup : NSObject {
49  NSArray *errors_;
50}
51
52- (id)initWithData:(NSData *)data;
53
54- (NSArray *)errors;
55- (void)setErrors:(NSArray *)array;
56
57- (GDataServerError *)mainError;
58
59@end
60
61//
62// GDataServerError
63//
64
65@interface GDataServerError : NSObject {
66  NSString *domain_;          // domain name
67  NSString *code_;            // error name, unique within the domain
68  NSString *internalReason_;  // internal server message
69  NSString *extendedHelpURI_; // URI to additional help
70  NSString *sendReportURI_;   // URI for sending a report
71}
72
73- (id)initWithXMLElement:(NSXMLElement *)element;
74
75// summary is a minimally user-readable summary of the domain, code, and
76// reason
77- (NSString *)summary;
78
79- (NSString *)domain;
80- (void)setDomain:(NSString *)str;
81
82- (NSString *)code;
83- (void)setCode:(NSString *)str;
84
85- (NSString *)internalReason;
86- (void)setInternalReason:(NSString *)str;
87
88- (NSString *)extendedHelpURI;
89- (void)setExtendedHelpURI:(NSString *)str;
90
91- (NSString *)sendReportURI;
92- (void)setSendReportURI:(NSString *)str;
93
94@end