Skip to content

Commit

Permalink
added empty classes for unimplemented apis
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Willoughby committed Dec 17, 2009
1 parent 224e008 commit a31687e
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 1 deletion.
4 changes: 3 additions & 1 deletion symbian.wrt/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ package:

js: lib/phonegap.js

lib/phonegap.js: js/phonegap.js.base js/acceleration.js js/accelerometer.js js/camera.js js/camera/com.nokia.device.utility.js js/camera/com.nokia.device.framework.js js/camera/s60_camera.js js/camera/com.nokia.device.camera.js js/contacts.js js/device.js js/geolocation.js js/media.js js/notification.js js/orientation.js js/position.js js/sms.js js/storage.js
lib/phonegap.js: js/phonegap.js.base js/acceleration.js js/accelerometer.js js/camera.js js/camera/com.nokia.device.utility.js js/camera/com.nokia.device.framework.js js/camera/s60_camera.js js/camera/com.nokia.device.camera.js js/contacts.js js/debugconsole.js js/device.js js/geolocation.js js/media.js js/notification.js js/orientation.js js/position.js js/sms.js js/storage.js js/telephony.js
$(MKPATH) lib
$(RM_F) $@
$(CAT) js/phonegap.js.base >> $@
Expand All @@ -43,6 +43,7 @@ lib/phonegap.js: js/phonegap.js.base js/acceleration.js js/accelerometer.js js/c
$(CAT) js/camera/s60_camera.js >> $@
$(CAT) js/camera/com.nokia.device.camera.js >> $@
$(CAT) js/contacts.js >> $@
$(CAT) js/debugconsole.js >> $@
$(CAT) js/device.js >> $@
$(CAT) js/geolocation.js >> $@
$(CAT) js/media.js >> $@
Expand All @@ -51,3 +52,4 @@ lib/phonegap.js: js/phonegap.js.base js/acceleration.js js/accelerometer.js js/c
$(CAT) js/position.js >> $@
$(CAT) js/sms.js >> $@
$(CAT) js/storage.js >> $@
$(CAT) js/telephony.js >> $@
30 changes: 30 additions & 0 deletions symbian.wrt/js/debugconsole.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* This class provides access to the debugging console.
* @constructor
*/
function DebugConsole() {
}

/**
* Print a normal log message to the console
* @param {Object|String} message Message or object to print to the console
*/
DebugConsole.prototype.log = function(message) {
alert(message);
};

/**
* Print a warning message to the console
* @param {Object|String} message Message or object to print to the console
*/
DebugConsole.prototype.warn = function(message) {
};

/**
* Print an error message to the console
* @param {Object|String} message Message or object to print to the console
*/
DebugConsole.prototype.error = function(message) {
};

if (typeof window.debug == "undefined") window.debug = new DebugConsole();
19 changes: 19 additions & 0 deletions symbian.wrt/js/telephony.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* This class provides access to the telephony features of the device.
* @constructor
*/
function Telephony() {
this.number = "";
}

/**
* Calls the specifed number.
* @param {Integer} number The number to be called.
*/
Telephony.prototype.send = function(number) {
var errStr = "Telephony API not available for symbian.wrt";
debug.log(errStr);
return { name: "TelephonyError", message: errStr };
}

if (typeof navigator.telephony == "undefined") navigator.telephony = new Telephony();

0 comments on commit a31687e

Please sign in to comment.