Returns a file type which is used eMule internally only, examining the extension of the given filename
| 933 | |
| 934 | // Returns a file type which is used eMule internally only, examining the extension of the given filename |
| 935 | wxString 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 |
no test coverage detected