intl/locale/src/mac/nsDateTimeFormatMac.h

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

     2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     3  *
     4  * This Source Code Form is subject to the terms of the Mozilla Public
     5  * License, v. 2.0. If a copy of the MPL was not distributed with this
     6  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 #ifndef nsDateTimeFormatMac_h__
     8 #define nsDateTimeFormatMac_h__
    11 #include "nsCOMPtr.h"
    12 #include "nsIDateTimeFormat.h"
    15 class nsDateTimeFormatMac : public nsIDateTimeFormat {
    17 public: 
    18   NS_DECL_THREADSAFE_ISUPPORTS 
    20   // performs a locale sensitive date formatting operation on the time_t parameter
    21   NS_IMETHOD FormatTime(nsILocale* locale, 
    22                         const nsDateFormatSelector  dateFormatSelector, 
    23                         const nsTimeFormatSelector timeFormatSelector, 
    24                         const time_t  timetTime, 
    25                         nsAString& stringOut); 
    27   // performs a locale sensitive date formatting operation on the struct tm parameter
    28   NS_IMETHOD FormatTMTime(nsILocale* locale, 
    29                           const nsDateFormatSelector  dateFormatSelector, 
    30                           const nsTimeFormatSelector timeFormatSelector, 
    31                           const struct tm*  tmTime, 
    32                           nsAString& stringOut); 
    33   // performs a locale sensitive date formatting operation on the PRTime parameter
    34   NS_IMETHOD FormatPRTime(nsILocale* locale, 
    35                           const nsDateFormatSelector  dateFormatSelector, 
    36                           const nsTimeFormatSelector timeFormatSelector, 
    37                           const PRTime  prTime, 
    38                           nsAString& stringOut);
    40   // performs a locale sensitive date formatting operation on the PRExplodedTime parameter
    41   NS_IMETHOD FormatPRExplodedTime(nsILocale* locale, 
    42                                   const nsDateFormatSelector  dateFormatSelector, 
    43                                   const nsTimeFormatSelector timeFormatSelector, 
    44                                   const PRExplodedTime*  explodedTime, 
    45                                   nsAString& stringOut); 
    47   nsDateTimeFormatMac() {}
    49   virtual ~nsDateTimeFormatMac() {}
    51 private:
    52   // init this interface to a specified locale
    53   NS_IMETHOD Initialize(nsILocale* locale);
    55   nsString    mLocale;
    56   nsString    mAppLocale;
    57   bool        mUseDefaultLocale;
    58 };
    60 #endif  /* nsDateTimeFormatMac_h__ */

mercurial