Jeff Thompson | 745026e | 2012-10-13 12:49:20 -0700 | [diff] [blame] | 1 | /* This file is created by running make-ndn-js.jsm.sh in this directory. |
| 2 | * It concatenates ndn-js-header.txt with all the ndn-js source files to |
| 3 | * make ndn-js.jsm . |
Jeff Thompson | 146d7de | 2012-11-17 16:15:28 -0800 | [diff] [blame^] | 4 | * author: Jeff Thompson |
Jeff Thompson | 745026e | 2012-10-13 12:49:20 -0700 | [diff] [blame] | 5 | * See COPYING for copyright and distribution information. |
Jeff Thompson | 08ab3cd | 2012-10-08 02:56:20 -0700 | [diff] [blame] | 6 | */ |
| 7 | |
Jeff Thompson | e769c51 | 2012-11-04 17:25:07 -0800 | [diff] [blame] | 8 | var EXPORTED_SYMBOLS = ["NDN", "Closure", "Name", "Interest", "ContentObject", |
Jeff Thompson | 17a9da8 | 2012-11-12 01:11:01 -0800 | [diff] [blame] | 9 | "DataUtils", "MimeTypes", "XpcomTransport"]; |
Jeff Thompson | 08ab3cd | 2012-10-08 02:56:20 -0700 | [diff] [blame] | 10 | |
| 11 | Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); |
| 12 | Components.utils.import("resource://gre/modules/NetUtil.jsm"); |
| 13 | |
| 14 | // LOG is used by some of the NDN code. |
| 15 | var LOG = 0; |
| 16 | |
| 17 | // jsbn.js needs the navigator object which isn't defined in XPCOM, so make a local hack. |
| 18 | var navigator = { |
| 19 | appName: "Netscape" |
| 20 | }; |
| 21 | |
| 22 | // Some code calls console.log without checking LOG>0. Until this is cleaned up, make a local hack console. |
| 23 | var console = { |
| 24 | log: function(message) { |
| 25 | dump(message + "\n"); |
| 26 | } |
| 27 | }; |
| 28 | |