You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ripple.apache.org by ti...@apache.org on 2015/10/19 20:38:13 UTC

incubator-ripple git commit: Add support for Insomnia-PhoneGap-Plugin.

Repository: incubator-ripple
Updated Branches:
  refs/heads/master 6d8bfcff7 -> 65c1034ac


Add support for Insomnia-PhoneGap-Plugin.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ripple/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ripple/commit/65c1034a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ripple/tree/65c1034a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ripple/diff/65c1034a

Branch: refs/heads/master
Commit: 65c1034acea1d19633bf070fc543fe2e49cc2a21
Parents: 6d8bfcf
Author: Leo von Klenze <de...@leo-von-klenze.de>
Authored: Sat Sep 19 19:53:08 2015 +0200
Committer: Tim Barham <ti...@microsoft.com>
Committed: Mon Oct 19 11:37:48 2015 -0700

----------------------------------------------------------------------
 .../platform/cordova/3.0.0/bridge/insomnia.js   | 44 ++++++++++++++++++++
 lib/client/platform/cordova/3.0.0/spec.js       |  3 ++
 2 files changed, 47 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/65c1034a/lib/client/platform/cordova/3.0.0/bridge/insomnia.js
----------------------------------------------------------------------
diff --git a/lib/client/platform/cordova/3.0.0/bridge/insomnia.js b/lib/client/platform/cordova/3.0.0/bridge/insomnia.js
new file mode 100644
index 0000000..5037b55
--- /dev/null
+++ b/lib/client/platform/cordova/3.0.0/bridge/insomnia.js
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+module.exports = {
+
+    keepAwake: function (win, fail, args) {
+
+        if( !$.isArray(args) ) throw new Error('Arguments must be an array');
+
+        if( args.length > 0  ) throw new Error('No Arguments beside the callbacks allowed');
+
+        console.warn('insomnia.keepAwake() has been called!');
+
+    },
+
+    allowSleepAgain: function (win, fail, args) {
+
+        if( !$.isArray(args) ) throw new Error('Arguments must be an array');
+
+        if( args.length > 0  ) throw new Error('No Arguments beside the callbacks allowed');
+
+        console.warn('insomnia.allowSleepAgain() has been called!');
+
+    }
+
+};

http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/65c1034a/lib/client/platform/cordova/3.0.0/spec.js
----------------------------------------------------------------------
diff --git a/lib/client/platform/cordova/3.0.0/spec.js b/lib/client/platform/cordova/3.0.0/spec.js
index e9bc302..75a0181 100644
--- a/lib/client/platform/cordova/3.0.0/spec.js
+++ b/lib/client/platform/cordova/3.0.0/spec.js
@@ -63,6 +63,9 @@ module.exports = {
         // scandit barcode scanner @see https://github.com/Scandit/BarcodeScannerPlugin
         bridge.add("ScanditSDK", ripple('platform/cordova/3.0.0/bridge/scanditsdk'));
 
+        // Eddy Verbruggen's Insomnia-PhoneGap-Plugin (https://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin)
+        bridge.add("Insomnia", ripple('platform/cordova/3.0.0/bridge/insomnia'));
+
         // RIPPLE-71 BarcodeScaner plugin support @see https://github.com/phonegap-build/BarcodeScanner
         bridge.add("BarcodeScanner", ripple('platform/cordova/3.0.0/bridge/barcodescanner'));