6 Appendix A: Full Definition of Interfaces and Types

For ease of implementation, the complete definitions of the types and interfaces used by this protocol are as follows, and are specified in the Microsoft.HtmlTrans.Interface assembly.

 namespace Microsoft.HtmlTrans
 {
     interface IHtmlTrLauncher
     {
         CreateHtmlInfo CHICreateHtml(String strLauncherUri, Byte[] rgbFile, BrowserType bt,
             String strReqFile, String strTaskName, Int32 timeout, bool fReturnFileBits);
     }
     interface IDocumentConversionsLauncher
     {
         CreateDCInfo ConvertFile(String launcherUri, String appExe, String convertFrom, String convertTo,
             Byte[] fileBits, String taskName, String configInfo, Int32 timeout, bool fReturnFileBits);
     }
     interface IHtmlTrLoadBalancer
     {
         String StrGetLauncher(String strTaskName);
         bool RegisterLauncher(String strLauncherUri);
         bool UnRegisterLauncher(String strLauncherUri);
         bool LauncherTaskCompleted(String strLauncherUri, String strTaskName);
     }
     
     class CreateHtmlInfo
     {
         CreationErrorType m_ce;
         String m_strMainFileName;
         String m_strMainFilePath;
         Byte [][]m_rgrgbThicketFiles;
         String []m_rgstrThicketFileNames;
         Byte []m_rgbMainFile;
         String m_strThicketFolderName;
     }
     
     class CreateDCInfo
     {
         CreationErrorType m_ce;
         String m_strMainFileName;
         Byte[] m_rgbMainFile;
         String[] m_rgstrSupportingFileNames;
         Byte[][] m_rgrgbSupportingFiles;
         String m_strSupportingFolderName;
         String m_strErrorString;
     }
     
     enum BrowserType : Int32 {
         BT_IE3 = 0,
         BT_IE4 = 1,
         BT_UNKNOWN = 2
     }
  
     enum CreationErrorType : Int32 {
         CE_NONE = 0,
         CE_CRASH = 1,
         CE_HANG = 2,
         CE_OTHER_BLOCKLIST = 3,
         CE_SERVERFILENOTFOUND = 4, 
         CE_RESOURCESUNAVAILABLE = 5,
         CE_SPGETCONTENTFAILED = 6,
         CE_DISKWRITEERROR = 7,
         CE_BADINPUT = 8,
         CE_BACKENDUNAVAILABLE = 9,
         CE_ALREADYRUNNING = 10,
         CE_STARTTIMEOUT = 11,
         CE_OTHER = 12
     }
 }