Skip to content

Commit 4b9fedf

Browse files
committed
[Config] Port 'RCNConfigSettings' (1)
1 parent e8a5155 commit 4b9fedf

File tree

11 files changed

+708
-10
lines changed

11 files changed

+708
-10
lines changed

FirebaseRemoteConfig/Sources/FIRRemoteConfig.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"
2121
#import "FirebaseRemoteConfig/Sources/Private/FIRRemoteConfig_Private.h"
2222
#import "FirebaseRemoteConfig/Sources/Private/RCNConfigFetch.h"
23-
#import "FirebaseRemoteConfig/Sources/Private/RCNConfigSettings.h"
2423
#import "FirebaseRemoteConfig/Sources/RCNConfigConstants.h"
2524
#import "FirebaseRemoteConfig/Sources/RCNConfigRealtime.h"
2625
#import "FirebaseRemoteConfig/Sources/RCNPersonalization.h"

FirebaseRemoteConfig/Sources/Private/FIRRemoteConfig_Private.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616

1717
#import <FirebaseRemoteConfig/FIRRemoteConfig.h>
18-
#import "RCNConfigSettings.h" // This import is needed to expose settings for the Swift API tests.
1918

2019
@class FIROptions;
2120
@class RCNConfigContent;

FirebaseRemoteConfig/Sources/RCNConfigFetch.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#import <GoogleUtilities/GULNSData+zlib.h>
2121
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"
2222
#import "FirebaseInstallations/Source/Library/Private/FirebaseInstallationsInternal.h"
23-
#import "FirebaseRemoteConfig/Sources/Private/RCNConfigSettings.h"
2423
#import "FirebaseRemoteConfig/Sources/RCNConfigConstants.h"
2524

2625
#import "FirebaseRemoteConfig/FirebaseRemoteConfig-Swift.h"

FirebaseRemoteConfig/Sources/RCNConfigRealtime.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#import "FirebaseInstallations/Source/Library/Private/FirebaseInstallationsInternal.h"
2222
#import "FirebaseRemoteConfig/FirebaseRemoteConfig-Swift.h"
2323
#import "FirebaseRemoteConfig/Sources/Private/RCNConfigFetch.h"
24-
#import "FirebaseRemoteConfig/Sources/Private/RCNConfigSettings.h"
2524
#import "FirebaseRemoteConfig/Sources/RCNConfigConstants.h"
2625

2726
/// URL params
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
//// Copyright 2024 Google LLC
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+
// import Foundation
16+
// import FirebaseCore
17+
//
18+
//// TODO(ncooke3): Port RCNConfigSettings
19+
// public class ConfigSettings {}
20+
//
21+
///// Completion handler invoked by NSSessionFetcher.
22+
// public typealias RCNConfigFetcherCompletion = (Data, URLResponse, any Error) -> Void
23+
//
24+
///// Completion handler invoked after a fetch that contains the updated keys
25+
// public typealias RCNConfigFetchCompletion = (
26+
// RemoteConfigFetchStatus,
27+
// RemoteConfigUpdate,
28+
// any Error
29+
// ) -> Void
30+
//
31+
// open class RCNConfigFetch : NSObject {
32+
// /// Designated initializer
33+
// init(
34+
// content: ConfigContent,
35+
// dbManager: ConfigDBManager,
36+
// settings: ConfigSettings,
37+
// analytics: (any FIRAnalyticsInterop)?,
38+
// experiment: ConfigExperiment?,
39+
// queue: DispatchQueue,
40+
// namespace: String,
41+
// options: FirebaseOptions
42+
// ) {
43+
//
44+
// }
45+
//
46+
// typedef void (^FIRRemoteConfigFetchCompletion)(FIRRemoteConfigFetchStatus status,
47+
// NSError *_Nullable error)
48+
// NS_SWIFT_UNAVAILABLE("Use Swift's closure syntax instead.");
49+
//
50+
// /// Fetches config data keyed by namespace. Completion block will be called on the main queue.
51+
// /// @param expirationDuration Expiration duration, in seconds.
52+
// /// @param completionHandler Callback handler.
53+
// open func fetchConfig(
54+
// withExpirationDuration expirationDuration: TimeInterval,
55+
// completionHandler: Int32) {
56+
//
57+
// }
58+
//
59+
// /// Fetches config data immediately, keyed by namespace. Completion block will be called on the
60+
// /main
61+
// /// queue.
62+
// /// @param fetchAttemptNumber The number of the fetch attempt.
63+
// /// @param completionHandler Callback handler.
64+
// open func realtimeFetchConfigWithNoExpirationDuration(_ fetchAttemptNumber: Int,
65+
// completionHandler: @escaping RCNConfigFetchCompletion) {
66+
//
67+
// }
68+
//
69+
// /// Add the ability to update NSURLSession's timeout after a session has already been created.
70+
// open func recreateNetworkSession() {
71+
//
72+
// }
73+
//
74+
// /// Provide fetchSession for tests to override.
75+
// open var fetchSession: URLSession {
76+
//
77+
// }
78+
//
79+
// /// Provide config template version number for Realtime config client.
80+
// open var templateVersionNumber: String {
81+
//
82+
// }
83+
// }
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//// Copyright 2024 Google LLC
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+
// import Foundation
16+
//
17+
// open class RCNConfigRealtime : NSObject, URLSessionDataDelegate {
18+
//
19+
// public init(_ configFetch: RCNConfigFetch!, settings: RCNConfigSettings, namespace: String,
20+
// options: Any!)
21+
//
22+
// open func addConfigUpdateListener(_ listener: @escaping RCNConfigUpdateCompletion) -> Any!
23+
//
24+
// open func removeConfigUpdateListener(_ listener: @escaping RCNConfigUpdateCompletion)
25+
// }
26+
///// Completion handler invoked by config update methods when they get a response from the server.
27+
/////
28+
///// @param error Error message on failure.
29+
// public typealias RCNConfigUpdateCompletion = (UnsafeMutablePointer<Int32>?, (any Error)?) -> Void

0 commit comments

Comments
 (0)