Lines Matching refs:FORM
778 if (val < opd->FORM.Range.MinimumValue.u16) { in adjust_u16()
779 return opd->FORM.Range.MinimumValue.u16; in adjust_u16()
781 if (val > opd->FORM.Range.MaximumValue.u16) { in adjust_u16()
782 return opd->FORM.Range.MaximumValue.u16; in adjust_u16()
785 if (val % opd->FORM.Range.StepSize.u16 != 0) { in adjust_u16()
786 return val - (val % opd->FORM.Range.StepSize.u16); in adjust_u16()
793 uint16_t bestfit = opd->FORM.Enum.SupportedValue[0].u16; in adjust_u16()
795 for (i=0; i<opd->FORM.Enum.NumberOfValues; i++) { in adjust_u16()
796 if (val == opd->FORM.Enum.SupportedValue[i].u16) { in adjust_u16()
800 if (opd->FORM.Enum.SupportedValue[i].u16 < val) { in adjust_u16()
801 bestfit = opd->FORM.Enum.SupportedValue[i].u16; in adjust_u16()
823 if (val < opd->FORM.Range.MinimumValue.u32) { in adjust_u32()
824 return opd->FORM.Range.MinimumValue.u32; in adjust_u32()
826 if (val > opd->FORM.Range.MaximumValue.u32) { in adjust_u32()
827 return opd->FORM.Range.MaximumValue.u32; in adjust_u32()
830 if (val % opd->FORM.Range.StepSize.u32 != 0) { in adjust_u32()
831 return val - (val % opd->FORM.Range.StepSize.u32); in adjust_u32()
838 uint32_t bestfit = opd->FORM.Enum.SupportedValue[0].u32; in adjust_u32()
840 for (i=0; i<opd->FORM.Enum.NumberOfValues; i++) { in adjust_u32()
841 if (val == opd->FORM.Enum.SupportedValue[i].u32) { in adjust_u32()
845 if (opd->FORM.Enum.SupportedValue[i].u32 < val) { in adjust_u32()
846 bestfit = opd->FORM.Enum.SupportedValue[i].u32; in adjust_u32()
902 allowed_vals->num_entries = opd.FORM.Enum.NumberOfValues; in LIBMTP_Get_Allowed_Property_Values()
907 allowed_vals->i8vals = malloc(sizeof(int8_t) * opd.FORM.Enum.NumberOfValues); in LIBMTP_Get_Allowed_Property_Values()
911 allowed_vals->u8vals = malloc(sizeof(uint8_t) * opd.FORM.Enum.NumberOfValues); in LIBMTP_Get_Allowed_Property_Values()
915 allowed_vals->i16vals = malloc(sizeof(int16_t) * opd.FORM.Enum.NumberOfValues); in LIBMTP_Get_Allowed_Property_Values()
919 allowed_vals->u16vals = malloc(sizeof(uint16_t) * opd.FORM.Enum.NumberOfValues); in LIBMTP_Get_Allowed_Property_Values()
923 allowed_vals->i32vals = malloc(sizeof(int32_t) * opd.FORM.Enum.NumberOfValues); in LIBMTP_Get_Allowed_Property_Values()
927 allowed_vals->u32vals = malloc(sizeof(uint32_t) * opd.FORM.Enum.NumberOfValues); in LIBMTP_Get_Allowed_Property_Values()
931 allowed_vals->i64vals = malloc(sizeof(int64_t) * opd.FORM.Enum.NumberOfValues); in LIBMTP_Get_Allowed_Property_Values()
935 allowed_vals->u64vals = malloc(sizeof(uint64_t) * opd.FORM.Enum.NumberOfValues); in LIBMTP_Get_Allowed_Property_Values()
940 for (i = 0; i < opd.FORM.Enum.NumberOfValues; i++) { in LIBMTP_Get_Allowed_Property_Values()
944 allowed_vals->i8vals[i] = opd.FORM.Enum.SupportedValue[i].i8; in LIBMTP_Get_Allowed_Property_Values()
947 allowed_vals->u8vals[i] = opd.FORM.Enum.SupportedValue[i].u8; in LIBMTP_Get_Allowed_Property_Values()
950 allowed_vals->i16vals[i] = opd.FORM.Enum.SupportedValue[i].i16; in LIBMTP_Get_Allowed_Property_Values()
953 allowed_vals->u16vals[i] = opd.FORM.Enum.SupportedValue[i].u16; in LIBMTP_Get_Allowed_Property_Values()
956 allowed_vals->i32vals[i] = opd.FORM.Enum.SupportedValue[i].i32; in LIBMTP_Get_Allowed_Property_Values()
959 allowed_vals->u32vals[i] = opd.FORM.Enum.SupportedValue[i].u32; in LIBMTP_Get_Allowed_Property_Values()
962 allowed_vals->i64vals[i] = opd.FORM.Enum.SupportedValue[i].i64; in LIBMTP_Get_Allowed_Property_Values()
965 allowed_vals->u64vals[i] = opd.FORM.Enum.SupportedValue[i].u64; in LIBMTP_Get_Allowed_Property_Values()
977 allowed_vals->i8min = opd.FORM.Range.MinimumValue.i8; in LIBMTP_Get_Allowed_Property_Values()
978 allowed_vals->i8max = opd.FORM.Range.MaximumValue.i8; in LIBMTP_Get_Allowed_Property_Values()
979 allowed_vals->i8step = opd.FORM.Range.StepSize.i8; in LIBMTP_Get_Allowed_Property_Values()
983 allowed_vals->u8min = opd.FORM.Range.MinimumValue.u8; in LIBMTP_Get_Allowed_Property_Values()
984 allowed_vals->u8max = opd.FORM.Range.MaximumValue.u8; in LIBMTP_Get_Allowed_Property_Values()
985 allowed_vals->u8step = opd.FORM.Range.StepSize.u8; in LIBMTP_Get_Allowed_Property_Values()
989 allowed_vals->i16min = opd.FORM.Range.MinimumValue.i16; in LIBMTP_Get_Allowed_Property_Values()
990 allowed_vals->i16max = opd.FORM.Range.MaximumValue.i16; in LIBMTP_Get_Allowed_Property_Values()
991 allowed_vals->i16step = opd.FORM.Range.StepSize.i16; in LIBMTP_Get_Allowed_Property_Values()
995 allowed_vals->u16min = opd.FORM.Range.MinimumValue.u16; in LIBMTP_Get_Allowed_Property_Values()
996 allowed_vals->u16max = opd.FORM.Range.MaximumValue.u16; in LIBMTP_Get_Allowed_Property_Values()
997 allowed_vals->u16step = opd.FORM.Range.StepSize.u16; in LIBMTP_Get_Allowed_Property_Values()
1001 allowed_vals->i32min = opd.FORM.Range.MinimumValue.i32; in LIBMTP_Get_Allowed_Property_Values()
1002 allowed_vals->i32max = opd.FORM.Range.MaximumValue.i32; in LIBMTP_Get_Allowed_Property_Values()
1003 allowed_vals->i32step = opd.FORM.Range.StepSize.i32; in LIBMTP_Get_Allowed_Property_Values()
1007 allowed_vals->u32min = opd.FORM.Range.MinimumValue.u32; in LIBMTP_Get_Allowed_Property_Values()
1008 allowed_vals->u32max = opd.FORM.Range.MaximumValue.u32; in LIBMTP_Get_Allowed_Property_Values()
1009 allowed_vals->u32step = opd.FORM.Range.StepSize.u32; in LIBMTP_Get_Allowed_Property_Values()
1013 allowed_vals->i64min = opd.FORM.Range.MinimumValue.i64; in LIBMTP_Get_Allowed_Property_Values()
1014 allowed_vals->i64max = opd.FORM.Range.MaximumValue.i64; in LIBMTP_Get_Allowed_Property_Values()
1015 allowed_vals->i64step = opd.FORM.Range.StepSize.i64; in LIBMTP_Get_Allowed_Property_Values()
1019 allowed_vals->u64min = opd.FORM.Range.MinimumValue.u64; in LIBMTP_Get_Allowed_Property_Values()
1020 allowed_vals->u64max = opd.FORM.Range.MaximumValue.u64; in LIBMTP_Get_Allowed_Property_Values()
1021 allowed_vals->u64step = opd.FORM.Range.StepSize.u64; in LIBMTP_Get_Allowed_Property_Values()
1826 if (dpd.FORM.Range.MaximumValue.u8 != 0) { in LIBMTP_Open_Raw_Device()
1827 mtp_device->maximum_battery_level = dpd.FORM.Range.MaximumValue.u8; in LIBMTP_Open_Raw_Device()
2962 opd.FORM.Range.MinimumValue.i8, in LIBMTP_Dump_Device_Info()
2963 opd.FORM.Range.MaximumValue.i8, in LIBMTP_Dump_Device_Info()
2964 opd.FORM.Range.StepSize.i8); in LIBMTP_Dump_Device_Info()
2968 for(k=0;k<opd.FORM.Enum.NumberOfValues;k++) { in LIBMTP_Dump_Device_Info()
2969 printf("%d, ", opd.FORM.Enum.SupportedValue[k].i8); in LIBMTP_Dump_Device_Info()
2986 opd.FORM.Range.MinimumValue.u8, in LIBMTP_Dump_Device_Info()
2987 opd.FORM.Range.MaximumValue.u8, in LIBMTP_Dump_Device_Info()
2988 opd.FORM.Range.StepSize.u8); in LIBMTP_Dump_Device_Info()
2992 for(k=0;k<opd.FORM.Enum.NumberOfValues;k++) { in LIBMTP_Dump_Device_Info()
2993 printf("%d, ", opd.FORM.Enum.SupportedValue[k].u8); in LIBMTP_Dump_Device_Info()
3010 opd.FORM.Range.MinimumValue.i16, in LIBMTP_Dump_Device_Info()
3011 opd.FORM.Range.MaximumValue.i16, in LIBMTP_Dump_Device_Info()
3012 opd.FORM.Range.StepSize.i16); in LIBMTP_Dump_Device_Info()
3016 for(k=0;k<opd.FORM.Enum.NumberOfValues;k++) { in LIBMTP_Dump_Device_Info()
3017 printf("%d, ", opd.FORM.Enum.SupportedValue[k].i16); in LIBMTP_Dump_Device_Info()
3031 opd.FORM.Range.MinimumValue.u16, in LIBMTP_Dump_Device_Info()
3032 opd.FORM.Range.MaximumValue.u16, in LIBMTP_Dump_Device_Info()
3033 opd.FORM.Range.StepSize.u16); in LIBMTP_Dump_Device_Info()
3037 for(k=0;k<opd.FORM.Enum.NumberOfValues;k++) { in LIBMTP_Dump_Device_Info()
3038 printf("%d, ", opd.FORM.Enum.SupportedValue[k].u16); in LIBMTP_Dump_Device_Info()
3052 opd.FORM.Range.MinimumValue.i32, in LIBMTP_Dump_Device_Info()
3053 opd.FORM.Range.MaximumValue.i32, in LIBMTP_Dump_Device_Info()
3054 opd.FORM.Range.StepSize.i32); in LIBMTP_Dump_Device_Info()
3058 for(k=0;k<opd.FORM.Enum.NumberOfValues;k++) { in LIBMTP_Dump_Device_Info()
3059 printf("%d, ", opd.FORM.Enum.SupportedValue[k].i32); in LIBMTP_Dump_Device_Info()
3073 opd.FORM.Range.MinimumValue.u32, in LIBMTP_Dump_Device_Info()
3074 opd.FORM.Range.MaximumValue.u32, in LIBMTP_Dump_Device_Info()
3075 opd.FORM.Range.StepSize.u32); in LIBMTP_Dump_Device_Info()
3081 for (k=0;k<opd.FORM.Enum.NumberOfValues;k++) { in LIBMTP_Dump_Device_Info()
3082 if (opd.FORM.Enum.SupportedValue[k].u32 == 0) { in LIBMTP_Dump_Device_Info()
3086 fourcc[0] = (opd.FORM.Enum.SupportedValue[k].u32 >> 24) & 0xFFU; in LIBMTP_Dump_Device_Info()
3087 fourcc[1] = (opd.FORM.Enum.SupportedValue[k].u32 >> 16) & 0xFFU; in LIBMTP_Dump_Device_Info()
3088 fourcc[2] = (opd.FORM.Enum.SupportedValue[k].u32 >> 8) & 0xFFU; in LIBMTP_Dump_Device_Info()
3089 fourcc[3] = opd.FORM.Enum.SupportedValue[k].u32 & 0xFFU; in LIBMTP_Dump_Device_Info()
3097 for(k=0;k<opd.FORM.Enum.NumberOfValues;k++) { in LIBMTP_Dump_Device_Info()
3098 printf("%d, ", opd.FORM.Enum.SupportedValue[k].u32); in LIBMTP_Dump_Device_Info()
8112 retsam->filetype = map_ptp_type_to_libmtp_type(opd_format.FORM.Enum.SupportedValue[0].u16);
8116 retsam->width = opd_width.FORM.Range.MaximumValue.u32;
8120 retsam->height = opd_height.FORM.Range.MaximumValue.u32;
8125 retsam->size = opd_size.FORM.Range.MaximumValue.u32;
8139 retsam->filetype = map_ptp_type_to_libmtp_type(opd_format.FORM.Enum.SupportedValue[0].u16);
8143 retsam->duration = opd_duration.FORM.Range.MaximumValue.u32;
8148 retsam->size = opd_size.FORM.Range.MaximumValue.u32;