modules/libpref/public/nsIPrefLocalizedString.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #include "nsISupports.idl"
michael@0 7
michael@0 8 /**
michael@0 9 * The nsIPrefLocalizedString interface is simply a wrapper interface for
michael@0 10 * nsISupportsString so the preferences service can have a unique identifier
michael@0 11 * to distinguish between requests for normal wide strings (nsISupportsString)
michael@0 12 * and "localized" wide strings, which get their default values from properites
michael@0 13 * files.
michael@0 14 *
michael@0 15 * @see nsIPrefBranch
michael@0 16 * @see nsISupportsString
michael@0 17 */
michael@0 18
michael@0 19 [scriptable, uuid(ae419e24-1dd1-11b2-b39a-d3e5e7073802)]
michael@0 20 interface nsIPrefLocalizedString : nsISupports
michael@0 21 {
michael@0 22 /**
michael@0 23 * Provides access to string data stored in this property.
michael@0 24 *
michael@0 25 * @throws Error An error occurred.
michael@0 26 */
michael@0 27 attribute wstring data;
michael@0 28
michael@0 29 /**
michael@0 30 * Used to retrieve the contents of this object into a wide string.
michael@0 31 *
michael@0 32 * @return wstring The string containing the data stored within this object.
michael@0 33 */
michael@0 34 wstring toString();
michael@0 35
michael@0 36 /**
michael@0 37 * Used to set the contents of this object.
michael@0 38 *
michael@0 39 * @param length The length of the string. This value should not include
michael@0 40 * space for the null terminator, nor should it account for the
michael@0 41 * size of a character. It should only be the number of
michael@0 42 * characters for which there is space in the string.
michael@0 43 * @param data The string data to be stored.
michael@0 44 *
michael@0 45 * @note
michael@0 46 * This makes a copy of the string argument passed in.
michael@0 47 */
michael@0 48 void setDataWithLength(in unsigned long length,
michael@0 49 [size_is(length)] in wstring data);
michael@0 50 };
michael@0 51
michael@0 52 %{C++
michael@0 53
michael@0 54 #define NS_PREFLOCALIZEDSTRING_CID \
michael@0 55 { /* {064d9cee-1dd2-11b2-83e3-d25ab0193c26} */ \
michael@0 56 0x064d9cee, \
michael@0 57 0x1dd2, \
michael@0 58 0x11b2, \
michael@0 59 { 0x83, 0xe3, 0xd2, 0x5a, 0xb0, 0x19, 0x3c, 0x26 } \
michael@0 60 }
michael@0 61
michael@0 62 #define NS_PREFLOCALIZEDSTRING_CONTRACTID "@mozilla.org/pref-localizedstring;1"
michael@0 63
michael@0 64 %}

mercurial