michael@0: michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: #ifndef nsDateTimeFormatMac_h__ michael@0: #define nsDateTimeFormatMac_h__ michael@0: michael@0: michael@0: #include "nsCOMPtr.h" michael@0: #include "nsIDateTimeFormat.h" michael@0: michael@0: michael@0: class nsDateTimeFormatMac : public nsIDateTimeFormat { michael@0: michael@0: public: michael@0: NS_DECL_THREADSAFE_ISUPPORTS michael@0: michael@0: // performs a locale sensitive date formatting operation on the time_t parameter michael@0: NS_IMETHOD FormatTime(nsILocale* locale, michael@0: const nsDateFormatSelector dateFormatSelector, michael@0: const nsTimeFormatSelector timeFormatSelector, michael@0: const time_t timetTime, michael@0: nsAString& stringOut); michael@0: michael@0: // performs a locale sensitive date formatting operation on the struct tm parameter michael@0: NS_IMETHOD FormatTMTime(nsILocale* locale, michael@0: const nsDateFormatSelector dateFormatSelector, michael@0: const nsTimeFormatSelector timeFormatSelector, michael@0: const struct tm* tmTime, michael@0: nsAString& stringOut); michael@0: // performs a locale sensitive date formatting operation on the PRTime parameter michael@0: NS_IMETHOD FormatPRTime(nsILocale* locale, michael@0: const nsDateFormatSelector dateFormatSelector, michael@0: const nsTimeFormatSelector timeFormatSelector, michael@0: const PRTime prTime, michael@0: nsAString& stringOut); michael@0: michael@0: // performs a locale sensitive date formatting operation on the PRExplodedTime parameter michael@0: NS_IMETHOD FormatPRExplodedTime(nsILocale* locale, michael@0: const nsDateFormatSelector dateFormatSelector, michael@0: const nsTimeFormatSelector timeFormatSelector, michael@0: const PRExplodedTime* explodedTime, michael@0: nsAString& stringOut); michael@0: michael@0: nsDateTimeFormatMac() {} michael@0: michael@0: virtual ~nsDateTimeFormatMac() {} michael@0: michael@0: private: michael@0: // init this interface to a specified locale michael@0: NS_IMETHOD Initialize(nsILocale* locale); michael@0: michael@0: nsString mLocale; michael@0: nsString mAppLocale; michael@0: bool mUseDefaultLocale; michael@0: }; michael@0: michael@0: #endif /* nsDateTimeFormatMac_h__ */