std::string GetPropertyName(CS_Property property, CS_Status* status) { llvm::SmallString<128> buf; int propertyIndex; auto source = GetPropertySource(property, &propertyIndex, status); if (!source) return std::string{}; return source->GetPropertyName(propertyIndex, buf, status); }
llvm::StringRef GetPropertyName(CS_Property property, llvm::SmallVectorImpl<char>& buf, CS_Status* status) { int propertyIndex; auto source = GetPropertySource(property, &propertyIndex, status); if (!source) return llvm::StringRef{}; return source->GetPropertyName(propertyIndex, buf, status); }
BYTE MgdSqlDataReader::GetByte(INT32 index) { BYTE ret = 0; MG_FEATURE_SERVICE_TRY() STRING propertyName = GetPropertyName(index); ret = GetByte(propertyName); MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdSqlDataReader::GetByte") return ret; }
bool MgdSqlDataReader::GetBoolean(INT32 index) { bool ret = false; MG_FEATURE_SERVICE_TRY() STRING propertyName = GetPropertyName(index); ret = GetBoolean(propertyName); MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdSqlDataReader::GetBoolean") return ret; }
float MgdSqlDataReader::GetSingle(INT32 index) { float ret = 0.0f; MG_FEATURE_SERVICE_TRY() STRING propertyName = GetPropertyName(index); ret = GetSingle(propertyName); MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdSqlDataReader::GetSingle") return ret; }
double MgdSqlDataReader::GetDouble(INT32 index) { double ret = 0.0; MG_FEATURE_SERVICE_TRY() STRING propertyName = GetPropertyName(index); ret = GetDouble(propertyName); MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdSqlDataReader::GetDouble") return ret; }
INT64 MgdSqlDataReader::GetInt64(INT32 index) { INT64 ret = 0; MG_FEATURE_SERVICE_TRY() STRING propertyName = GetPropertyName(index); ret = GetInt64(propertyName); MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdSqlDataReader::GetInt64") return ret; }
STRING MgdSqlDataReader::GetString(INT32 index) { STRING ret = L""; MG_FEATURE_SERVICE_TRY() STRING propertyName = GetPropertyName(index); ret = GetString(propertyName); MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdSqlDataReader::GetString") return ret; }
MgDateTime* MgdSqlDataReader::GetDateTime(INT32 index) { Ptr<MgDateTime> ret; MG_FEATURE_SERVICE_TRY() STRING propertyName = GetPropertyName(index); ret = GetDateTime(propertyName); MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdSqlDataReader::GetDateTime") return ret; }
MgByteReader* MgdSqlDataReader::GetGeometry(INT32 index) { Ptr<MgByteReader> ret; MG_FEATURE_SERVICE_TRY() STRING propertyName = GetPropertyName(index); ret = GetGeometry(propertyName); MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdSqlDataReader::GetGeometry") return ret; }
std::vector<std::string> DeviceInstance::GetPropertyNames() const { std::vector<std::string> result; size_t nrProperties = GetNumberOfProperties(); result.reserve(nrProperties); for (size_t i = 0; i < nrProperties; ++i) result.push_back(GetPropertyName(i)); return result; }
void list_properties( CAMDeviceInfoPtr pDevInfo) { uint32_t ctr; printf( "\n Properties %s\n", pDevInfo->Model); printf( " ========== %s\n", underline( pDevInfo->Model)); for (ctr = 0; ctr < pDevInfo->cntDevicePropertiesSupported; ctr++){ printf( " 0x%04X: %s\n", pDevInfo->DevicePropertiesSupported[ctr], GetPropertyName( pDevInfo, pDevInfo->DevicePropertiesSupported[ctr])); } }
void ChangeFontPropertyCommand::Rollback() { // The previous values are stored in Command Data. QString propertyName = GetPropertyName(); for (COMMANDDATAVECTITER iter = this->commandData.begin(); iter != commandData.end(); iter ++) { Font* previousValue = (*iter).GetTreeNodePropertyValue(); bool propertySetOK = ApplyPropertyValue(iter, previousValue); // Always restore control rect for align property while rollback // RestoreControlRect(iter); //TODO: revert changes if (propertySetOK) { CommandsController::Instance()->EmitChangePropertySucceeded(propertyName); } else { CommandsController::Instance()->EmitChangePropertyFailed(propertyName); } } }
std::unique_ptr<Reply> M3Handler::HandleMessage(Message* message) { // FIXME : resolve clashes between wds exported and internal rtsp type names. //using namespace rtsp; auto received_payload = ToGetParameterPayload(message->payload()); if (!received_payload) return nullptr; auto reply = std::unique_ptr<Reply>(new Reply(rtsp::STATUS_OK)); auto reply_payload = new rtsp::PropertyMapPayload(); for (const std::string& property : received_payload->properties()) { std::shared_ptr<rtsp::Property> new_prop; if (property == GetPropertyName(rtsp::AudioCodecsPropertyType)){ // FIXME: declare that we support absolutely every audio codec/format, // but there should be a MediaManager API for it auto codec_lpcm = AudioCodec(LPCM, AudioModes(3), 0); auto codec_aac = AudioCodec(AAC, AudioModes(15), 0); auto codec_ac3 = AudioCodec(AC3, AudioModes(7), 0); std::vector<AudioCodec> codec_list; codec_list.push_back(codec_lpcm); codec_list.push_back(codec_aac); codec_list.push_back(codec_ac3); new_prop.reset(new rtsp::AudioCodecs(codec_list)); reply_payload->AddProperty(new_prop); } else if (property == GetPropertyName(rtsp::VideoFormatsPropertyType)){ new_prop.reset(new rtsp::VideoFormats(ToSinkMediaManager(manager_)->GetNativeVideoFormat(), false, ToSinkMediaManager(manager_)->GetSupportedH264VideoCodecs())); reply_payload->AddProperty(new_prop); } else if (property == GetPropertyName(rtsp::Video3DFormatsPropertyType)){ new_prop.reset(new rtsp::Formats3d()); reply_payload->AddProperty(new_prop); } else if (property == GetPropertyName(rtsp::ContentProtectionPropertyType)){ new_prop.reset(new rtsp::ContentProtection()); reply_payload->AddProperty(new_prop); } else if (property == GetPropertyName(rtsp::DisplayEdidPropertyType)){ new_prop.reset(new rtsp::DisplayEdid()); reply_payload->AddProperty(new_prop); } else if (property == GetPropertyName(rtsp::CoupledSinkPropertyType)){ new_prop.reset(new rtsp::CoupledSink()); reply_payload->AddProperty(new_prop); } else if (property == GetPropertyName(rtsp::ClientRTPPortsPropertyType)){ new_prop.reset(new rtsp::ClientRtpPorts( ToSinkMediaManager(manager_)->GetLocalRtpPorts().first, ToSinkMediaManager(manager_)->GetLocalRtpPorts().second)); reply_payload->AddProperty(new_prop); } else if (property == GetPropertyName(rtsp::I2CPropertyType)){ new_prop.reset(new rtsp::I2C(0)); reply_payload->AddProperty(new_prop); } else if (property == GetPropertyName(rtsp::UIBCCapabilityPropertyType)){ new_prop.reset(new rtsp::UIBCCapability()); reply_payload->AddProperty(new_prop); } else if (property == GetPropertyName(rtsp::ConnectorTypePropertyType)){ new_prop.reset(new rtsp::ConnectorType(ToSinkMediaManager(manager_)->GetConnectorType())); reply_payload->AddProperty(new_prop); } else if (property == GetPropertyName(rtsp::StandbyResumeCapabilityPropertyType)){ new_prop.reset(new rtsp::StandbyResumeCapability(false)); reply_payload->AddProperty(new_prop); } else { WDS_WARNING("** GET_PARAMETER: Ignoring unsupported property '%s'.", property.c_str()); } } reply->set_payload(std::unique_ptr<Payload>(reply_payload)); return reply; }
void getset_property( CAMHandle hCam, CAMDeviceInfoPtr pDevInfo, OPTS *pOpts) { CAMPropertyDescPtr pProp = 0; if (validate_property( pDevInfo, pOpts->property)) { camcli_error( "The device does not support property 0x%04X", pOpts->property); return; } if (GetPropertyDesc( hCam, pOpts->property, &pProp)) { camcli_error( "Could not get device property description for 0x%04X", pOpts->property); return; } printf( "\n Get/Set Property %s\n", pDevInfo->Model); printf( " ================ %s\n", underline( pDevInfo->Model)); printf( " Property: 0x%04X\n", pProp->DevicePropertyCode); printf( " Description: %s\n", GetPropertyName( pDevInfo, pOpts->property)); printf( " DataType: %s\n", GetCodeName( pProp->DataType, CAM_DATATYPE)); printf( " %sValue: ", (pOpts->value ? "Previous" : " Current")); print_propval( pProp->DataType, pProp->cntCurrentValue, pProp->CurrentValue, (pProp->FormFlag == CAM_PROP_EnumForm)); printf("\n"); if (pOpts->value) { uint16_t ret; CAMPropertyValuePtr pValue = 0; ret = set_property( hCam, pProp->DevicePropertyCode, pOpts->value, pProp->DataType); if (ret == CAMERR_BADPARM) camcli_error( "Unable to set property value for this datatype"); else if (ret) camcli_error( "Unable to set property value - rc= %X", ret); else { ret = GetPropertyValue( hCam, pProp->DevicePropertyCode, pProp->DataType, &pValue); if (ret == 0) { printf( " NewValue: "); print_propval( pValue->DataType, pValue->cntValue, pValue->Value, (pProp->FormFlag == CAM_PROP_EnumForm)); printf("\n"); } else camcli_error( "Unable to get new property value - rc= %X", ret); } if (pValue) free( pValue); if (pProp) free( pProp); return; } printf( " DefaultValue: "); print_propval( pProp->DataType, pProp->cntDefaultValue, pProp->DefaultValue, (pProp->FormFlag == CAM_PROP_EnumForm)); printf("\n"); if (pProp->GetSet == CAM_PROP_ReadOnly) printf( " Read/Write: read only\n"); else printf( " Read/Write: read & write\n"); if (pProp->FormFlag == CAM_PROP_EnumForm) { if (pProp->Form.Enum.cntSupportedValues) { printf( " ValueFormat: enumeration\n"); printf( " AllowedValues: "); print_propval( pProp->DataType, pProp->Form.Enum.cntSupportedValues, pProp->Form.Enum.SupportedValues, 1); printf( "\n"); } } else if (pProp->FormFlag == CAM_PROP_RangeForm) { printf( " ValueFormat: range\n"); printf( " AllowedValues: "); print_propval( pProp->DataType, 1, pProp->Form.Range.MinimumValue, 1); printf( " - "); print_propval( pProp->DataType, 1, pProp->Form.Range.MaximumValue, 1); printf( "; step size: "); print_propval( pProp->DataType, 1, pProp->Form.Range.StepSize, 1); printf( "\n"); } else if (pProp->FormFlag != CAM_PROP_None) printf( " ValueFormat: %02X [not supported]\n", (uint8_t)pProp->FormFlag); if (pProp) free( pProp); return; }
FString UK2Node_RemoveDelegate::GetNodeTitle(ENodeTitleType::Type TitleType) const { return FString::Printf(*NSLOCTEXT("K2Node", "RemoveDelegate", "Unbind Event from %s").ToString(), *GetPropertyName().ToString()); }
FString UK2Node_AddDelegate::GetNodeTitle(ENodeTitleType::Type TitleType) const { return FString::Printf(*NSLOCTEXT("K2Node", "AddDelegate", "Bind Event to %s").ToString(), *GetPropertyName().ToString()); }
FString UK2Node_CallDelegate::GetNodeTitle(ENodeTitleType::Type TitleType) const { return FString::Printf(*NSLOCTEXT("K2Node", "CallDelegate", "Call %s").ToString(), *GetPropertyName().ToString()); }