cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject [01/27] cordova-plugins git commit: Removed plugins other than notification-rebroadcast, moved plugin to root
Date Wed, 22 Feb 2017 19:24:41 GMT
Repository: cordova-plugins
Updated Branches:
  refs/heads/notification-rebroadcast 8f39c7015 -> 819a3ed74


http://git-wip-us.apache.org/repos/asf/cordova-plugins/blob/819a3ed7/notification/src/firefoxos/notification.js
----------------------------------------------------------------------
diff --git a/notification/src/firefoxos/notification.js b/notification/src/firefoxos/notification.js
deleted file mode 100644
index 4ff541a..0000000
--- a/notification/src/firefoxos/notification.js
+++ /dev/null
@@ -1,99 +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.
- *
-*/ 
-
-var NotificationError = require('./NotificationError');
-var modulemapper = require('cordova/modulemapper');
-
-// keep hold of notification for future use
-var mozNotifications = {};
-var mozNotification = modulemapper.getOriginalSymbol(window, 'window.Notification');
-
-var closeEvent = new Event('close');
-var clickEvent = new Event('click');
-var showEvent = new Event('show');
-var errorEvent = new Event('error');
-
-function makeNotification(successCB, errorCB, options) {
-    var title = options.title;
-    var nId = options.notificationId;
-    var pluginObject = options.pluginObject;
-    delete options.title;
-    delete options.notificationId;
-    delete options.pluginObject;
-
-    var notification = new mozNotification(title, options);
-    mozNotifications[nId] = notification;
-
-    // handle events
-    notification.onclose = function() {
-        pluginObject.dispatchEvent(closeEvent);
-    }
-    notification.onclick = function() {
-        pluginObject.dispatchEvent(clickEvent);
-    }
-    notification.onshow = function() {
-        pluginObject.dispatchEvent(showEvent);
-    }
-    notification.onerror = function() {
-        pluginObject.dispatchEvent(errorEvent);
-    }
-
-    successCB();
-}
-
-// errors currently reporting String for debug only
-function create(successCB, errorCB, options) {
-    console.log('FxOS DEBUG: create', options);
-
-    if (mozNotification.permission === 'denied') {
-        errorCB(new NotificationError(NotificationError.PERMISSION_DENIED,
-              'FxOS Notification: Permission denied'));
-        return;
-    }
-    if (mozNotification.permission === 'granted') {
-        makeNotification(successCB, errorCB, options);
-        return;
-    }
-    mozNotification.requestPermission(function (permission) {
-        if (permission === 'granted') {
-            makeNotification(successCB, errorCB, options);
-        } else {
-            errorCB(new NotificationError(NotificationError.USER_DENIED,
-                  'FxOS Notification: User denied'));
-        }
-    });
-}
-
-function remove(successCB, errorCB, params) {
-    successCB = (successCB) ? successCB : function() {};
-    errorCB = (errorCB) ? errorCB : function() {};
-    var nId = params.notificationId;
-    mozNotifications[nId].close();
-    successCB();
-}
-
-
-module.exports = {
-    create: create,
-    remove: remove
-};    
-    
-require("cordova/exec/proxy").add("Notification", module.exports);

http://git-wip-us.apache.org/repos/asf/cordova-plugins/blob/819a3ed7/notification/www/NotificationError.js
----------------------------------------------------------------------
diff --git a/notification/www/NotificationError.js b/notification/www/NotificationError.js
deleted file mode 100644
index 590720b..0000000
--- a/notification/www/NotificationError.js
+++ /dev/null
@@ -1,40 +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.
- *
-*/
-
-
-/**
- * Notification error object
- *
- * @constructor
- * @param code
- * @param message
- */
-var NotificationError = function(code, message) {
-    this.code = code || null;
-    this.message = message || '';
-};
-
-// Notification error codes
-NotificationError.UNKNOWN_ERROR = 0;
-NotificationError.PERMISSION_DENIED = 1;
-NotificationError.USER_DENIED = 2;
-
-module.exports = NotificationError;

