MCPcopy Create free account
hub / github.com/amule-project/amule / GetFileTypeByName

Function GetFileTypeByName

src/OtherFunctions.cpp:935–948  ·  view source on GitHub ↗

Returns a file type which is used eMule internally only, examining the extension of the given filename

Source from the content-addressed store, hash-verified

933
934// Returns a file type which is used eMule internally only, examining the extension of the given filename
935wxString GetFileTypeByName(const CPath& fileName)
936{
937 EED2KFileType iFileType = GetED2KFileTypeID(fileName);
938 switch (iFileType) {
939 case ED2KFT_AUDIO: return ED2KFTSTR_AUDIO;
940 case ED2KFT_VIDEO: return ED2KFTSTR_VIDEO;
941 case ED2KFT_IMAGE: return ED2KFTSTR_IMAGE;
942 case ED2KFT_DOCUMENT: return ED2KFTSTR_DOCUMENT;
943 case ED2KFT_PROGRAM: return ED2KFTSTR_PROGRAM;
944 case ED2KFT_ARCHIVE: return ED2KFTSTR_ARCHIVE;
945 case ED2KFT_CDIMAGE: return ED2KFTSTR_CDIMAGE;
946 default: return "";
947 }
948}
949
950
951// Returns the ed2k file type integer ID which is to be used for publishing+searching

Callers 1

AddToListMethod · 0.85

Calls 1

GetED2KFileTypeIDFunction · 0.85

Tested by

no test coverage detected