Separate Halcyon (rendering) into standalone target without Flex dependency; JavaScri...
[potlatch2.git] / net / systemeD / halcyon / connection / Connection.as
index 73207ca0387d037a283dcf606282c8875362c9db..d4d13c19e7355cad06d79349ab4829bb268be19e 100755 (executable)
@@ -13,7 +13,12 @@ package net.systemeD.halcyon.connection {
         protected static var policyURL:String = "http://127.0.0.1:3000/api/crossdomain.xml";
         protected static var apiBaseURL:String = "http://127.0.0.1:3000/api/0.6/";
 
-        public static function getConnection():Connection {
+        public static function getConnection(api:String,policy:String,conn:String):Connection {
+                       
+                       policyURL=policy;
+                       apiBaseURL=api;
+                       CONNECTION_TYPE=conn;
+                       
             if ( connectionInstance == null ) {
                 if ( CONNECTION_TYPE == "XML" )
                     connectionInstance = new XMLConnection();
@@ -23,6 +28,10 @@ package net.systemeD.halcyon.connection {
             return connectionInstance;
         }
 
+               public static function getConnectionInstance():Connection {
+            return connectionInstance;
+               }
+
                public function getEnvironment(responder:Responder):void {}
 
         // connection events
@@ -132,4 +141,3 @@ package net.systemeD.halcyon.connection {
 
 }
 
-