Skip to content

Commit

Permalink
Merge pull request #26 from blackberry-webworks/smartphone-soaFinal
Browse files Browse the repository at this point in the history
Smartphone SOA docs changes
Docs to support blackberry/WebWorks#45
  • Loading branch information
Chris DelCol (RIM) committed Sep 27, 2011
2 parents 91a2d9c + e1644de commit 7f3561a
Show file tree
Hide file tree
Showing 3 changed files with 175 additions and 62 deletions.
41 changes: 21 additions & 20 deletions api/blackberry_system.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@
* <br> The System object is static; all of its functions and properties are used directly from the object.
* @example
* &lt;script type="text/javascript"&gt;
* // See if we are in coverage
* // See if we are in coverage
* if (!blackberry.system.hasDataCoverage()) {
* alert("You are not in coverage, we will attempt to send later");
* }
*
* // Check if we have GPS capability
* // Check if we have GPS capability
* if (blackberry.system.hasCapability("location.gps")) {
* alert("This PlayBook has a GPS.");
* }
* &lt;/script&gt;
*/
blackberry.system ={

/**
* @param {String} capability The capability being checked for.
* @description This method will determine if the BlackBerry PlayBook or the BlackBerry Smartphone device is capable of the given service.<br>
Expand All @@ -59,41 +59,42 @@ blackberry.system ={
hasCapability : function(capability){},

/**
* @function
* @function
* @description Returns true if the device is in coverage, otherwise returns false. This can be used in conjunction with the blackberry.network property to find out what kind of coverage it is in.
* @returns {Boolean} Returns true if the BlackBerry PlayBook or the BlackBerry Smartphone device has any network interface active.
* @BB50+
* @PB10
*/
hasDataCoverage : function(){},

/**
* @function
* @function
* @description Set the image that appears as the background of the Home screen on a BlackBerry device.
* @param {String} uri URI path to an image file that resides in flash memory or a microSD Card.
* @BB50+
*/
setHomeScreenBackground : function(uri){},

/**
* @param {String} module The BlackBerry WebWorks namespace or class to check for access. For example blackberry.system, blackberry.app.
* @description Determines the level of access to the requested module.
* @returns {Number} The possible return values: 0 - ALLOW 1 - DENY
* @returns {Number} The possible return values: 0 - ALLOW 1 - DENY
* @BB50+
* @PB10
*/
hasPermission : function(module){},

/**
* @description Returns whether USB MassStorage mode is active.
* @returns {Boolean} Always returns false on the BlackBerry PlayBook since Mass Storage Mode is not supported. All memory is presented as a network share when connected by USB and is not blocked.
* @BB50+
* @PB10
*/
isMassStorageActive : function(){},

/**
* @uri
* @uri
* @BB50+
* @PB10
* @description The objects in hasPermission will always be ALLOW (0). They will correspond to all the entries in the whitelist. If they are not whitelisted, they are omitted from the list. Similarly, all of the objects in hasCapability will be true, otherwise they will be omitted.
* @returns {JSON of all the properties}
Expand Down Expand Up @@ -123,25 +124,25 @@ blackberry.system ={
* "isMassStorageActive":false
* }
* }
* @example
* @example
* &lt;html&gt;
* &lt;head&gt;
* &lt;script type="text/javascript" src="js/jquery-1.4.2.js" &gt;&lt;/script&gt;
* &lt;script type="text/javascript" src="js/jquery.form.js" &gt;&lt;/script&gt;
* &lt;script type="text/javascript" src="js/jquery.populate.js" &gt;&lt;/script&gt;
*
*
* &lt;script type="text/javascript"&gt;
* function getSystemData(){
* $.ajax({
* type: "get",
* url: "webworks://blackberry/system/get",
* url: "http://localhost:8472/blackberry/system/get",
* success: function(msg){
* $('#mySystemDiv').populate(JSON.parse(msg).data);
* }
* });
* }
* &lt;/script&gt;
*
*
*&lt;/head&gt;
*&lt;body&gt;
*
Expand All @@ -150,12 +151,12 @@ blackberry.system ={
* Software Version: &lt;span id="softwareVersion"&gt;&lt;/span&gt;&lt;br/&gt;
* Mass Storage Active: &lt;span id="isMassStorageActive"&gt;&lt;/span&gt;
* &lt;/div&gt;
*
*
*&lt;/body&gt;
*&lt;/html&gt;
*/
get: function(){},

/**
* @type String
* @description Returns the model number of the BlackBerry PlayBook or the BlackBerry Smartphone device.
Expand All @@ -164,7 +165,7 @@ blackberry.system ={
* @PB10
*/
model: null,

/**
* @type String
* @description Returns the current version of the WebWorks library being used.
Expand All @@ -173,7 +174,7 @@ blackberry.system ={
* @PB10
*/
scriptApiVersion:null,

/**
* @type String
* @description Returns the current version of the operating system, for example, 1.0.0.0.
Expand All @@ -182,7 +183,7 @@ blackberry.system ={
* @PB10
*/
softwareVersion:null,

/**
* @constant
* @type Number
Expand Down
Loading

0 comments on commit 7f3561a

Please sign in to comment.