+ Added file-extension based mime type guessing

+ Added sniffer rule based mime type guessing
+ Added get_device_icon()
+ Added complete (synchronous, asynchronous; recursive,
  non-recursive; forcing, non-forcing; you name it we got it :-)
  update_mime_info() implementation.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1152 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Tyler Dauwalder
2002-09-24 05:36:03 +00:00
parent 743e936ee7
commit 1bd963b6c2
12 changed files with 891 additions and 101 deletions
+6 -3
View File
@@ -145,10 +145,10 @@ public:
/* calls to ask the sniffer to identify the MIME type of a file or data in
memory */
static status_t GuessMimeType(const entry_ref *file, BMimeType *result);
static status_t GuessMimeType(const entry_ref *file, BMimeType *type);
static status_t GuessMimeType(const void *buffer, int32 length,
BMimeType *result);
static status_t GuessMimeType(const char *filename, BMimeType *result);
BMimeType *type);
static status_t GuessMimeType(const char *filename, BMimeType *type);
static status_t StartWatching(BMessenger target);
static status_t StopWatching(BMessenger target);
@@ -201,6 +201,9 @@ private:
// status_t CloseFile() const;
status_t GetSupportedTypes(BMessage *types);
status_t SetSupportedTypes(const BMessage *types, bool fullSync = true);
static status_t GetAssociatedTypes(const char *extension, BMessage *types);
// void MimeChanged(int32 w, const char *type = NULL,
// bool large = true) const;