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.

148 lines
3.8 KiB

  1. #include "stdafx.h"
  2. #include "resource.h"
  3. #include <winfax.h>
  4. #include "FaxStrings.h"
  5. extern CComModule _Module;
  6. BSTR GetQueueStatus(DWORD QueueStatus)
  7. {
  8. LPCTSTR lpcstrQueueStatus = NULL;
  9. if (QueueStatus & JS_INPROGRESS)
  10. {
  11. lpcstrQueueStatus = IDS_JOB_INPROGRESS;
  12. }
  13. if (QueueStatus & JS_NOLINE)
  14. {
  15. lpcstrQueueStatus = IDS_JOB_NOLINE;
  16. }
  17. else if (QueueStatus & JS_DELETING)
  18. {
  19. lpcstrQueueStatus = IDS_JOB_DELETING;
  20. }
  21. else if (QueueStatus & JS_FAILED)
  22. {
  23. lpcstrQueueStatus = IDS_JOB_FAILED;
  24. }
  25. else if (QueueStatus & JS_PAUSED)
  26. {
  27. lpcstrQueueStatus = IDS_JOB_PAUSED;
  28. }
  29. if (JS_RETRYING == QueueStatus)
  30. {
  31. lpcstrQueueStatus = IDS_JOB_RETRYING;
  32. }
  33. if (JS_RETRIES_EXCEEDED == QueueStatus)
  34. {
  35. lpcstrQueueStatus = IDS_JOB_RETRIESEXCEEDED;
  36. }
  37. else if (JS_PENDING == QueueStatus)
  38. {
  39. lpcstrQueueStatus = IDS_JOB_PENDING;
  40. }
  41. else
  42. {
  43. lpcstrQueueStatus = IDS_JOB_UNKNOWN;
  44. }
  45. return SysAllocString(lpcstrQueueStatus);
  46. }
  47. BSTR GetDeviceStatus(DWORD DeviceStatus)
  48. {
  49. LPCTSTR lpcstrDeviceStatus = NULL;
  50. if (DeviceStatus == FPS_DIALING)
  51. {
  52. lpcstrDeviceStatus = IDS_DEVICE_DIALING;
  53. }
  54. else if (DeviceStatus == FPS_SENDING)
  55. {
  56. lpcstrDeviceStatus = IDS_DEVICE_SENDING;
  57. }
  58. else if (DeviceStatus == FPS_RECEIVING)
  59. {
  60. lpcstrDeviceStatus = IDS_DEVICE_RECEIVING;
  61. }
  62. else if (DeviceStatus == FPS_COMPLETED)
  63. {
  64. lpcstrDeviceStatus = IDS_DEVICE_COMPLETED;
  65. }
  66. else if (DeviceStatus == FPS_HANDLED)
  67. {
  68. lpcstrDeviceStatus = IDS_DEVICE_HANDLED;
  69. }
  70. else if (DeviceStatus == FPS_UNAVAILABLE)
  71. {
  72. lpcstrDeviceStatus = IDS_DEVICE_UNAVAILABLE;
  73. }
  74. else if (DeviceStatus == FPS_BUSY)
  75. {
  76. lpcstrDeviceStatus = IDS_DEVICE_BUSY;
  77. }
  78. else if (DeviceStatus == FPS_NO_ANSWER)
  79. {
  80. lpcstrDeviceStatus = IDS_DEVICE_NOANSWER;
  81. }
  82. else if (DeviceStatus == FPS_BAD_ADDRESS)
  83. {
  84. lpcstrDeviceStatus = IDS_DEVICE_BADADDRESS;
  85. }
  86. else if (DeviceStatus == FPS_NO_DIAL_TONE)
  87. {
  88. lpcstrDeviceStatus = IDS_DEVICE_NODIALTONE;
  89. }
  90. else if (DeviceStatus == FPS_DISCONNECTED)
  91. {
  92. lpcstrDeviceStatus = IDS_DEVICE_DISCONNECTED;
  93. }
  94. else if (DeviceStatus == FPS_FATAL_ERROR)
  95. {
  96. lpcstrDeviceStatus = IDS_DEVICE_FATALERROR;
  97. }
  98. else if (DeviceStatus == FPS_NOT_FAX_CALL)
  99. {
  100. lpcstrDeviceStatus = IDS_DEVICE_NOTFAXCALL;
  101. }
  102. else if (DeviceStatus == FPS_CALL_DELAYED)
  103. {
  104. lpcstrDeviceStatus = IDS_DEVICE_CALLDELAYED;
  105. }
  106. else if (DeviceStatus == FPS_CALL_BLACKLISTED)
  107. {
  108. lpcstrDeviceStatus = IDS_DEVICE_BLACKLISTED;
  109. }
  110. else if (DeviceStatus == FPS_INITIALIZING)
  111. {
  112. lpcstrDeviceStatus = IDS_DEVICE_INITIALIZING;
  113. }
  114. else if (DeviceStatus == FPS_OFFLINE)
  115. {
  116. lpcstrDeviceStatus = IDS_DEVICE_OFFLINE;
  117. }
  118. else if (DeviceStatus == FPS_RINGING)
  119. {
  120. lpcstrDeviceStatus = IDS_DEVICE_RINGING;
  121. }
  122. else if (DeviceStatus == FPS_AVAILABLE)
  123. {
  124. lpcstrDeviceStatus = IDS_DEVICE_AVAILABLE;
  125. }
  126. else if (DeviceStatus == FPS_ABORTING)
  127. {
  128. lpcstrDeviceStatus = IDS_DEVICE_ABORTING;
  129. }
  130. else if (DeviceStatus == FPS_ROUTING)
  131. {
  132. lpcstrDeviceStatus = IDS_DEVICE_ROUTING;
  133. }
  134. else if (DeviceStatus == FPS_ANSWERED)
  135. {
  136. lpcstrDeviceStatus = IDS_DEVICE_ANSWERED;
  137. }
  138. else
  139. {
  140. lpcstrDeviceStatus = IDS_DEVICE_UNKNOWN;
  141. }
  142. return SysAllocString(lpcstrDeviceStatus);
  143. }