src/Builder4/FakeServer.vala
authorAlan Knowles <alan@roojs.com>
Wed, 22 Apr 2015 11:51:44 +0000 (19:51 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 22 Apr 2015 11:51:44 +0000 (19:51 +0800)
src/Builder4/FakeServer.vala

index 6d40baf..f8321e1 100644 (file)
@@ -86,6 +86,9 @@ public class FakeServerCache : Object
                return el;
        }
     
+    
+    
+    
        public FakeServerCache.with_data( string data )
        {
                this.fname = "/" + GLib.Checksum.compute_for_string(GLib.ChecksumType.MD5, data, data.length) + ".js";
@@ -95,7 +98,15 @@ public class FakeServerCache : Object
         
          
        }
-
+       public FakeServerCache.from_resource( string fname )
+       {
+               this.fname = "/" + GLib.Checksum.compute_for_string(GLib.ChecksumType.MD5, data, data.length) + ".js";
+               this.data = data.data;
+               this.content_type = "text/javascript";
+               this.size= data.length;
+        
+         
+       }
        public FakeServerCache( string fname ) {
               
                this.fname = fname;