Lines Matching refs:device
67 static text_t* read_into_spl_text_t(LIBMTP_mtpdevice_t *device, const int fd);
68 static void write_from_spl_text_t(LIBMTP_mtpdevice_t *device, const int fd, text_t* p);
108 * Take an object ID, a .spl playlist on the MTP device,
111 * @param device mtp device pointer
113 * @param id .spl playlist id on MTP device
117 void spl_to_playlist_t(LIBMTP_mtpdevice_t* device, PTPObjectInfo *oi,
144 int ret = LIBMTP_Get_File_To_File_Descriptor(device, pl->playlist_id, fd, NULL, NULL, NULL);
146 // FIXME add_ptp_error_to_errorstack(device, ret, "LIBMTP_Get_Playlist: Could not get .spl playlist file.");
151 text_t* p = read_into_spl_text_t(device, fd);
157 folders = LIBMTP_Get_Folder_List(device);
158 files = LIBMTP_Get_Filelisting_With_Callback(device, NULL, NULL);
174 * Push a playlist_t onto the device after converting it to a .spl format
176 * @param device mtp device pointer
181 int playlist_t_to_spl(LIBMTP_mtpdevice_t *device,
187 folders = LIBMTP_Get_Folder_List(device);
188 files = LIBMTP_Get_Filelisting_With_Callback(device, NULL, NULL);
207 PTP_USB *ptp_usb = (PTP_USB*) device->usbinfo;
216 write_from_spl_text_t(device, fd, t);
233 // push the playlist to the device
235 int ret = LIBMTP_Send_File_From_File_Descriptor(device, fd, f, NULL, NULL);
251 * Update a playlist on the device. If only the playlist's name is being
257 * @param device mtp device pointer
262 int update_spl_playlist(LIBMTP_mtpdevice_t *device,
268 LIBMTP_playlist_t * old = LIBMTP_Get_Playlist(device, newlist->playlist_id);
289 if(LIBMTP_Delete_Object(device, old->playlist_id) != 0)
299 return LIBMTP_Create_New_Playlist(device, newlist);
310 int ret = LIBMTP_Set_Playlist_Name(device, newlist, s);
323 * @param device a pointer to the current device.
328 static text_t* read_into_spl_text_t(LIBMTP_mtpdevice_t *device, const int fd)
407 tail->text = utf16_to_utf8(device, (uint16_t*) w);
446 * to the device.
452 static void write_from_spl_text_t(LIBMTP_mtpdevice_t *device,
459 char *const t = (char*) utf8_to_utf16(device, p->text);
559 * @param folders the folders list for the device
560 * @param fiels the files list for the device
587 * @param folders the folders list for the device
588 * @param fiels the files list for the device
660 * @param folders the folders list for the device
661 * @param files the files list for the device
722 * @param folders the folders list for the device
723 * @param files the files list for the device
783 * @param folders the folders list for the device
807 * @param folders the folders list for the device