|
16 | 16 | #define FIREBASE_REMOTE_CONFIG_CLIENT_CPP_SRC_IOS_REMOTE_CONFIG_IOS_H_
|
17 | 17 |
|
18 | 18 | #include "firebase/app.h"
|
| 19 | +#include "app/memory/unique_ptr.h" |
19 | 20 | #include "app/src/reference_counted_future_impl.h"
|
| 21 | +#include "app/src/util_ios.h" |
20 | 22 | #include "firebase/future.h"
|
| 23 | + |
21 | 24 | #include "remote_config/src/include/firebase/remote_config.h"
|
22 | 25 |
|
| 26 | +#ifdef __OBJC__ |
| 27 | +#import "FIRRemoteConfig.h" |
| 28 | +#endif // __OBJC__ |
| 29 | + |
23 | 30 | namespace firebase {
|
24 | 31 | namespace remote_config {
|
25 | 32 | namespace internal {
|
26 | 33 | // Remote Config Client implementation for iOS.
|
27 |
| -// |
| 34 | + |
| 35 | +// This defines the class FIRRemoteConfigPointer, which is a C++-compatible wrapper |
| 36 | +// around the FIRRemoteConfig Obj-C class. |
| 37 | +OBJ_C_PTR_WRAPPER(FIRRemoteConfig); |
| 38 | + |
28 | 39 | // This class implements functions from `firebase/remote_config.h` header.
|
29 | 40 | // See `firebase/remote_config.h` for all public functions documentation.
|
30 | 41 | class RemoteConfigInternal {
|
@@ -80,11 +91,21 @@ class RemoteConfigInternal {
|
80 | 91 | void Cleanup();
|
81 | 92 |
|
82 | 93 | private:
|
| 94 | +#ifdef __OBJC__ |
| 95 | + FIRRemoteConfig* _Nullable impl() const { return impl_->get(); } |
| 96 | +#endif |
83 | 97 | // app
|
84 | 98 | const firebase::App& app_;
|
85 | 99 |
|
| 100 | + UniquePtr<FIRRemoteConfigPointer> impl_; |
| 101 | + |
86 | 102 | /// Handle calls from Futures that the API returns.
|
87 | 103 | ReferenceCountedFutureImpl future_impl_;
|
| 104 | + |
| 105 | + // Saved default keys. |
| 106 | + std::vector<std::string> default_keys_; |
| 107 | + |
| 108 | + int64_t throttled_end_time_in_sec_; |
88 | 109 | };
|
89 | 110 | } // namespace internal
|
90 | 111 | } // namespace remote_config
|
|
0 commit comments