Permalink
Browse files

Merge pull request #268 from blackberry-webworks/master

Sync main repo with working - master branch
  • Loading branch information...
2 parents 6ff2233 + e6ce542 commit e1b0f4e20144bf4f6ed061a1ef3fb2e1eb96cf8d Chris DelCol (RIM) committed Oct 13, 2011
Showing with 3,790 additions and 3,084 deletions.
  1. +2 −0 .gitignore
  2. +3 −1 api/blackberry_app.js
  3. +180 −0 api/blackberry_bbm_platform.js
  4. +262 −0 api/blackberry_bbm_platform_io.js
  5. +39 −0 api/blackberry_bbm_platform_io_Channel.js
  6. +300 −0 api/blackberry_bbm_platform_io_Connection.js
  7. +58 −0 api/blackberry_bbm_platform_io_IncomingJoinRequest.js
  8. +43 −0 api/blackberry_bbm_platform_io_JoinRequest.js
  9. +39 −0 api/blackberry_bbm_platform_io_OutgoingJoinRequest.js
  10. +99 −0 api/blackberry_bbm_platform_io_Session.js
  11. +92 −0 api/blackberry_bbm_platform_self.js
  12. +58 −0 api/blackberry_bbm_platform_self_location.js
  13. +122 −0 api/blackberry_bbm_platform_self_profilebox.js
  14. +54 −0 api/blackberry_bbm_platform_self_profilebox_ProfileBoxItem.js
  15. +307 −0 api/blackberry_bbm_platform_users.js
  16. +97 −0 api/blackberry_bbm_platform_users_BBMPlatformUser.js
  17. +3 −1 api/blackberry_identity.js
  18. +3 −1 api/blackberry_io_dir.js
  19. +217 −212 api/blackberry_io_file.js
  20. +31 −15 api/blackberry_payment.js
  21. +23 −20 api/blackberry_system.js
  22. +146 −34 api/blackberry_system_event.js
  23. +3 −1 api/blackberry_utils.js
  24. BIN api/images/bbm/channel.png
  25. BIN api/images/bbm/hosting.png
  26. BIN api/images/bbm/invite_to_join.png
  27. BIN api/images/bbm/session_invite1.png
  28. BIN api/images/bbm/session_invite2.png
  29. BIN api/images/bbm/session_invite3.png
  30. +57 −0 build/BBTemplate/JSON.tmpl
  31. +59 −0 build/BBTemplate/PHP.tmpl
  32. +294 −1,313 build/BBTemplate/class.tmpl
  33. +0 −132 build/BBTemplate/css/about.css
  34. +0 −31 build/BBTemplate/css/browser-ie.css
  35. +0 −38 build/BBTemplate/css/browser-other.css
  36. +0 −180 build/BBTemplate/css/docs.css
  37. +0 −47 build/BBTemplate/css/headerStyle.css
  38. +0 −56 build/BBTemplate/css/toc.css
  39. +69 −0 build/BBTemplate/ditamap.tmpl
  40. +0 −35 build/BBTemplate/featureList.tmpl
  41. BIN build/BBTemplate/images/header_back.png
  42. BIN build/BBTemplate/images/header_back_inner.png
  43. BIN build/BBTemplate/images/icon.png
  44. BIN build/BBTemplate/images/title_header.png
  45. +42 −36 build/BBTemplate/publish.js
  46. +382 −0 build/BBTemplate/publish.js.orig
  47. +0 −360 build/BBTemplate/static/common.css
  48. +0 −21 build/BBTemplate/static/header.html
  49. +45 −184 build/BBTemplate/static/index.html
  50. +0 −304 build/BBTemplate/static/server.js
  51. BIN build/BBTemplate/static/webworks.png
  52. +14 −0 build/BBTemplate/subtemplates/example.tmpl
  53. +156 −0 build/BBTemplate/subtemplates/functionDetails.tmpl
  54. +94 −0 build/BBTemplate/subtemplates/propertyDetails.tmpl
  55. +61 −0 build/BBTemplate/subtemplates/summary.tmpl
  56. +0 −55 build/BBTemplate/toc.tmpl
  57. +326 −0 build/BBTemplate/viewableClass.tmpl
  58. +10 −7 build/bbPlugin.js
