Major update: Refactor to rename ContentName to Name. Delete KeyName.js. For the moment, the KeyName class is now in KeyLocator.js.
This is done according to the API notes:
http://sea.remap.ucla.edu:8080/attachments/download/23/lwndn_api-notes_21020830.txt
diff --git a/js/testing/test-connection.html b/js/testing/test-connection.html
index eb0d137..29a017a 100644
--- a/js/testing/test-connection.html
+++ b/js/testing/test-connection.html
@@ -11,7 +11,7 @@
<script type="text/javascript" src="../CCNTime.js"></script>
- <script type="text/javascript" src="../ContentName.js"></script>
+ <script type="text/javascript" src="../Name.js"></script>
<script type="text/javascript" src="../ContentObject.js"></script>
@@ -27,8 +27,6 @@
<script type="text/javascript" src="../KeyLocator.js"></script>
- <script type="text/javascript" src="../KeyName.js"></script>
-
<script type="text/javascript" src="../PublisherID.js"></script>
<script type="text/javascript" src="../Signature.js"></script>
diff --git a/js/testing/test-decode-FaceInstance.html b/js/testing/test-decode-FaceInstance.html
index 196afbe..999e5f2 100644
--- a/js/testing/test-decode-FaceInstance.html
+++ b/js/testing/test-decode-FaceInstance.html
@@ -12,7 +12,7 @@
<script type="text/javascript" src="../CCNTime.js"></script>
- <script type="text/javascript" src="../ContentName.js"></script>
+ <script type="text/javascript" src="../Name.js"></script>
<script type="text/javascript" src="../ContentObject.js"></script>
@@ -28,8 +28,6 @@
<script type="text/javascript" src="../KeyLocator.js"></script>
- <script type="text/javascript" src="../KeyName.js"></script>
-
<script type="text/javascript" src="../PublisherID.js"></script>
<script type="text/javascript" src="../Signature.js"></script>
@@ -154,7 +152,7 @@
<body >
<form>
- Please Enter a Interest:<br />
+ Please Press Decode:<br />
<!-- input id="faceInstance" type="text" name="FACEINSTANCE" value="/PARC/abc" /-->
diff --git a/js/testing/test-decode-Interest+Forwarding+Entry.html b/js/testing/test-decode-Interest+Forwarding+Entry.html
index 5e5e1c0..362b254 100644
--- a/js/testing/test-decode-Interest+Forwarding+Entry.html
+++ b/js/testing/test-decode-Interest+Forwarding+Entry.html
@@ -12,7 +12,7 @@
<script type="text/javascript" src="../CCNTime.js"></script>
- <script type="text/javascript" src="../ContentName.js"></script>
+ <script type="text/javascript" src="../Name.js"></script>
<script type="text/javascript" src="../ContentObject.js"></script>
@@ -28,8 +28,6 @@
<script type="text/javascript" src="../KeyLocator.js"></script>
- <script type="text/javascript" src="../KeyName.js"></script>
-
<script type="text/javascript" src="../PublisherID.js"></script>
<script type="text/javascript" src="../Signature.js"></script>
diff --git a/js/testing/test-encode-decode-ContentObject-bis.html b/js/testing/test-encode-decode-ContentObject-bis.html
index 6e8dad9..8ea3e93 100644
--- a/js/testing/test-encode-decode-ContentObject-bis.html
+++ b/js/testing/test-encode-decode-ContentObject-bis.html
@@ -12,7 +12,7 @@
<script type="text/javascript" src="../CCNTime.js"></script>
- <script type="text/javascript" src="../ContentName.js"></script>
+ <script type="text/javascript" src="../Name.js"></script>
<script type="text/javascript" src="../ContentObject.js"></script>
@@ -28,8 +28,6 @@
<script type="text/javascript" src="../KeyLocator.js"></script>
- <script type="text/javascript" src="../KeyName.js"></script>
-
<script type="text/javascript" src="../PublisherID.js"></script>
<script type="text/javascript" src="../Signature.js"></script>
@@ -72,7 +70,7 @@
<script type="text/javascript">
function encode(){
- var contentname = new ContentName( createNameArray(document.getElementById('contentname').value) );
+ var contentname = new Name( createNameArray(document.getElementById('contentname').value) );
var content = document.getElementById('content').value;
diff --git a/js/testing/test-encode-decode-ContentObject.html b/js/testing/test-encode-decode-ContentObject.html
index 6818a86..08904c8 100644
--- a/js/testing/test-encode-decode-ContentObject.html
+++ b/js/testing/test-encode-decode-ContentObject.html
@@ -12,7 +12,7 @@
<script type="text/javascript" src="../CCNTime.js"></script>
- <script type="text/javascript" src="../ContentName.js"></script>
+ <script type="text/javascript" src="../Name.js"></script>
<script type="text/javascript" src="../ContentObject.js"></script>
@@ -26,8 +26,6 @@
<script type="text/javascript" src="../KeyLocator.js"></script>
- <script type="text/javascript" src="../KeyName.js"></script>
-
<script type="text/javascript" src="../PublisherID.js"></script>
<script type="text/javascript" src="../Signature.js"></script>
@@ -72,7 +70,7 @@
<script type="text/javascript">
function encode(){
- var contentname = new ContentName( document.getElementById('contentname').value );
+ var contentname = new Name( document.getElementById('contentname').value );
var content = document.getElementById('content').value;
diff --git a/js/testing/test-encode-decode-Interest.html b/js/testing/test-encode-decode-Interest.html
index d957176..ef69d67 100644
--- a/js/testing/test-encode-decode-Interest.html
+++ b/js/testing/test-encode-decode-Interest.html
@@ -12,7 +12,7 @@
<script type="text/javascript" src="../CCNTime.js"></script>
- <script type="text/javascript" src="../ContentName.js"></script>
+ <script type="text/javascript" src="../Name.js"></script>
<script type="text/javascript" src="../ContentObject.js"></script>
@@ -28,8 +28,6 @@
<script type="text/javascript" src="../KeyLocator.js"></script>
- <script type="text/javascript" src="../KeyName.js"></script>
-
<script type="text/javascript" src="../PublisherID.js"></script>
<script type="text/javascript" src="../Signature.js"></script>
@@ -74,7 +72,7 @@
<script type="text/javascript">
function encode(){
- var interest = new Interest( new ContentName(document.getElementById('interest').value ) );
+ var interest = new Interest( new Name(document.getElementById('interest').value ) );
interest.scope = 1;
diff --git a/js/testing/test-get.html b/js/testing/test-get.html
index 8053655..780b5be 100644
--- a/js/testing/test-get.html
+++ b/js/testing/test-get.html
@@ -11,7 +11,7 @@
<script type="text/javascript" src="../CCNTime.js"></script>
- <script type="text/javascript" src="../ContentName.js"></script>
+ <script type="text/javascript" src="../Name.js"></script>
<script type="text/javascript" src="../ContentObject.js"></script>
@@ -27,8 +27,6 @@
<script type="text/javascript" src="../KeyLocator.js"></script>
- <script type="text/javascript" src="../KeyName.js"></script>
-
<script type="text/javascript" src="../PublisherID.js"></script>
<script type="text/javascript" src="../Signature.js"></script>
@@ -74,7 +72,7 @@
<script type="text/javascript">
function getAction(){
- var interest = new Interest( new ContentName(document.getElementById('interest').value));
+ var interest = new Interest( new Name(document.getElementById('interest').value));
interest.scope = 1;
var received = get('127.0.0.1', 9695, encodeToHexInterest(interest));
diff --git a/js/testing/test-interest-matches-name.html b/js/testing/test-interest-matches-name.html
index 111789f..9038369 100644
--- a/js/testing/test-interest-matches-name.html
+++ b/js/testing/test-interest-matches-name.html
@@ -12,7 +12,7 @@
<script type="text/javascript" src="../CCNTime.js"></script>
- <script type="text/javascript" src="../ContentName.js"></script>
+ <script type="text/javascript" src="../Name.js"></script>
<script type="text/javascript" src="../ContentObject.js"></script>
@@ -28,8 +28,6 @@
<script type="text/javascript" src="../KeyLocator.js"></script>
- <script type="text/javascript" src="../KeyName.js"></script>
-
<script type="text/javascript" src="../PublisherID.js"></script>
<script type="text/javascript" src="../Signature.js"></script>
@@ -74,10 +72,10 @@
<script type="text/javascript">
function check(){
- var interest = new Interest( new ContentName(document.getElementById('interest').value));
+ var interest = new Interest( new Name(document.getElementById('interest').value));
interest.scope = 1;
- var nameToCheck = new ContentName(document.getElementById('nameToCheck').value);
+ var nameToCheck = new Name(document.getElementById('nameToCheck').value);
var output = (interest.matches_name(nameToCheck) ? "matches" : "doesn't match");
document.getElementById('result').innerHTML = output;
diff --git a/js/testing/test-request-send-hex.html b/js/testing/test-request-send-hex.html
index 3ed1a90..666d3f5 100644
--- a/js/testing/test-request-send-hex.html
+++ b/js/testing/test-request-send-hex.html
@@ -11,7 +11,7 @@
<script type="text/javascript" src="../CCNTime.js"></script>
- <script type="text/javascript" src="../ContentName.js"></script>
+ <script type="text/javascript" src="../Name.js"></script>
<script type="text/javascript" src="../ContentObject.js"></script>
@@ -27,8 +27,6 @@
<script type="text/javascript" src="../KeyLocator.js"></script>
- <script type="text/javascript" src="../KeyName.js"></script>
-
<script type="text/javascript" src="../PublisherID.js"></script>
<script type="text/javascript" src="../Signature.js"></script>
@@ -88,7 +86,7 @@
//createRoute('borges.metwi.ucla.edu', 9695);
//content object
- //var co = queryPrefix( ContentName );
+ //var co = queryPrefix( Name );
console.log('HEX IS');
console.log(hex);