home *** CD-ROM | disk | FTP | other *** search
/ Computer Active 2010 August / CA08.iso / Multimedija / shufflr.air / ShufflrClient.swf / scripts / com / althea / client / shufflr / controller / FacebookCommand.as < prev    next >
Encoding:
Text File  |  2010-06-23  |  1.5 KB  |  46 lines

  1. package com.althea.client.shufflr.controller
  2. {
  3.    import com.althea.client.shufflr.ApplicationFacade;
  4.    import com.althea.client.shufflr.model.FacebookProxy;
  5.    import org.puremvc.as3.multicore.interfaces.ICommand;
  6.    import org.puremvc.as3.multicore.interfaces.INotification;
  7.    import org.puremvc.as3.multicore.patterns.command.SimpleCommand;
  8.    
  9.    public class FacebookCommand extends SimpleCommand implements ICommand
  10.    {
  11.       public function FacebookCommand()
  12.       {
  13.          super();
  14.       }
  15.       
  16.       override public function execute(param1:INotification) : void
  17.       {
  18.          var _loc2_:String = param1.getName();
  19.          var _loc3_:Object = param1.getBody();
  20.          switch(_loc2_)
  21.          {
  22.             case ApplicationFacade.FB_CONNECT:
  23.                this.proxy.connect(_loc3_ as String);
  24.                break;
  25.             case ApplicationFacade.FB_GETINFO:
  26.                this.proxy.getInfo(_loc3_ as String);
  27.                break;
  28.             case ApplicationFacade.FB_LOGOUT:
  29.                this.proxy.logout(_loc3_ as String);
  30.                break;
  31.             case ApplicationFacade.FB_GET_PERMS:
  32.                this.proxy.getPerms(_loc3_ as String);
  33.                break;
  34.             case ApplicationFacade.FB_GET_EXTENDED_PERM_KEYS:
  35.                this.proxy.getExtendedPermKeys(_loc3_ as String);
  36.          }
  37.       }
  38.       
  39.       private function get proxy() : FacebookProxy
  40.       {
  41.          return this.facade.retrieveProxy(FacebookProxy.NAME) as FacebookProxy;
  42.       }
  43.    }
  44. }
  45.  
  46.