diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/AppConfig.as b/clients/flash/air-client/src/org/bigbluebutton/air/AppConfig.as index 94f4a4b304..759a698e0c 100755 --- a/clients/flash/air-client/src/org/bigbluebutton/air/AppConfig.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/AppConfig.as @@ -5,8 +5,6 @@ package org.bigbluebutton.air { import org.bigbluebutton.air.main.models.IUISession; import org.bigbluebutton.air.main.models.UISession; import org.bigbluebutton.air.main.services.GuestWaitPageService; - import org.bigbluebutton.air.main.views.LoadingScreen; - import org.bigbluebutton.air.main.views.LoadingScreenMediator; import org.bigbluebutton.lib.chat.models.ChatMessagesSession; import org.bigbluebutton.lib.chat.models.IChatMessagesSession; import org.bigbluebutton.lib.chat.services.ChatMessageService; @@ -47,7 +45,7 @@ package org.bigbluebutton.air { import robotlegs.bender.extensions.signalCommandMap.api.ISignalCommandMap; import robotlegs.bender.framework.api.IConfig; - import robotlegs.bender.framework.api.IInjector; + import robotlegs.bender.framework.api.IInjector; public class AppConfig implements IConfig { diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/MainConfig.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/MainConfig.as index d025e9250a..6c8d3d8266 100755 --- a/clients/flash/air-client/src/org/bigbluebutton/air/main/MainConfig.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/MainConfig.as @@ -40,16 +40,16 @@ package org.bigbluebutton.air.main { */ private function mediators():void { /* - mediatorMap.map(INavigationButton).toMediator(NavigationButtonMediator); - mediatorMap.map(IRecordingStatus).toMediator(RecordingStatusMediator); - mediatorMap.map(IPagesNavigatorView).toMediator(PagesNavigatorViewMediator); - mediatorMap.map(IMenuButtonsView).toMediator(MenuButtonsViewMediator); - mediatorMap.map(ILoginPageView).toMediator(LoginPageViewMediator); - mediatorMap.map(ILoadingScreen).toMediator(LoadingScreenMediator); - mediatorMap.map(IDisconnectPageView).toMediator(DisconnectPageViewMediator); - mediatorMap.map(IProfileView).toMediator(ProfileViewMediator); - mediatorMap.map(IChangeStatusPopUp).toMediator(ChangeStatusPopUpMediator); - mediatorMap.map(IExitPageView).toMediator(ExitPageViewMediator); + mediatorMap.map(INavigationButton).toMediator(NavigationButtonMediator); + mediatorMap.map(IRecordingStatus).toMediator(RecordingStatusMediator); + mediatorMap.map(IPagesNavigatorView).toMediator(PagesNavigatorViewMediator); + mediatorMap.map(IMenuButtonsView).toMediator(MenuButtonsViewMediator); + mediatorMap.map(ILoginPageView).toMediator(LoginPageViewMediator); + mediatorMap.map(ILoadingScreen).toMediator(LoadingScreenMediator); + mediatorMap.map(IDisconnectPageView).toMediator(DisconnectPageViewMediator); + mediatorMap.map(IProfileView).toMediator(ProfileViewMediator); + mediatorMap.map(IChangeStatusPopUp).toMediator(ChangeStatusPopUpMediator); + mediatorMap.map(IExitPageView).toMediator(ExitPageViewMediator); */ mediatorMap.map(LoadingScreen).toMediator(LoadingScreenMediator); mediatorMap.map(PagesNavigatorView).toMediator(PagesNavigatorViewMediator); diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/commands/JoinMeetingCommandAIR.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/commands/JoinMeetingCommandAIR.as index 02bcd09f2e..38d54eeb4c 100755 --- a/clients/flash/air-client/src/org/bigbluebutton/air/main/commands/JoinMeetingCommandAIR.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/commands/JoinMeetingCommandAIR.as @@ -12,7 +12,7 @@ package org.bigbluebutton.air.main.commands { import org.bigbluebutton.lib.main.services.ILoginService; import org.bigbluebutton.lib.video.models.VideoProfileManager; - import robotlegs.bender.bundles.mvcs.Command; + import robotlegs.bender.bundles.mvcs.Command; public class JoinMeetingCommandAIR extends Command { private const LOG:String = "JoinMeetingCommandAIR::"; @@ -49,7 +49,7 @@ package org.bigbluebutton.air.main.commands { joinSubservice.join(url); } - protected function onGuestWaitSignal(waitUrl: String, urlRequest:URLRequest, responseUrl:String, sessionToken:String):void { + protected function onGuestWaitSignal(waitUrl:String, urlRequest:URLRequest, responseUrl:String, sessionToken:String):void { //trace("GUEST WAIT URL = " + waitUrl); guestWaitService.wait(waitUrl, urlRequest, responseUrl, sessionToken); } diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/services/GuestWaitPageService.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/services/GuestWaitPageService.as index a92ab70c18..8f4d4a30f8 100755 --- a/clients/flash/air-client/src/org/bigbluebutton/air/main/services/GuestWaitPageService.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/services/GuestWaitPageService.as @@ -1,5 +1,4 @@ -package org.bigbluebutton.air.main.services -{ +package org.bigbluebutton.air.main.services { import flash.events.TimerEvent; import flash.net.URLRequest; import flash.net.URLVariables; @@ -9,9 +8,9 @@ package org.bigbluebutton.air.main.services import org.bigbluebutton.lib.main.services.IGuestWaitPageService; import org.osflash.signals.ISignal; import org.osflash.signals.Signal; - - public class GuestWaitPageService implements IGuestWaitPageService - { + + public class GuestWaitPageService implements IGuestWaitPageService { + [Inject] public var uiSession:IUISession; @@ -32,9 +31,11 @@ package org.bigbluebutton.air.main.services private static const TOKEN_QUERY_PARAM:String = "sessionToken="; protected var _urlRequest:URLRequest = null; - protected var _guestWaitUrl: String = null; + + protected var _guestWaitUrl:String = null; protected var _guestAccessAllowedSignal:Signal = new Signal(); + protected var _guestAccessDeniedSignal:Signal = new Signal(); protected var _failureSignal:Signal = new Signal(); @@ -42,6 +43,7 @@ package org.bigbluebutton.air.main.services private var sessionToken:String; private var connectAttemptTimeout:Number = 5000; + private var connectionTimer:Timer; public function get guestAccessAllowedSignal():ISignal { @@ -55,20 +57,20 @@ package org.bigbluebutton.air.main.services public function get failureSignal():ISignal { return _failureSignal; } - + protected function fail(reason:String):void { //trace("Login failed. " + reason); _failureSignal.dispatch(reason); //TODO: show message to user saying that the meeting identifier is invalid } - public function wait(guestWaitUrl: String, urlRequest:URLRequest, url:String, sessionToken:String):void { + public function wait(guestWaitUrl:String, urlRequest:URLRequest, url:String, sessionToken:String):void { _urlRequest = urlRequest; this.sessionToken = sessionToken; _guestWaitUrl = guestWaitUrl; fetch(); - + } private function fetch():void { @@ -90,7 +92,7 @@ package org.bigbluebutton.air.main.services connectionTimer.start(); } - public function connectionTimeout (e:TimerEvent) : void { + public function connectionTimeout(e:TimerEvent):void { //trace("Timedout connecting to " + _guestWaitUrl); fetch(); } @@ -99,11 +101,11 @@ package org.bigbluebutton.air.main.services //trace(JSON.stringify(data)); if (httpStatusCode == 200) { var result:Object = JSON.parse(data as String); - var guestStatus: String = result.response.guestStatus; + var guestStatus:String = result.response.guestStatus; if (guestStatus == "WAIT") { uiSession.setLoading(true, "Waiting for moderator approval."); queueFetch(); - } else if(guestStatus == "ALLOW") { + } else if (guestStatus == "ALLOW") { guestAccessAllowedSignal.dispatch(urlRequest, responseUrl, sessionToken); } else if (guestStatus == "DENY") { // signal denied @@ -117,6 +119,6 @@ package org.bigbluebutton.air.main.services protected function onFailure(reason:String):void { failureSignal.dispatch(reason); } - + } -} \ No newline at end of file +} diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/services/JoinService.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/services/JoinService.as index 1b07c3e5af..32c4bea1f7 100755 --- a/clients/flash/air-client/src/org/bigbluebutton/air/main/services/JoinService.as +++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/services/JoinService.as @@ -5,7 +5,7 @@ package org.bigbluebutton.air.main.services { import flash.net.URLRequest; import org.bigbluebutton.lib.common.utils.URLFetcher; import org.osflash.signals.ISignal; - import org.osflash.signals.Signal; + import org.osflash.signals.Signal; public class JoinService { protected var _successSignal:Signal = new Signal(); @@ -112,7 +112,7 @@ package org.bigbluebutton.air.main.services { } else { successSignal.dispatch(urlRequest, responseUrl, sessionToken); } - + break; default: onFailure(URL_REQUEST_GENERIC_ERROR); diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/common/utils/GuestWaitURLFetcher.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/common/utils/GuestWaitURLFetcher.as index 14186e988f..c2d7a3304a 100755 --- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/common/utils/GuestWaitURLFetcher.as +++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/common/utils/GuestWaitURLFetcher.as @@ -1,5 +1,4 @@ -package org.bigbluebutton.lib.common.utils -{ +package org.bigbluebutton.lib.common.utils { import flash.events.Event; import flash.events.HTTPStatusEvent; import flash.events.IOErrorEvent; @@ -13,9 +12,8 @@ package org.bigbluebutton.lib.common.utils import org.osflash.signals.ISignal; import org.osflash.signals.Signal; - - public class GuestWaitURLFetcher - { + + public class GuestWaitURLFetcher { protected var _successSignal:Signal = new Signal(); protected var _failureSignal:Signal = new Signal(); @@ -24,8 +22,7 @@ package org.bigbluebutton.lib.common.utils protected var _responseURL:String = null; - public function GuestWaitURLFetcher() - { + public function GuestWaitURLFetcher() { } public function get successSignal():ISignal { @@ -36,8 +33,7 @@ package org.bigbluebutton.lib.common.utils return _failureSignal; } - public function fetch(url:String, urlRequest:URLRequest, reqVars: URLVariables, - dataFormat:String = URLLoaderDataFormat.TEXT):void { + public function fetch(url:String, urlRequest:URLRequest, reqVars:URLVariables, dataFormat:String = URLLoaderDataFormat.TEXT):void { //trace("Fetching " + url); _urlRequest = urlRequest; if (_urlRequest == null) { @@ -86,4 +82,4 @@ package org.bigbluebutton.lib.common.utils failureSignal.dispatch(e.text); } } -} \ No newline at end of file +} diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/services/EnterService.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/services/EnterService.as index 95ac5e5dee..ac4d331d4e 100755 --- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/services/EnterService.as +++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/services/EnterService.as @@ -21,13 +21,13 @@ package org.bigbluebutton.lib.main.services { public function enter(enterUrl:String, urlRequest:URLRequest, sessionToken:String):void { /* - var p:QueryStringParameters = new QueryStringParameters(); - p.collectParameters(); - var sessionToken:String = p.getParameter("sessionToken"); - */ - var reqVars:URLVariables = new URLVariables(); - reqVars.sessionToken = sessionToken; - + var p:QueryStringParameters = new QueryStringParameters(); + p.collectParameters(); + var sessionToken:String = p.getParameter("sessionToken"); + */ + var reqVars:URLVariables = new URLVariables(); + reqVars.sessionToken = sessionToken; + var fetcher:URLFetcher = new URLFetcher; fetcher.successSignal.add(onSuccess); fetcher.failureSignal.add(onFailure); diff --git a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/services/IGuestWaitPageService.as b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/services/IGuestWaitPageService.as index bfeb76d2ba..61250cea4b 100755 --- a/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/services/IGuestWaitPageService.as +++ b/clients/flash/common-library/src/main/actionscript/org/bigbluebutton/lib/main/services/IGuestWaitPageService.as @@ -1,17 +1,15 @@ -package org.bigbluebutton.lib.main.services -{ +package org.bigbluebutton.lib.main.services { import flash.net.URLRequest; import org.osflash.signals.ISignal; - - public interface IGuestWaitPageService - { + + public interface IGuestWaitPageService { function get guestAccessAllowedSignal():ISignal; function get guestAccessDeniedSignal():ISignal; function get failureSignal():ISignal; - function wait(guestWaitUrl: String, urlRequest:URLRequest, url:String, sessionToken:String):void; + function wait(guestWaitUrl:String, urlRequest:URLRequest, url:String, sessionToken:String):void; } -} \ No newline at end of file +}