Lines Matching refs:propValue

39 Result<void> verifyPropValue(const VehiclePropValue& propValue, VehicleProperty vehicleProperty,  in verifyPropValue()  argument
41 auto prop = verifyAndCast<VehicleProperty>(propValue.prop); in verifyPropValue()
49 if (propValue.value.int32Values.size() < minInt32Values) { in verifyPropValue()
51 << " values, received " << propValue.value.int32Values.size(); in verifyPropValue()
163 Result<InitialUserInfoRequest> toInitialUserInfoRequest(const VehiclePropValue& propValue) { in toInitialUserInfoRequest() argument
164 auto ret = verifyPropValue(propValue, VehicleProperty::INITIAL_USER_INFO, 2); in toInitialUserInfoRequest()
169 request.requestId = propValue.value.int32Values[0]; in toInitialUserInfoRequest()
170 auto requestType = verifyAndCast<InitialUserInfoRequestType>(propValue.value.int32Values[1]); in toInitialUserInfoRequest()
175 ret = parseUsersInfo(propValue.value.int32Values, 2, &request.usersInfo); in toInitialUserInfoRequest()
182 Result<SwitchUserRequest> toSwitchUserRequest(const VehiclePropValue& propValue) { in toSwitchUserRequest() argument
183 auto ret = verifyPropValue(propValue, VehicleProperty::SWITCH_USER, 2); in toSwitchUserRequest()
188 auto messageType = verifyAndCast<SwitchUserMessageType>(propValue.value.int32Values[1]); in toSwitchUserRequest()
198 request.requestId = propValue.value.int32Values[0]; in toSwitchUserRequest()
200 ret = parseUserInfo(propValue.value.int32Values, 2, &request.targetUser); in toSwitchUserRequest()
204 ret = parseUsersInfo(propValue.value.int32Values, 4, &request.usersInfo); in toSwitchUserRequest()
211 Result<CreateUserRequest> toCreateUserRequest(const VehiclePropValue& propValue) { in toCreateUserRequest() argument
212 auto ret = verifyPropValue(propValue, VehicleProperty::CREATE_USER, 1); in toCreateUserRequest()
217 request.requestId = propValue.value.int32Values[0]; in toCreateUserRequest()
218 ret = parseUserInfo(propValue.value.int32Values, 1, &request.newUserInfo); in toCreateUserRequest()
222 request.newUserName = propValue.value.stringValue; in toCreateUserRequest()
223 ret = parseUsersInfo(propValue.value.int32Values, 3, &request.usersInfo); in toCreateUserRequest()
230 Result<RemoveUserRequest> toRemoveUserRequest(const VehiclePropValue& propValue) { in toRemoveUserRequest() argument
231 auto ret = verifyPropValue(propValue, VehicleProperty::REMOVE_USER, 1); in toRemoveUserRequest()
236 request.requestId = propValue.value.int32Values[0]; in toRemoveUserRequest()
237 ret = parseUserInfo(propValue.value.int32Values, 1, &request.removedUserInfo); in toRemoveUserRequest()
241 ret = parseUsersInfo(propValue.value.int32Values, 3, &request.usersInfo); in toRemoveUserRequest()
249 const VehiclePropValue& propValue) { in toUserIdentificationGetRequest() argument
250 auto ret = verifyPropValue(propValue, VehicleProperty::USER_IDENTIFICATION_ASSOCIATION, 4); in toUserIdentificationGetRequest()
255 request.requestId = propValue.value.int32Values[0]; in toUserIdentificationGetRequest()
256 ret = parseUserInfo(propValue.value.int32Values, 1, &request.userInfo); in toUserIdentificationGetRequest()
260 request.numberAssociationTypes = propValue.value.int32Values[3]; in toUserIdentificationGetRequest()
261 ret = parseUserAssociationTypes(propValue.value.int32Values, 4, request.numberAssociationTypes, in toUserIdentificationGetRequest()
270 const VehiclePropValue& propValue) { in toUserIdentificationSetRequest() argument
271 auto ret = verifyPropValue(propValue, VehicleProperty::USER_IDENTIFICATION_ASSOCIATION, 4); in toUserIdentificationSetRequest()
276 request.requestId = propValue.value.int32Values[0]; in toUserIdentificationSetRequest()
277 ret = parseUserInfo(propValue.value.int32Values, 1, &request.userInfo); in toUserIdentificationSetRequest()
281 request.numberAssociations = propValue.value.int32Values[3]; in toUserIdentificationSetRequest()
282 ret = parseUserAssociations(propValue.value.int32Values, 4, request.numberAssociations, in toUserIdentificationSetRequest()
296 auto propValue = std::unique_ptr<VehiclePropValue>(new VehiclePropValue()); in toVehiclePropValue() local
297 propValue->prop = static_cast<int32_t>(VehicleProperty::SWITCH_USER); in toVehiclePropValue()
298 propValue->timestamp = elapsedRealtimeNano(); in toVehiclePropValue()
299 propValue->value.int32Values.resize(3); in toVehiclePropValue()
300 propValue->value.int32Values[0] = static_cast<int32_t>(request.requestId); in toVehiclePropValue()
301 propValue->value.int32Values[1] = static_cast<int32_t>(request.messageType); in toVehiclePropValue()
302 propValue->value.int32Values[2] = static_cast<int32_t>(request.targetUser.userId); in toVehiclePropValue()
303 return propValue; in toVehiclePropValue()
307 auto propValue = std::unique_ptr<VehiclePropValue>(new VehiclePropValue()); in toVehiclePropValue() local
308 propValue->prop = static_cast<int32_t>(VehicleProperty::INITIAL_USER_INFO); in toVehiclePropValue()
309 propValue->timestamp = elapsedRealtimeNano(); in toVehiclePropValue()
310 propValue->value.int32Values.resize(4); in toVehiclePropValue()
311 propValue->value.int32Values[0] = static_cast<int32_t>(response.requestId); in toVehiclePropValue()
312 propValue->value.int32Values[1] = static_cast<int32_t>(response.action); in toVehiclePropValue()
313 propValue->value.int32Values[2] = static_cast<int32_t>(response.userToSwitchOrCreate.userId); in toVehiclePropValue()
314 propValue->value.int32Values[3] = static_cast<int32_t>(response.userToSwitchOrCreate.flags); in toVehiclePropValue()
315 propValue->value.stringValue = std::string(response.userLocales) + std::string(kSeparator) + in toVehiclePropValue()
317 return propValue; in toVehiclePropValue()
321 auto propValue = std::unique_ptr<VehiclePropValue>(new VehiclePropValue()); in toVehiclePropValue() local
322 propValue->prop = static_cast<int32_t>(VehicleProperty::SWITCH_USER); in toVehiclePropValue()
323 propValue->timestamp = elapsedRealtimeNano(); in toVehiclePropValue()
324 propValue->value.int32Values.resize(3); in toVehiclePropValue()
325 propValue->value.int32Values[0] = static_cast<int32_t>(response.requestId); in toVehiclePropValue()
326 propValue->value.int32Values[1] = static_cast<int32_t>(response.messageType); in toVehiclePropValue()
327 propValue->value.int32Values[2] = static_cast<int32_t>(response.status); in toVehiclePropValue()
329 propValue->value.stringValue = response.errorMessage; in toVehiclePropValue()
331 return propValue; in toVehiclePropValue()
335 auto propValue = std::unique_ptr<VehiclePropValue>(new VehiclePropValue()); in toVehiclePropValue() local
336 propValue->prop = static_cast<int32_t>(VehicleProperty::CREATE_USER); in toVehiclePropValue()
337 propValue->timestamp = elapsedRealtimeNano(); in toVehiclePropValue()
338 propValue->value.int32Values.resize(2); in toVehiclePropValue()
339 propValue->value.int32Values[0] = static_cast<int32_t>(response.requestId); in toVehiclePropValue()
340 propValue->value.int32Values[1] = static_cast<int32_t>(response.status); in toVehiclePropValue()
342 propValue->value.stringValue = response.errorMessage; in toVehiclePropValue()
344 return propValue; in toVehiclePropValue()
348 auto propValue = std::unique_ptr<VehiclePropValue>(new VehiclePropValue()); in toVehiclePropValue() local
349 propValue->prop = static_cast<int32_t>(VehicleProperty::USER_IDENTIFICATION_ASSOCIATION); in toVehiclePropValue()
350 propValue->timestamp = elapsedRealtimeNano(); in toVehiclePropValue()
351 propValue->value.int32Values.resize(2 + (response.numberAssociation * 2)); in toVehiclePropValue()
352 propValue->value.int32Values[0] = static_cast<int32_t>(response.requestId); in toVehiclePropValue()
353 propValue->value.int32Values[1] = static_cast<int32_t>(response.numberAssociation); in toVehiclePropValue()
356 propValue->value.int32Values[int32ValuesPos] = in toVehiclePropValue()
358 propValue->value.int32Values[int32ValuesPos + 1] = in toVehiclePropValue()
362 propValue->value.stringValue = response.errorMessage; in toVehiclePropValue()
364 return propValue; in toVehiclePropValue()