home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / program / c / cookie / cookie.h next >
Text File  |  1990-12-02  |  3KB  |  120 lines

  1.  
  2. /*******************************************************************
  3. *    Module:        COOKIE.H, C-Binding for COOKIE.S
  4. *
  5. *    Abstract:    Everything you need for accessing the 
  6. *                cookie jar on Atari ST/TT computers.
  7. *
  8. *    Author:        Arnd Beissner, SciLab GmbH - Germany
  9. *                Parts of the code are derived from Atari's 
  10. *                TOS 1.06 Release Notes.
  11. *
  12. *    Compatibility:
  13. *                Any ST/TT-compatible machine, any TOS version.
  14. *
  15. *    Version:    1.00
  16. *
  17. *    Date:        03.12.1990
  18. *    
  19. *    History:    no history
  20. *
  21. ********************************************************************
  22. *    Comments:
  23. *
  24. *    Most functions in this module must be called in supervisor mode.
  25. *******************************************************************/
  26.  
  27. /*******************************************************************
  28. * CK_JarInstalled
  29. *
  30. * See if the cookie jar is installed.
  31. *
  32. * Return value:
  33. *    = pointer to the cookie jar (0 = not installed)
  34. *******************************************************************/
  35.  
  36. long *CK_JarInstalled(void);
  37.  
  38. /*******************************************************************
  39. * CK_UsedEntries
  40. *
  41. * Inquire the number of used cookie jar entries. The number includes
  42. * the null cookie, so a return value of 0 means that there is no
  43. * cookie jar at all.
  44. *
  45. * Return value:
  46. *    = number of used cookie jar entries
  47. *******************************************************************/
  48.  
  49. int CK_UsedEntries(void);
  50.         
  51. /*******************************************************************
  52. * CK_JarSize
  53. *
  54. * Inquire the total number of cookie jar entries.
  55. *
  56. * Return value:
  57. *    = total number of cookie jar entries
  58. *******************************************************************/
  59.  
  60. int CK_JarSize(void);
  61.  
  62. /*******************************************************************
  63. * CK_ResizeJar
  64. *
  65. * Resize the cookie jar to the desired size.
  66. *
  67. * Input arguments:
  68. *    size = desired cookie jar size, number of entries
  69. *
  70. * Return value:
  71. *    = state (0=FALSE, 1=TRUE)
  72. *******************************************************************/
  73.  
  74. int CK_ResizeJar(int size);
  75.  
  76. /*******************************************************************
  77. * CK_ReadJar
  78. *
  79. * Read the value of the specified cookie.
  80. *
  81. * Input arguments:
  82. *    cookie = cookie name
  83. *    value  = pointer to cookie value
  84. *
  85. * Return value:
  86. *    = state (0=FALSE, 1=TRUE)
  87. *******************************************************************/
  88.  
  89. int CK_ReadJar(long cookie, long *value);
  90.  
  91. /*******************************************************************
  92. * CK_WriteJar
  93. *
  94. * Insert a new entry into the cookie jar. If no cookie jar exists
  95. * or the current cookie jar is full, a new, bigger cookie jar is
  96. * installed. The increment in size can be set using CK_SetOptions.
  97. *
  98. * Input arguments:
  99. *    cookie = cookie name
  100. *    value  = cookie value
  101. *
  102. * Return value:
  103. *    = state (0=FALSE, 1=TRUE)
  104. *******************************************************************/
  105.  
  106. int CK_WriteJar(long cookie, long value);
  107.  
  108. /*******************************************************************
  109. * CK_SetOptions
  110. *
  111. * Set cookie jar options.
  112. *
  113. * Input arguments:
  114. *    increment = cookie jar increment when allocating a new buffer
  115. *    xbraID      = xbra id for reset handler
  116. *******************************************************************/
  117.  
  118. void CK_SetOptions(int increment, long xbraID);
  119.  
  120.