Lines Matching refs:folders
72 static void tracks_from_spl_text_t(text_t* p, uint32_t* tracks, LIBMTP_folder_t* folders, LIBMTP_file_t* files);
73 static void spl_text_t_from_tracks(text_t** p, uint32_t* tracks, const uint32_t trackno, const uint32_t ver_major, const uint32_t ver_minor, char* dnse, LIBMTP_folder_t* folders, LIBMTP_file_t* files);
75 static uint32_t discover_id_from_filepath(const char* s, LIBMTP_folder_t* folders, LIBMTP_file_t* files); // TODO add file/dir cached args
76 static void discover_filepath_from_id(char** p, uint32_t track, LIBMTP_folder_t* folders, LIBMTP_file_t* files);
77 static void find_folder_name(LIBMTP_folder_t* folders, uint32_t* id, char** name);
78 static uint32_t find_folder_id(LIBMTP_folder_t* folders, uint32_t parent, char* name);
155 LIBMTP_folder_t *folders;
157 folders = LIBMTP_Get_Folder_List(device);
164 tracks_from_spl_text_t(p, pl->tracks, folders, files);
185 LIBMTP_folder_t *folders;
187 folders = LIBMTP_Get_Folder_List(device);
215 spl_text_t_from_tracks(&t, pl->tracks, pl->no_tracks, ver_major, ver_minor, NULL, folders, files);
559 * @param folders the folders list for the device
565 LIBMTP_folder_t* folders,
571 tracks[c] = discover_id_from_filepath(p->text, folders, files);
587 * @param folders the folders list for the device
597 LIBMTP_folder_t* folders,
616 discover_filepath_from_id(&f, tracks[i], folders, files);
660 * @param folders the folders list for the device
668 LIBMTP_folder_t* folders,
694 // prepending folders to the path as we go
698 find_folder_name(folders, &id, &f);
722 * @param folders the folders list for the device
727 static uint32_t discover_id_from_filepath(const char* s, LIBMTP_folder_t* folders, LIBMTP_file_t* files)
763 id = find_folder_id(folders, id, sci);
783 * @param folders the folders list for the device
788 static void find_folder_name(LIBMTP_folder_t* folders, uint32_t* id, char** name)
793 LIBMTP_folder_t* f = LIBMTP_Find_Folder(folders, *id);
807 * @param folders the folders list for the device
813 static uint32_t find_folder_id(LIBMTP_folder_t* folders, uint32_t parent, char* name) {
815 if(folders == NULL)
819 else if( (folders->parent_id == parent) &&
820 (strcmp(folders->name, name) == 0) )
821 return folders->folder_id;
827 if(folders->sibling != NULL)
828 id = find_folder_id(folders->sibling, parent, name);
829 if( (id == 0) && (folders->child != NULL) )
830 id = find_folder_id(folders->child, parent, name);