Source code of Windows XP (NT5)
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.

182 lines
3.3 KiB

  1. /*
  2. File devicedb.h
  3. Definition of the device database for the ras dialup server.
  4. Paul Mayfield, 10/2/97
  5. */
  6. #ifndef __rassrvui_devicedb_h
  7. #define __rassrvui_devicedb_h
  8. #include <windows.h>
  9. // ===================================
  10. // Types of incoming connections
  11. // ===================================
  12. #define INCOMING_TYPE_PHONE 0
  13. #define INCOMING_TYPE_DIRECT 1
  14. #define INCOMING_TYPE_VPN 4
  15. #define INCOMING_TYPE_ISDN 8
  16. // =====================================
  17. // Device database functions
  18. // =====================================
  19. //
  20. // Opens a handle to the database of devices
  21. //
  22. DWORD
  23. devOpenDatabase(
  24. OUT HANDLE * hDevDatabase);
  25. //
  26. // Closes the general database and flushes any changes
  27. // to the system when bFlush is TRUE
  28. //
  29. DWORD
  30. devCloseDatabase(
  31. IN HANDLE hDevDatabase);
  32. //
  33. // Commits any changes made to the general tab values
  34. //
  35. DWORD
  36. devFlushDatabase(
  37. IN HANDLE hDevDatabase);
  38. //
  39. // Rollsback any changes made to the general tab values
  40. //
  41. DWORD
  42. devRollbackDatabase(
  43. IN HANDLE hDevDatabase);
  44. //
  45. // Reloads any values for the general tab from disk
  46. //
  47. DWORD
  48. devReloadDatabase(
  49. IN HANDLE hDevDatabase);
  50. //
  51. // Adds all com ports as devices. If a com port gets
  52. // enabled (devSetDeviceEnable), then it will have a
  53. // null modem installed over it.
  54. //
  55. DWORD
  56. devAddComPorts(
  57. IN HANDLE hDevDatabase);
  58. //
  59. // Filters out all devices in the database except those that
  60. // meet the given type description (can be ||'d).
  61. //
  62. DWORD
  63. devFilterDevices(
  64. IN HANDLE hDevDatabase,
  65. IN DWORD dwType);
  66. //
  67. // Gets a handle to a device to be displayed in the general tab
  68. //
  69. DWORD
  70. devGetDeviceHandle(
  71. IN HANDLE hDevDatabase,
  72. IN DWORD dwIndex,
  73. OUT HANDLE * hDevice);
  74. //
  75. // Returns a count of devices to be displayed in the general tab
  76. //
  77. DWORD
  78. devGetDeviceCount(
  79. IN HANDLE hDevDatabase,
  80. OUT LPDWORD lpdwCount);
  81. //
  82. // Loads the vpn enable status
  83. //
  84. DWORD
  85. devGetVpnEnable(
  86. IN HANDLE hDevDatabase,
  87. OUT BOOL * pbEnabled);
  88. //
  89. // Saves the vpn enable status
  90. //
  91. DWORD
  92. devSetVpnEnable(
  93. IN HANDLE hDevDatabase,
  94. IN BOOL bEnable);
  95. // Saves the vpn Original value enable status
  96. //
  97. DWORD
  98. devSetVpnOrigEnable(
  99. IN HANDLE hDevDatabase,
  100. IN BOOL bEnable);
  101. //
  102. // Returns the count of enabled endpoints accross all devices
  103. //
  104. DWORD
  105. devGetEndpointEnableCount(
  106. IN HANDLE hDevDatabase,
  107. OUT LPDWORD lpdwCount);
  108. //
  109. // Returns a pointer to the name of a device
  110. //
  111. DWORD
  112. devGetDeviceName(
  113. IN HANDLE hDevice,
  114. OUT PWCHAR * pszDeviceName);
  115. //
  116. // Returns the type of a device
  117. //
  118. DWORD
  119. devGetDeviceType(
  120. IN HANDLE hDevice,
  121. OUT LPDWORD lpdwType);
  122. //
  123. // Returns an identifier of the device that can be used in conjunction
  124. // with tapi calls.
  125. //
  126. DWORD
  127. devGetDeviceId(
  128. IN HANDLE hDevice,
  129. OUT LPDWORD lpdwId);
  130. //
  131. // Returns the enable status of a device for dialin
  132. //
  133. DWORD
  134. devGetDeviceEnable(
  135. IN HANDLE hDevice,
  136. OUT BOOL * pbEnabled);
  137. //
  138. // Sets the enable status of a device for dialin
  139. //
  140. DWORD
  141. devSetDeviceEnable(
  142. IN HANDLE hDevice,
  143. IN BOOL bEnable);
  144. //
  145. // Returns whether the given device is a com port as added
  146. // by devAddComPorts
  147. //
  148. DWORD
  149. devDeviceIsComPort(
  150. IN HANDLE hDevice,
  151. OUT PBOOL pbIsComPort);
  152. BOOL
  153. devIsVpnEnableChanged(
  154. IN HANDLE hDevDatabase) ;
  155. #endif