intl/locale/idl/nsILocale.idl

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #include "nsISupports.idl"
     8 %{C++
     9 #define NSILOCALE_COLLATE "NSILOCALE_COLLATE"
    10 #define NSILOCALE_CTYPE  "NSILOCALE_CTYPE"
    11 #define NSILOCALE_MONETARY "NSILOCALE_MONETARY"
    12 #define NSILOCALE_NUMERIC "NSILOCALE_NUMERIC"
    13 #define NSILOCALE_TIME "NSILOCALE_TIME"
    14 #define NSILOCALE_MESSAGE "NSILOCALE_MESSAGES"
    16 #define NS_LOCALE_CONTRACTID "@mozilla.org/intl/nslocale;1"
    17 %}
    19 /**
    20  * Represents one locale, which can be used for things like sorting text strings
    21  * and formatting numbers, dates and times.
    22  */
    23 [scriptable, uuid(21035ee0-4556-11d3-91cd-00105aa3f7dc)]
    24 interface nsILocale : nsISupports
    25 {
    26     /**
    27      * Get the locale code for a given category.
    28      *
    29      * A locale code is of the form language[-COUNTRY[-region]], where
    30      * "language" is an ISO 639 language code (two letter codes preferred over
    31      * three letter codes when available), "COUNTRY" is an ISO 3166 two letter
    32      * country code, and "region" is a string of up to 5 letters.
    33      *
    34      * A category is one of the following:
    35      * NSILOCALE_CTYPE: Character classification and case conversion.
    36      * NSILOCALE_COLLATE: Collation order. How strings are sorted.
    37      * NSILOCALE_MONETARY: Monetary formatting.
    38      * NSILOCALE_NUMERIC: Numeric, non-monetary formatting.
    39      * NSILOCALE_TIME: Date and time formats.
    40      * NSILOCALE_MESSAGES: Related to fonts, character encodings etc.
    41      * 
    42      * @param category
    43      *        The category of interest.
    44      * @return The locale code to be used for the given category.
    45      */
    46     AString getCategory(in AString category);
    47 };

mercurial