home *** CD-ROM | disk | FTP | other *** search
/ Troubleshooting Netware Systems / CSTRIAL0196.BIN / attach / msj / v10n10 / vb40.exe / WCIMR.EXE / WCDEFINE.BAS < prev    next >
BASIC Source File  |  1995-10-01  |  6KB  |  247 lines

  1. Attribute VB_Name = "WCIMDefines"
  2. ' CIM Message Type constants
  3.  
  4. Global Const MT_UNDEF As Byte = 0  ' Undefined message type
  5. Global Const MT_EMAIL As Byte = 1  ' E-Mail message
  6. Global Const MT_FORMSG As Byte = 2 ' Forum message
  7. Global Const MT_FORTHD As Byte = 3 ' Forum thread
  8. Global Const MT_IPLEX As Byte = 4  ' InfoPlex message (obsolete)
  9. Global Const MT_DISP As Byte = 5   ' Display article
  10. Global Const MT_ENS As Byte = 6    ' ENS story
  11.  
  12. ' Image List picture offsets for various msg types
  13.  
  14. Global Const picFolder As Variant = 1
  15. Global Const picThread As Variant = 2
  16. Global Const picMail As Variant = 3
  17. Global Const picForum As Variant = 4
  18. Global Const picNews As Variant = 5
  19. Global Const picUnknown As Variant = 6
  20.  
  21. ' Relationship constants for TreeView control
  22.  
  23. Global Const tvwFirst As Variant = 0      '   First sibling
  24. Global Const tvwLast As Variant = 1       '   Last sibling
  25. Global Const tvwNext As Variant = 2       '   Next sibling
  26. Global Const tvwPrevious As Variant = 3   '   Previous sibling
  27. Global Const tvwChild As Variant = 4      '   Child
  28.  
  29.  
  30. ' EMail header message types
  31.  
  32. Global Const EM_UNTYPED = 0  ' Untyped msg
  33. Global Const EM_IN = 1       ' In basket msg
  34. Global Const EM_OUT = 2      ' Out basket msg
  35. Global Const EM_RECD = 3     ' Rec'd cabinet msg
  36. Global Const EM_UNSENT = 4   ' Unsent cabinet msg
  37.  
  38. ' EMail message types
  39.  
  40. Global Const EM_TEXT = 0
  41. Global Const EM_RESERVED = 1
  42. Global Const EM_GIF = 2
  43. Global Const EM_BINARY = 3
  44. Global Const EM_TEXTFILE = 4
  45. Global Const EM_TEXTOBJ = 5
  46. Global Const EM_JPEG = 6
  47. Global Const EM_MACBIN = 255
  48.  
  49. ' Utility types used in headers and such
  50.  
  51. Type PString ' Pascal-style string
  52.     SLen As Byte
  53.     SData As String
  54. End Type
  55.  
  56. Type Folder ' WinCIM folder type
  57.     FPath As String * 11
  58.     FName As String * 19
  59. End Type
  60.  
  61. Type TimeStamp  ' CIM time stamp record
  62.     TSec As Byte
  63.     TMin As Byte
  64.     THour As Byte
  65.     TDay As Byte
  66.     TMonth As Byte
  67.     TYear As Byte ' Offset from 1970
  68. End Type
  69.  
  70.  
  71. Type Recipient
  72.     Name As PString
  73.     Addr As PString
  74.     Options As Long
  75. End Type
  76.  
  77. Type Content
  78.     ID As Byte
  79.     size As Long
  80.     Subject As PString
  81.     Name As PString
  82.     FType As Byte
  83.     DirID As Long
  84.     Path As PString ' DOS = Full path, Mac = Volume
  85. End Type
  86.  
  87. '---------------------------------------------
  88.  
  89. Type CommonHeader ' WinCIM common header
  90.     ID As String * 3 ' always = "VIS"
  91.     Rev As String * 3 ' currently = "000"
  92.     EOFChar As Byte ' always = 0x1A (ctrl Z)
  93.     StrucSize As Integer ' remaining size of this structure
  94.     RecType As Byte
  95.     Created As TimeStamp
  96.     Received As TimeStamp
  97.     PSize As Long ' Presentation size
  98. End Type
  99.  
  100. '---------------------------------------------
  101. ' After the CommonHeader, there are 4 PStrings - Pascal-style
  102. ' strings represented by a length byte followed by data
  103.  
  104. Type CommonPStrings
  105.     Subject As PString
  106.     Creator As PString ' Author in msg, or Section in thrd
  107.     CreAddr As PString ' Author's addr in msg, Forum in thrd
  108.     Service As PString ' Service name of forum, ie: CIS:VBASIC
  109. End Type
  110.  
  111. Type EMailHeader
  112.     HdrSize As Integer
  113.     HdrType As Byte
  114.  
  115.     NumCCs As Byte
  116.     CCs(1 To 100) As Recipient ' 1 to NumCCs
  117.  
  118.     NumBCs As Byte
  119.     BCs(1 To 100) As Recipient ' 1 to NumBCs
  120.  
  121.     msgid As PString ' Received msgs only
  122.     Options As Long  ' Received msgs only
  123.     SendOpts As Byte
  124.     Release As TimeStamp
  125.     Expire As TimeStamp
  126.     ReplyTo As PString
  127.  
  128.     NumContents As Byte
  129.     contents(1 To 100) As Content ' 1 to NumContents
  130.  
  131.     AddSentOpts As Byte
  132.  
  133.     AddCCNum As Integer
  134.     AddCC(1 To 100) As Recipient ' 1 to AddCCNum
  135.  
  136.     AddBCNum As Integer
  137.     AddBC(1 To 100) As Recipient '1 to AddBCNum
  138. End Type
  139. '---------------------------------------------
  140.  
  141. Type MessageHeader
  142.     size As Integer ' Remaining size of this struct
  143.     Created As TimeStamp
  144.     Received As TimeStamp ' Local receipt time
  145.     Subject As PString
  146.     AuthName As PString
  147.     AuthAddr As PString
  148.     NumRecips As Byte
  149.     PrimaryRecips As Recipient
  150.     Name As PString
  151.     Addr As PString
  152.     Options As Long
  153.  
  154.     flags As Integer ' bit 0 - autofiled if 1
  155.                      ' bit 1-15 reserved
  156.  
  157.     NumAddlRecips As Integer
  158.     AddlRecips(1 To 100) As Recipient ' 1 to NumAddlRecips
  159. End Type
  160.  
  161. '---------------------------------------------
  162.  
  163. Type ForumThdHeader
  164.     size As Integer ' remaining size of this structure
  165.     sectionid As Byte
  166.     Service As PString
  167.     threadid As Long
  168.     sectionname As PString
  169.     forumname As PString
  170.     count As Integer
  171.     Subject As PString
  172.     HiWatermark As Long
  173. End Type
  174.  
  175. '---------------------------------------------
  176.  
  177. Type ForumThdMsg
  178.     size As Integer
  179.     MessageID As Long
  180.     ParentID As Long
  181.     FirstChildID As Long
  182.     NextChildID As Long
  183.     numreplies As Byte
  184.     Created As TimeStamp
  185.     Received As TimeStamp
  186.     AuthorName As PString
  187.     AuthorAddr As PString
  188.     RecipName As PString
  189.     RecipAddr As PString
  190.     flags As Byte
  191.     msgsize As Integer ' String size of ForumMsgThd body
  192.     MsgText As String
  193. End Type
  194.  
  195. Type ForumMsgHeader
  196.     size As Integer
  197.     msgid As Long
  198.     parent As Long
  199.     nextsib As Long
  200.     firstchild As Long
  201.     numreplies As Byte
  202.     sectionid As Byte
  203.     sectionname As PString
  204.     servicename As PString
  205.     flags As Byte
  206.     threadid As Long
  207.     msgsize As Long
  208.     forumname As PString
  209.     msgtype As Byte
  210.     body As String ' len = msgsize
  211. End Type
  212.  
  213. Type Thread
  214.     ComHdr As CommonHeader
  215.     ComPStr As CommonPStrings
  216.     Header As ForumThdHeader
  217.     Message As ForumThdMsg
  218.     FName As String
  219.     ShortFName As String
  220. End Type
  221.  
  222. Type ENSStory
  223.     HSize As Integer
  224.     StoryNum As Long
  225.     CreDate As TimeStamp
  226.     WireID As PString
  227.     Title As PString
  228.     SSize As Long
  229.     ContSize As Long
  230.     Story As String ' Array [1-ContSize] of byte
  231. End Type
  232.  
  233.  
  234. Public gFolderList() As Folder ' List of paths & names of all folders
  235. Public gThreadList() As Thread ' List of all threads in the current folder
  236.  
  237. Public gCurFolder As Folder    ' Current folder selected
  238. Public gCurThread As Thread    ' Current thread selected
  239.  
  240. Public gNumFolders As Integer ' Number of folders in filing cabinet
  241. Public gNumThreads As Integer ' Number of threads in current folder
  242.  
  243. Public WCimDir As String
  244. Public WCimBase As String
  245.  
  246. Public gStopSearch As Integer
  247.