mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-21 17:37:50 -05:00
Brought up to date with the private repository (feea4c7)
This commit is contained in:
1 parent
1aa738d692
commit
1b1df1ae48
7925 files changed
+2617237
-20
No files matched your search
+62
@@ -0,0 +1,62 @@
|
||||
package it.gotoandplay.smartfoxserver.handlers
|
||||
{
|
||||
import it.gotoandplay.smartfoxserver.SFSEvent;
|
||||
import it.gotoandplay.smartfoxserver.SmartFoxClient;
|
||||
import it.gotoandplay.smartfoxserver.util.ObjectSerializer;
|
||||
|
||||
public class ExtHandler implements IMessageHandler
|
||||
{
|
||||
|
||||
private var sfs:SmartFoxClient;
|
||||
|
||||
public function ExtHandler(param1:SmartFoxClient)
|
||||
{
|
||||
super();
|
||||
this.sfs = param1;
|
||||
}
|
||||
|
||||
public function handleMessage(param1:Object, param2:String) : void
|
||||
{
|
||||
var _loc3_:Object = null;
|
||||
var _loc4_:SFSEvent = null;
|
||||
var _loc5_:XML = null;
|
||||
var _loc6_:String = null;
|
||||
var _loc7_:int = 0;
|
||||
var _loc8_:String = null;
|
||||
var _loc9_:Object = null;
|
||||
if(param2 == SmartFoxClient.XTMSG_TYPE_XML)
|
||||
{
|
||||
_loc5_ = param1 as XML;
|
||||
_loc6_ = _loc5_.body.@action;
|
||||
_loc7_ = int(_loc5_.body.@id);
|
||||
if(_loc6_ == "xtRes")
|
||||
{
|
||||
_loc8_ = _loc5_.body.toString();
|
||||
_loc9_ = ObjectSerializer.getInstance().deserialize(_loc8_);
|
||||
_loc3_ = {};
|
||||
_loc3_.dataObj = _loc9_;
|
||||
_loc3_.type = param2;
|
||||
_loc4_ = new SFSEvent(SFSEvent.onExtensionResponse,_loc3_);
|
||||
this.sfs.dispatchEvent(_loc4_);
|
||||
}
|
||||
}
|
||||
else if(param2 == SmartFoxClient.XTMSG_TYPE_JSON)
|
||||
{
|
||||
_loc3_ = {};
|
||||
_loc3_.dataObj = param1.o;
|
||||
_loc3_.type = param2;
|
||||
_loc4_ = new SFSEvent(SFSEvent.onExtensionResponse,_loc3_);
|
||||
this.sfs.dispatchEvent(_loc4_);
|
||||
}
|
||||
else if(param2 == SmartFoxClient.XTMSG_TYPE_STR)
|
||||
{
|
||||
_loc3_ = {};
|
||||
_loc3_.dataObj = param1;
|
||||
_loc3_.type = param2;
|
||||
_loc4_ = new SFSEvent(SFSEvent.onExtensionResponse,_loc3_);
|
||||
this.sfs.dispatchEvent(_loc4_);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user