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.

142 lines
3.7 KiB

  1. /*++
  2. 1998 Seagate Software, Inc. All rights reserved.
  3. Module Name:
  4. FsaTrace.cpp
  5. Abstract:
  6. These functions are used to provide an ability to trace the flow
  7. of the application for FSA debugging purposes.
  8. Author:
  9. Cat Brant [cbrant] 7-Dec-1996
  10. Revision History:
  11. --*/
  12. #include "stdafx.h"
  13. #include "stdio.h"
  14. #include "fsa.h"
  15. const OLECHAR*
  16. FsaRequestActionAsString(
  17. FSA_REQUEST_ACTION requestAction
  18. )
  19. /*++
  20. Routine Description:
  21. This routine provides a string repesentation (e.g. FSA_REQUSEST_ACTION_MIGRATE) for
  22. the value of the request action supplied.
  23. NOTE: This method does not support localization of the strings.
  24. Arguments:
  25. requestAction - An FSA_REQUEST_ACTION value.
  26. Return Value:
  27. A string representation of the value of the request action.
  28. --*/
  29. {
  30. static OLECHAR returnString[60];
  31. switch (requestAction) {
  32. case FSA_REQUEST_ACTION_DELETE:
  33. swprintf(returnString, OLESTR("FSA_REQUEST_ACTION_DELETE"));
  34. break;
  35. case FSA_REQUEST_ACTION_FILTER_RECALL:
  36. swprintf(returnString, OLESTR("FSA_REQUEST_ACTION_FIILTER_RECALL"));
  37. break;
  38. case FSA_REQUEST_ACTION_PREMIGRATE:
  39. swprintf(returnString, OLESTR("FSA_REQUEST_ACTION_PREMIGRATE"));
  40. break;
  41. case FSA_REQUEST_ACTION_RECALL:
  42. swprintf(returnString, OLESTR("FSA_REQUEST_ACTION_RECALL"));
  43. break;
  44. case FSA_REQUEST_ACTION_VALIDATE:
  45. swprintf(returnString, OLESTR("FSA_REQUEST_ACTION_VALIDATE"));
  46. break;
  47. default:
  48. swprintf(returnString, OLESTR("UNKNOWN FSA_REQUEST_ACTION_?????"));
  49. break;
  50. }
  51. return(returnString);
  52. }
  53. const OLECHAR*
  54. FsaResultActionAsString(
  55. FSA_RESULT_ACTION resultAction
  56. )
  57. /*++
  58. Routine Description:
  59. This routine provides a string repesentation (e.g. FSA_RESULT_ACTION_TRUNCATE) for
  60. the value of the result action supplied.
  61. NOTE: This method does not support localization of the strings.
  62. Arguments:
  63. resultAction - An FSA_RESULT_ACTION value.
  64. Return Value:
  65. A string representation of the value of the result action.
  66. --*/
  67. {
  68. static OLECHAR returnString[60];
  69. switch (resultAction) {
  70. case FSA_RESULT_ACTION_DELETE:
  71. swprintf(returnString, OLESTR("FSA_RESULT_ACTION_DELETE"));
  72. break;
  73. case FSA_RESULT_ACTION_DELETEPLACEHOLDER:
  74. swprintf(returnString, OLESTR("FSA_RESULT_ACTION_DELETEPLACEHOLDER"));
  75. break;
  76. case FSA_RESULT_ACTION_LIST:
  77. swprintf(returnString, OLESTR("FSA_RESULT_ACTION_LIST"));
  78. break;
  79. case FSA_RESULT_ACTION_OPEN:
  80. swprintf(returnString, OLESTR("FSA_RESULT_ACTION_OPEN"));
  81. break;
  82. case FSA_RESULT_ACTION_PEEK:
  83. swprintf(returnString, OLESTR("FSA_RESULT_ACTION_PEEK"));
  84. break;
  85. case FSA_RESULT_ACTION_REPARSE:
  86. swprintf(returnString, OLESTR("FSA_RESULT_ACTION_REPARSE"));
  87. break;
  88. case FSA_RESULT_ACTION_TRUNCATE:
  89. swprintf(returnString, OLESTR("FSA_RESULT_ACTION_TRUNCATE"));
  90. break;
  91. case FSA_RESULT_ACTION_REWRITEPLACEHOLDER:
  92. swprintf(returnString, OLESTR("FSA_RESULT_ACTION_REWRITEPLACEHOLDER"));
  93. break;
  94. case FSA_RESULT_ACTION_RECALLEDDATA:
  95. swprintf(returnString, OLESTR("FSA_RESULT_ACTION_RECALLEDDATA"));
  96. break;
  97. case FSA_RESULT_ACTION_NONE:
  98. swprintf(returnString, OLESTR("FSA_RESULT_ACTION_NONE"));
  99. break;
  100. default:
  101. swprintf(returnString, OLESTR("UNKNOWN FSA_RESULT_ACTION_?????"));
  102. break;
  103. }
  104. return(returnString);
  105. }