<?xml version = "1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<!-- 
	See COPYING for copyright and distribution information.
-->
<html xmlns = "http://www.w3.org/1999/xhtml">
<meta charset="UTF-8">

<head>
	<title>NDN Get via WebSocket</title>
	
	<script type="text/javascript" src="../build/ndn-js.js"></script>

	<script type="text/javascript">
		var ndn = new NDN();
        
        var AsyncGetClosure = function AsyncGetClosure() {
        	// Inherit from Closure.
			Closure.call(this);
		};
		
		AsyncGetClosure.prototype.upcall = function(kind, upcallInfo) {
			//console.log("Closure.upcall() executed.");
			if (kind == Closure.UPCALL_FINAL) {
				// Do nothing.
			} else if (kind == Closure.UPCALL_CONTENT) {
				console.log("Closure.upcall: content signature verification pass.");
                console.log("Host: " + ndn.host + ":" + ndn.port);
				var content = upcallInfo.contentObject;
				//console.log(content.name);
				nameStr = escape(content.name.getName());
				document.getElementById('content').innerHTML += "<p>Name string: " + nameStr + "</p>";
				document.getElementById('content').innerHTML += "<p>Content buffer length: " + content.content.length + "</p>";
				//console.log("In callback, nameStr: " + nameStr);
				//console.log("In callback, content: ");
				//console.log(content);
				document.getElementById('content').innerHTML += contentObjectToHtml(content);
			} else if (kind == Closure.UPCALL_CONTENT_BAD) {
				var content = upcallInfo.contentObject;
				console.log("Closure.upcall: content signature verification fail.");
                console.log("Host: " + ndn.host + ":" + ndn.port);
				if (content.signature.signature)
					console.log("Signature: " + DataUtils.toHex(content.signature.signature).toLowerCase());
				if (content.signature.Witness)
					console.log("Witness: " + DataUtils.toHex(content.signature.Witness).toLowerCase());
			} else if (kind == Closure.UPCALL_INTEREST_TIMED_OUT) {
				console.log("Closure.upcall called with interest time out. Re-expressing the interest.");
                console.log("Host: " + ndn.host + ":" + ndn.port);
                return Closure.RESULT_REEXPRESS;
			}
			return Closure.RESULT_OK;
		};
		
		
		function run() {
			ndn.expressInterest(new Name(document.getElementById('interest').value), new AsyncGetClosure());
		}
		
	</script>
	
</head>
<body >

	<form>
		Please Enter an Interest:<br />
		<input id="interest" type="text" name="INTEREST" size="50" value="/%C1.M.S.localhost/%C1.M.SRV/ccnd/KEY" /> 
	</form>

	<button id="testBtn" onclick="run()">Fetch Content</button>
	
	<p id="content">Content: <br/></p>

</body>
</html>
