Lines Matching refs:props

47 std::string GenerateDefaultPropName(const sysprop::Properties& props,
50 Result<void> ValidateProp(const sysprop::Properties& props,
52 Result<void> ValidateProps(const sysprop::Properties& props);
54 std::string GenerateDefaultPropName(const sysprop::Properties& props, in GenerateDefaultPropName() argument
60 switch (props.owner()) { in GenerateDefaultPropName()
108 Result<void> ValidateProp(const sysprop::Properties& props, in ValidateProp() argument
138 if (prop_name.empty()) prop_name = GenerateDefaultPropName(props, prop); in ValidateProp()
160 switch (props.owner()) { in ValidateProp()
202 Result<void> ValidateProps(const sysprop::Properties& props) { in ValidateProps() argument
203 std::vector<std::string> names = android::base::Split(props.module(), "."); in ValidateProps()
205 return Errorf("Invalid module name \"{}\"", props.module()); in ValidateProps()
214 if (props.prop_size() == 0) { in ValidateProps()
218 for (int i = 0; i < props.prop_size(); ++i) { in ValidateProps()
219 const auto& prop = props.prop(i); in ValidateProps()
220 if (auto res = ValidateProp(props, prop); !res.ok()) return res; in ValidateProps()
226 for (int i = 0; i < props.prop_size(); ++i) { in ValidateProps()
227 const auto& prop = props.prop(i); in ValidateProps()
253 void SetDefaultValues(sysprop::Properties* props) { in SetDefaultValues() argument
254 for (int i = 0; i < props->prop_size(); ++i) { in SetDefaultValues()
256 sysprop::Property& prop = *props->mutable_prop(i); in SetDefaultValues()
258 prop.set_prop_name(GenerateDefaultPropName(*props, prop)); in SetDefaultValues()
284 std::string GetModuleName(const sysprop::Properties& props) { in GetModuleName() argument
285 const std::string& module = props.module(); in GetModuleName()
331 sysprop::Properties* props = ret.mutable_props(i); in ParseApiFile() local
333 if (!modules.insert(props->module()).second) { in ParseApiFile()
335 input_file_path, props->module()); in ParseApiFile()
338 SetDefaultValues(props); in ParseApiFile()
341 if (auto res = ValidateProps(*props); !res.ok()) { in ParseApiFile()