http://git-wip-us.apache.org/repos/asf/cordova-plugins/blob/819a3ed7/notification/www/notification.js
----------------------------------------------------------------------
diff --git a/notification/www/notification.js b/notification/www/notification.js
deleted file mode 100644
index f10bab3..0000000
--- a/notification/www/notification.js
+++ /dev/null
@@ -1,79 +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.
- *
-*/
-
-var argscheck = require('cordova/argscheck'),
-    utils = require('cordova/utils'),
-    exec = require('cordova/exec');
-   
-// counter for a notification id
-var nId = 0;
-
-// This might not be the best idea
-// from http://stackoverflow.com/questions/22186467/how-to-use-javascript-eventtarget
-
-function Emitter () {
-  var eventTarget = document.createDocumentFragment();
-
-  function delegate (method) {
-    this[method] = eventTarget[method].bind(eventTarget);
-  }
-
-  Emitter.methods.forEach(delegate, this);
-}
-
-Emitter.methods = ["addEventListener", "dispatchEvent", "removeEventListener"];
-
-function Notification(title, options, successCB, errorCB) {
-
-    options = (options) ? options : {};
-    successCB = (successCB) ? successCB : function() {};
-    errorCB = (errorCB) ? errorCB : function() {};
-
-    // return object in success callback
-    var self = this;
-    function success() {
-        successCB(self);
-    }
-
-    // add emitter methods to Notification
-    Emitter.call(this);
-
-    // set parameters
-    this.title = options.title = title;
-    this.dir = options.dir || null;
-    this.lang = options.lang || null;
-    this.body = options.dir || null;
-    this.dir = options.dir || null;
-    this.dir = options.dir || null;
-    this.dir = options.dir || null;
-    // add and store notificationId
-    this._notificationId = options.notificationId = nId++;
-    options.pluginObject = self;
-    exec(success, errorCB, "Notification", "create", options);
-}
-
-// handling closing an event
-Notification.prototype.close = function(successCB, errorCB) {
-    var options = {notificationId: this._notificationId};
-    exec(successCB, errorCB, "Notification", "remove", options);
-};
-
-module.exports = Notification;

