From 28773611dfb66b5bd0fe34fa4c2bef9b78f0a17a Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 28 Feb 2014 16:03:20 -0500 Subject: [PATCH] JS max_chunk_size parsing; final bits Signed-off-by: Bill Erickson --- src/javascript/opensrf.js | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/src/javascript/opensrf.js b/src/javascript/opensrf.js index c37f913..394cddd 100644 --- a/src/javascript/opensrf.js +++ b/src/javascript/opensrf.js @@ -188,6 +188,45 @@ osrfResult.prototype.content = function(d) { this.hash.content = d; return this.hash.content; }; +function osrfResultPartial(hash) { + this.hash = hash; + this._encodehash = true; +} +osrfResultPartial.prototype.status = function(d) { + if(arguments.length == 1) + this.hash.status = d; + return this.hash.status; +}; +osrfResultPartial.prototype.statusCode = function(d) { + if(arguments.length == 1) + this.hash.statusCode = d; + return this.hash.statusCode; +}; +osrfResultPartial.prototype.content = function(d) { + if(arguments.length == 1) + this.hash.content = d; + return this.hash.content; +}; +function osrfResultPartialComplete(hash) { + this.hash = hash; + this._encodehash = true; +} +osrfResultPartialComplete.prototype.status = function(d) { + if(arguments.length == 1) + this.hash.status = d; + return this.hash.status; +}; +osrfResultPartialComplete.prototype.statusCode = function(d) { + if(arguments.length == 1) + this.hash.statusCode = d; + return this.hash.statusCode; +}; +osrfResultPartialComplete.prototype.content = function(d) { + if(arguments.length == 1) + this.hash.content = d; + return this.hash.content; +}; + function osrfServerError(hash) { this.hash = hash; this._encodehash = true; -- 2.11.0