Skip to content

Commit 9340a59

Browse files
cynthiajianga-maurice
authored andcommitted
[RemoteConfig] Add left out API to RemoteConfig class
PiperOrigin-RevId: 288024263
1 parent 9282b7c commit 9340a59

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

remote_config/src/android/remote_config_android.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,12 @@ std::map<std::string, Variant> RemoteConfigInternal::GetAll() {
907907
// TODO(cynthiajiang) implement
908908
return value;
909909
}
910+
911+
const ConfigInfo& RemoteConfigInternal::GetInfo() const {
912+
static ConfigInfo config_info;
913+
// TODO(cynthiajiang) implement
914+
return config_info;
915+
}
910916
} // namespace internal
911917
} // namespace remote_config
912918
} // namespace firebase

remote_config/src/include/firebase/remote_config.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,13 @@ class RemoteConfig {
721721
/// key. The default value, if the key was set with @ref SetDefaults().
722722
std::map<std::string, Variant> GetAll();
723723

724+
/// @brief Returns information about the last fetch request, in the form
725+
/// of a ConfigInfo struct.
726+
///
727+
/// @return A ConfigInfo struct, containing fields reflecting the state
728+
/// of the most recent fetch request.
729+
const ConfigInfo& GetInfo();
730+
724731
/// Gets the App this remote config object is connected to.
725732
App* app() { return app_; }
726733

remote_config/src/ios/remote_config_ios.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,12 @@ bool ActivateFetched() {
521521
// TODO(cynthiajiang) implement
522522
return value;
523523
}
524+
525+
const ConfigInfo& RemoteConfigInternal::GetInfo() const {
526+
static ConfigInfo config_info;
527+
// TODO(cynthiajiang) implement
528+
return config_info;
529+
}
524530
} // namespace internal
525531
} // namespace remote_config
526532
} // namespace firebase

remote_config/src/remote_config.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,11 @@ std::vector<std::string> RemoteConfig::GetKeys() {
220220
std::map<std::string, Variant> RemoteConfig::GetAll() {
221221
return internal_->GetAll();
222222
}
223+
224+
// TODO(b/147143718): Change to a more descriptive name.
225+
const ConfigInfo& RemoteConfig::GetInfo() {
226+
return internal_->GetInfo();
227+
}
223228
#endif // FIREBASE_EARLY_ACCESS_PREVIEW
224229

225230
} // namespace remote_config

0 commit comments

Comments
 (0)