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
#define RCN_SEC_PER_MIN 60
20
#define RCN_MSEC_PER_SEC 1000
21
 
22
/// Key prefix applied to all the packages (bundle IDs) in internal metadata.
23
static NSString *const RCNInternalMetadataAllPackagesPrefix = @"all_packages";
24
 
25
/// HTTP connection default timeout in seconds.
26
static const NSTimeInterval RCNHTTPDefaultConnectionTimeout = 60;
27
/// Default duration of how long config data lasts to stay fresh.
28
static const NSTimeInterval RCNDefaultMinimumFetchInterval = 43200;
29
 
30
/// Label for serial queue for read/write lock on ivars.
31
static const char *RCNRemoteConfigQueueLabel = "com.google.GoogleConfigService.FIRRemoteConfig";
32
 
33
/// Constants for key names in the fetch response.
34
/// Key that includes an array of template entries.
35
static NSString *const RCNFetchResponseKeyEntries = @"entries";
36
/// Key that includes data for experiment descriptions in ABT.
37
static NSString *const RCNFetchResponseKeyExperimentDescriptions = @"experimentDescriptions";
38
/// Key that includes data for Personalization metadata.
39
static NSString *const RCNFetchResponseKeyPersonalizationMetadata = @"personalizationMetadata";
40
/// Error key.
41
static NSString *const RCNFetchResponseKeyError = @"error";
42
/// Error code.
43
static NSString *const RCNFetchResponseKeyErrorCode = @"code";
44
/// Error status.
45
static NSString *const RCNFetchResponseKeyErrorStatus = @"status";
46
/// Error message.
47
static NSString *const RCNFetchResponseKeyErrorMessage = @"message";
48
/// The current state of the backend template.
49
static NSString *const RCNFetchResponseKeyState = @"state";
50
/// Default state (when not set).
51
static NSString *const RCNFetchResponseKeyStateUnspecified = @"INSTANCE_STATE_UNSPECIFIED";
52
/// Config key/value map and/or ABT experiment list differs from last fetch.
53
/// TODO: Migrate to the new HTTP error codes once available in the backend. b/117182055
54
static NSString *const RCNFetchResponseKeyStateUpdate = @"UPDATE";
55
/// No template fetched.
56
static NSString *const RCNFetchResponseKeyStateNoTemplate = @"NO_TEMPLATE";
57
/// Config key/value map and ABT experiment list both match last fetch.
58
static NSString *const RCNFetchResponseKeyStateNoChange = @"NO_CHANGE";
59
/// Template found, but evaluates to empty (e.g. all keys omitted).
60
static NSString *const RCNFetchResponseKeyStateEmptyConfig = @"EMPTY_CONFIG";