summaryrefslogtreecommitdiffstats
path: root/xpcom/components/ModuleLoader.h
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/components/ModuleLoader.h
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/components/ModuleLoader.h')
-rw-r--r--xpcom/components/ModuleLoader.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/xpcom/components/ModuleLoader.h b/xpcom/components/ModuleLoader.h
new file mode 100644
index 000000000..c2c920d4d
--- /dev/null
+++ b/xpcom/components/ModuleLoader.h
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ts=8 sts=2 et sw=2 tw=80: */
+/* 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/. */
+
+#ifndef mozilla_ModuleLoader_h
+#define mozilla_ModuleLoader_h
+
+#include "nsISupports.h"
+#include "mozilla/Module.h"
+#include "mozilla/FileLocation.h"
+
+#define MOZILLA_MODULELOADER_PSEUDO_IID \
+{ 0xD951A8CE, 0x6E9F, 0x464F, \
+ { 0x8A, 0xC8, 0x14, 0x61, 0xC0, 0xD3, 0x63, 0xC8 } }
+
+namespace mozilla {
+
+/**
+ * Module loaders are responsible for loading a component file. The static
+ * component loader is special and does not use this abstract interface.
+ *
+ * @note Implementations of this interface should be threadsafe,
+ * methods may be called from any thread.
+ */
+class ModuleLoader : public nsISupports
+{
+public:
+ NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_MODULELOADER_PSEUDO_IID)
+
+ /**
+ * Return the module for a specified file. The caller should cache
+ * the module: the implementer should not expect for the same file
+ * to be loaded multiple times. The Module object should either be
+ * statically or permanently allocated; it will not be freed.
+ */
+ virtual const Module* LoadModule(mozilla::FileLocation& aFile) = 0;
+};
+NS_DEFINE_STATIC_IID_ACCESSOR(ModuleLoader, MOZILLA_MODULELOADER_PSEUDO_IID)
+
+} // namespace mozilla
+
+#endif // mozilla_ModuleLoader_h