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.

93 lines
1.6 KiB

  1. #ifndef __VUART_H__
  2. #define __VUART_H__
  3. #include <af_irda.h>
  4. #include <irdatdi.h>
  5. #include <tdiobj.h>
  6. typedef PVOID IRDA_HANDLE;
  7. typedef NTSTATUS (*RECEIVE_CALLBACK)(
  8. PVOID Context,
  9. PUCHAR Buffer,
  10. ULONG BytesAvailible,
  11. PULONG BytesUsed
  12. );
  13. typedef VOID (*EVENT_CALLBACK)(
  14. PVOID Context,
  15. ULONG Event
  16. );
  17. //
  18. // irda connection functions
  19. //
  20. NTSTATUS
  21. IrdaConnect(
  22. TDI_OBJECT_HANDLE TdiObjectHandle,
  23. ULONG DeviceAddress,
  24. CHAR *ServiceName,
  25. BOOLEAN OutGoingConnection,
  26. IRDA_HANDLE *ConnectionHandle,
  27. RECEIVE_CALLBACK ReceiveCallBack,
  28. EVENT_CALLBACK EventCallBack,
  29. PVOID CallbackContext
  30. );
  31. VOID
  32. FreeConnection(
  33. IRDA_HANDLE Handle
  34. );
  35. typedef VOID (*CONNECTION_CALLBACK)(
  36. PVOID Context,
  37. PIRP Irp
  38. );
  39. VOID
  40. SendOnConnection(
  41. IRDA_HANDLE Handle,
  42. PIRP Irp,
  43. CONNECTION_CALLBACK Callback,
  44. PVOID Context,
  45. ULONG Timeout
  46. );
  47. VOID
  48. AbortSend(
  49. IRDA_HANDLE Handle
  50. );
  51. VOID
  52. AccessUartState(
  53. IRDA_HANDLE Handle,
  54. PIRP Irp,
  55. CONNECTION_CALLBACK Callback,
  56. PVOID Context
  57. );
  58. NTSTATUS
  59. QueueControlInfo(
  60. IRDA_HANDLE Handle,
  61. UCHAR PI,
  62. UCHAR PL,
  63. PUCHAR PV
  64. );
  65. NTSTATUS
  66. IndicateReceiveBufferSpaceAvailible(
  67. IRDA_HANDLE Handle
  68. );
  69. #endif