home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / winbase / winnt / pop3 / pop3.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-10-05  |  2.6 KB  |  94 lines

  1.  
  2. /******************************************************************************\
  3. *       This is a part of the Microsoft Source Code Samples.
  4. *       Copyright (C) 1992-1997 Microsoft Corporation.
  5. *       All rights reserved. 
  6. *       This source code is only intended as a supplement to 
  7. *       Microsoft Development Tools and/or WinHelp documentation.
  8. *       See these sources for detailed information regarding the 
  9. *       Microsoft samples programs.
  10. \******************************************************************************/
  11.  
  12. //+---------------------------------------------------------------------------
  13. //
  14. //  File:       pop3.h
  15. //
  16. //  Contents:
  17. //
  18. //  Classes:
  19. //
  20. //  Functions:
  21. //
  22. //----------------------------------------------------------------------------
  23.  
  24. #ifndef __POP3_H__
  25. #define __POP3_H__
  26.  
  27.  
  28. ////////////////////////////////////////////////////////////////////////////
  29. //
  30. //
  31. //  Strings for the protocol:
  32. //
  33. //
  34. ////////////////////////////////////////////////////////////////////////////
  35.  
  36. #define POP3_GOOD_RESPONSE  "+OK"
  37. #define POP3_BAD_RESPONSE   "-ERR"
  38.  
  39. #define POP3_SUCCESS(psz)   (*((char *)psz) == '+')
  40. #define POP3_FAILURE(psz)   (*((char *)psz) == '-')
  41.  
  42. #define POP3_CONTINUE_RESPONSE  "+CONT"
  43.  
  44.  
  45. #define POP3_HELO           "HELO"
  46. #define POP3_USER           "USER"
  47. #define POP3_PASS           "PASS"
  48. #define POP3_QUIT           "QUIT"
  49. #define POP3_STAT           "STAT"
  50. #define POP3_LIST           "LIST"
  51. #define POP3_RETR           "RETR"
  52. #define POP3_DELE           "DELE"
  53. #define POP3_NOOP           "NOOP"
  54. #define POP3_LAST           "LAST"
  55. #define POP3_RSET           "RSET"
  56.  
  57. #define POP3_EHLO           "EHLO"
  58. #define POP3_AUTH           "AUTH"
  59.  
  60. #define POP3_HELO_ARG       ""
  61. #define POP3_USER_ARG       "%s"
  62. #define POP3_PASS_ARG       "%s"
  63. #define POP3_QUIT_ARG       ""
  64. #define POP3_STAT_ARG       ""
  65. #define POP3_LIST_ARG       "%d"
  66. #define POP3_RETR_ARG       "%d"
  67. #define POP3_DELE_ARG       "%d"
  68. #define POP3_NOOP_ARG       ""
  69. #define POP3_LAST_ARG       ""
  70. #define POP3_RSET_ARG       ""
  71.  
  72. #define POP3_EHLO_ARG       ""
  73. #define POP3_AUTH_ARG       "%d"
  74.  
  75. #define POP3_HELO_ID        0
  76. #define POP3_USER_ID        1
  77. #define POP3_PASS_ID        2
  78. #define POP3_QUIT_ID        3
  79. #define POP3_STAT_ID        4
  80. #define POP3_LIST_ID        5
  81. #define POP3_RETR_ID        6
  82. #define POP3_DELE_ID        7
  83. #define POP3_NOOP_ID        8
  84. #define POP3_LAST_ID        9
  85. #define POP3_RSET_ID        10
  86.  
  87. #define POP3_EHLO_ID        11
  88. #define POP3_AUTH_ID        12
  89.  
  90. #define MAX_POP3_COMMAND    11
  91. #define POP3_COMMAND_LENGTH 5       // 4 chars and a space
  92.  
  93. #endif
  94.