/[gr2lib]/trunk/gr2lib/core/coreclasses/header/granny_file.cs
ViewVC logotype

Diff of /trunk/gr2lib/core/coreclasses/header/granny_file.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/gr2lib/core/coreclasses/header/granny_file.cs	2010/07/24 05:43:04	190
+++ trunk/gr2lib/core/coreclasses/header/granny_file.cs	2010/07/24 06:31:50	191
@@ -80,7 +80,7 @@
         public void Dispose()
         {
             if (NativeFilePointer == IntPtr.Zero) return;
-            coreapi.FreeFile(NativeFilePointer);
+            coreapi.FileLoadingSupport.FreeFile(NativeFilePointer);
         }
 
         internal static void ReadFromMemory(string filename, ref granny_file grn_file, gr2lib.core.coretypes.implementation.granny_log_callback_builder.OnMessageLogged OnMessageLoggedEventHandler)
@@ -103,7 +103,7 @@
             if (native.Header != IntPtr.Zero)
             {
                 managed.Header = granny_header.ReadFromMemory(native.Header);
-                managed.Header.TypeTag = coreapi.GrannyGetFileTypeTag(grn_file.NativePointer);
+                managed.Header.TypeTag = coreapi.HeaderSupport.GrannyGetFileTypeTag(grn_file.NativePointer);
             }
             else
             {
@@ -121,7 +121,7 @@
 #if HAVE_GRANNY_API_LOGGER
             grn_file.GrannyAPILogger.StartLogging();
 #endif
-            grn_file.NativeFilePointer = coreapi.GetFileInfo(grn_file.NativePointer);
+            grn_file.NativeFilePointer = coreapi.FileLoadingSupport.GetFileInfo(grn_file.NativePointer);
  
             managed.NativeFilePointer = grn_file.NativeFilePointer;
             managed.GrannyFileInfo = grnfileinfo.ReadFromMemory(managed.NativeFilePointer);
@@ -140,9 +140,9 @@
         /// <param name="OnMessageLoggedEventHandler">the granny2 api logging function to use</param>
         /// <returns></returns>
         public static granny_file ReadFromFile(string filename, ref granny_file grn_file, gr2lib.core.coretypes.implementation.granny_log_callback_builder.OnMessageLogged OnMessageLoggedEventHandler)
-        {          
-            
-            grn_file.NativePointer = coreapi.GrannyReadEntireFile(filename);
+        {
+
+            grn_file.NativePointer = coreapi.FileLoadingSupport.GrannyReadEntireFile(filename);
           
             if (grn_file.NativePointer == null || grn_file.NativePointer == IntPtr.Zero)
             {
@@ -150,7 +150,7 @@
             }         
             ReadFromMemory(filename, ref grn_file, OnMessageLoggedEventHandler);
          
-            coreapi.FreeFile(grn_file.NativePointer);
+            coreapi.FileLoadingSupport.FreeFile(grn_file.NativePointer);
          
             return grn_file;
         }

 

  ViewVC Help
Powered by ViewVC 1.1.22