Proyectos de Subversion Iphone Microlearning

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
/*
2
 * Copyright 2019 Google
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *      http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
 
17
#import <Foundation/Foundation.h>
18
 
19
#import "FirebaseInstallations/Source/Library/Public/FirebaseInstallations/FIRInstallationsErrors.h"
20
 
21
@class FIRInstallationsHTTPError;
22
@class FBLPromise<ResultType>;
23
 
24
NS_ASSUME_NONNULL_BEGIN
25
 
26
void FIRInstallationsItemSetErrorToPointer(NSError *error, NSError **pointer);
27
 
28
@interface FIRInstallationsErrorUtil : NSObject
29
 
30
+ (NSError *)keyedArchiverErrorWithException:(NSException *)exception;
31
+ (NSError *)keyedArchiverErrorWithError:(NSError *)error;
32
 
33
+ (NSError *)keychainErrorWithFunction:(NSString *)keychainFunction status:(OSStatus)status;
34
 
35
+ (NSError *)installationItemNotFoundForAppID:(NSString *)appID appName:(NSString *)appName;
36
 
37
+ (NSError *)JSONSerializationError:(NSError *)error;
38
 
39
+ (NSError *)networkErrorWithError:(NSError *)error;
40
 
41
+ (NSError *)FIDRegistrationErrorWithResponseMissingField:(NSString *)missingFieldName;
42
 
43
+ (NSError *)corruptedIIDTokenData;
44
 
45
+ (FIRInstallationsHTTPError *)APIErrorWithHTTPResponse:(NSHTTPURLResponse *)HTTPResponse
46
                                                   data:(nullable NSData *)data;
47
+ (BOOL)isAPIError:(NSError *)error withHTTPCode:(NSInteger)HTTPCode;
48
 
49
+ (NSError *)backoffIntervalWaitError;
50
 
51
/**
52
 * Returns the passed error if it is already in the public domain or a new error with the passed
53
 * error at `NSUnderlyingErrorKey`.
54
 */
55
+ (NSError *)publicDomainErrorWithError:(NSError *)error;
56
 
57
+ (FBLPromise *)rejectedPromiseWithError:(NSError *)error;
58
 
59
+ (NSError *)installationsErrorWithCode:(FIRInstallationsErrorCode)code
60
                          failureReason:(nullable NSString *)failureReason
61
                        underlyingError:(nullable NSError *)underlyingError;
62
 
63
@end
64
 
65
NS_ASSUME_NONNULL_END