http://git-wip-us.apache.org/repos/asf/cordova-plugins/blob/819a3ed7/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
new file mode 100644
index 0000000..388efee
--- /dev/null
+++ b/plugin.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
+    xmlns:rim="http://www.blackberry.com/ns/widgets"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="org.apache.cordova.labs.notification-rebroadcast"
+    version="0.1.0">
+    <name>Cordova Notification Rebroadcast Plugin</name>
+    <description>rebroadcasts local and remote notifications to other plugins, and
as events in JavaScript</description>
+    <license>Apache 2.0</license>
+    <keywords>cordova,local,remote,push,notifications</keywords>
+    <repo>https://git-wip-us.apache.org/repos/asf/cordova-plugins.git</repo>
+
+	<engines>
+		<engine name="cordova" version=">=3.9.9" />
+	</engines>
+    
+    <!-- ios -->
+    <platform name="ios">
+        <config-file target="config.xml" parent="/*">
+            <feature name="CDVNotificationRebroadcast">
+                <param name="ios-package" value="CDVNotificationRebroadcast" />
+                <param name="onload" value="true" />
+            </feature>
+        </config-file>
+
+        <header-file src="src/ios/CDVNotificationRebroadcast.h" />
+        <source-file src="src/ios/CDVNotificationRebroadcast.m" />
+        
+    </platform>
+
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugins/blob/819a3ed7/src/ios/CDVNotificationRebroadcast.h
----------------------------------------------------------------------
diff --git a/src/ios/CDVNotificationRebroadcast.h b/src/ios/CDVNotificationRebroadcast.h
new file mode 100644
index 0000000..9fe278d
--- /dev/null
+++ b/src/ios/CDVNotificationRebroadcast.h
@@ -0,0 +1,34 @@
+/*
+ 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.
+ */
+
+#import <Cordova/CDV.h>
+
+@interface CDVAppDelegate (SwizzledMethods)
+
+- (void) cdv_notification_rebroadcastApplication:(UIApplication*)application didReceiveLocalNotification:(UILocalNotification*)notification;
+
+- (void) cdv_notification_rebroadcastApplication:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken;
+
+- (void) cdv_notification_rebroadcastApplication:(UIApplication*)application didFailToRegisterForRemoteNotificationsWithError:(NSError*)error;
+
+@end
+
+@interface CDVNotificationRebroadcast : CDVPlugin
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-plugins/blob/819a3ed7/src/ios/CDVNotificationRebroadcast.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVNotificationRebroadcast.m b/src/ios/CDVNotificationRebroadcast.m
new file mode 100644
index 0000000..b8aae30
--- /dev/null
+++ b/src/ios/CDVNotificationRebroadcast.m
@@ -0,0 +1,225 @@
+/*
+ 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.
+ */
+
+#import "CDVNotificationRebroadcast.h"
+#import <objc/runtime.h>
+
+#pragma mark Global Methods
+
+// Return a NSArray<Class> containing all subclasses of a Class
+NSArray* ClassGetSubclasses(Class parentClass)
+{
+    int numClasses = objc_getClassList(nil, 0);
+    Class* classes = nil;
+    
+    classes = (Class*)malloc(sizeof(Class) * numClasses);
+    numClasses = objc_getClassList(classes, numClasses);
+    
+    NSMutableArray* result = [NSMutableArray array];
+    for (NSInteger i = 0; i < numClasses; i++) {
+        
+        Class superClass = classes[i];
+        do {
+            superClass = class_getSuperclass(superClass);
+        }
+        while(superClass && superClass != parentClass);
+        
+        if (superClass == nil) {
+            continue;
+        }
+        
+        [result addObject:classes[i]];
+    }
+    
+    free(classes);
+    
+    return result;
+}
+
+// Replace or Exchange method implementations
+// Return YES if method was exchanged, NO if replaced
+BOOL MethodSwizzle(Class clazz, SEL originalSelector, SEL overrideSelector)
+{
+    Method originalMethod = class_getInstanceMethod(clazz, originalSelector);
+    Method overrideMethod = class_getInstanceMethod(clazz, overrideSelector);
+    
+    // try to add, if it does not exist, replace
+    if (class_addMethod(clazz, originalSelector, method_getImplementation(overrideMethod),
method_getTypeEncoding(overrideMethod))) {
+        class_replaceMethod(clazz, overrideSelector, method_getImplementation(originalMethod),
method_getTypeEncoding(originalMethod));
+    }
+    // add failed, so we exchange
+    else {
+        method_exchangeImplementations(originalMethod, overrideMethod);
+        return YES;
+    }
+    
+    return NO;
+}
+
+// Helper to return the Class to swizzle
+// We need to swizzle the subclass (if available) of CDVAppDelegate
+Class ClassToSwizzle() {
+    Class clazz = [CDVAppDelegate class];
+    
+    NSArray* subClazz = ClassGetSubclasses(clazz);
+    if ([subClazz count] > 0) {
+        clazz = [subClazz objectAtIndex:0];
+    }
+    
+    return clazz;
+}
+
+#pragma mark Global Variables
+
+static BOOL cdvLocalNotifSelExchanged = NO;
+static BOOL cdvRemoteNotifSelExchanged = NO;
+static BOOL cdvRemoteNotifErrorSelExchanged = NO;
+
+#pragma mark CDVAppDelegate (SwizzledMethods)
+
+@implementation CDVAppDelegate (SwizzledMethods)
+
++ (void)load
+{
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        Class clazz = ClassToSwizzle();
+        
+    cdvLocalNotifSelExchanged = MethodSwizzle(clazz, @selector(application:didReceiveLocalNotification:),
@selector(cdv_notification_rebroadcastApplication:didReceiveLocalNotification:));
+    cdvRemoteNotifSelExchanged = MethodSwizzle(clazz, @selector(application:didRegisterForRemoteNotificationsWithDeviceToken:),
@selector(cdv_notification_rebroadcastApplication:didRegisterForRemoteNotificationsWithDeviceToken:));
+    cdvRemoteNotifErrorSelExchanged = MethodSwizzle(clazz, @selector(application:didFailToRegisterForRemoteNotificationsWithError:),
@selector(cdv_notification_rebroadcastApplication:didFailToRegisterForRemoteNotificationsWithError:));
+    });
+}
+
+- (void) cdv_notification_rebroadcastApplication:(UIApplication*)application didReceiveLocalNotification:(UILocalNotification*)notification
+{
+    // re-post ( broadcast )
+    [[NSNotificationCenter defaultCenter] postNotificationName:CDVLocalNotification object:notification];
+    
+    // if method was exchanged through method_exchangeImplementations, we call ourselves
(no, it's not a recursion)
+    if (cdvLocalNotifSelExchanged) {
+        [self cdv_notification_rebroadcastApplication:application didReceiveLocalNotification:notification];
+    }
+}
+
+- (void) cdv_notification_rebroadcastApplication:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken;
+{
+    // re-post ( broadcast )
+    NSString* token = [[[[deviceToken description]
+                         stringByReplacingOccurrencesOfString:@"<" withString:@""]
+                        stringByReplacingOccurrencesOfString:@">" withString:@""]
+                       stringByReplacingOccurrencesOfString:@" " withString:@""];
+    
+    [[NSNotificationCenter defaultCenter] postNotificationName:CDVRemoteNotification object:token];
+    
+    // if method was exchanged through method_exchangeImplementations, we call ourselves
(no, it's not a recursion)
+    if (cdvRemoteNotifSelExchanged) {
+        [self cdv_notification_rebroadcastApplication:application didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
+    }
+}
+
+- (void) cdv_notification_rebroadcastApplication:(UIApplication*)application didFailToRegisterForRemoteNotificationsWithError:(NSError*)error;
+{
+    // re-post ( broadcast )
+    [[NSNotificationCenter defaultCenter] postNotificationName:CDVRemoteNotificationError
object:error];
+    
+    // if method was exchanged through method_exchangeImplementations, we call ourselves
(no, it's not a recursion)
+    if (cdvRemoteNotifErrorSelExchanged) {
+        [self cdv_notification_rebroadcastApplication:application didFailToRegisterForRemoteNotificationsWithError:error];
+    }
+}
+
+@end
+
+#pragma mark UILocalNotification (JSONString)
+
+@implementation UILocalNotification (JSONString)
+
+- (NSString*) cdv_notification_rebroadcastJSONString
+{
+    NSMutableDictionary* dict = [NSMutableDictionary dictionary];
+    
+    if ([self alertAction]) {
+        [dict setValue:[self alertAction] forKey:@"alertAction"];
+    }
+    if ([self alertBody]) {
+        [dict setValue:[self alertBody] forKey:@"alertBody"];
+    }
+    if ([self alertLaunchImage]) {
+        [dict setValue:[self alertLaunchImage] forKey:@"alertLaunchImage"];
+    }
+    if ([self alertTitle]) {
+        [dict setValue:[self alertTitle] forKey:@"alertTitle"];
+    }
+    if ([self userInfo]) {
+        [dict setValue:[self userInfo] forKey:@"userInfo"];
+    }
+    
+    NSError* error  = nil;
+    NSData* jsonData = [NSJSONSerialization dataWithJSONObject:dict options:0 error:&error];
+    NSString* val = nil;
+    
+    if (error == nil) {
+        val = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
+    }
+    
+    return val;
+}
+
+@end
+
+#pragma mark CDVNotificationRebroadcast Plugin
+
+@implementation CDVNotificationRebroadcast : CDVPlugin
+
+
+- (void)pluginInitialize
+{
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onLocalNotification:)
name:CDVLocalNotification object:nil];
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onRemoteNotification:)
name:CDVRemoteNotification object:nil];
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onRemoteNotificationError:)
name:CDVRemoteNotificationError object:nil];
+}
+
+ - (void)onLocalNotification:(NSNotification*)notification
+{
+    UILocalNotification* localNotification = notification.object;
+    NSString* jsString = [NSString stringWithFormat:@"cordova.fireDocumentEvent('CDVLocalNotification',
%@);", [localNotification cdv_notification_rebroadcastJSONString]];
+    
+    [self.commandDelegate evalJs:jsString];
+}
+
+- (void)onRemoteNotification:(NSNotification*)notification
+{
+    NSString* token = notification.object;
+    NSString* jsString = [NSString stringWithFormat:@"cordova.fireDocumentEvent('CDVRemoteNotification',
{ 'token': '%@'});", token];
+
+    [self.commandDelegate evalJs:jsString];
+}
+
+- (void)onRemoteNotificationError:(NSNotification*)notification
+{
+    NSError* error = notification.object;
+    NSString* desc = [error localizedDescription];
+    NSString* jsString = [NSString stringWithFormat:@"cordova.fireDocumentEvent('CDVRemoteNotificationError',
{ 'error': '%@'});", desc];
+    
+    [self.commandDelegate evalJs:jsString];
+}
+
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-plugins/blob/819a3ed7/tcpsocket/doc/index.md
----------------------------------------------------------------------
diff --git a/tcpsocket/doc/index.md b/tcpsocket/doc/index.md
deleted file mode 100644
index 7f840a1..0000000
--- a/tcpsocket/doc/index.md
+++ /dev/null
@@ -1,60 +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.
--->
-
-# org.apache.cordova.labs.tcpsocket
-
-This plugin is used to run sockets
-
-## Objects
-
-- navigator.TCPSocket
-
-## Methods
-
-### navigator.TCPSocket.open
-
-	navigator.TCPSocket.open(host, port, successCallback, errorCallback, options)
-
-
-- host is a string representing the hostname of the server to connect to (it can also be
its raw IP address).
-- port is a umber representing the TCP port to be used by the socket (some protocols have
a standard port, for example 80 for HTTP, 447 for SSL, 25 for SMTP, etc. Port numbers beyond
1024 are not assigned to any specific protocol and can be used for any purpose.)
-- options is an object containing
-	- useSecureTransport (Boolean) false (default)
-	- binaryType (String) "string" (default) or "arrayBuffer"
-
-an instantiation of a new TCPSocket object is returned in success callback
-
-#### Firefox OS quirks
-
-Only certified apps can use a port below 1024.
-
-### navigator.TCPSocket.listen
-
-	navigator.TCPSocket.listen(port, successCallback, errorCallback, options, queueLimit)
-
-- port is a number representing the TCP port to be used to listen for connections. 
-- options is an optional object expecting a property called binaryType which is a string
that can have two possible values: string and arraybuffer. If the value is arraybuffer then
the TCPSocket.send() will use ArrayBuffers and the data received from the remote connection
will also be available in that format.
-- queueLimit is a number representing the maximum lenght that the pending connections queue
can grow.
-
-an instantiation of a new TCPSocket object is returned in success callback
-
-#### Firefox OS quirks
-
-Only certified apps can use a port below 1024.
-

