1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/intl/locale/src/mac/nsDateTimeFormatMac.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,60 @@ 1.4 + 1.5 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 1.6 + * 1.7 + * This Source Code Form is subject to the terms of the Mozilla Public 1.8 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.9 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.10 +#ifndef nsDateTimeFormatMac_h__ 1.11 +#define nsDateTimeFormatMac_h__ 1.12 + 1.13 + 1.14 +#include "nsCOMPtr.h" 1.15 +#include "nsIDateTimeFormat.h" 1.16 + 1.17 + 1.18 +class nsDateTimeFormatMac : public nsIDateTimeFormat { 1.19 + 1.20 +public: 1.21 + NS_DECL_THREADSAFE_ISUPPORTS 1.22 + 1.23 + // performs a locale sensitive date formatting operation on the time_t parameter 1.24 + NS_IMETHOD FormatTime(nsILocale* locale, 1.25 + const nsDateFormatSelector dateFormatSelector, 1.26 + const nsTimeFormatSelector timeFormatSelector, 1.27 + const time_t timetTime, 1.28 + nsAString& stringOut); 1.29 + 1.30 + // performs a locale sensitive date formatting operation on the struct tm parameter 1.31 + NS_IMETHOD FormatTMTime(nsILocale* locale, 1.32 + const nsDateFormatSelector dateFormatSelector, 1.33 + const nsTimeFormatSelector timeFormatSelector, 1.34 + const struct tm* tmTime, 1.35 + nsAString& stringOut); 1.36 + // performs a locale sensitive date formatting operation on the PRTime parameter 1.37 + NS_IMETHOD FormatPRTime(nsILocale* locale, 1.38 + const nsDateFormatSelector dateFormatSelector, 1.39 + const nsTimeFormatSelector timeFormatSelector, 1.40 + const PRTime prTime, 1.41 + nsAString& stringOut); 1.42 + 1.43 + // performs a locale sensitive date formatting operation on the PRExplodedTime parameter 1.44 + NS_IMETHOD FormatPRExplodedTime(nsILocale* locale, 1.45 + const nsDateFormatSelector dateFormatSelector, 1.46 + const nsTimeFormatSelector timeFormatSelector, 1.47 + const PRExplodedTime* explodedTime, 1.48 + nsAString& stringOut); 1.49 + 1.50 + nsDateTimeFormatMac() {} 1.51 + 1.52 + virtual ~nsDateTimeFormatMac() {} 1.53 + 1.54 +private: 1.55 + // init this interface to a specified locale 1.56 + NS_IMETHOD Initialize(nsILocale* locale); 1.57 + 1.58 + nsString mLocale; 1.59 + nsString mAppLocale; 1.60 + bool mUseDefaultLocale; 1.61 +}; 1.62 + 1.63 +#endif /* nsDateTimeFormatMac_h__ */