/**
 * 该模块是手机端网络状况相关<br>
 *  <strong>
 *          页面需要导入的文件
 *          <ul>
 *              <li>cmp-connection.js</li>
 *          </ul>
 *      </strong>
 * @module Connection
 * @subtitle 网络状态
 */

/**
 * 网络<br>
 * @class connection
 * @namespace cmp
 * @type {{}}
 */

/**
 * 获取当前网络类型
 * @namespace cmp
 * @method getNetworkType
 * @param {Object} options 配置参数
 *      @param {Function} options.success 获取成功后的回调
 * @example
 * ```
 * 文件导入路径:
 * M3App端
 *  <script  src="http://cmp/v1.0.0/js/cordova/__CMPSHELL_PLATFORM__/cordova.js"></script>
 *  <script  src="http://cmp/v1.0.0/js/cordova/cordova-plugins.js"></script>
 *  <script  src="http://cmp/v/js/cmp.js"></script>
 *  <script  src="http://cmp/v/js/cmp-connection.js"></script>
 *  ===========================================================================================
 *  微协同端:
 *  <script  src="/seeyon/m3/cmp/js/cmp.js"></script>
 *  <script  src="/seeyon/m3/cmp/js/cmp-connection.js"></script>
 *  =========================================================================================
 *  调用组件
 * <script>
 *    cmp.connection.getNetworkType({
 *        success:function(networkState){
 *             //返回的数据格式,请参考下面return的类型
 *             //do something with networkState
 *        }
 *    });
 * </script>
 * ```
 * @returns {String} networkState 类型有:<br>
 *     <ul>
 *         <li>Unknown:未知网络</li>
 *         <li>Ethernet:以太网</li>
 *         <li>wifi:wifi</li>
 *         <li>2g:2g网络</li>
 *         <li>3g:3g网络</li>
 *         <li>4g:4g网络</li>
 *         <li>generic:未受保护的通用网络</li>
 *         <li>NONE:没有网络</li>
 *     </ul>
 */

/**
 * 获取当前网络详情
 * @namespace cmp
 * @method getNetworkDetail
 * @param {Object} options 配置参数
 *      @param {Function} options.success 获取成功后的回调
 * @example
 * ```
 *  文件导入路径:
 * M3App端
 *  <script  src="http://cmp/v1.0.0/js/cordova/__CMPSHELL_PLATFORM__/cordova.js"></script>
 *  <script  src="http://cmp/v1.0.0/js/cordova/cordova-plugins.js"></script>
 *  <script  src="http://cmp/v/js/cmp.js"></script>
 *  <script  src="http://cmp/v/js/cmp-connection.js"></script>
 *  ===========================================================================================
 *  微协同端:不支持
 *  =========================================================================================
 *  调用组件
 * <script>
 *    cmp.connection.getNetworkDetail({
 *        success:function(networkDetail){
 *
 *             //do something with networkDetail
 *        }
 *    });
 * </script>
 * ```
 *
 *
 */
    
Top