http://git-wip-us.apache.org/repos/asf/cordova-plugins/blob/819a3ed7/tcpsocket/plugin.xml
----------------------------------------------------------------------
diff --git a/tcpsocket/plugin.xml b/tcpsocket/plugin.xml
deleted file mode 100644
index 8bb3d03..0000000
--- a/tcpsocket/plugin.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-
-<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
-    id="org.apache.cordova.labs.tcpsocket"
-    version="0.0.1">
-    <name>TCPSocket</name>
-    <description>Cordova TCP Socket Plugin</description>
-    <license>Apache 2.0</license>
-    <keywords>cordova,tcpsocket,socket,tcp</keywords>
-
-
-	<engines>
-		<engine name="cordova" version=">=3.6.0" />
-	</engines>
-
-    <js-module src="www/TCPSocket.js" name="TCPSocket">
-        <clobbers target="navigator.TCPSocket" />
-    </js-module>
-
-    <!-- firefoxos -->
-    <platform name="firefoxos">
-        <config-file target="config.xml" parent="/*">
-            <permission name="tcp-socket" description="Required for accessing TCP Socket"
-                        privileged="true"/>
-        </config-file>
-        <js-module src="src/firefoxos/TCPSocketProxy.js" name="TCPSocketProxy">
-            <runs />
-        </js-module>
-    </platform>
-</plugin>
-

