engine_entry get_engine_null_entry() { return engine_entry( [](const data::config& config_, const boost::filesystem::path&, const boost::filesystem::path&, const boost::filesystem::path&, iface::environment_detector&, iface::displayer&, logger*) { return make_engine(config_.active_shell_config().engine, not_supported(), not_supported(), not_supported(), not_supported(), not_supported(), not_supported(), not_supported(), not_supported(), supported_features()); }, "", data::markdown_string("An engine which does not support anything. " "Mainly for testing purposes."), supported_features()); }
std::string get_connection_string() { std::vector<std::string> connection_properties; #if !ADB_HOST static const char* cnxn_props[] = { "ro.product.name", "ro.product.model", "ro.product.device", }; for (const auto& prop_name : cnxn_props) { char value[PROPERTY_VALUE_MAX]; property_get(prop_name, value, ""); connection_properties.push_back( android::base::StringPrintf("%s=%s", prop_name, value)); } #endif connection_properties.push_back(android::base::StringPrintf( "features=%s", android::base::Join(supported_features(), ',').c_str())); return android::base::StringPrintf( "%s::%s", adb_device_banner, android::base::Join(connection_properties, ';').c_str()); }
std::string get_connection_string() { std::vector<std::string> connection_properties; #if !ADB_HOST static const char* cnxn_props[] = { "ro.product.name", "ro.product.model", "ro.product.device", }; for (const auto& prop : cnxn_props) { std::string value = std::string(prop) + "=" + android::base::GetProperty(prop, ""); connection_properties.push_back(value); } #endif connection_properties.push_back(android::base::StringPrintf( "features=%s", FeatureSetToString(supported_features()).c_str())); return android::base::StringPrintf( "%s::%s", adb_device_banner, android::base::Join(connection_properties, ';').c_str()); }
bool CanUseFeature(const FeatureSet& feature_set, const std::string& feature) { return feature_set.count(feature) > 0 && supported_features().count(feature) > 0; }