-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from plos-clan/dev-copi143
修改magic的实现
- Loading branch information
Showing
7 changed files
with
515 additions
and
777 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,26 @@ | ||
#pragma once | ||
#include <define.h> | ||
|
||
enum { | ||
MIME_UNKNOWN, | ||
MIME_TEXT, | ||
MIME_IMAGE, | ||
MIME_AUDIO, | ||
MIME_VIDEO, | ||
MIME_APPLICATION, | ||
MIME_FONT, | ||
MIME_MESSAGE, | ||
MIME_MODEL, | ||
MIME_MULTIPART, | ||
}; | ||
|
||
typedef struct filetype { | ||
const i32 id; // ID | ||
const i32 type; // 类型 | ||
const cstr mime; // MIME 类型 | ||
const cstr desc; // 描述 | ||
} *filetype_t; | ||
|
||
dlimport cstr filetype(const void *data, size_t size); | ||
|
||
dlexport cstr filetype_by_ext(cstr ext); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.