Path: blob/trunk/third_party/closure/goog/labs/net/webchannel/wire.js
1865 views
// Copyright 2013 The Closure Library Authors. All Rights Reserved.1//2// Licensed under the Apache License, Version 2.0 (the "License");3// you may not use this file except in compliance with the License.4// You may obtain a copy of the License at5//6// http://www.apache.org/licenses/LICENSE-2.07//8// Unless required by applicable law or agreed to in writing, software9// distributed under the License is distributed on an "AS-IS" BASIS,10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.11// See the License for the specific language governing permissions and12// limitations under the License.1314/**15* @fileoverview Interface and shared data structures for implementing16* different wire protocol versions.17* @visibility {//closure/goog:__pkg__}18* @visibility {//closure/goog/bin/sizetests:__pkg__}19*/202122goog.provide('goog.labs.net.webChannel.Wire');23242526/**27* The interface class.28*29* @interface30*/31goog.labs.net.webChannel.Wire = function() {};323334goog.scope(function() {35var Wire = goog.labs.net.webChannel.Wire;363738/**39* The latest protocol version that this class supports. We request this version40* from the server when opening the connection. Should match41* LATEST_CHANNEL_VERSION on the server code.42* @type {number}43*/44Wire.LATEST_CHANNEL_VERSION = 8;45464748/**49* Simple container class for a (mapId, map) pair.50* @param {number} mapId The id for this map.51* @param {!Object|!goog.structs.Map} map The map itself.52* @param {!Object=} opt_context The context associated with the map.53* @constructor54* @struct55*/56Wire.QueuedMap = function(mapId, map, opt_context) {57/**58* The id for this map.59* @type {number}60*/61this.mapId = mapId;6263/**64* The map itself.65* @type {!Object|!goog.structs.Map}66*/67this.map = map;6869/**70* The context for the map.71* @type {Object}72*/73this.context = opt_context || null;74};75}); // goog.scope767778