diff --git a/bigbluebutton-client/src/JoinModule.mxml b/bigbluebutton-client/src/JoinModule.mxml deleted file mode 100644 index f77d70668e03cea68a97d9d15ca714cf0e400cc9..0000000000000000000000000000000000000000 --- a/bigbluebutton-client/src/JoinModule.mxml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<!-- - BigBlueButton - http://www.bigbluebutton.org - - Copyright (c) 2008-2009 by respective authors (see below). All rights reserved. - - BigBlueButton is free software; you can redistribute it and/or modify it under the - terms of the GNU Lesser General Public License as published by the Free Software - Foundation; either version 3 of the License, or (at your option) any later - version. - - BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along - with BigBlueButton; if not, If not, see <http://www.gnu.org/licenses/>. - - $Id: $ ---> - -<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" - implements="org.bigbluebutton.common.IBigBlueButtonModule" - creationComplete="onCreationComplete()"> - <mx:Script> - <![CDATA[ - import org.bigbluebutton.modules.join.JoinFacade; - import org.bigbluebutton.common.messaging.Router; - - private var _router:Router; - private var _moduleId:String = "JoinModule"; - private var _moduleName:String = "Join Module"; - private var _attributes:Object; - - private function onCreationComplete():void { - LogUtil.debug("JoinModule Initialized"); - } - - public function acceptRouter(router:Router):void{ - _router = router; - } - - public function get router():Router{ - return _router; - } - - public function get moduleId():String { - return _moduleId; - } - - public function get moduleName():String { - return _moduleName; - } - - public function get uri():String { - return _attributes.uri; - } - - public function get username():String { - return _attributes.username; - } - - public function get userid():Number { - return _attributes.userid as Number; - } - - public function get role():String { - return _attributes.userrole as String; - } - - public function start(attributes:Object):void { - LogUtil.debug("JoinModule start"); - _attributes = attributes; - JoinFacade.getInstance().startup(this); - } - - public function stop():void { - JoinFacade.getInstance().stop(this); - } - ]]> - </mx:Script> -</mx:Module> diff --git a/bigbluebutton-client/src/LoginModule.mxml b/bigbluebutton-client/src/LoginModule.mxml deleted file mode 100644 index 991a0554026b0605344a97124cf627b1c118c6d6..0000000000000000000000000000000000000000 --- a/bigbluebutton-client/src/LoginModule.mxml +++ /dev/null @@ -1,82 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<!-- - BigBlueButton - http://www.bigbluebutton.org - - Copyright (c) 2008-2009 by respective authors (see below). All rights reserved. - - BigBlueButton is free software; you can redistribute it and/or modify it under the - terms of the GNU Lesser General Public License as published by the Free Software - Foundation; either version 3 of the License, or (at your option) any later - version. - - BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along - with BigBlueButton; if not, If not, see <http://www.gnu.org/licenses/>. - - $Id: $ ---> - -<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" - implements="org.bigbluebutton.common.IBigBlueButtonModule" - creationComplete="onCreationComplete()"> - <mx:Script> - <![CDATA[ - import org.bigbluebutton.modules.login.LoginFacade; - import org.bigbluebutton.common.messaging.Router; - - private var _router:Router; - private var _moduleId:String = "LoginModule"; - private var _moduleName:String = "Login Module"; - private var _attributes:Object; - - private function onCreationComplete():void { - LogUtil.debug("LogintModule Initialized"); - } - - public function acceptRouter(router:Router):void{ - _router = router; - } - - public function get router():Router{ - return _router; - } - - public function get moduleId():String { - return _moduleId; - } - - public function get moduleName():String { - return _moduleName; - } - - public function get uri():String { - return _attributes.uri; - } - - public function get username():String { - return _attributes.username; - } - - public function get userid():Number { - return _attributes.userid as Number; - } - - public function get role():String { - return _attributes.userrole as String; - } - - public function start(attributes:Object):void { - _attributes = attributes; - LoginFacade.getInstance().startup(this); - } - - public function stop():void { - LoginFacade.getInstance().stop(this); - } - ]]> - </mx:Script> -</mx:Module> diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/join/JoinEndpointMediator.as b/bigbluebutton-client/src/org/bigbluebutton/modules/join/JoinEndpointMediator.as deleted file mode 100644 index 8c894f825c1ab91cc171c87f3c26bcdb86a99825..0000000000000000000000000000000000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/join/JoinEndpointMediator.as +++ /dev/null @@ -1,110 +0,0 @@ -/** -* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/ -* -* Copyright (c) 2008 by respective authors (see below). -* -* This program is free software; you can redistribute it and/or modify it under the -* terms of the GNU Lesser General Public License as published by the Free Software -* Foundation; either version 2.1 of the License, or (at your option) any later -* version. -* -* This program is distributed in the hope that it will be useful, but WITHOUT ANY -* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -*/ -package org.bigbluebutton.modules.join -{ - import org.bigbluebutton.common.IBigBlueButtonModule; - import org.bigbluebutton.common.messaging.Endpoint; - import org.bigbluebutton.common.messaging.EndpointMessageConstants; - import org.bigbluebutton.common.messaging.Router; - import org.puremvc.as3.multicore.interfaces.IMediator; - import org.puremvc.as3.multicore.interfaces.INotification; - import org.puremvc.as3.multicore.patterns.mediator.Mediator; - import org.puremvc.as3.multicore.utilities.pipes.interfaces.IPipeMessage; - - public class JoinEndpointMediator extends Mediator implements IMediator - { - public static const NAME:String = "JoinEndpointMediator"; - - private var _module:IBigBlueButtonModule; - private var _router:Router; - private var _endpoint:Endpoint; - private static const TO_JOIN_MODULE:String = "TO_JOIN_MODULE"; - private static const FROM_JOIN_MODULE:String = "FROM_JOIN_MODULE"; - - private static const PLAYBACK_MESSAGE:String = "PLAYBACK_MESSAGE"; - private static const PLAYBACK_MODE:String = "PLAYBACK_MODE"; - - public function JoinEndpointMediator(module:IBigBlueButtonModule) - { - super(NAME,module); - _module = module; - _router = module.router - LogUtil.debug(NAME + "::Creating endpoint for JoinModule"); - _endpoint = new Endpoint(_router, FROM_JOIN_MODULE, TO_JOIN_MODULE, messageReceiver); - } - - override public function getMediatorName():String - { - return NAME; - } - - override public function listNotificationInterests():Array - { - return [ - JoinModuleConstants.STARTED, - JoinModuleConstants.STOPPED, - JoinModuleConstants.JOIN_SUCCESS, - ]; - } - - override public function handleNotification(notification:INotification):void - { - LogUtil.debug(NAME + "::JoinEndPoint MSG. " + notification.getName()); - switch(notification.getName()){ - case JoinModuleConstants.JOIN_SUCCESS: - LogUtil.debug(NAME + "::Sending Join USER_JOINED message to main"); - _endpoint.sendMessage(EndpointMessageConstants.USER_JOINED, - EndpointMessageConstants.TO_MAIN_APP, notification.getBody()); - break; - case JoinModuleConstants.STARTED: - LogUtil.debug(NAME + "::Sending Join MODULE_STARTED message to main"); - _endpoint.sendMessage(EndpointMessageConstants.MODULE_STARTED, - EndpointMessageConstants.TO_MAIN_APP, _module.moduleId); - break; - case JoinModuleConstants.STOPPED: - LogUtil.debug(NAME + '::Sending Join MODULE_STOPPED message to main'); - facade.sendNotification(JoinModuleConstants.CLOSE_WINDOW); - var info:Object; - info["moduleId"] = _module.moduleId - _endpoint.sendMessage(EndpointMessageConstants.MODULE_STOPPED, - EndpointMessageConstants.TO_MAIN_APP, info); - break; - } - } - - private function messageReceiver(message : IPipeMessage) : void - { - var msg : String = message.getHeader().MSG as String; - switch(msg){ - case EndpointMessageConstants.CLOSE_WINDOW: - facade.sendNotification(JoinModuleConstants.CLOSE_WINDOW); - break; - case EndpointMessageConstants.OPEN_WINDOW: - //LogUtil.debug('Received OPEN_WINDOW message from ' + message.getHeader().SRC); - //facade.sendNotification(ChatModuleConstants.OPEN_WINDOW); - break; - } - } - - private function playMessage(message:XML):void{ - - } - } -} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/join/JoinFacade.as b/bigbluebutton-client/src/org/bigbluebutton/modules/join/JoinFacade.as deleted file mode 100644 index 9295995947a40e6932bced26b9ba5150d0d9b58a..0000000000000000000000000000000000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/join/JoinFacade.as +++ /dev/null @@ -1,62 +0,0 @@ -/* - * BigBlueButton - http://www.bigbluebutton.org - * - * Copyright (c) 2008-2009 by respective authors (see below). All rights reserved. - * - * BigBlueButton is free software; you can redistribute it and/or modify it under the - * terms of the GNU Lesser General Public License as published by the Free Software - * Foundation; either version 3 of the License, or (at your option) any later - * version. - * - * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License along - * with BigBlueButton; if not, If not, see <http://www.gnu.org/licenses/>. - * - * $Id: $ - */ -package org.bigbluebutton.modules.join -{ - import org.bigbluebutton.modules.join.controller.StartupCommand; - import org.puremvc.as3.multicore.interfaces.IFacade; - import org.puremvc.as3.multicore.patterns.facade.Facade; - - public class JoinFacade extends Facade implements IFacade - { - public static const NAME:String = "JoinFacade"; - - public static const STARTUP:String = 'startup'; - public static const STOP:String = 'stop'; - public static const LOGIN:String = 'login'; - public static const LOGOUT:String = 'login'; - - public function JoinFacade(key:String) - { - //TODO: implement function - super(key); - } - - public static function getInstance():JoinFacade{ - if (instanceMap[NAME] == null) - instanceMap[NAME] = new JoinFacade(NAME); - return instanceMap[NAME] as JoinFacade; - } - - override protected function initializeController():void { - super.initializeController(); - registerCommand(STARTUP, StartupCommand); - } - - public function startup(module:JoinModule):void { - LogUtil.debug('JoinFacade startup'); - sendNotification(STARTUP, module); - } - - public function stop(app:JoinModule):void{ - sendNotification(STOP, app); - removeCore(NAME); - } - } -} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/join/JoinModuleConstants.as b/bigbluebutton-client/src/org/bigbluebutton/modules/join/JoinModuleConstants.as deleted file mode 100644 index e45cf05c39652468a85479a220ccc90d07fae985..0000000000000000000000000000000000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/join/JoinModuleConstants.as +++ /dev/null @@ -1,35 +0,0 @@ -/* - * BigBlueButton - http://www.bigbluebutton.org - * - * Copyright (c) 2008-2009 by respective authors (see below). All rights reserved. - * - * BigBlueButton is free software; you can redistribute it and/or modify it under the - * terms of the GNU Lesser General Public License as published by the Free Software - * Foundation; either version 3 of the License, or (at your option) any later - * version. - * - * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License along - * with BigBlueButton; if not, If not, see <http://www.gnu.org/licenses/>. - * - * $Id: $ - */ -package org.bigbluebutton.modules.join -{ - public class JoinModuleConstants - { - public static const START:String = "start module"; - public static const STOP:String = "stop module"; - public static const STARTED:String = "STARTED"; - public static const STOPPED:String = "STOPPED"; - public static const JOIN_FAILED:String = 'JOIN_FAILED'; - public static const JOIN_SUCCESS:String = 'JOIN_SUCCESS'; - public static const OPEN_WINDOW:String = 'OPEN_WINDOW'; - public static const CLOSE_WINDOW:String = 'CLOSE_WINDOW'; - public static const ADD_WINDOW:String = 'ADD_WINDOW'; - public static const REMOVE_WINDOW:String = 'REMOVE_WINDOW'; - } -} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/join/JoinModuleMediator.as b/bigbluebutton-client/src/org/bigbluebutton/modules/join/JoinModuleMediator.as deleted file mode 100644 index cc305ac4e72f24f4f940aa117761c4b8ec681137..0000000000000000000000000000000000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/join/JoinModuleMediator.as +++ /dev/null @@ -1,42 +0,0 @@ -/** -* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/ -* -* Copyright (c) 2008 by respective authors (see below). -* -* This program is free software; you can redistribute it and/or modify it under the -* terms of the GNU Lesser General Public License as published by the Free Software -* Foundation; either version 2.1 of the License, or (at your option) any later -* version. -* -* This program is distributed in the hope that it will be useful, but WITHOUT ANY -* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -*/ -package org.bigbluebutton.modules.join -{ - import org.bigbluebutton.common.IBigBlueButtonModule; - import org.bigbluebutton.common.messaging.Endpoint; - import org.puremvc.as3.multicore.interfaces.IMediator; - import org.puremvc.as3.multicore.patterns.mediator.Mediator; - import org.puremvc.as3.multicore.utilities.pipes.interfaces.IPipeMessage; - - public class JoinModuleMediator extends Mediator implements IMediator - { - public static const NAME:String = 'JoinModuleMediator'; - private var _module:IBigBlueButtonModule; - - - public function JoinModuleMediator( module:IBigBlueButtonModule ) - { - super( NAME, module ); - _module = module; -// facade.registerMediator(new ChatEndpointMediator(_module.router)); - } - - } -} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/join/controller/StartupCommand.as b/bigbluebutton-client/src/org/bigbluebutton/modules/join/controller/StartupCommand.as deleted file mode 100644 index 4fc6bfa32cfe7bb50c1ed4a9c1619035eb42f626..0000000000000000000000000000000000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/join/controller/StartupCommand.as +++ /dev/null @@ -1,56 +0,0 @@ -/* - * BigBlueButton - http://www.bigbluebutton.org - * - * Copyright (c) 2008-2009 by respective authors (see below). All rights reserved. - * - * BigBlueButton is free software; you can redistribute it and/or modify it under the - * terms of the GNU Lesser General Public License as published by the Free Software - * Foundation; either version 3 of the License, or (at your option) any later - * version. - * - * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License along - * with BigBlueButton; if not, If not, see <http://www.gnu.org/licenses/>. - * - * $Id: $ - */ -package org.bigbluebutton.modules.join.controller -{ - import org.bigbluebutton.modules.join.JoinEndpointMediator; - import org.bigbluebutton.modules.join.JoinModuleConstants; - import org.bigbluebutton.modules.join.JoinModuleMediator; - import org.bigbluebutton.modules.join.model.JoinProxy; - import org.puremvc.as3.multicore.interfaces.INotification; - import org.puremvc.as3.multicore.patterns.command.SimpleCommand; - - public class StartupCommand extends SimpleCommand - { - public function StartupCommand() - { - super(); - } - - override public function execute(note:INotification):void { - var m:JoinModule = note.getBody() as JoinModule; - - LogUtil.debug('facade.registerMediator(new JoinEndpointMediator(m));'); - facade.registerMediator(new JoinEndpointMediator(m)); - LogUtil.debug('facade.registerMediator(new JoinModuleMediator(m));'); - facade.registerMediator(new JoinModuleMediator(m)); -// LogUtil.debug('facade.registerMediator( new JoinWindowMediator(m) );'); -// facade.registerMediator( new JoinWindowMediator(m) ); - LogUtil.debug('facade.registerProxy(new JoinProxy(m.uri));'); - facade.registerProxy(new JoinProxy(m.uri)); - LogUtil.debug('JoinModule COnnected'); - facade.sendNotification(JoinModuleConstants.STARTED); - proxy.join(); - } - - private function get proxy():JoinProxy { - return facade.retrieveProxy(JoinProxy.NAME) as JoinProxy; - } - } -} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/join/maps/JoinEventMap.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/join/maps/JoinEventMap.mxml deleted file mode 100644 index f884f407a11e9a559fa34cbfc6e0b21f3609ff60..0000000000000000000000000000000000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/join/maps/JoinEventMap.mxml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<EventMap xmlns:mx="http://www.adobe.com/2006/mxml" - xmlns="http://mate.asfusion.com/"> - - <mx:Script> - <![CDATA[ - - ]]> - </mx:Script> -</EventMap> diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/join/model/JoinProxy.as b/bigbluebutton-client/src/org/bigbluebutton/modules/join/model/JoinProxy.as deleted file mode 100644 index f584741a31cb43ea84a8d61bc801be1ff5c8eed2..0000000000000000000000000000000000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/join/model/JoinProxy.as +++ /dev/null @@ -1,65 +0,0 @@ -/** -* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/ -* -* Copyright (c) 2008 by respective authors (see below). -* -* This program is free software; you can redistribute it and/or modify it under the -* terms of the GNU Lesser General Public License as published by the Free Software -* Foundation; either version 2.1 of the License, or (at your option) any later -* version. -* -* This program is distributed in the hope that it will be useful, but WITHOUT ANY -* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -*/ -package org.bigbluebutton.modules.join.model -{ - import org.bigbluebutton.modules.join.JoinModuleConstants; - import org.bigbluebutton.modules.join.model.service.JoinService; - import org.bigbluebutton.modules.login.LoginModuleConstants; - import org.puremvc.as3.multicore.interfaces.IProxy; - import org.puremvc.as3.multicore.patterns.proxy.Proxy; - - public class JoinProxy extends Proxy implements IProxy - { - public static const NAME:String = "JoinProxy"; - - private var uri:String; - private var joinService:JoinService; - - public function JoinProxy(uri:String) - { - super(NAME); - this.uri = uri; - } - - public function join():void { - LogUtil.debug(NAME + "::joning in "); - joinService = new JoinService(); - joinService.addJoinResultListener(joinListener); - joinService.load(uri); - - } - - public function stop():void { - // USer is issuing a disconnect. -// manualDisconnect = true; -// chatService.disconnect(); - } - - private function joinListener(success:Boolean, result:Object):void { - if (success) { - LogUtil.debug(NAME + '::Sending JoinModuleConstants.JOIN_SUCCESS'); -// sendNotification(JoinModuleConstants.JOIN_SUCCESS, result); - } else { - LogUtil.debug(NAME + '::Sending JoinModuleConstants.JOIN_FAILED'); - sendNotification(JoinModuleConstants.JOIN_FAILED, result); - } - } - } -} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/join/model/service/JoinService.as b/bigbluebutton-client/src/org/bigbluebutton/modules/join/model/service/JoinService.as deleted file mode 100644 index db5f110eec6c377efa674ca522eaaab52cb05e90..0000000000000000000000000000000000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/join/model/service/JoinService.as +++ /dev/null @@ -1,74 +0,0 @@ -/* - * BigBlueButton - http://www.bigbluebutton.org - * - * Copyright (c) 2008-2009 by respective authors (see below). All rights reserved. - * - * BigBlueButton is free software; you can redistribute it and/or modify it under the - * terms of the GNU Lesser General Public License as published by the Free Software - * Foundation; either version 3 of the License, or (at your option) any later - * version. - * - * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License along - * with BigBlueButton; if not, If not, see <http://www.gnu.org/licenses/>. - * - * $Id: $ - */ -package org.bigbluebutton.modules.join.model.service -{ - import flash.events.*; - import flash.net.URLLoader; - import flash.net.URLRequest; - import flash.net.URLRequestMethod; - import flash.net.URLVariables; - - public class JoinService - { - private var request:URLRequest = new URLRequest(); - private var vars:URLVariables = new URLVariables(); - - private var urlLoader:URLLoader; - private var _resultListener:Function; - - public function JoinService() - { - } - - public function load(url:String) : void - { - LogUtil.debug("JoinService:load(...) " + url); - - request = new URLRequest(url); - request.method = URLRequestMethod.GET; - - urlLoader = new URLLoader(); - urlLoader.addEventListener(Event.COMPLETE, handleComplete); - urlLoader.load(request); - } - - public function addJoinResultListener(listener:Function):void { - _resultListener = listener; - } - - private function handleComplete(e:Event):void{ - - var xml:XML = new XML(e.target.data) - LogUtil.debug("Loading complete: " + xml); - var returncode:String = xml.returncode; - if (returncode == 'FAILED') { - LogUtil.debug("Result = " + returncode + " " + xml.message); - _resultListener(false, {message:xml.message}); - } else if (returncode == 'SUCCESS') { - LogUtil.debug(xml.returncode + " " + xml.fullname + " " + xml.conference + " " + xml.role - + " " + xml.room + " " + xml.mode); - var user:Object = {username:xml.fullname, conference:xml.conference, - userrole:xml.role, room:xml.room, authToken:xml.room, mode:xml.mode}; - _resultListener(true, user); - } - - } - } -} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/join/view/JoinWindowMediator.as b/bigbluebutton-client/src/org/bigbluebutton/modules/join/view/JoinWindowMediator.as deleted file mode 100644 index 6dcdf0559e9f44e0b66b0891529e443a18bf0fab..0000000000000000000000000000000000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/join/view/JoinWindowMediator.as +++ /dev/null @@ -1,142 +0,0 @@ -/** -* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/ -* -* Copyright (c) 2008 by respective authors (see below). -* -* This program is free software; you can redistribute it and/or modify it under the -* terms of the GNU Lesser General Public License as published by the Free Software -* Foundation; either version 2.1 of the License, or (at your option) any later -* version. -* -* This program is distributed in the hope that it will be useful, but WITHOUT ANY -* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -*/ -package org.bigbluebutton.modules.join.view -{ - import flash.events.Event; - import flash.events.KeyboardEvent; - - import org.bigbluebutton.common.IBigBlueButtonModule; - import org.bigbluebutton.modules.join.JoinModuleConstants; - import org.bigbluebutton.modules.join.model.JoinProxy; - import org.bigbluebutton.modules.join.view.components.JoinWindow; - import org.puremvc.as3.multicore.interfaces.IMediator; - import org.puremvc.as3.multicore.interfaces.INotification; - import org.puremvc.as3.multicore.patterns.mediator.Mediator; - - /** - * The JoinWindowMediator is a mediator class for the JoinWindow gui component - * @author Denis Zgonjanin - * - */ - public class JoinWindowMediator extends Mediator implements IMediator - { - public static const NAME:String = "JoinWindowMediator"; - - private var _module:IBigBlueButtonModule; - private var _joinWindow:JoinWindow = new JoinWindow(); - public static const JOIN:String = "Attempt join"; - - /** - * the constructor. registers this mediator with the JoinWindow gui component - * @param view - * - */ - public function JoinWindowMediator(module:IBigBlueButtonModule) - { - super(NAME, module); - _module = module; - _joinWindow.addEventListener(JOIN, join); - _joinWindow.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed); - } - - /** - * Lists the notifications to which this mediator listens to - * @return - * - */ - override public function listNotificationInterests():Array{ - - return [ - JoinModuleConstants.OPEN_WINDOW, - JoinModuleConstants.CLOSE_WINDOW - ]; - - - } - - /** - * Handles specific notifications upon their reception - * @param notification - * - */ - override public function handleNotification(notification:INotification):void{ - - switch(notification.getName()) - { - case JoinModuleConstants.OPEN_WINDOW: - LogUtil.debug('Received request to OPEN_JOIN_WINDOW'); - - _joinWindow.width = 350; - _joinWindow.height = 270; - _joinWindow.title = "Login"; - _joinWindow.showCloseButton = false; - _joinWindow.xPosition = 450; - _joinWindow.yPosition = 150; - facade.sendNotification(JoinModuleConstants.ADD_WINDOW, _joinWindow); - break; - - case JoinModuleConstants.CLOSE_WINDOW: - LogUtil.debug('Received request to CLOSE_JOIN_WINDOW'); - _joinWindow.clear(); - facade.sendNotification(JoinModuleConstants.REMOVE_WINDOW, _joinWindow); - break; - } - - } - - protected function keyPressed(event:KeyboardEvent):void{ - if (event.keyCode == 13) join(event); - } - - /** - * Returns the gui component which this class is a mediator of - * @return - * - */ - private function get joinWindow():JoinWindow{ - return viewComponent as JoinWindow; - } - - /** - * Try to login. - * @param e - * - */ - private function join(e:Event):void{ - LogUtil.debug('Received join event'); - var name : String = _joinWindow.nameField.text; - var room : String = _joinWindow.confField.text; - var password : String = _joinWindow.passwdField.text - - if ((name.length < 1) || (room.length < 1) || (password.length < 1)) { - _joinWindow.lblNote.text = "Please enter all the information."; - return; - } - _joinWindow.lblNote.text = "Attempting to Login."; - - proxy.join(); - } - - - private function get proxy():JoinProxy { - return facade.retrieveProxy(JoinProxy.NAME) as JoinProxy; - } - } -} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/join/view/components/JoinWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/join/view/components/JoinWindow.mxml deleted file mode 100644 index a117597bb2e5b005e96805f70cfa9d0517f7c858..0000000000000000000000000000000000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/join/view/components/JoinWindow.mxml +++ /dev/null @@ -1,108 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<!-- - BigBlueButton - http://www.bigbluebutton.org - - Copyright (c) 2008-2009 by respective authors (see below). All rights reserved. - - BigBlueButton is free software; you can redistribute it and/or modify it under the - terms of the GNU Lesser General Public License as published by the Free Software - Foundation; either version 3 of the License, or (at your option) any later - version. - - BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along - with BigBlueButton; if not, If not, see <http://www.gnu.org/licenses/>. - - $Id: $ ---> - -<MDIWindow xmlns="flexlib.mdi.containers.*" - xmlns:mx="http://www.adobe.com/2006/mxml" - width="328" height="265" layout="absolute" showCloseButton="false" - implements="org.bigbluebutton.common.IBbbModuleWindow"> - - <mx:Script> - <![CDATA[ - import flexlib.mdi.events.MDIWindowEvent; - import org.bigbluebutton.modules.login.LoginModuleConstants; - import org.bigbluebutton.modules.login.view.LoginWindowMediator; - - //The following code block is to deal with a bug in FLexLib with MDI windows not responding well to being maximized - private var savedWindowWidth:Number; - private var savedWindowHeight:Number; - private var savedX:Number; - private var savedY:Number; - private var isMaximized:Boolean = false; - override public function maximize():void{ - if (!isMaximized){ - savedWindowHeight = this.height; - savedWindowWidth = this.width; - savedX = this.x; - savedY = this.y; - dispatchEvent(new MDIWindowEvent(MDIWindowEvent.MAXIMIZE, this)); - isMaximized = true; - } else{ - this.width = savedWindowWidth; - this.height = savedWindowHeight; - this.x = savedX; - this.y = savedY; - isMaximized = false; - //dispatchEvent(new MDIWindowEvent(MDIWindowEvent.RESTORE, this)); - } - } - - private var _xPosition:int; - private var _yPosition:int; - - public function get xPosition():int { - return _xPosition; - } - - public function get yPosition():int { - return _yPosition; - } - - public function set xPosition(x:int):void { - _xPosition = x; - } - - public function set yPosition(y:int):void { - _yPosition = y; - } - - public function showError(error:String):void - { - this.lblNote.visible = true; - switch(error){ - case LoginModuleConstants.LOGIN_FAILED: - this.lblNote.text = "Connection Failed. Please try again.\n"; - break; - case LoginModuleConstants.LOGIN_SUCCESS: - this.lblNote.text = "Connection Successful.\n"; - break; - } - } - - public function clear():void { - nameField.text = ""; - confField.text = ""; - passwdField.text = ""; - lblNote.text = ""; - } - - ]]> - </mx:Script> - <mx:Label x="41" y="52" text="Name" id="nameLabel"/> - <mx:TextInput id="nameField" x="98" y="50" tabIndex="1"/> - <mx:Label x="10" y="91" text="Conference" id="confLabel"/> - <mx:TextInput x="98" y="89" id="confField" tabIndex="2"/> - <mx:Label x="22" y="132" text="Password" id="passwdLabel"/> - <mx:TextInput x="98" y="130" id="passwdField" displayAsPassword="true" tabIndex="3"/> - <mx:Button label="Join" x="243" y="169" click="dispatchEvent(new Event(LoginWindowMediator.LOGIN))" tabIndex="4"/> - <mx:Label x="21" y="10" text="Complete form to join conference." width="256" id="messageLbl"/> - <mx:Label x="22" y="208" width="270" id="lblNote"/> -</MDIWindow> diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/join/views/JoinWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/join/views/JoinWindow.mxml deleted file mode 100644 index 28ac2b62efb9a7ff9a478f611246b7fad691fe2a..0000000000000000000000000000000000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/join/views/JoinWindow.mxml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<MDIWindow xmlns="flexlib.mdi.containers.*" - xmlns:mx="http://www.adobe.com/2006/mxml" - implements="org.bigbluebutton.common.IBbbModuleWindow" - width="328" height="265" layout="absolute" showCloseButton="false"> - - <mx:Script> - <![CDATA[ - - private var _xPosition:int; - private var _yPosition:int; - - public function get xPosition():int { - return _xPosition; - } - - public function get yPosition():int { - return _yPosition; - } - - public function set xPosition(x:int):void { - _xPosition = x; - } - - public function set yPosition(y:int):void { - _yPosition = y; - } - - private function sendJoinEvent():void{ - - } - - ]]> - </mx:Script> - - <mx:Label x="41" y="52" text="Name" id="nameLabel"/> - <mx:TextInput id="nameField" x="98" y="50" tabIndex="1"/> - <mx:Label x="10" y="91" text="Conference" id="confLabel"/> - <mx:TextInput x="98" y="89" id="confField" tabIndex="2"/> - <mx:Label x="22" y="132" text="Password" id="passwdLabel"/> - <mx:TextInput x="98" y="130" id="passwdField" displayAsPassword="true" tabIndex="3"/> - <mx:Button label="Join" x="243" y="169" click="sendJoinEvent()" tabIndex="4"/> - <mx:Label x="21" y="10" text="Complete form to join conference." width="256" id="messageLbl"/> - <mx:Label x="22" y="208" width="270" id="lblNote"/> -</MDIWindow> diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/login/LoginEndpointMediator.as b/bigbluebutton-client/src/org/bigbluebutton/modules/login/LoginEndpointMediator.as deleted file mode 100644 index 8736e0383f29775db4927ac59ec6383e41c5a5a4..0000000000000000000000000000000000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/login/LoginEndpointMediator.as +++ /dev/null @@ -1,123 +0,0 @@ -/** -* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/ -* -* Copyright (c) 2008 by respective authors (see below). -* -* This program is free software; you can redistribute it and/or modify it under the -* terms of the GNU Lesser General Public License as published by the Free Software -* Foundation; either version 2.1 of the License, or (at your option) any later -* version. -* -* This program is distributed in the hope that it will be useful, but WITHOUT ANY -* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -*/ -package org.bigbluebutton.modules.login -{ - import org.bigbluebutton.common.IBigBlueButtonModule; - import org.bigbluebutton.common.messaging.Endpoint; - import org.bigbluebutton.common.messaging.EndpointMessageConstants; - import org.bigbluebutton.common.messaging.Router; - import org.puremvc.as3.multicore.interfaces.IMediator; - import org.puremvc.as3.multicore.interfaces.INotification; - import org.puremvc.as3.multicore.patterns.mediator.Mediator; - import org.puremvc.as3.multicore.utilities.pipes.interfaces.IPipeMessage; - - public class LoginEndpointMediator extends Mediator implements IMediator - { - public static const NAME:String = "LoginEndPointMediator"; - - private var _module:IBigBlueButtonModule; - private var _router:Router; - private var _endpoint:Endpoint; - private static const TO_LOGIN_MODULE:String = "TO_LOGIN_MODULE"; - private static const FROM_LOGIN_MODULE:String = "FROM_LOGIN_MODULE"; - - private static const PLAYBACK_MESSAGE:String = "PLAYBACK_MESSAGE"; - private static const PLAYBACK_MODE:String = "PLAYBACK_MODE"; - - public function LoginEndpointMediator(module:IBigBlueButtonModule) - { - super(NAME,module); - _module = module; - _router = module.router - LogUtil.debug(NAME + "::Creating endpoint for LoginModule"); - _endpoint = new Endpoint(_router, FROM_LOGIN_MODULE, TO_LOGIN_MODULE, messageReceiver); - } - - override public function getMediatorName():String - { - return NAME; - } - - override public function listNotificationInterests():Array - { - return [ - LoginModuleConstants.USER_LOGGEDIN, - LoginModuleConstants.STARTED, - LoginModuleConstants.STOPPED, - LoginModuleConstants.ADD_WINDOW, - LoginModuleConstants.REMOVE_WINDOW - ]; - } - - override public function handleNotification(notification:INotification):void - { - LogUtil.debug(NAME + "::LoginEndPoint MSG. " + notification.getName()); - switch(notification.getName()){ - case LoginModuleConstants.STARTED: - LogUtil.debug(NAME + "::Sending Login MODULE_STARTED message to main"); - _endpoint.sendMessage(EndpointMessageConstants.MODULE_STARTED, - EndpointMessageConstants.TO_MAIN_APP, _module.moduleId); - facade.sendNotification(LoginModuleConstants.OPEN_WINDOW); - break; - case LoginModuleConstants.STOPPED: - LogUtil.debug(NAME + '::Sending Login MODULE_STOPPED message to main'); - facade.sendNotification(LoginModuleConstants.CLOSE_WINDOW); - var info:Object = notification.getBody(); - info["moduleId"] = _module.moduleId - _endpoint.sendMessage(EndpointMessageConstants.MODULE_STOPPED, - EndpointMessageConstants.TO_MAIN_APP, info); - break; - case LoginModuleConstants.ADD_WINDOW: - LogUtil.debug(NAME + '::Sending Login ADD_WINDOW message to main'); - _endpoint.sendMessage(EndpointMessageConstants.ADD_WINDOW, - EndpointMessageConstants.TO_MAIN_APP, notification.getBody()); - break; - case LoginModuleConstants.REMOVE_WINDOW: - LogUtil.debug(NAME + '::Sending Login REMOVE_WINDOW message to main'); - _endpoint.sendMessage(EndpointMessageConstants.REMOVE_WINDOW, - EndpointMessageConstants.TO_MAIN_APP, notification.getBody()); - break; - case LoginModuleConstants.USER_LOGGEDIN: - LogUtil.debug(NAME + '::Sending Login LOGIN_SUCCESS message to main'); - _endpoint.sendMessage(EndpointMessageConstants.USER_LOGGED_IN, - EndpointMessageConstants.TO_MAIN_APP, notification.getBody()); - break; - } - } - - private function messageReceiver(message : IPipeMessage) : void - { - var msg : String = message.getHeader().MSG as String; - switch(msg){ - case EndpointMessageConstants.CLOSE_WINDOW: - facade.sendNotification(LoginModuleConstants.CLOSE_WINDOW); - break; - case EndpointMessageConstants.OPEN_WINDOW: - //LogUtil.debug('Received OPEN_WINDOW message from ' + message.getHeader().SRC); - //facade.sendNotification(ChatModuleConstants.OPEN_WINDOW); - break; - } - } - - private function playMessage(message:XML):void{ - - } - } -} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/login/LoginFacade.as b/bigbluebutton-client/src/org/bigbluebutton/modules/login/LoginFacade.as deleted file mode 100644 index fed64f27d55e5e7790dc7fdd31f706d2593085ad..0000000000000000000000000000000000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/login/LoginFacade.as +++ /dev/null @@ -1,62 +0,0 @@ -/* - * BigBlueButton - http://www.bigbluebutton.org - * - * Copyright (c) 2008-2009 by respective authors (see below). All rights reserved. - * - * BigBlueButton is free software; you can redistribute it and/or modify it under the - * terms of the GNU Lesser General Public License as published by the Free Software - * Foundation; either version 3 of the License, or (at your option) any later - * version. - * - * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License along - * with BigBlueButton; if not, If not, see <http://www.gnu.org/licenses/>. - * - * $Id: $ - */ -package org.bigbluebutton.modules.login -{ - import org.bigbluebutton.modules.login.controller.StartupCommand; - import org.puremvc.as3.multicore.interfaces.IFacade; - import org.puremvc.as3.multicore.patterns.facade.Facade; - - public class LoginFacade extends Facade implements IFacade - { - public static const NAME:String = "LoginFacade"; - - public static const STARTUP:String = 'startup'; - public static const STOP:String = 'stop'; - public static const LOGIN:String = 'login'; - public static const LOGOUT:String = 'login'; - - public function LoginFacade(key:String) - { - //TODO: implement function - super(key); - } - - public static function getInstance():LoginFacade{ - if (instanceMap[NAME] == null) - instanceMap[NAME] = new LoginFacade(NAME); - return instanceMap[NAME] as LoginFacade; - } - - override protected function initializeController():void { - super.initializeController(); - registerCommand(STARTUP, StartupCommand); - } - - public function startup(module:LoginModule):void { - LogUtil.debug('LoginFacade startup'); - sendNotification(STARTUP, module); - } - - public function stop(app:LoginModule):void{ - sendNotification(STOP, app); - removeCore(NAME); - } - } -} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/login/LoginModuleConstants.as b/bigbluebutton-client/src/org/bigbluebutton/modules/login/LoginModuleConstants.as deleted file mode 100644 index 9aae521f0d34da037e615b9ab1f4e7a103caa484..0000000000000000000000000000000000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/login/LoginModuleConstants.as +++ /dev/null @@ -1,36 +0,0 @@ -/* - * BigBlueButton - http://www.bigbluebutton.org - * - * Copyright (c) 2008-2009 by respective authors (see below). All rights reserved. - * - * BigBlueButton is free software; you can redistribute it and/or modify it under the - * terms of the GNU Lesser General Public License as published by the Free Software - * Foundation; either version 3 of the License, or (at your option) any later - * version. - * - * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License along - * with BigBlueButton; if not, If not, see <http://www.gnu.org/licenses/>. - * - * $Id: $ - */ -package org.bigbluebutton.modules.login -{ - public class LoginModuleConstants - { - public static const START:String = "start module"; - public static const STOP:String = "stop module"; - public static const STARTED:String = "STARTED"; - public static const STOPPED:String = "STOPPED"; - public static const USER_LOGGEDIN:String = 'USER_LOGGEDIN'; - public static const LOGIN_FAILED:String = 'LOGIN_FAILED'; - public static const LOGIN_SUCCESS:String = 'LOGIN_SUCCESS'; - public static const OPEN_WINDOW:String = 'OPEN_WINDOW'; - public static const CLOSE_WINDOW:String = 'CLOSE_WINDOW'; - public static const ADD_WINDOW:String = 'ADD_WINDOW'; - public static const REMOVE_WINDOW:String = 'REMOVE_WINDOW'; - } -} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/login/LoginModuleMediator.as b/bigbluebutton-client/src/org/bigbluebutton/modules/login/LoginModuleMediator.as deleted file mode 100644 index 7c5a058223ac09eb7ceb63a165e8d9ed3574fb8f..0000000000000000000000000000000000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/login/LoginModuleMediator.as +++ /dev/null @@ -1,42 +0,0 @@ -/** -* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/ -* -* Copyright (c) 2008 by respective authors (see below). -* -* This program is free software; you can redistribute it and/or modify it under the -* terms of the GNU Lesser General Public License as published by the Free Software -* Foundation; either version 2.1 of the License, or (at your option) any later -* version. -* -* This program is distributed in the hope that it will be useful, but WITHOUT ANY -* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -*/ -package org.bigbluebutton.modules.login -{ - import org.bigbluebutton.common.IBigBlueButtonModule; - import org.bigbluebutton.common.messaging.Endpoint; - import org.puremvc.as3.multicore.interfaces.IMediator; - import org.puremvc.as3.multicore.patterns.mediator.Mediator; - import org.puremvc.as3.multicore.utilities.pipes.interfaces.IPipeMessage; - - public class LoginModuleMediator extends Mediator implements IMediator - { - public static const NAME:String = 'LoginModuleMediator'; - private var _module:IBigBlueButtonModule; - - - public function LoginModuleMediator( module:IBigBlueButtonModule ) - { - super( NAME, module ); - _module = module; -// facade.registerMediator(new ChatEndpointMediator(_module.router)); - } - - } -} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/login/controller/StartupCommand.as b/bigbluebutton-client/src/org/bigbluebutton/modules/login/controller/StartupCommand.as deleted file mode 100644 index 59d4fd61e33d2e96bbe0d7d3f07b7d5bcb8b63e6..0000000000000000000000000000000000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/login/controller/StartupCommand.as +++ /dev/null @@ -1,52 +0,0 @@ -/* - * BigBlueButton - http://www.bigbluebutton.org - * - * Copyright (c) 2008-2009 by respective authors (see below). All rights reserved. - * - * BigBlueButton is free software; you can redistribute it and/or modify it under the - * terms of the GNU Lesser General Public License as published by the Free Software - * Foundation; either version 3 of the License, or (at your option) any later - * version. - * - * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License along - * with BigBlueButton; if not, If not, see <http://www.gnu.org/licenses/>. - * - * $Id: $ - */ -package org.bigbluebutton.modules.login.controller -{ - import org.bigbluebutton.modules.login.LoginEndpointMediator; - import org.bigbluebutton.modules.login.LoginModuleConstants; - import org.bigbluebutton.modules.login.LoginModuleMediator; - import org.bigbluebutton.modules.login.model.LoginProxy; - import org.bigbluebutton.modules.login.view.LoginWindowMediator; - import org.puremvc.as3.multicore.interfaces.INotification; - import org.puremvc.as3.multicore.patterns.command.SimpleCommand; - - public class StartupCommand extends SimpleCommand - { - public function StartupCommand() - { - super(); - } - - override public function execute(note:INotification):void { - var m:LoginModule = note.getBody() as LoginModule; - - LogUtil.debug('facade.registerMediator(new LoginEndpointMediator(m));'); - facade.registerMediator(new LoginEndpointMediator(m)); - LogUtil.debug('facade.registerMediator(new LoginModuleMediator(m));'); - facade.registerMediator(new LoginModuleMediator(m)); - LogUtil.debug('facade.registerMediator( new LoginWindowMediator(m) );'); - facade.registerMediator( new LoginWindowMediator(m) ); - LogUtil.debug('facade.registerProxy(new LoginProxy(m.uri));'); - facade.registerProxy(new LoginProxy(m.uri)); - LogUtil.debug('LoginModule COnnected'); - facade.sendNotification(LoginModuleConstants.STARTED); - } - } -} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/login/model/LoginProxy.as b/bigbluebutton-client/src/org/bigbluebutton/modules/login/model/LoginProxy.as deleted file mode 100644 index cc8803b6808d321cef32128d06e1df1107a70fa7..0000000000000000000000000000000000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/login/model/LoginProxy.as +++ /dev/null @@ -1,64 +0,0 @@ -/** -* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/ -* -* Copyright (c) 2008 by respective authors (see below). -* -* This program is free software; you can redistribute it and/or modify it under the -* terms of the GNU Lesser General Public License as published by the Free Software -* Foundation; either version 2.1 of the License, or (at your option) any later -* version. -* -* This program is distributed in the hope that it will be useful, but WITHOUT ANY -* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -*/ -package org.bigbluebutton.modules.login.model -{ - import org.bigbluebutton.modules.login.LoginModuleConstants; - import org.bigbluebutton.modules.login.model.services.LoginService; - import org.puremvc.as3.multicore.interfaces.IProxy; - import org.puremvc.as3.multicore.patterns.proxy.Proxy; - - public class LoginProxy extends Proxy implements IProxy - { - public static const NAME:String = "LoginProxy"; - - private var uri:String; - private var loginService:LoginService; - - public function LoginProxy(uri:String) - { - super(NAME); - this.uri = uri; - } - - public function login(fullname:String, conference:String, password:String):void { - LogUtil.debug(NAME + "::logging in " + fullname + " to " + conference); - loginService = new LoginService(); - loginService.addLoginResultListener(loginListener); - loginService.load(uri, fullname, conference, password); - - } - - public function stop():void { - // USer is issuing a disconnect. -// manualDisconnect = true; -// chatService.disconnect(); - } - - private function loginListener(success:Boolean, result:Object):void { - if (success) { - LogUtil.debug(NAME + '::Sending LoginModuleConstants.LOGIN_SUCCESS'); - sendNotification(LoginModuleConstants.LOGIN_SUCCESS, result); - } else { - LogUtil.debug(NAME + '::Sending LoginModuleConstants.LOGIN_FAILED'); - sendNotification(LoginModuleConstants.LOGIN_FAILED, result); - } - } - } -} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/login/model/services/LoginService.as b/bigbluebutton-client/src/org/bigbluebutton/modules/login/model/services/LoginService.as deleted file mode 100644 index 46e62ee6b0ec1057a6fa13702e6834cabe7cbc84..0000000000000000000000000000000000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/login/model/services/LoginService.as +++ /dev/null @@ -1,81 +0,0 @@ -/* - * BigBlueButton - http://www.bigbluebutton.org - * - * Copyright (c) 2008-2009 by respective authors (see below). All rights reserved. - * - * BigBlueButton is free software; you can redistribute it and/or modify it under the - * terms of the GNU Lesser General Public License as published by the Free Software - * Foundation; either version 3 of the License, or (at your option) any later - * version. - * - * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License along - * with BigBlueButton; if not, If not, see <http://www.gnu.org/licenses/>. - * - * $Id: $ - */ -package org.bigbluebutton.modules.login.model.services -{ - import flash.events.*; - import flash.net.URLLoader; - import flash.net.URLRequest; - import flash.net.URLRequestMethod; - import flash.net.URLVariables; - - public class LoginService - { - private var request:URLRequest = new URLRequest(); - private var vars:URLVariables = new URLVariables(); - - private var urlLoader:URLLoader; - private var _resultListener:Function; - - public function LoginService() - { - } - - /** - * Load slides from an HTTP service. Response is received in the Responder class' onResult method - * @param url - * - */ - public function load(url:String, fullname:String, conference:String, password:String) : void - { - LogUtil.debug("LoginService:load(...) " + url); - - vars.fullname = fullname; - vars.conference = conference; - vars.password = password; - request = new URLRequest(url); - request.data = vars; - request.method = URLRequestMethod.POST; - - urlLoader = new URLLoader(); - urlLoader.addEventListener(Event.COMPLETE, handleComplete); - urlLoader.load(request); - } - - public function addLoginResultListener(listener:Function):void { - _resultListener = listener; - } - - private function handleComplete(e:Event):void{ - - var xml:XML = new XML(e.target.data) - LogUtil.debug("Loading complete: " + xml); - var returncode:String = xml.returncode; - if (returncode == 'FAILED') { - LogUtil.debug("Result = " + returncode + " " + xml.message); - _resultListener(false, {message:xml.message}); - } else if (returncode == 'SUCCESS') { - LogUtil.debug(xml.returncode + " " + xml.fullname + " " + xml.conference + " " + xml.role - + " " + xml.room); - _resultListener(true, {fullname:xml.fullname,conference:xml.conference,role:xml.role,room:xml.room}); - } - - } - } -} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/login/model/vo/LoginVO.as b/bigbluebutton-client/src/org/bigbluebutton/modules/login/model/vo/LoginVO.as deleted file mode 100644 index b3c44f08dd359c5a931987eb0a7f328a2f46fea8..0000000000000000000000000000000000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/login/model/vo/LoginVO.as +++ /dev/null @@ -1,31 +0,0 @@ -/* - * BigBlueButton - http://www.bigbluebutton.org - * - * Copyright (c) 2008-2009 by respective authors (see below). All rights reserved. - * - * BigBlueButton is free software; you can redistribute it and/or modify it under the - * terms of the GNU Lesser General Public License as published by the Free Software - * Foundation; either version 3 of the License, or (at your option) any later - * version. - * - * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License along - * with BigBlueButton; if not, If not, see <http://www.gnu.org/licenses/>. - * - * $Id: $ - */ -package org.bigbluebutton.modules.login.model.vo -{ - [Bindable] - public class LoginVO - { - public var userid : Number; - public var name : String; - public var password: String; - public var authToken: String; - public var role : String = Role.VIEWER; - } -} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/login/view/LoginWindowMediator.as b/bigbluebutton-client/src/org/bigbluebutton/modules/login/view/LoginWindowMediator.as deleted file mode 100644 index f50a193f8f97cec99c977fa03fb91202c32776c8..0000000000000000000000000000000000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/login/view/LoginWindowMediator.as +++ /dev/null @@ -1,154 +0,0 @@ -/** -* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/ -* -* Copyright (c) 2008 by respective authors (see below). -* -* This program is free software; you can redistribute it and/or modify it under the -* terms of the GNU Lesser General Public License as published by the Free Software -* Foundation; either version 2.1 of the License, or (at your option) any later -* version. -* -* This program is distributed in the hope that it will be useful, but WITHOUT ANY -* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -*/ -package org.bigbluebutton.modules.login.view -{ - import flash.events.Event; - import flash.events.KeyboardEvent; - - import org.bigbluebutton.common.IBigBlueButtonModule; - import org.bigbluebutton.modules.login.LoginModuleConstants; - import org.bigbluebutton.modules.login.model.LoginProxy; - import org.bigbluebutton.modules.login.view.components.LoginWindow; - import org.puremvc.as3.multicore.interfaces.IMediator; - import org.puremvc.as3.multicore.interfaces.INotification; - import org.puremvc.as3.multicore.patterns.mediator.Mediator; - - /** - * The JoinWindowMediator is a mediator class for the JoinWindow gui component - * @author Denis Zgonjanin - * - */ - public class LoginWindowMediator extends Mediator implements IMediator - { - public static const NAME:String = "JoinWindowMediator"; - - private var _module:IBigBlueButtonModule; - private var _joinWindow:LoginWindow = new LoginWindow(); - public static const LOGIN:String = "Attempt Login"; - - /** - * the constructor. registers this mediator with the JoinWindow gui component - * @param view - * - */ - public function LoginWindowMediator(module:IBigBlueButtonModule) - { - super(NAME, module); - _module = module; - _joinWindow.addEventListener(LOGIN, login); - _joinWindow.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed); - } - - /** - * Lists the notifications to which this mediator listens to - * @return - * - */ - override public function listNotificationInterests():Array{ - - return [ - LoginModuleConstants.LOGIN_FAILED, - LoginModuleConstants.LOGIN_SUCCESS, - LoginModuleConstants.OPEN_WINDOW, - LoginModuleConstants.CLOSE_WINDOW - ]; - } - - /** - * Handles specific notifications upon their reception - * @param notification - * - */ - override public function handleNotification(notification:INotification):void{ - - switch(notification.getName()) - { - case LoginModuleConstants.OPEN_WINDOW: - LogUtil.debug('Received request to OPEN_JOIN_WINDOW'); - - _joinWindow.width = 350; - _joinWindow.height = 270; - _joinWindow.title = "Login"; - _joinWindow.showCloseButton = false; - _joinWindow.xPosition = 450; - _joinWindow.yPosition = 150; - facade.sendNotification(LoginModuleConstants.ADD_WINDOW, _joinWindow); - break; - - case LoginModuleConstants.CLOSE_WINDOW: - LogUtil.debug('Received request to CLOSE_JOIN_WINDOW'); - _joinWindow.clear(); - facade.sendNotification(LoginModuleConstants.REMOVE_WINDOW, _joinWindow); - break; - - case LoginModuleConstants.LOGIN_FAILED: - LogUtil.debug('Received request to LOGIN_FAILED'); - _joinWindow.showError(notification.getBody()["message"]); - break; - - case LoginModuleConstants.LOGIN_SUCCESS: - LogUtil.debug('Received request to LOGIN_SUCCESS'); - _joinWindow.clear(); - facade.sendNotification(LoginModuleConstants.REMOVE_WINDOW, _joinWindow); - facade.sendNotification(LoginModuleConstants.USER_LOGGEDIN); - break; - } - - } - - protected function keyPressed(event:KeyboardEvent):void{ - if (event.keyCode == 13) login(event); - } - - /** - * Returns the gui component which this class is a mediator of - * @return - * - */ - private function get loginWindow():LoginWindow{ - return viewComponent as LoginWindow; - } - - /** - * Try to login. - * @param e - * - */ - private function login(e:Event):void{ - LogUtil.debug('Received login event'); - var name : String = _joinWindow.nameField.text; - var room : String = _joinWindow.confField.text; - var password : String = _joinWindow.passwdField.text - - if ((name.length < 1) || (room.length < 1) || (password.length < 1)) { - _joinWindow.lblNote.text = "Please enter all the information."; - return; - } - _joinWindow.lblNote.text = "Attempting to Login."; - - proxy.login(name, room, password); - } - - - private function get proxy():LoginProxy { - return facade.retrieveProxy(LoginProxy.NAME) as LoginProxy; - } - } -} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/login/view/components/LoginWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/login/view/components/LoginWindow.mxml deleted file mode 100644 index 72e4c6ea91c642d43ea4a879d45109d65d01d090..0000000000000000000000000000000000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/login/view/components/LoginWindow.mxml +++ /dev/null @@ -1,100 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<!-- - BigBlueButton - http://www.bigbluebutton.org - - Copyright (c) 2008-2009 by respective authors (see below). All rights reserved. - - BigBlueButton is free software; you can redistribute it and/or modify it under the - terms of the GNU Lesser General Public License as published by the Free Software - Foundation; either version 3 of the License, or (at your option) any later - version. - - BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along - with BigBlueButton; if not, If not, see <http://www.gnu.org/licenses/>. - - $Id: $ ---> - -<MDIWindow xmlns="flexlib.mdi.containers.*" - xmlns:mx="http://www.adobe.com/2006/mxml" - width="328" height="265" layout="absolute" showCloseButton="false" - implements="org.bigbluebutton.common.IBbbModuleWindow"> - - <mx:Script> - <![CDATA[ - import org.bigbluebutton.modules.login.LoginModuleConstants; - import org.bigbluebutton.modules.login.view.LoginWindowMediator; - - private var _xPosition:int; - private var _yPosition:int; - - //The following code block is to deal with a bug in FLexLib with MDI windows not responding well to being maximized - private var savedWindowWidth:Number; - private var savedWindowHeight:Number; - private var savedX:Number; - private var savedY:Number; - private var isMaximized:Boolean = false; - override public function maximize():void{ - if (!isMaximized){ - savedWindowHeight = this.height; - savedWindowWidth = this.width; - savedX = this.x; - savedY = this.y; - dispatchEvent(new MDIWindowEvent(MDIWindowEvent.MAXIMIZE, this)); - isMaximized = true; - } else{ - this.width = savedWindowWidth; - this.height = savedWindowHeight; - this.x = savedX; - this.y = savedY; - isMaximized = false; - //dispatchEvent(new MDIWindowEvent(MDIWindowEvent.RESTORE, this)); - } - } - - public function get xPosition():int { - return _xPosition; - } - - public function get yPosition():int { - return _yPosition; - } - - public function set xPosition(x:int):void { - _xPosition = x; - } - - public function set yPosition(y:int):void { - _yPosition = y; - } - - public function showError(error:String):void - { - this.lblNote.visible = true; - this.lblNote.text = error; - } - - public function clear():void { - nameField.text = ""; - confField.text = ""; - passwdField.text = ""; - lblNote.text = ""; - } - - ]]> - </mx:Script> - <mx:Label x="41" y="52" text="Name" id="nameLabel"/> - <mx:TextInput id="nameField" x="98" y="50" tabIndex="1"/> - <mx:Label x="10" y="91" text="Conference" id="confLabel"/> - <mx:TextInput x="98" y="89" id="confField" tabIndex="2"/> - <mx:Label x="22" y="132" text="Password" id="passwdLabel"/> - <mx:TextInput x="98" y="130" id="passwdField" displayAsPassword="true" tabIndex="3"/> - <mx:Button label="Join" x="243" y="169" click="dispatchEvent(new Event(LoginWindowMediator.LOGIN))" tabIndex="4"/> - <mx:Label x="21" y="10" text="Complete form to join conference." width="256" id="messageLbl"/> - <mx:Label x="22" y="208" width="270" id="lblNote"/> -</MDIWindow>