Lines Matching refs:dpd
1002 unsigned char* dpd=NULL; in ptp_getdevicepropdesc() local
1009 ret=ptp_transaction(params, &ptp, PTP_DP_GETDATA, 0, &dpd, &len); in ptp_getdevicepropdesc()
1010 if (ret == PTP_RC_OK) ptp_unpack_DPD(params, dpd, devicepropertydesc, len); in ptp_getdevicepropdesc()
1011 free(dpd); in ptp_getdevicepropdesc()
1598 PTPDevicePropDesc *dpd) in ptp_canon_eos_getdevicepropdesc() argument
1607 memcpy (dpd, ¶ms->canon_props[i].dpd, sizeof (*dpd)); in ptp_canon_eos_getdevicepropdesc()
1608 if (dpd->FormFlag == PTP_DPFF_Enumeration) { in ptp_canon_eos_getdevicepropdesc()
1610 dpd->FORM.Enum.SupportedValue = malloc (sizeof (PTPPropertyValue)*dpd->FORM.Enum.NumberOfValues); in ptp_canon_eos_getdevicepropdesc()
1611 memcpy (dpd->FORM.Enum.SupportedValue, in ptp_canon_eos_getdevicepropdesc()
1612 params->canon_props[i].dpd.FORM.Enum.SupportedValue, in ptp_canon_eos_getdevicepropdesc()
1613 sizeof (PTPPropertyValue)*dpd->FORM.Enum.NumberOfValues in ptp_canon_eos_getdevicepropdesc()
1616 if (dpd->DataType == PTP_DTC_STR) { in ptp_canon_eos_getdevicepropdesc()
1617 dpd->FactoryDefaultValue.str = strdup( params->canon_props[i].dpd.FactoryDefaultValue.str ); in ptp_canon_eos_getdevicepropdesc()
1618 dpd->CurrentValue.str = strdup( params->canon_props[i].dpd.CurrentValue.str ); in ptp_canon_eos_getdevicepropdesc()
1729 params->canon_props[i].dpd.CurrentValue.u16 = value->u16; in ptp_canon_eos_setdevicepropvalue()
1744 params->canon_props[i].dpd.CurrentValue.u8 = value->u8; in ptp_canon_eos_setdevicepropvalue()
1749 params->canon_props[i].dpd.CurrentValue.u16 = value->u16; in ptp_canon_eos_setdevicepropvalue()
1754 params->canon_props[i].dpd.CurrentValue.u32 = value->u32; in ptp_canon_eos_setdevicepropvalue()
1758 free (params->canon_props[i].dpd.CurrentValue.str); in ptp_canon_eos_setdevicepropvalue()
1759 params->canon_props[i].dpd.CurrentValue.str = strdup(value->str); in ptp_canon_eos_setdevicepropvalue()
2685 ptp_free_devicepropvalue(uint16_t dt, PTPPropertyValue* dpd) { in ptp_free_devicepropvalue() argument
2699 if (dpd->a.v) in ptp_free_devicepropvalue()
2700 free(dpd->a.v); in ptp_free_devicepropvalue()
2703 if (dpd->str) in ptp_free_devicepropvalue()
2704 free(dpd->str); in ptp_free_devicepropvalue()
2710 ptp_free_devicepropdesc(PTPDevicePropDesc* dpd) in ptp_free_devicepropdesc() argument
2714 ptp_free_devicepropvalue (dpd->DataType, &dpd->FactoryDefaultValue); in ptp_free_devicepropdesc()
2715 ptp_free_devicepropvalue (dpd->DataType, &dpd->CurrentValue); in ptp_free_devicepropdesc()
2716 switch (dpd->FormFlag) { in ptp_free_devicepropdesc()
2718 ptp_free_devicepropvalue (dpd->DataType, &dpd->FORM.Range.MinimumValue); in ptp_free_devicepropdesc()
2719 ptp_free_devicepropvalue (dpd->DataType, &dpd->FORM.Range.MaximumValue); in ptp_free_devicepropdesc()
2720 ptp_free_devicepropvalue (dpd->DataType, &dpd->FORM.Range.StepSize); in ptp_free_devicepropdesc()
2723 if (dpd->FORM.Enum.SupportedValue) { in ptp_free_devicepropdesc()
2724 for (i=0;i<dpd->FORM.Enum.NumberOfValues;i++) in ptp_free_devicepropdesc()
2725 ptp_free_devicepropvalue (dpd->DataType, dpd->FORM.Enum.SupportedValue+i); in ptp_free_devicepropdesc()
2726 free (dpd->FORM.Enum.SupportedValue); in ptp_free_devicepropdesc()
3540 PTPDevicePropDesc *dpd, int length, char *out) in ptp_render_property_value() argument
4129 double value = _value_to_num(&(dpd->CurrentValue), dpd->DataType); in ptp_render_property_value()
4138 kval = _value_to_num(&(dpd->CurrentValue), dpd->DataType); in ptp_render_property_value()
4153 return snprintf(out, length, "%s", dpd->CurrentValue.str); in ptp_render_property_value()
4157 for (i=0;(i<dpd->CurrentValue.a.count) && (i<length);i++) in ptp_render_property_value()
4158 out[i] = dpd->CurrentValue.a.v[i].u16; in ptp_render_property_value()
4159 if ( dpd->CurrentValue.a.count && in ptp_render_property_value()
4160 (dpd->CurrentValue.a.count < length)) { in ptp_render_property_value()
4161 out[dpd->CurrentValue.a.count-1] = 0; in ptp_render_property_value()
4162 return dpd->CurrentValue.a.count-1; in ptp_render_property_value()