Permalink
Browse files

remove led from master branch

  • Loading branch information...
1 parent e74a1fb commit c27a22c475b88f57db64927a41efe551864c321e Andy Wu committed Oct 24, 2012
View
@@ -1,52 +0,0 @@
-# LED API
-
-The LED API allows you to control the LED.
-
-**Tested On**
-
-* BlackBerry 10.0.9.388
-
-**Author(s)**
-
-* [Andy Wu](https://github.com/andywu89)
-
-**To contribute code to this repository you must be [signed up as an official contributor](http://blackberry.github.com/howToContribute.html).**
-
-## How To Install The Extension
-
-1. Clone the repo to your local machine
-2. Locate your BlackBerry WebWorks SDK **C:\Program Files\Research In Motion\BlackBerry 10 WebWorks SDK <version>\Framework\ext** (Windows) or **~/SDKs/BlackBerry 10 WebWorks SDK <version>/Framework/ext** (Mac)
-3. Create a new directory **webworks.bbalert.led** in the **ext** directory.
-4. Copy **output/webworks.bbalert.led/ledJnext.so** to **/path/to/sdk/ext/webworks.bbalert.led/device/ledJnext.so**
-5. Copy everything in **javascript_src** to **/path/to/sdk/ext/webworks.bbalert.led/**
-
-## Required Feature ID
-Whenever you use the below feature id in any of your WebWorks applications this extension will be loaded for use.
-
- <feature id="webworks.bbalert.led" required="true" version="1.0.0.0" />
-
-## Summary
-
-var id = webworks.bbalert.led.startLed([String: color], [String: blinkCount])
-
-Parameters:
-color: hex string with with format "RRGGBB", default: "FF0000"
-blinkCount: String Integer >=0, default: "0" (0 means Blink indefinitely until stopLed command is issued)
-
-Return:
-request id - used to reference the LED request
-
-webworks.bbalert.led.stopLed([String:id])
-Parameter:
-id: request id - given when startLed command was issued.
-
-Example:
-
- <script type="text/javascript" >
- var id = webworks.bbalert.led.startLed("FFFF00", "10");
- webworks.bbalert.led.stopLed(id)
- </script>
-
-## Disclaimer
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,3 +0,0 @@
-# Where to find the missing file webworks-1.0.2.9.js
-
-You will find it under Framework/clientFiles/webworks-1.0.2.9.js in your WebWorks SDK installation folder and copy it to this folder.
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<widget xmlns="http://www.w3.org/ns/widgets"
- xmlns:rim="http://www.blackberry.com/ns/widgets"
- version="1.0.0.5" id="helloworld" xml:lang="en">
- <author href="http://www.example.com/"
- rim:copyright="Copyright 1998-2012 My Corp">My Corp</author>
- <name>helloWorld</name>
- <content src="index.html"/>
- <rim:permissions>
- <rim:permit>access_led_control</rim:permit>
- </rim:permissions>
- <feature id="webworks.bbalert.led" required="true" version="1.0.0.0"/>
-</widget>
@@ -1,65 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Hello World</title>
- <style>
- button{
- width: 100%;
- border:none;
- height:50px;
- margin-top:10px;
- }
- #stop-buttons{
- width:100%;
- }
- </style>
-</head>
-<body>
- <div id="color-selection">
- <label>Colors</label>
- <br>
- <input type="checkbox" name="color" value="FF0000">Red<br>
- <input type="checkbox" name="color" value="00FF00">Green<br>
- <input type="checkbox" name="color" value="0000FF">Blue<br>
-
- </div>
- <label>Blink Count</label>
- <input type="text" value="1" name="blinkCount" id="blinkCount" />
- <button id="start" onclick="startLed()">start led</button>
- <div id="stop-buttons">
- </div>
- <script src="webworks-1.0.2.9.js"></script>
- <script>
- var stopButtons = document.getElementById('stop-buttons');
- function startLed(){
-
- var colors = document.getElementsByName("color");
- var currColor = 0;
-
- for(var i = 0; i < colors.length; i++){
- if(colors[i].checked){
- currColor = parseInt(colors[i].value, 16) | currColor;
- }
- }
- var id = webworks.bbalert.led.startLed(currColor.toString(16), document.getElementById("blinkCount").value);
-
- var button = document.createElement("button")
- var buttonContent = document.createTextNode("Stop Led - " + id);
- button.appendChild(buttonContent);
- button.setAttribute("id", id);
- button.onclick = function (){
- webworks.bbalert.led.stopLed(this.id);
- stopButtons.removeChild(this);
-
- };
- stopButtons.appendChild(button);
- }
-
-
- window.addEventListener("load", function(e) {
- document.addEventListener("webworksready", ready);
- }, false);
- </script>
-</body>
-</html>
@@ -1,28 +0,0 @@
-/*
-* Copyright 2012 Research In Motion Limited.
-*
-* Licensed 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 _self = {},
- _ID = require("./manifest.json").namespace;
-
-_self.startLed = function (color, blinkCount) {
- var args = {"color": color || {}, "blinkCount": blinkCount || {}};
- return window.webworks.execSync(_ID, "flashLedStart", args);
-};
-_self.stopLed = function (id) {
- var args = {"id": id};
- return window.webworks.execSync(_ID, "flashLedStop", args);
-};
-module.exports = _self;
@@ -1,89 +0,0 @@
-/*
- * Copyright 2012 Research In Motion Limited.
- *
- * Licensed 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 ledJNext,
- _event = require("../../lib/event");
-
-module.exports = {
- flashLedStart: function (success, fail, args, env) {
- try {
- var stringArgs = "";
- for (key in args) {
- stringArgs += " " + JSON.parse(decodeURIComponent(args[key]));
- }
- success(ledJNext.flashLedStartJNext(stringArgs));
- } catch (e) {
- fail(-1, e);
- }
- },
- flashLedStop: function (success, fail, args, env) {
- try {
- var stringArgs = "";
- for (key in args) {
- stringArgs += " " + JSON.parse(decodeURIComponent(args[key]));
- }
- success(ledJNext.flashLedStopJNext(stringArgs));
- } catch (e) {
- fail(-1, e);
- }
- }
-};
-
-///////////////////////////////////////////////////////////////////
-// JavaScript wrapper for JNEXT plugin
-///////////////////////////////////////////////////////////////////
-
-JNEXT.LedJNext = function ()
-{
- var _self = this;
-
- _self.flashLedStartJNext = function (args) {
- return JNEXT.invoke(_self._id, "flashLedStartNative" + args);
- };
-
- _self.flashLedStopJNext = function (args) {
- return JNEXT.invoke(_self._id, "flashLedStopNative" + args);
- };
-
- _self.getId = function () {
- return _self._id;
- };
-
- _self.init = function () {
- if (!JNEXT.require("ledJnext")) {
- return false;
- }
-
- _self._id = JNEXT.createObject("ledJnext.FlashLed");
-
- if (!_self._id || _self._id === "") {
- return false;
- }
-
- JNEXT.registerEvents(_self);
- };
-
- _self.onEvent = function (strData) {
- var arData = strData.split(" "),
- strEventId = arData[0],
- arg = arData[1];
- };
-
- _self._id = "";
-
- _self.init();
-};
-
-ledJNext = new JNEXT.LedJNext();
@@ -1,5 +0,0 @@
-{
- "global": false,
- "namespace": "webworks.bbalert.led",
- "dependencies": []
-}
Oops, something went wrong.

0 comments on commit c27a22c

Please sign in to comment.