http://git-wip-us.apache.org/repos/asf/cordova-plugins/blob/819a3ed7/tcpsocket/src/firefoxos/TCPSocketProxy.js
----------------------------------------------------------------------
diff --git a/tcpsocket/src/firefoxos/TCPSocketProxy.js b/tcpsocket/src/firefoxos/TCPSocketProxy.js
deleted file mode 100644
index bbdf1fa..0000000
--- a/tcpsocket/src/firefoxos/TCPSocketProxy.js
+++ /dev/null
@@ -1,47 +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.
- *
- */
-
-var mozTCPSocket = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.TCPSocket')
|| navigator.mozTCPSocket;
-
-function open(successCB, errorCB, options) {
-    try {
-        var socket = mozTCPSocket.open(options.host, options.port, options.setup);
-    } catch (e) {
-        errorCB(e);
-        return;
-    }
-    successCB(socket);
-}
-
-function listen(successCB, errorCB, options) {
-    try {
-        var socket = mozTCPSocket.listen(options.port, options.setup, options.queueLimit);
-    } catch (e) {
-        errorCB(e);
-        return;
-    }
-    successCB(socket);
-}
-
-require('cordova/exec/proxy').add('TCPSocket', {
-  open: open,
-  listen: listen
-});

http://git-wip-us.apache.org/repos/asf/cordova-plugins/blob/819a3ed7/tcpsocket/www/TCPSocket.js
----------------------------------------------------------------------
diff --git a/tcpsocket/www/TCPSocket.js b/tcpsocket/www/TCPSocket.js
deleted file mode 100644
index b2ab013..0000000
--- a/tcpsocket/www/TCPSocket.js
+++ /dev/null
@@ -1,51 +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.
- *
-*/
-
-var cordova = require('cordova'),
-    exec = require('cordova/exec');
-
-var TCPSocket = {
-    open: function(host, port, successCB, errorCB, setup) {
-      setup = setup || {};
-      setup.useSecureTransport = setup.useSecureTransport || false;
-      setup.binaryType = setup.binaryType || 'string'; 
-      options = {
-        host: host,
-        port: port,
-        setup: setup
-      }
-      exec(successCB, errorCB, "TCPSocket", "open", options)
-    },
-    listen: function(port, successCB, errorCB, setup, queueLimit) {
-      setup = setup || {};
-      setup.binaryType = setup.binaryType || 'string'; 
-      options = {
-        port: port,
-        setup: setup
-      };
-      if (queueLimit) {
-          options.queueLimit = queueLimit;
-      }
-      exec(successCB, errorCB, "TCPSocket", "listen", options)
-    }
-}
-
-module.exports = TCPSocket;

