home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / psion / opp16f_zip / INCLUDE / SDK / TLVFILE.OPH < prev    next >
Encoding:
Text File  |  1995-12-21  |  3.5 KB  |  230 lines

  1. #define TLVFILE_OPH
  2.  
  3. #ifndef APPMAN_OPH
  4. #include <sdk\appman>
  5. #endif
  6.  
  7. #ifndef P_FILE_OPH
  8. #include <p\file>
  9. #endif
  10.  
  11. #ifndef P_SERIAL_OPH
  12. #include <p\serial>
  13. #endif
  14.  
  15. #ifndef P_MODEM_OPH
  16. #include <p\modem>
  17. #endif
  18.  
  19. /* Constants for bfile */
  20.  
  21. #define OP_BFILE_ID_SIZE 16
  22.  
  23. /* Types for bfile */
  24.  
  25. STRUCT OP_BFILE_FSIG
  26.     fid#(OP_BFILE_ID_SIZE)
  27.     vers%
  28.     offset%
  29.     rtvers%
  30. ENDS
  31.  
  32. /* Property of bfile */
  33.  
  34. STRUCT PRS_BFILE
  35.     pcb%
  36.     rbuf%
  37.     rlen%
  38.     offset%
  39. ENDS
  40.  
  41. STRUCT PR_BFILE
  42.     root#(SIZEOF(PRS_ROOT))
  43.     bfile#(SIZEOF(PRS_BFILE))
  44. ENDS
  45.  
  46. /* Constants for tlvfile */
  47.  
  48. #define TLV_TYPE_UNKNOWN 0x10
  49. #define TLV_TYPE_INVALID 0x0f
  50. #define TLV_TYPE_DELETED 0x00
  51. #define TLV_TYPE_NORMAL 0x01
  52. #define TLV_TYPE_FIELDS 0x02
  53. #define TLV_TYPE_SHIFT 12
  54. #define TLV_TYPE_MASK 0xf000
  55.  
  56. /* Types for tlvfile */
  57.  
  58. STRUCT OP_TLVFILE
  59.     fsig#(SIZEOF(OP_BFILE_FSIG))
  60.     types%
  61. ENDS
  62.  
  63. STRUCT OP_TLV_REC
  64.     buf%
  65.     len%
  66.     type%
  67. ENDS
  68.  
  69. /* Property of tlvfile */
  70.  
  71. STRUCT PRS_TLVFILE
  72.     typmask%
  73.     hdlen%
  74.     hdtype%
  75.     pos&
  76.     fpos&
  77. ENDS
  78.  
  79. STRUCT PR_TLVFILE
  80.     root#(SIZEOF(PRS_ROOT))
  81.     bfile#(SIZEOF(PRS_BFILE))
  82.     tlvfile#(SIZEOF(PRS_TLVFILE))
  83. ENDS
  84.  
  85. /* Types for tlvdata */
  86.  
  87. STRUCT PR_TLVDATA_CHARS
  88.     tlvfile#(SIZEOF(OP_TLVFILE))
  89.     ext#(6)
  90. ENDS
  91.  
  92. /* Property of tlvdata */
  93.  
  94. STRUCT PRS_TLVDATA
  95.     tlv%
  96.     cl_tlv%
  97.     changed%
  98.     index%
  99.     tmask%
  100.     name#(P_FNAMESIZE)
  101. ENDS
  102.  
  103. STRUCT PR_TLVDATA
  104.     root#(SIZEOF(PRS_ROOT))
  105.     tlvdata#(SIZEOF(PRS_TLVDATA))
  106. ENDS
  107.  
  108. /* Constants for serfile */
  109.  
  110. #define TE_MASK_SERIAL 0x0001
  111. #define TE_MASK_MODEM 0x0002
  112. #define TE_MASK_FILE 0x0004
  113. #define TY_SERFILE_SERIAL 1
  114. #define OBSOLETE_SERFILE_MODEM 2
  115. #define TY_SERFILE_FILE 3
  116. #define TY_SERFILE_NEW_MODEM 4
  117. #define TY_SERFILE_SERDVR 5
  118. #define TY_SERFILE_LNKDVR 6
  119. #define TE_XMDM_NONE 3
  120. #define TE_DIAL_PULSE 1
  121. #define TE_DIAL_TONE 2
  122. #define TE_MODEM_300 0x01
  123. #define TE_MODEM_1200 0x02
  124. #define TE_MODEM_2400 0x03
  125. #define TE_MODEM_4800 0x04
  126. #define TE_MODEM_9600 0x05
  127. #define TE_MODEM_19200 0x06
  128. #define MAX_DEVICE_NAME 10
  129. #define MAX_MODEM_CMD 40
  130.  
  131. /* Types for serfile */
  132.  
  133. STRUCT PF_SERIAL
  134.     ch#(SIZEOF(P_SRCHAR))
  135.     port#(P_MAXDEVNAME+2)
  136. ENDS
  137.  
  138. STRUCT PF_MODEM
  139.     mch#(SIZEOF(P_MDMCHR))
  140.     phone#(25)
  141.     auto_dial#
  142.     mdmdvr#(MAX_DEVICE_NAME)
  143.     mdmcmd#(MAX_MODEM_CMD)
  144.     spare#(16)
  145. ENDS
  146.  
  147. STRUCT PF_FILE
  148.     protocol%
  149. ENDS
  150.  
  151. STRUCT PF_SERDVR
  152.     ch#(SIZEOF(P_SRCHAR))
  153.     serdvr#(MAX_DEVICE_NAME)
  154.     spare#(16)
  155. ENDS
  156.  
  157. STRUCT PF_LNKDVR
  158.     masdvr#(MAX_DEVICE_NAME)
  159.     lnkdvr#(MAX_DEVICE_NAME)
  160.     spare#(16)
  161. ENDS
  162.  
  163. /* Property of serfile */
  164.  
  165. STRUCT PRS_SERFILE
  166.     serial#(SIZEOF(PF_SERIAL))
  167.     modem#(SIZEOF(PF_MODEM))
  168.     file#(SIZEOF(PF_FILE))
  169.     lnkdvr#(SIZEOF(PF_LNKDVR))
  170.     serdvr#(SIZEOF(PF_SERDVR))
  171. ENDS
  172.  
  173. STRUCT PR_SERFILE
  174.     root#(SIZEOF(PRS_ROOT))
  175.     tlvdata#(SIZEOF(PRS_TLVDATA))
  176.     serfile#(SIZEOF(PRS_SERFILE))
  177. ENDS
  178.  
  179. /* Constants for print */
  180.  
  181. #define PRINT_DATA 0x0
  182. #define PRINT_LINE 0x1
  183. #define PRINT_FINISH 0x8
  184.  
  185. /* Types for print */
  186.  
  187. STRUCT PRINT_STATE
  188.     buf%
  189.     len%
  190.     status%
  191. ENDS
  192.  
  193. /* Property of print */
  194.  
  195. STRUCT PRS_PRINT
  196.     state#(SIZEOF(PRINT_STATE))
  197.     crlf#(2)
  198. ENDS
  199.  
  200. STRUCT PR_PRINT
  201.     root#(SIZEOF(PRS_ROOT))
  202.     active#(SIZEOF(PRS_ACTIVE))
  203.     print#(SIZEOF(PRS_PRINT))
  204. ENDS
  205.  
  206. /* Constants for serial */
  207.  
  208. #define READ_QUEUED 0x01
  209. #define WRITE_QUEUED 0x02
  210.  
  211. /* Property of serial */
  212.  
  213. STRUCT PRS_SERIAL
  214.     flags%
  215.     rstat%
  216.     wstat%
  217.     rlen%
  218.     rbuf%
  219.     wlen%
  220.     wbuf%
  221.     rsize%
  222.     wsize%
  223. ENDS
  224.  
  225. STRUCT PR_SERIAL
  226.     root#(SIZEOF(PRS_ROOT))
  227.     active#(SIZEOF(PRS_ACTIVE))
  228.     serial#(SIZEOF(PRS_SERIAL))
  229. ENDS
  230.