Path: blob/trunk/third_party/closure/goog/net/networkstatusmonitor.js
2868 views
// Copyright 2012 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 Base class for objects monitoring and exposing runtime16* network status information.17*/1819goog.provide('goog.net.NetworkStatusMonitor');2021goog.require('goog.events.Listenable');22232425/**26* Base class for network status information providers.27* @interface28* @extends {goog.events.Listenable}29*/30goog.net.NetworkStatusMonitor = function() {};313233/**34* Enum for the events dispatched by the OnlineHandler.35* @enum {string}36*/37goog.net.NetworkStatusMonitor.EventType = {38ONLINE: 'online',39OFFLINE: 'offline'40};414243/**44* @return {boolean} Whether the system is online or otherwise.45*/46goog.net.NetworkStatusMonitor.prototype.isOnline;474849