http://git-wip-us.apache.org/repos/asf/cordova-plugins/blob/819a3ed7/wkwebview-engine-localhost/README.md
----------------------------------------------------------------------
diff --git a/wkwebview-engine-localhost/README.md b/wkwebview-engine-localhost/README.md
deleted file mode 100644
index 77b5ce9..0000000
--- a/wkwebview-engine-localhost/README.md
+++ /dev/null
@@ -1,21 +0,0 @@
-Cordova WKWebView Engine with http server (localhost) support
-======
-
-This plugin uses the:
-- [cordova-plugin-wkwebview-engine](https://git-wip-us.apache.org/repos/asf/cordova-plugin-wkwebview-engine.git)
plugin
-- [cordova-labs-local-webserver](https://git-wip-us.apache.org/repos/asf/cordova-plugins.git#master:local-webserver)
plugin
-
-This plugin requires at least version 4.1.0 `cordova-ios`.
-
-To try this:
-
-    cordova create wkwvtest my.project.id wkwvtest
-    cd wkwvtest
-    cordova platform add ios@4
-    cordova plugin add https://github.com/apache/cordova-plugins.git#master:wkwebview-engine-localhost
-
-
-Supported Platforms
--------------------
-
-- iOS

http://git-wip-us.apache.org/repos/asf/cordova-plugins/blob/819a3ed7/wkwebview-engine-localhost/plugin.xml
----------------------------------------------------------------------
diff --git a/wkwebview-engine-localhost/plugin.xml b/wkwebview-engine-localhost/plugin.xml
deleted file mode 100644
index 6003793..0000000
--- a/wkwebview-engine-localhost/plugin.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
-    xmlns:rim="http://www.blackberry.com/ns/widgets"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="cordova-labs-wkwebview-engine-localhost"
-    version="0.5.0">
-    <name>Cordova WKWebView Engine with http server (localhost) support</name>
-    <description>Cordova WKWebView Engine with HTTP Server Plugin</description>
-    <license>Apache 2.0</license>
-    <keywords>cordova,wkwebview,webview</keywords>
-    <repo>https://git-wip-us.apache.org/repos/asf/cordova-plugins.git</repo>
-
-	<engines>
-        <engine name="cordova-ios" version=">=4.1.0" />
-        <engine name="apple-ios" version=">=8.0" />
-	</engines>
-
-    <dependency id="cordova-labs-local-webserver" url="https://git-wip-us.apache.org/repos/asf/cordova-plugins.git#master:local-webserver"
version=">=2.3.1" />
-    <dependency id="cordova-plugin-wkwebview-engine" version=">=1.0.1" />
-
-    <!-- ios -->
-    <platform name="ios">
-    </platform>
-
-</plugin>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message