|
| 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 | +// } |
0 commit comments