Android-cuttlefish cvd tool
Classes | Namespaces | Macros | Functions | Variables
properties.cpp File Reference
#include "android-base/properties.h"
#include <algorithm>
#include <chrono>
#include <limits>
#include <set>
#include <string>
#include <android-base/parsebool.h>
#include <android-base/parseint.h>
#include <android-base/strings.h>
#include <android-base/thread_annotations.h>
Include dependency graph for properties.cpp:

Classes

struct  prop_info
 
struct  prop_info_cmp
 

Namespaces

namespace  android
 
namespace  android::base
 

Macros

#define SYSPROP_WEAK
 
#define PROP_VALUE_MAX   92
 

Functions

static auto &g_properties GUARDED_BY (g_properties_lock)
 
SYSPROP_WEAK int __system_property_set (const char *key, const char *value)
 
SYSPROP_WEAK int __system_property_get (const char *key, char *value)
 
SYSPROP_WEAK const prop_info__system_property_find (const char *key)
 
SYSPROP_WEAK void __system_property_read_callback (const prop_info *pi, void(*callback)(void *, const char *, const char *, uint32_t), void *cookie)
 
bool android::base::GetBoolProperty (const std::string &key, bool default_value)
 
template<typename T >
android::base::GetIntProperty (const std::string &key, T default_value, T min=std::numeric_limits< T >::min(), T max=std::numeric_limits< T >::max())
 
template<typename T >
android::base::GetUintProperty (const std::string &key, T default_value, T max=std::numeric_limits< T >::max())
 
template int8_t android::base::GetIntProperty (const std::string &, int8_t, int8_t, int8_t)
 
template int16_t android::base::GetIntProperty (const std::string &, int16_t, int16_t, int16_t)
 
template int32_t android::base::GetIntProperty (const std::string &, int32_t, int32_t, int32_t)
 
template int64_t android::base::GetIntProperty (const std::string &, int64_t, int64_t, int64_t)
 
template uint8_t android::base::GetUintProperty (const std::string &, uint8_t, uint8_t)
 
template uint16_t android::base::GetUintProperty (const std::string &, uint16_t, uint16_t)
 
template uint32_t android::base::GetUintProperty (const std::string &, uint32_t, uint32_t)
 
template uint64_t android::base::GetUintProperty (const std::string &, uint64_t, uint64_t)
 
std::string android::base::GetProperty (const std::string &key, const std::string &default_value)
 
bool android::base::SetProperty (const std::string &key, const std::string &value)
 

Variables

static auto & g_properties_lock = *new std::mutex
 

Macro Definition Documentation

◆ PROP_VALUE_MAX

#define PROP_VALUE_MAX   92

◆ SYSPROP_WEAK

#define SYSPROP_WEAK

Function Documentation

◆ __system_property_find()

SYSPROP_WEAK const prop_info * __system_property_find ( const char *  key)

Implementation detail.

◆ __system_property_get()

SYSPROP_WEAK int __system_property_get ( const char *  key,
char *  value 
)

Implementation detail.

◆ __system_property_read_callback()

SYSPROP_WEAK void __system_property_read_callback ( const prop_info pi,
void(*)(void *, const char *, const char *, uint32_t)  callback,
void *  cookie 
)

Implementation detail.

◆ __system_property_set()

SYSPROP_WEAK int __system_property_set ( const char *  key,
const char *  value 
)

Implementation detail.

◆ GUARDED_BY()

static auto &g_properties GUARDED_BY ( g_properties_lock  )
static

Variable Documentation

◆ g_properties_lock

auto& g_properties_lock = *new std::mutex
static