Jeff Thompson | 08ab3cd | 2012-10-08 02:56: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. |
| 3 | */ |
| 4 | |
| 5 | var EXPORTED_SYMBOLS = ["NDN", "DataUtils", "readAllFromSocket"]; |
| 6 | |
| 7 | Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); |
| 8 | Components.utils.import("resource://gre/modules/NetUtil.jsm"); |
| 9 | |
| 10 | // LOG is used by some of the NDN code. |
| 11 | var LOG = 0; |
| 12 | |
| 13 | // jsbn.js needs the navigator object which isn't defined in XPCOM, so make a local hack. |
| 14 | var navigator = { |
| 15 | appName: "Netscape" |
| 16 | }; |
| 17 | |
| 18 | // Some code calls console.log without checking LOG>0. Until this is cleaned up, make a local hack console. |
| 19 | var console = { |
| 20 | log: function(message) { |
| 21 | dump(message + "\n"); |
| 22 | } |
| 23 | }; |
| 24 | |