Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

137 lines
6.2 KiB

  1. /****************************************************************************/
  2. // ascint.h
  3. //
  4. // Share Controller Internal Header File.
  5. //
  6. // Copyright (C) Microsoft, PictureTel 1992-1996
  7. // Copyright (C) 1997-2000 Microsoft Corporation
  8. /****************************************************************************/
  9. #ifndef _H_ASCINT
  10. #define _H_ASCINT
  11. /****************************************************************************/
  12. /* Constants for calling PartyJoiningShare and PartyLeftShare functions. */
  13. /****************************************************************************/
  14. #define SC_CPC 0
  15. #define SC_IM 1
  16. #define SC_CA 2
  17. #define SC_CM 3
  18. #define SC_OE 4
  19. #define SC_SBC 5
  20. #define SC_SSI 6
  21. #define SC_USR 7
  22. #define SC_DCS 8
  23. #define SC_SC 9
  24. #define SC_UP 10
  25. #define SC_PM 11
  26. #define SC_NUM_PARTY_JOINING_FCTS 12
  27. /****************************************************************************/
  28. /* Events for the SC state table. */
  29. /****************************************************************************/
  30. /****************************************************************************/
  31. /* Real events */
  32. /****************************************************************************/
  33. #define SCE_INIT 0
  34. #define SCE_TERM 1
  35. #define SCE_CREATE_SHARE 2
  36. #define SCE_END_SHARE 3
  37. #define SCE_CONFIRM_ACTIVE 4
  38. #define SCE_DETACH_USER 5
  39. /****************************************************************************/
  40. /* Dummy events to allow state checking on function calls */
  41. /****************************************************************************/
  42. #define SCE_INITIATESYNC 6
  43. #define SCE_CONTROLPACKET 7
  44. #define SCE_DATAPACKET 8
  45. #define SCE_GETMYNETWORKPERSONID 9
  46. #define SCE_GETREMOTEPERSONDETAILS 10
  47. #define SCE_GETLOCALPERSONDETAILS 11
  48. #define SCE_PERIODIC 12
  49. #define SCE_LOCALIDTONETWORKID 13
  50. #define SCE_NETWORKIDTOLOCALID 14
  51. #define SCE_ISLOCALPERSONID 15
  52. #define SCE_ISNETWORKPERSONID 16
  53. #define SC_NUM_EVENTS 17
  54. /****************************************************************************/
  55. /* States for the SC state table. */
  56. /****************************************************************************/
  57. #define SCS_STARTED 0
  58. #define SCS_INITED 1
  59. #define SCS_SHARE_STARTING 2
  60. #define SCS_IN_SHARE 3
  61. #define SC_NUM_STATES 4
  62. /****************************************************************************/
  63. /* Values in the state table */
  64. /****************************************************************************/
  65. #define SC_TABLE_OK 0
  66. #define SC_TABLE_WARN 1
  67. #define SC_TABLE_ERROR 2
  68. /****************************************************************************/
  69. /* SC_SET_STATE - set the SLCstate */
  70. /****************************************************************************/
  71. #define SC_SET_STATE(newstate) \
  72. { \
  73. TRC_NRM((TB, "Set state from %s to %s", \
  74. scStateName[scState], scStateName[newstate])); \
  75. scState = newstate; \
  76. }
  77. /****************************************************************************/
  78. /* SC_CHECK_STATE checks whether we have violated the SC state table. */
  79. /****************************************************************************/
  80. #ifdef DC_DEBUG
  81. #define SC_CHECK_STATE(event) \
  82. { \
  83. if (scStateTable[event][scState] != SC_TABLE_OK) \
  84. { \
  85. if (scStateTable[event][scState] == SC_TABLE_WARN) \
  86. { \
  87. TRC_ALT((TB, "Unusual event %s in state %s", \
  88. scEventName[event], scStateName[scState])); \
  89. } \
  90. else \
  91. { \
  92. TRC_ABORT((TB, "Invalid event %s in state %s", \
  93. scEventName[event], scStateName[scState])); \
  94. } \
  95. DC_QUIT; \
  96. } \
  97. }
  98. #else /* DC_DEBUG */
  99. #define SC_CHECK_STATE(event) \
  100. { \
  101. if (scStateTable[event][scState] != SC_TABLE_OK) \
  102. { \
  103. DC_QUIT; \
  104. } \
  105. }
  106. #endif /* DC_DEBUG */
  107. /****************************************************************************/
  108. /* Information kept for each person in the share. */
  109. /****************************************************************************/
  110. typedef struct tagSC_PARTY_INFO
  111. {
  112. NETPERSONID netPersonID; /* Is non-zero when in a share. */
  113. char name[MAX_NAME_LEN]; /* Party's name. */
  114. BOOLEAN sync[PROT_PRIO_COUNT]; /* Is priority synchronized? */
  115. } SC_PARTY_INFO, *PSC_PARTY_INFO;
  116. #endif /* _H_ASCINT */