• Home
  • Raw
  • Download

Lines Matching refs:prop

1265   MTPProperties *prop;  in get_string_from_object()  local
1271 prop = ptp_find_object_prop_in_cache(params, object_id, attribute_id); in get_string_from_object()
1272 if (prop) { in get_string_from_object()
1273 if (prop->propval.str != NULL) in get_string_from_object()
1274 return strdup(prop->propval.str); in get_string_from_object()
1308 MTPProperties *prop; in get_u64_from_object() local
1314 prop = ptp_find_object_prop_in_cache(params, object_id, attribute_id); in get_u64_from_object()
1315 if (prop) in get_u64_from_object()
1316 return prop->propval.u64; in get_u64_from_object()
1347 MTPProperties *prop; in get_u32_from_object() local
1353 prop = ptp_find_object_prop_in_cache(params, object_id, attribute_id); in get_u32_from_object()
1354 if (prop) in get_u32_from_object()
1355 return prop->propval.u32; in get_u32_from_object()
1385 MTPProperties *prop; in get_u16_from_object() local
1393 prop = ptp_find_object_prop_in_cache(params, object_id, attribute_id); in get_u16_from_object()
1394 if (prop) in get_u16_from_object()
1395 return prop->propval.u16; in get_u16_from_object()
1426 MTPProperties *prop; in get_u8_from_object() local
1434 prop = ptp_find_object_prop_in_cache(params, object_id, attribute_id); in get_u8_from_object()
1435 if (prop) in get_u8_from_object()
1436 return prop->propval.u8; in get_u8_from_object()
2143 MTPProperties *prop; in get_all_metadata_fast() local
2191 prop = props; in get_all_metadata_fast()
2193 if (lasthandle != prop->ObjectHandle) { in get_all_metadata_fast()
2195 lasthandle = prop->ObjectHandle; in get_all_metadata_fast()
2197 prop++; in get_all_metadata_fast()
2201 prop = props; in get_all_metadata_fast()
2204 if (lasthandle != prop->ObjectHandle) { in get_all_metadata_fast()
2213 lasthandle = prop->ObjectHandle; in get_all_metadata_fast()
2214 params->objects[i].oid = prop->ObjectHandle; in get_all_metadata_fast()
2216 switch (prop->property) { in get_all_metadata_fast()
2218 params->objects[i].oi.ParentObject = prop->propval.u32; in get_all_metadata_fast()
2222 params->objects[i].oi.ObjectFormat = prop->propval.u16; in get_all_metadata_fast()
2229 params->objects[i].oi.ObjectCompressedSize = (uint32_t) prop->propval.u64; in get_all_metadata_fast()
2231 params->objects[i].oi.ObjectCompressedSize = prop->propval.u32; in get_all_metadata_fast()
2235 params->objects[i].oi.StorageID = prop->propval.u32; in get_all_metadata_fast()
2239 if (prop->propval.str != NULL) in get_all_metadata_fast()
2240 params->objects[i].oi.Filename = strdup(prop->propval.str); in get_all_metadata_fast()
2259 prop++; in get_all_metadata_fast()
2376 MTPProperties *prop = ob->mtpprops; in obj2file() local
2381 if (prop->property == PTP_OPC_ObjectSize) { in obj2file()
2383 file->filesize = prop->propval.u64; in obj2file()
2385 file->filesize = prop->propval.u32; in obj2file()
2389 prop++; in obj2file()
2897 uint16_t prop = params->deviceinfo.DevicePropertiesSupported[i]; in LIBMTP_Dump_Device_Info() local
2898 printf(" 0x%04x: Unknown property\n", prop); in LIBMTP_Dump_Device_Info()
3983 MTPProperties *prop = ob->mtpprops; in LIBMTP_Get_Filelisting_With_Callback() local
3988 if (prop->property == PTP_OPC_ObjectSize) { in LIBMTP_Get_Filelisting_With_Callback()
3990 file->filesize = prop->propval.u64; in LIBMTP_Get_Filelisting_With_Callback()
3992 file->filesize = prop->propval.u32; in LIBMTP_Get_Filelisting_With_Callback()
3996 prop++; in LIBMTP_Get_Filelisting_With_Callback()
4101 MTPProperties *prop = ob->mtpprops; in LIBMTP_Get_Filemetadata() local
4103 for (i=0;i<ob->nrofmtpprops;i++,prop++) { in LIBMTP_Get_Filemetadata()
4105 if (prop->property == PTP_OPC_ObjectSize) { in LIBMTP_Get_Filemetadata()
4109 file->filesize = prop->propval.u64; in LIBMTP_Get_Filemetadata()
4111 file->filesize = prop->propval.u32; in LIBMTP_Get_Filemetadata()
4228 static void pick_property_to_track_metadata(LIBMTP_mtpdevice_t *device, MTPProperties *prop, LIBMTP… in pick_property_to_track_metadata() argument
4230 switch (prop->property) { in pick_property_to_track_metadata()
4232 if (prop->propval.str != NULL) in pick_property_to_track_metadata()
4233 track->title = strdup(prop->propval.str); in pick_property_to_track_metadata()
4238 if (prop->propval.str != NULL) in pick_property_to_track_metadata()
4239 track->artist = strdup(prop->propval.str); in pick_property_to_track_metadata()
4244 if (prop->propval.str != NULL) in pick_property_to_track_metadata()
4245 track->composer = strdup(prop->propval.str); in pick_property_to_track_metadata()
4250 track->duration = prop->propval.u32; in pick_property_to_track_metadata()
4253 track->tracknumber = prop->propval.u16; in pick_property_to_track_metadata()
4256 if (prop->propval.str != NULL) in pick_property_to_track_metadata()
4257 track->genre = strdup(prop->propval.str); in pick_property_to_track_metadata()
4262 if (prop->propval.str != NULL) in pick_property_to_track_metadata()
4263 track->album = strdup(prop->propval.str); in pick_property_to_track_metadata()
4268 if (prop->propval.str != NULL) in pick_property_to_track_metadata()
4269 track->date = strdup(prop->propval.str); in pick_property_to_track_metadata()
4275 track->samplerate = prop->propval.u32; in pick_property_to_track_metadata()
4278 track->nochannels = prop->propval.u16; in pick_property_to_track_metadata()
4281 track->wavecodec = prop->propval.u32; in pick_property_to_track_metadata()
4284 track->bitrate = prop->propval.u32; in pick_property_to_track_metadata()
4287 track->bitratetype = prop->propval.u16; in pick_property_to_track_metadata()
4290 track->rating = prop->propval.u16; in pick_property_to_track_metadata()
4293 track->usecount = prop->propval.u32; in pick_property_to_track_metadata()
4297 track->filesize = prop->propval.u64; in pick_property_to_track_metadata()
4299 track->filesize = prop->propval.u32; in pick_property_to_track_metadata()
4321 MTPProperties *prop; in get_track_metadata() local
4329 prop = ob->mtpprops; in get_track_metadata()
4330 for (i=0;i<ob->nrofmtpprops;i++,prop++) in get_track_metadata()
4331 pick_property_to_track_metadata(device, prop, track); in get_track_metadata()
5698 MTPProperties *prop = NULL; local
5717 prop = ptp_get_new_object_prop_entry(&props,&nrofprops);
5718 prop->ObjectHandle = filedata->item_id;
5719 prop->property = PTP_OPC_ObjectFileName;
5720 prop->datatype = PTP_DTC_STR;
5722 prop->propval.str = strdup(filedata->filename);
5724 strip_7bit_from_utf8(prop->propval.str);
5729 prop = ptp_get_new_object_prop_entry(&props,&nrofprops);
5730 prop->ObjectHandle = filedata->item_id;
5731 prop->property = PTP_OPC_ProtectionStatus;
5732 prop->datatype = PTP_DTC_UINT16;
5733 prop->propval.u16 = 0x0000U; /* Not protected */
5736 prop = ptp_get_new_object_prop_entry(&props,&nrofprops);
5737 prop->ObjectHandle = filedata->item_id;
5738 prop->property = PTP_OPC_NonConsumable;
5739 prop->datatype = PTP_DTC_UINT8;
5740 prop->propval.u8 = 0x00; /* It is supported, then it is consumable */
5743 prop = ptp_get_new_object_prop_entry(&props,&nrofprops);
5744 prop->ObjectHandle = filedata->item_id;
5745 prop->property = PTP_OPC_Name;
5746 prop->datatype = PTP_DTC_STR;
5748 prop->propval.str = strdup(filedata->filename);
5753 prop = ptp_get_new_object_prop_entry(&props,&nrofprops);
5754 prop->ObjectHandle = filedata->item_id;
5755 prop->property = PTP_OPC_DateModified;
5756 prop->datatype = PTP_DTC_STR;
5757 prop->propval.str = get_iso8601_stamp();
5857 MTPProperties *prop = NULL; local
5872 prop = ptp_get_new_object_prop_entry(&props, &nrofprops);
5873 prop->ObjectHandle = metadata->item_id;
5874 prop->property = PTP_OPC_Name;
5875 prop->datatype = PTP_DTC_STR;
5876 prop->propval.str = strdup(metadata->title);
5881 prop = ptp_get_new_object_prop_entry(&props, &nrofprops);
5882 prop->ObjectHandle = metadata->item_id;
5883 prop->property = PTP_OPC_AlbumName;
5884 prop->datatype = PTP_DTC_STR;
5885 prop->propval.str = strdup(metadata->album);
5890 prop = ptp_get_new_object_prop_entry(&props, &nrofprops);
5891 prop->ObjectHandle = metadata->item_id;
5892 prop->property = PTP_OPC_Artist;
5893 prop->datatype = PTP_DTC_STR;
5894 prop->propval.str = strdup(metadata->artist);
5899 prop = ptp_get_new_object_prop_entry(&props, &nrofprops);
5900 prop->ObjectHandle = metadata->item_id;
5901 prop->property = PTP_OPC_Composer;
5902 prop->datatype = PTP_DTC_STR;
5903 prop->propval.str = strdup(metadata->composer);
5908 prop = ptp_get_new_object_prop_entry(&props, &nrofprops);
5909 prop->ObjectHandle = metadata->item_id;
5910 prop->property = PTP_OPC_Genre;
5911 prop->datatype = PTP_DTC_STR;
5912 prop->propval.str = strdup(metadata->genre);
5915 prop = ptp_get_new_object_prop_entry(&props, &nrofprops);
5916 prop->ObjectHandle = metadata->item_id;
5917 prop->property = PTP_OPC_Duration;
5918 prop->datatype = PTP_DTC_UINT32;
5919 prop->propval.u32 = adjust_u32(metadata->duration, &opd);
5922 prop = ptp_get_new_object_prop_entry(&props, &nrofprops);
5923 prop->ObjectHandle = metadata->item_id;
5924 prop->property = PTP_OPC_Track;
5925 prop->datatype = PTP_DTC_UINT16;
5926 prop->propval.u16 = adjust_u16(metadata->tracknumber, &opd);
5931 prop = ptp_get_new_object_prop_entry(&props, &nrofprops);
5932 prop->ObjectHandle = metadata->item_id;
5933 prop->property = PTP_OPC_OriginalReleaseDate;
5934 prop->datatype = PTP_DTC_STR;
5935 prop->propval.str = strdup(metadata->date);
5938 prop = ptp_get_new_object_prop_entry(&props, &nrofprops);
5939 prop->ObjectHandle = metadata->item_id;
5940 prop->property = PTP_OPC_SampleRate;
5941 prop->datatype = PTP_DTC_UINT32;
5942 prop->propval.u32 = adjust_u32(metadata->samplerate, &opd);
5945 prop = ptp_get_new_object_prop_entry(&props, &nrofprops);
5946 prop->ObjectHandle = metadata->item_id;
5947 prop->property = PTP_OPC_NumberOfChannels;
5948 prop->datatype = PTP_DTC_UINT16;
5949 prop->propval.u16 = adjust_u16(metadata->nochannels, &opd);
5952 prop = ptp_get_new_object_prop_entry(&props, &nrofprops);
5953 prop->ObjectHandle = metadata->item_id;
5954 prop->property = PTP_OPC_AudioWAVECodec;
5955 prop->datatype = PTP_DTC_UINT32;
5956 prop->propval.u32 = adjust_u32(metadata->wavecodec, &opd);
5959 prop = ptp_get_new_object_prop_entry(&props, &nrofprops);
5960 prop->ObjectHandle = metadata->item_id;
5961 prop->property = PTP_OPC_AudioBitRate;
5962 prop->datatype = PTP_DTC_UINT32;
5963 prop->propval.u32 = adjust_u32(metadata->bitrate, &opd);
5966 prop = ptp_get_new_object_prop_entry(&props, &nrofprops);
5967 prop->ObjectHandle = metadata->item_id;
5968 prop->property = PTP_OPC_BitRateType;
5969 prop->datatype = PTP_DTC_UINT16;
5970 prop->propval.u16 = adjust_u16(metadata->bitratetype, &opd);
5976 prop = ptp_get_new_object_prop_entry(&props, &nrofprops);
5977 prop->ObjectHandle = metadata->item_id;
5978 prop->property = PTP_OPC_Rating;
5979 prop->datatype = PTP_DTC_UINT16;
5980 prop->propval.u16 = adjust_u16(metadata->rating, &opd);
5983 prop = ptp_get_new_object_prop_entry(&props, &nrofprops);
5984 prop->ObjectHandle = metadata->item_id;
5985 prop->property = PTP_OPC_UseCount;
5986 prop->datatype = PTP_DTC_UINT32;
5987 prop->propval.u32 = adjust_u32(metadata->usecount, &opd);
5992 prop = ptp_get_new_object_prop_entry(&props, &nrofprops);
5993 prop->ObjectHandle = metadata->item_id;
5994 prop->property = PTP_OPC_DateModified;
5995 prop->datatype = PTP_DTC_STR;
5996 prop->propval.str = get_iso8601_stamp();
6274 MTPProperties *prop = NULL; local
6277 prop = ptp_get_new_object_prop_entry(&props, &nrofprops);
6278 prop->ObjectHandle = object_id;
6279 prop->property = PTP_OPC_ObjectFileName;
6280 prop->datatype = PTP_DTC_STR;
6281 prop->propval.str = newname;
7101 MTPProperties *prop = NULL; local
7118 prop = ptp_get_new_object_prop_entry(&props,&nrofprops);
7119 prop->ObjectHandle = *newid;
7120 prop->property = PTP_OPC_ObjectFileName;
7121 prop->datatype = PTP_DTC_STR;
7122 prop->propval.str = strdup(fname);
7124 strip_7bit_from_utf8(prop->propval.str);
7128 prop = ptp_get_new_object_prop_entry(&props,&nrofprops);
7129 prop->ObjectHandle = *newid;
7130 prop->property = PTP_OPC_ProtectionStatus;
7131 prop->datatype = PTP_DTC_UINT16;
7132 prop->propval.u16 = 0x0000U; /* Not protected */
7135 prop = ptp_get_new_object_prop_entry(&props,&nrofprops);
7136 prop->ObjectHandle = *newid;
7137 prop->property = PTP_OPC_NonConsumable;
7138 prop->datatype = PTP_DTC_UINT8;
7139 prop->propval.u8 = nonconsumable;
7143 prop = ptp_get_new_object_prop_entry(&props,&nrofprops);
7144 prop->ObjectHandle = *newid;
7145 prop->property = PTP_OPC_Name;
7146 prop->datatype = PTP_DTC_STR;
7147 prop->propval.str = strdup(name);
7152 prop = ptp_get_new_object_prop_entry(&props,&nrofprops);
7153 prop->ObjectHandle = *newid;
7154 prop->property = PTP_OPC_AlbumArtist;
7155 prop->datatype = PTP_DTC_STR;
7156 prop->propval.str = strdup(artist);
7161 prop = ptp_get_new_object_prop_entry(&props,&nrofprops);
7162 prop->ObjectHandle = *newid;
7163 prop->property = PTP_OPC_Artist;
7164 prop->datatype = PTP_DTC_STR;
7165 prop->propval.str = strdup(artist);
7170 prop = ptp_get_new_object_prop_entry(&props,&nrofprops);
7171 prop->ObjectHandle = *newid;
7172 prop->property = PTP_OPC_Composer;
7173 prop->datatype = PTP_DTC_STR;
7174 prop->propval.str = strdup(composer);
7179 prop = ptp_get_new_object_prop_entry(&props,&nrofprops);
7180 prop->ObjectHandle = *newid;
7181 prop->property = PTP_OPC_Genre;
7182 prop->datatype = PTP_DTC_STR;
7183 prop->propval.str = strdup(genre);
7189 prop = ptp_get_new_object_prop_entry(&props,&nrofprops);
7190 prop->ObjectHandle = *newid;
7191 prop->property = PTP_OPC_DateModified;
7192 prop->datatype = PTP_DTC_STR;
7193 prop->propval.str = get_iso8601_stamp();
7386 MTPProperties *prop = NULL; local
7399 prop = ptp_get_new_object_prop_entry(&props, &nrofprops);
7400 prop->ObjectHandle = objecthandle;
7401 prop->property = PTP_OPC_Name;
7402 prop->datatype = PTP_DTC_STR;
7404 prop->propval.str = strdup(name);
7408 prop = ptp_get_new_object_prop_entry(&props, &nrofprops);
7409 prop->ObjectHandle = objecthandle;
7410 prop->property = PTP_OPC_AlbumArtist;
7411 prop->datatype = PTP_DTC_STR;
7412 prop->propval.str = strdup(artist);
7417 prop = ptp_get_new_object_prop_entry(&props, &nrofprops);
7418 prop->ObjectHandle = objecthandle;
7419 prop->property = PTP_OPC_Artist;
7420 prop->datatype = PTP_DTC_STR;
7421 prop->propval.str = strdup(artist);
7426 prop = ptp_get_new_object_prop_entry(&props, &nrofprops);
7427 prop->ObjectHandle = objecthandle;
7428 prop->property = PTP_OPC_Composer;
7429 prop->datatype = PTP_DTC_STR;
7430 prop->propval.str = strdup(composer);
7435 prop = ptp_get_new_object_prop_entry(&props, &nrofprops);
7436 prop->ObjectHandle = objecthandle;
7437 prop->property = PTP_OPC_Genre;
7438 prop->datatype = PTP_DTC_STR;
7439 prop->propval.str = strdup(genre);
7445 prop = ptp_get_new_object_prop_entry(&props, &nrofprops);
7446 prop->ObjectHandle = objecthandle;
7447 prop->property = PTP_OPC_DateModified;
7448 prop->datatype = PTP_DTC_STR;
7449 prop->propval.str = get_iso8601_stamp();
7711 MTPProperties *prop, LIBMTP_album_t *alb) argument
7713 switch (prop->property) {
7715 if (prop->propval.str != NULL)
7716 alb->name = strdup(prop->propval.str);
7721 if (prop->propval.str != NULL) {
7725 alb->artist = strdup(prop->propval.str);
7730 if (prop->propval.str != NULL) {
7733 alb->artist = strdup(prop->propval.str);
7738 if (prop->propval.str != NULL)
7739 alb->composer = strdup(prop->propval.str);
7744 if (prop->propval.str != NULL)
7745 alb->genre = strdup(prop->propval.str);
7764 MTPProperties *prop; local
7772 prop = ob->mtpprops;
7773 for (i=0;i<ob->nrofmtpprops;i++,prop++)
7774 pick_property_to_album_metadata(device, prop, alb);