View
@@ -1,3 +1,5 @@
.DS_Store
build/jsdoc_toolkit-2.4.0.zip
build/jsdoc_toolkit-2.4.0
+/build/output/
+tags
View
@@ -17,6 +17,8 @@
/**
* @toc {System} Application
* @featureID blackberry.app
+ * @notice {Warning ( Playbook 1.0 Notice):}
+ * For URI based APIs, webworks:// has been deprecated and replaced with http://localhost:8472. This change does not affect the procedural APIs.
* @namespace The Application object provides functions and properties for the currently running application.
* @example
* <script type="text/javascript">
@@ -245,7 +247,7 @@ A banner indicator can have an optional numeric value that usually serves as a c
* function getAppData(){
* $.ajax({
* type: "get",
- * url: "webworks://blackberry/app/get",
+ * url: "http://localhost:8472/blackberry/app/get",
* success: function(msg){
* $('#myAppDiv').populate(JSON.parse(msg).data);
* }
@@ -0,0 +1,180 @@
+/*
+ * Copyright 2010 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.
+ */
+
+/**
+ * @toc {BBM} BBM Platform
+ * @featureID blackberry.bbm.platform
+ * @namespace Provides access to the BBM Social Platform.
+ *
+ * <h1>Required BBM Version</h1>
+ *
+ * BBM Social Platform APIs come with BBM6 and later. BBM6 is supported on BlackBerry OS 5, 6, and 7.
+ *
+ * <h1>Authorization</h1>
+ *
+ * <p>
+ * Applications must first obtain access to the platform by calling
+ * {@link blackberry.bbm.platform.register}.
+ * </p>
+ *
+ * <ul>
+ * <li><b>Accessing other namespaces under</b> {@link blackberry.bbm.platform} <b>may throw exceptions
+ * if not authorized.</b></li>
+ * <li><b>Authorization may be revoked by the user or server at any time.</b></li>
+ * </ul>
+ * @BB50+
+ * @learns {Download BBM SDK Resources} http://us.blackberry.com/developers/blackberrymessenger/ Download the resources required to use the BBM SDK for WebWorks [BlackBerry].
+ * @learns {Getting Started Guide} http://docs.blackberry.com/en/developers/deliverables/30299/ Setup the BBM SDK for BlackBerry WebWorks [BlackBerry Developer Resource Center].
+ * @learns {Sample Application Guide} http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Getting-Started-BlackBerry-WebWorks-Development-for-Smartphones/ta-p/1185353 Get started with the sample application included with the BBM SDK for BlackBerry WebWorks [BlackBerry Developer Resource Center].
+ */
+blackberry.bbm.platform = {
+
+ /**
+ * @description Registers for access to BBM Platform.
+ * <p>The application must assign a callback to {@link blackberry.bbm.platform.event:onaccesschanged}
+ * before registering. During registration, a dialog will be shown to guide the user through the registration process.
+ * The application should wait until {@link blackberry.bbm.platform.event:onaccesschanged} is invoked before continuing.</p>
+ * <h4>Application in Test Environment</h4>
+ * Applications must provide a UUID used to identify the application in the test
+ * environment. If the application is in App World then the UUID will not be used. The same
+ * UUID should be used for future releases of the same application; otherwise communication
+ * between them will not be possible. The UUID must be a randomly generated 36-character UUID.
+ * Any UUID generator can be used.
+ * @param {Object} options Options.
+ * @param {String} options.uuid ID used to identify the application in the test environment.
+ * @throws {IllegalStateException} If <code>blackberry.bbm.platform.onaccesschanged</code> is not assigned.
+ * @throws {IllegalArgumentException} If <code>UUID</code> is not a valid 36-character UUID.
+ * @example
+ * &lt;script type="text/javascript"&gt;
+ *
+ * // Create callback invoked when access changes
+ * blackberry.bbm.platform.onaccesschanged = function(accessible, status) {
+ * if (status == "allowed") {
+ * // Access allowed
+ * } else if (status == "user") {
+ * // Access blocked by user
+ * } else if (status == "rim") {
+ * // Access blocked by RIM
+ * }
+ * // Listen for other status...
+ * };
+ *
+ * // Register with the platform
+ * blackberry.bbm.platform.register({
+ * uuid: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" // Randomly generated UUID
+ * });
+ *
+ * &lt;/script&gt;
+ * @BB50+
+ */
+ register : function(options) {
+ },
+
+ /**
+ * @description Shows a dialog prompting the user to connect this application to BBM. This will
+ * only work if the application is blocked by the user (i.e. access status is <code>"user"</code>).
+ * <p>If the user decides to connect then the application should call {@link blackberry.bbm.platform.register}
+ * to complete connecting this application to BBM.
+ * @param {Function} onComplete Called when the user has finished connecting this application to BBM.
+ * @param {Boolean} connected <code>true</code> if the user connected the application to BBM;
+ * <code>false</code> otherwise.
+ * @example
+ * &lt;script type="text/javascript"&gt;
+ *
+ * // Prompt the user to connect to BBM, and call register() if they do
+ * blackberry.bbm.platform.requestUserPermission(function(allowed) {
+ * if(allowed) {
+ * // Register with the platform
+ * blackberry.bbm.platform.register({
+ * uuid: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" // Randomly generated UUID
+ * });
+ * }
+ * });
+ *
+ * &lt;/script&gt;
+ * @BB50+
+ */
+ requestUserPermission : function(onComplete) {
+
+ }
+
+ /**
+ * Called when the access status changes.
+ * <p>This callback is mandatory and must be assigned <b>before</b> the call to {@link blackberry.bbm.platform.register}.
+ * @param {Boolean} accessible <code>true</code> if access is allowed;
+ * <code>false</code> otherwise.
+ * @param {String} status The access status.
+ * <ul>
+ * <li><code>"allowed"</code>: Access is allowed.
+ * <li><code>"user"</code>: Access is blocked by the user.
+ * <li><code>"rim"</code>: Access is blocked by RIM (the application has most likely violated the terms of use).
+ * <li><code>"resetrequired"</code>: Access is blocked because a device reset is required to use the BBM Social Platform.
+ * <li><code>"nodata"</code>: Access is blocked because the device is out of data coverage. A data connection is required
+ * to register the application.
+ * <li><code>"temperror"</code>: Access is blocked because of a temporary error. The application should try to call
+ * {@link blackberry.bbm.platform.register} in 30 minutes, or the next time the application starts.
+ * <li><code>"nonuiapp"</code>: Access is blocked because {@link blackberry.bbm.platform.register} was called from a non-UI application.
+ * <p>The application must initially register from a UI application because user interaction is required. The application may register from a background application only after the application has been connected in a UI application at least once.</li>
+ * </ul>
+ * @event
+ * @BB50+
+ */
+ onaccesschanged : function(accessible, status) {
+ },
+
+ /**
+ * Called in certain cases when the application is invoked from within BBM. At the moment this
+ * event is only triggered by profile box items.
+ * <p>This callback should be assigned <b>before</b> the call to {@link blackberry.bbm.platform.register}. If the application is not yet running then it will be launched. This callback will only be invoked once access to the platform is allowed.
+ * <p>This callback is optional. Applications are not required to handle this type of event.
+ * <h3>ProfileBoxItem Invocations</h3>
+ * The user can launch the application via profile box items (see {@link blackberry.bbm.platform.self.profilebox}).
+ * This callback will be invoked with the reason <code>"profilebox"</code> and a
+ * {@link blackberry.bbm.platform.self.profilebox.ProfileBoxItem} param -- the profile box item
+ * which was clicked.
+ * @param {String} reason The reason that the application was invoked. If <code>"profilebox"</code> then
+ * <code>param</code> is a {@link blackberry.bbm.platform.self.profilebox.ProfileBoxItem}.
+ * @param {blackberry.bbm.platform.self.profilebox.ProfileBoxItem} param The parameter associated with <code>reason</code>.
+ * @example
+ * &lt;script type="text/javascript"&gt;
+ *
+ * // Trigger an action in the application when a profile box item is selected
+ * blackberry.bbm.platform.onappinvoked = function(reason, param) {
+ * if(reason == "profilebox") {
+ * var boxItem = param;
+ * // Take action based on profile box item...
+ * }
+ * };
+ *
+ * &lt;/script&gt;
+ * @event
+ * @BB50+
+ */
+ onappinvoked : function(reason, param) {
+ },
+
+ /**
+ * The application environment.
+ * <ul>
+ * <li><code>"appworld"</code>: The application exists in App World.
+ * <li><code>"test"</code>: The application does not exist in App World.
+ * </ul>
+ * @type String
+ * @readOnly
+ * @BB50+
+ */
+ environment : ""
+};
Oops, something went wrong.

0 comments on commit e1b0f4e

Please sign in to comment.