X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7dc3cc31af71522b8fc55b7f97bcba7f5ef9eac5..ef7a25a73ef4215454d6d8e3bad63bdf5b4339a0:/include/wx/unix/mimetype.h diff --git a/include/wx/unix/mimetype.h b/include/wx/unix/mimetype.h index 2677c1ffe7..3b7f478fd4 100644 --- a/include/wx/unix/mimetype.h +++ b/include/wx/unix/mimetype.h @@ -36,6 +36,8 @@ public: // ctor loads all info into memory for quicker access later on // TODO it would be nice to load them all, but parse on demand only... wxMimeTypesManagerImpl(); + ~wxMimeTypesManagerImpl(); + // implement containing class functions wxFileType *GetFileTypeFromExtension(const wxString& ext); @@ -76,20 +78,23 @@ private: static ArrayIconHandlers ms_iconHandlers; }; + + class WXDLLEXPORT wxFileTypeImpl { public: // initialization functions void Init(wxMimeTypesManagerImpl *manager, size_t index) - { m_manager = manager; m_index = index; } + { m_manager = manager; m_index.Add(index); } // accessors bool GetExtensions(wxArrayString& extensions); bool GetMimeType(wxString *mimeType) const - { *mimeType = m_manager->m_aTypes[m_index]; return TRUE; } + { *mimeType = m_manager->m_aTypes[m_index[0]]; return TRUE; } + bool GetMimeTypes(wxArrayString& mimeTypes) const; bool GetIcon(wxIcon *icon) const; bool GetDescription(wxString *desc) const - { *desc = m_manager->m_aDescriptions[m_index]; return TRUE; } + { *desc = m_manager->m_aDescriptions[m_index[0]]; return TRUE; } bool GetOpenCommand(wxString *openCmd, const wxFileType::MessageParameters& params) const @@ -113,7 +118,7 @@ private: bool open) const; wxMimeTypesManagerImpl *m_manager; - size_t m_index; // in the wxMimeTypesManagerImpl arrays + wxArrayInt m_index; // in the wxMimeTypesManagerImpl arrays };