v4.2 Methods changed to take _TCHARs
| 83 | |
| 84 | // v4.2 Methods changed to take _TCHARs |
| 85 | class CUT_AccessControl |
| 86 | { |
| 87 | public: |
| 88 | // Constructors/Destructor |
| 89 | CUT_AccessControl(); |
| 90 | virtual ~CUT_AccessControl(); |
| 91 | |
| 92 | // Checks if specified IP address is allowed to connect |
| 93 | virtual BOOL IsAddressAllowed(in_addr &ipAddress); |
| 94 | // v4.2 split this into char and wide char |
| 95 | virtual BOOL IsAddressAllowed(LPCSTR lpszAddress); |
| 96 | #if defined _UNICODE |
| 97 | virtual BOOL IsAddressAllowed(LPCWSTR lpszAddress); |
| 98 | #endif |
| 99 | |
| 100 | // Add address or addresses range to the allowed/blocked lists |
| 101 | virtual void AddAddress(enumAccessType Type, in_addr &ipStartAddress, in_addr *ipEndAddress = NULL); |
| 102 | // v4.2 split this into char and wide char |
| 103 | virtual void AddAddress(enumAccessType Type, LPCSTR lpszStartAddress, LPCSTR lpszEndAddress = NULL); |
| 104 | #if defined _UNICODE |
| 105 | virtual void AddAddress(enumAccessType Type, LPCWSTR lpszStartAddress, LPCWSTR lpszEndAddress = NULL); |
| 106 | #endif |
| 107 | // Get address or addresses range from the allowed/blocked list by index |
| 108 | virtual BOOL GetAddress(enumAccessType Type, long lIndex, in_addr &ipStartAddress, in_addr &ipEndAddress); |
| 109 | // Get the allowed/blocked/temp.blocked list size |
| 110 | virtual long GetAddressListSize(enumAccessType Type); |
| 111 | // Delete address or addresses range from the allowed/blocked/temp.blocked list by index |
| 112 | virtual BOOL DeleteAddress(enumAccessType Type, long lIndex); |
| 113 | // Clear all addresses from the allowed/blocked/temp.blocked list |
| 114 | virtual void ClearAll(enumAccessType Type); |
| 115 | |
| 116 | |
| 117 | // Add address to the temporary blocked list |
| 118 | virtual void AddTempBlockedAddress(in_addr &ipAddress); |
| 119 | // v4.2 split this into char and wide char |
| 120 | virtual void AddTempBlockedAddress(LPCSTR lpszAddress); |
| 121 | #if defined _UNICODE |
| 122 | virtual void AddTempBlockedAddress(LPCWSTR lpszAddress); |
| 123 | #endif |
| 124 | // Get address from the temp.blocked list by index |
| 125 | virtual BOOL GetTempBlockedAddress(long lIndex, in_addr &ipAddress, long &lBlockCounter, time_t &ExpiryTime); |
| 126 | // Delete address from the temporary blocked list |
| 127 | virtual BOOL DeleteTempBlockedAddress(in_addr &ipAddress); |
| 128 | // v4.2 split this into char and wide char |
| 129 | virtual BOOL DeleteTempBlockedAddress(LPCSTR lpszAddress); |
| 130 | #if defined _UNICODE |
| 131 | virtual BOOL DeleteTempBlockedAddress(LPCWSTR lpszAddress); |
| 132 | #endif |
| 133 | |
| 134 | // Convert IP address string to the IP adress structure |
| 135 | // v4.2 split this into char and wide char |
| 136 | virtual in_addr StringToIP(LPCSTR lpszAddress); |
| 137 | #if defined _UNICODE |
| 138 | virtual in_addr StringToIP(LPCWSTR lpszAddress); |
| 139 | #endif |
| 140 | // Convert IP address structure to the IP adress string |
| 141 | virtual char *IPToString(in_addr &ipAddress); |
| 142 |
nothing calls this directly
no outgoing calls
no test coverage detected