Namespaces
Records
-
class MetricPropertiesTest -
class MetricPropertiesTest_BooleanProperty_Test -
class MetricPropertiesTest_NonExistentProperty_Test -
class MetricPropertiesTest_SetGetDelete_Test -
class MigrateMetricDirectoryTest -
class MigrateMetricDirectoryTest_HasBothMetricDirectory_Test -
class MigrateMetricDirectoryTest_HasNewMetricDirectory_Test -
class MigrateMetricDirectoryTest_HasNoMetricDirectory_Test -
class MigrateMetricDirectoryTest_HasOldMetricDirectory_Test
Functions
-
void SetBool (std::string_view name, bool value)Defined at line 25 of file ../../src/lib/analytics/cpp/metric_properties/metric_properties.h
-
std::optional<std::string> Get (std::string_view name)Get the property with the given name. The returned string will contain no leading or trailing
newlines. Returns an empty std::optional if the property does not exist.
Defined at line 54 of file ../../src/lib/analytics/cpp/metric_properties/metric_properties.cc
-
std::optional<bool> GetBool (std::string_view name)Similar to Get(), but returns a boolean. Returns true if and only if Get() would return "1".
Defined at line 80 of file ../../src/lib/analytics/cpp/metric_properties/metric_properties.cc
-
void Set (std::string_view name, std::string_view value)Set the property with the given name to the given value.
Defined at line 64 of file ../../src/lib/analytics/cpp/metric_properties/metric_properties.cc
-
void Delete (std::string_view name)Delete the property with the given name.
Defined at line 88 of file ../../src/lib/analytics/cpp/metric_properties/metric_properties.cc
-
bool Exists (std::string_view name)Check the existence of the property with the given name.
Defined at line 94 of file ../../src/lib/analytics/cpp/metric_properties/metric_properties.cc
-
void MigrateMetricDirectory ()Migrate persistent storage location from $HOME to $XDG_DATA_HOME
Defined at line 100 of file ../../src/lib/analytics/cpp/metric_properties/metric_properties.cc
-
bool HasHome ()Check existence of home directory
Defined at line 123 of file ../../src/lib/analytics/cpp/metric_properties/metric_properties.cc