Return-Path: X-Original-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E6435CD24 for ; Fri, 27 Jul 2012 00:29:20 +0000 (UTC) Received: (qmail 36464 invoked by uid 500); 27 Jul 2012 00:29:18 -0000 Delivered-To: apmail-incubator-callback-commits-archive@incubator.apache.org Received: (qmail 36403 invoked by uid 500); 27 Jul 2012 00:29:18 -0000 Mailing-List: contact callback-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-commits@incubator.apache.org Received: (qmail 35364 invoked by uid 99); 27 Jul 2012 00:29:16 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jul 2012 00:29:16 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id B438419320; Fri, 27 Jul 2012 00:29:16 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: anis@apache.org To: callback-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [65/78] [abbrv] [partial] added platform specs and basic work Message-Id: <20120727002916.B438419320@tyr.zones.apache.org> Date: Fri, 27 Jul 2012 00:29:16 +0000 (UTC) http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/blackberry/www/ext-air/Cordova_Network/library.xml ---------------------------------------------------------------------- diff --git a/lib/cordova-1.9.0/lib/blackberry/www/ext-air/Cordova_Network/library.xml b/lib/cordova-1.9.0/lib/blackberry/www/ext-air/Cordova_Network/library.xml deleted file mode 100755 index c1835b4..0000000 --- a/lib/cordova-1.9.0/lib/blackberry/www/ext-air/Cordova_Network/library.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - org.apache.cordova.network.Network - - - - - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/blackberry/www/ext-air/Cordova_Network/src/org/apache/cordova/network/Network.as ---------------------------------------------------------------------- diff --git a/lib/cordova-1.9.0/lib/blackberry/www/ext-air/Cordova_Network/src/org/apache/cordova/network/Network.as b/lib/cordova-1.9.0/lib/blackberry/www/ext-air/Cordova_Network/src/org/apache/cordova/network/Network.as deleted file mode 100755 index cd8be87..0000000 --- a/lib/cordova-1.9.0/lib/blackberry/www/ext-air/Cordova_Network/src/org/apache/cordova/network/Network.as +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - * Copyright (c) 2011, Research In Motion Limited. - */ - - -package org.apache.cordova.network { - import flash.net.NetworkInfo; - import flash.net.NetworkInterface; - import flash.events.Event; - - import webworks.extension.DefaultExtension; - - public class Network extends DefaultExtension{ - - private var _jsFunctionCallbackIDs:Array = []; - private const FEATURE_ID:Array = [ "org.apache.cordova" ]; - - public function Network() { - //Attach event listener once only - NetworkInfo.networkInfo.addEventListener(flash.events.Event.NETWORK_CHANGE, networkChange); - } - - override public function getFeatureList():Array { - return FEATURE_ID; - } - - public function getConnectionInfo(param:String):void{ - if(_jsFunctionCallbackIDs.indexOf(param) < 0){ - _jsFunctionCallbackIDs.push(param); - } - } - - private function networkChange( event: Event ) : void { - - /** - * Right now, we only care if there is a connection or not, since PlayBook only has WiFi - * At the JS layer, we will map this from offline/online. - * At some point in the future where there are more connection types on PlayBook, - * we will want to attempt to map this to the real Cordova connection types... - */ - - var haveCoverage : Boolean = false; - var networkStatus : String = "offline"; - var connectionType = "none"; - - NetworkInfo.networkInfo.findInterfaces().some( - function callback(item:NetworkInterface, index:int, vector:Vector.):Boolean { - this.webView.executeJavaScript("alert('Network Interface ' + item.name)"); - haveCoverage = item.active || haveCoverage; - return haveCoverage; - }, this); - - if (haveCoverage) { - networkStatus = "online"; - connectionType = "wifi"; - } - - for (var i:Number=0; i<_jsFunctionCallbackIDs.length ; i++){ - evalJavaScriptEvent(_jsFunctionCallbackIDs[i], [{"type" : connectionType, "event" : networkStatus }] ); - } - } - } -} http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/blackberry/www/ext/cordova.1.9.0.jar ---------------------------------------------------------------------- diff --git a/lib/cordova-1.9.0/lib/blackberry/www/ext/cordova.1.9.0.jar b/lib/cordova-1.9.0/lib/blackberry/www/ext/cordova.1.9.0.jar deleted file mode 100755 index a0691ee..0000000 Binary files a/lib/cordova-1.9.0/lib/blackberry/www/ext/cordova.1.9.0.jar and /dev/null differ