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.

120 lines
3.3 KiB

  1. /////////////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1998 Active Voice Corporation. All Rights Reserved.
  4. //
  5. // Active Agent(r) and Unified Communications(tm) are trademarks of Active Voice Corporation.
  6. //
  7. // Other brand and product names used herein are trademarks of their respective owners.
  8. //
  9. // The entire program and user interface including the structure, sequence, selection,
  10. // and arrangement of the dialog, the exclusively "yes" and "no" choices represented
  11. // by "1" and "2," and each dialog message are protected by copyrights registered in
  12. // the United States and by international treaties.
  13. //
  14. // Protected by one or more of the following United States patents: 5,070,526, 5,488,650,
  15. // 5,434,906, 5,581,604, 5,533,102, 5,568,540, 5,625,676, 5,651,054.
  16. //
  17. // Active Voice Corporation
  18. // Seattle, Washington
  19. // USA
  20. //
  21. /////////////////////////////////////////////////////////////////////////////////////////
  22. ////
  23. // queue.h - interface for queue functions in queue.c
  24. ////
  25. #ifndef __QUEUE_H__
  26. #define __QUEUE_H__
  27. #include "winlocal.h"
  28. #define QUEUE_VERSION 0x00000100
  29. // handle to a queue
  30. //
  31. DECLARE_HANDLE32(HQUEUE);
  32. // queue data element
  33. //
  34. typedef LPVOID QUEUEELEM;
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif
  38. ////
  39. // queue constructor and destructor functions
  40. ////
  41. // QueueCreate - queue constructor
  42. // <dwVersion> (i) must be QUEUE_VERSION
  43. // <hInst> (i) instance handle of calling module
  44. // return new queue handle (NULL if error)
  45. //
  46. HQUEUE DLLEXPORT WINAPI QueueCreate(DWORD dwVersion, HINSTANCE hInst);
  47. // QueueDestroy - queue destructor
  48. // <hQueue> (i) handle returned from QueueCreate
  49. // return 0 if success
  50. //
  51. int DLLEXPORT WINAPI QueueDestroy(HQUEUE hQueue);
  52. ////
  53. // queue status functions
  54. ////
  55. // QueueGetCount - return count of nodes in queue
  56. // <hQueue> (i) handle returned from QueueCreate
  57. // return node count (-1 if error)
  58. //
  59. long DLLEXPORT WINAPI QueueGetCount(HQUEUE hQueue);
  60. // QueueIsEmpty - return TRUE if queue has no nodes
  61. // <hQueue> (i) handle returned from QueueCreate
  62. // return TRUE or FALSE
  63. //
  64. BOOL DLLEXPORT WINAPI QueueIsEmpty(HQUEUE hQueue);
  65. ////
  66. // queue element insertion functions
  67. ////
  68. // QueueAddTail - add new node with data <elem> to end of queue
  69. // <hQueue> (i) handle returned from QueueCreate
  70. // <elem> (i) new data element
  71. // returns 0 if success
  72. //
  73. int DLLEXPORT WINAPI QueueAddTail(HQUEUE hQueue, QUEUEELEM elem);
  74. ////
  75. // queue element removal functions
  76. ////
  77. // QueueRemoveHead - remove node from head of queue
  78. // <hQueue> (i) handle returned from QueueCreate
  79. // returns removed data element (NULL of error or empty)
  80. //
  81. QUEUEELEM DLLEXPORT WINAPI QueueRemoveHead(HQUEUE hQueue);
  82. // QueueRemoveAll - remove all nodes from queue
  83. // <hQueue> (i) handle returned from QueueCreate
  84. // return 0 if success
  85. //
  86. int DLLEXPORT WINAPI QueueRemoveAll(HQUEUE hQueue);
  87. ////
  88. // queue element get value functions
  89. ////
  90. // QueuePeek - return node from head of queue, but leave it on queue
  91. // <hQueue> (i) handle returned from QueueCreate
  92. // returns data element (NULL if error or empty)
  93. //
  94. QUEUEELEM DLLEXPORT WINAPI QueuePeek(HQUEUE hQueue);
  95. #ifdef __cplusplus
  96. }
  97. #endif
  98. #endif // __QUEUE_H__