Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.4 KiB

  1. /****************************************************************************
  2. MIMEMAPC.H
  3. Mime Map Class Definition
  4. ****************************************************************************/
  5. #ifndef _mimemapc_h
  6. #define _mimemapc_h
  7. // Forward declarations
  8. class CMimeMap ;
  9. // Maximum size of a Registry class name
  10. #define CREGKEY_MAX_CLASS_NAME MAX_PATH
  11. // Wrapper for a Registry key handle.
  12. class CMimeMap : public CObject
  13. {
  14. protected:
  15. CString m_strPrevMimeMap;
  16. CString m_strCurrentMimeMap;
  17. CString m_strDisplayString;
  18. CString m_strMimeType;
  19. CString m_strGopherType;
  20. CString m_strImageFile;
  21. CString m_strFileExtension;
  22. LPCTSTR GetMimeMapping();
  23. void CheckDot(CString &pchFileExtension);
  24. public:
  25. // Standard constructor
  26. CMimeMap ( LPCTSTR pchOriginalMimeMap) ;
  27. CMimeMap ( LPCTSTR pchFileExtension, LPCTSTR pchMimeType, LPCTSTR pchImageFile, LPCTSTR pchGopherType);
  28. ~CMimeMap();
  29. // Allow a CRegKey to be used anywhere an HKEY is required.
  30. operator LPCTSTR ()
  31. { return GetMimeMapping(); }
  32. void SetMimeType(LPCTSTR);
  33. LPCTSTR GetMimeType();
  34. void SetGopherType(LPCTSTR);
  35. LPCTSTR GetGopherType();
  36. void SetImageFile(LPCTSTR);
  37. LPCTSTR GetImageFile();
  38. void SetFileExtension(LPCTSTR);
  39. LPCTSTR GetFileExtension();
  40. void SetPrevMimeMap();
  41. LPCTSTR GetPrevMimeMap();
  42. BOOL PrevMimeMapExists();
  43. LPCTSTR GetDisplayString();
  44. };
  45. #endif