aboutsummaryrefslogtreecommitdiff
path: root/chrome/js/xpcom.js
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/js/xpcom.js')
-rw-r--r--chrome/js/xpcom.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/js/xpcom.js b/chrome/js/xpcom.js
index e81f58e..2d18ff3 100644
--- a/chrome/js/xpcom.js
+++ b/chrome/js/xpcom.js
@@ -7,10 +7,13 @@ const ServerSocket = Components.Constructor("@mozilla.org/network/server-socket;
const ScriptableInputStream = Components.Constructor("@mozilla.org/scriptableinputstream;1", "nsIScriptableInputStream", "init");
const FileInputStream = Components.Constructor("@mozilla.org/network/file-input-stream;1", "nsIFileInputStream", "init");
const ConverterInputStream = Components.Constructor("@mozilla.org/intl/converter-input-stream;1", "nsIConverterInputStream", "init");
+const FileOutputStream = Components.Constructor("@mozilla.org/network/file-output-stream;1", "nsIFileOutputStream", "init");
+const ConverterOutputStream = Components.Constructor("@mozilla.org/intl/converter-output-stream;1", "nsIConverterOutputStream", "init");
const LocalFile = Components.Constructor("@mozilla.org/file/local;1", "nsILocalFile", "initWithPath");
const FilePicker = Components.Constructor("@mozilla.org/filepicker;1", "nsIFilePicker", "init");
const FilePickerMode = { save : Ci.nsIFilePicker.modeSave, open : Ci.nsIFilePicker.modeOpen };
+
function Service(className, interfaceName) {
return Cc[className].getService(Ci[interfaceName]);
}
@@ -19,6 +22,9 @@ const PromptService = Service("@mozilla.org/embedcomp/prompt-service;1","nsIProm
const IOService = Service("@mozilla.org/network/io-service;1","nsIIOService");
const LocaleService = Service("@mozilla.org/intl/nslocaleservice;1", "nsILocaleService");
const StringBundleService = Service("@mozilla.org/intl/stringbundle;1", "nsIStringBundleService");
+const ConsoleService = Service("@mozilla.org/consoleservice;1", "nsIConsoleService");
+const PrefServie = Service("@mozilla.org/preferences-service;1", "nsIPrefService");
+const DirectoryService = Service("@mozilla.org/file/directory_service;1", "nsIProperties");
var EXPORTED_SYMBOLS = [];
for (var name in this) {