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