summaryrefslogtreecommitdiffstats
path: root/xpcom/ds/nsIINIParser.idl
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /xpcom/ds/nsIINIParser.idl
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'xpcom/ds/nsIINIParser.idl')
-rw-r--r--xpcom/ds/nsIINIParser.idl58
1 files changed, 58 insertions, 0 deletions
diff --git a/xpcom/ds/nsIINIParser.idl b/xpcom/ds/nsIINIParser.idl
new file mode 100644
index 000000000..166828e5d
--- /dev/null
+++ b/xpcom/ds/nsIINIParser.idl
@@ -0,0 +1,58 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "nsISupports.idl"
+
+interface nsIUTF8StringEnumerator;
+interface nsIFile;
+
+[scriptable, uuid(7eb955f6-3e78-4d39-b72f-c1bf12a94bce)]
+interface nsIINIParser : nsISupports
+{
+ /**
+ * Enumerates the [section]s available in the INI file.
+ */
+ nsIUTF8StringEnumerator getSections();
+
+ /**
+ * Enumerates the keys available within a section.
+ */
+ nsIUTF8StringEnumerator getKeys(in AUTF8String aSection);
+
+ /**
+ * Get the value of a string for a particular section and key.
+ */
+ AUTF8String getString(in AUTF8String aSection, in AUTF8String aKey);
+};
+
+[scriptable, uuid(b67bb24b-31a3-4a6a-a5d9-0485c9af5a04)]
+interface nsIINIParserWriter : nsISupports
+{
+ /**
+ * Windows and the NSIS installer code sometimes expect INI files to be in
+ * UTF-16 encoding. On Windows only, this flag to writeFile can be used to
+ * change the encoding from its default UTF-8.
+ */
+ const unsigned long WRITE_UTF16 = 0x1;
+
+ /**
+ * Set the value of a string for a particular section and key.
+ */
+ void setString(in AUTF8String aSection, in AUTF8String aKey, in AUTF8String aValue);
+
+ /**
+ * Write to the INI file.
+ */
+ void writeFile([optional] in nsIFile aINIFile,
+ [optional] in unsigned long aFlags);
+};
+
+[scriptable, uuid(ccae7ea5-1218-4b51-aecb-c2d8ecd46af9)]
+interface nsIINIParserFactory : nsISupports
+{
+ /**
+ * Create an iniparser instance from a local file.
+ */
+ nsIINIParser createINIParser(in nsIFile aINIFile);
+};