Created
December 20, 2011 04:24
-
-
Save pcamp96/1500246 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var profile = 'map'; | |
| switch (event) { | |
| case Bluetooth.serviceDown: | |
| // This scene should not be running if the service went down | |
| this.controller.stageController.popScene(); | |
| break; | |
| case Bluetooth.connAccepted: | |
| if(this.deviceDetails.address == address) { | |
| switch(profile){ | |
| case 'map': | |
| this.mapOnOffModel.value = true; | |
| this.isMapAllowed = true; | |
| this.controller.modelChanged(this.mapOnOffModel, this); | |
| break; | |
| case 'pbap': | |
| this.pbapOnOffModel.value = true; | |
| this.isPbapAllowed = true; | |
| this.controller.modelChanged(this.pbapOnOffModel, this); | |
| break; | |
| } | |
| } | |
| break; | |
| case Bluetooth.connRejected: | |
| if(this.deviceDetails.address == address) { | |
| switch(profile){ | |
| case 'map': | |
| this.mapOnOffModel.value = false; | |
| this.isMapAllowed = false; | |
| this.controller.modelChanged(this.mapOnOffModel, this); | |
| break; | |
| case 'pbap': | |
| this.pbapOnOffModel.value = false; | |
| this.isPbapAllowed = false; | |
| this.controller.modelChanged(this.pbapOnOffModel, this); | |
| break; | |
| } | |
| } | |
| break; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment