Functions using EAP_ERROR descriptor return bool now for code simplicity

This commit is contained in:
2016-06-15 22:59:52 +02:00
parent 03358170f4
commit ec0b283540
27 changed files with 686 additions and 515 deletions

View File

@@ -131,10 +131,10 @@ namespace eap {
/// \param[out] ppEapError Pointer to error descriptor in case of failure. Free using `module::free_error_memory()`.
///
/// \returns
/// - \c ERROR_SUCCESS if succeeded
/// - error code otherwise
/// - \c true if succeeded
/// - \c false otherwise. See \p ppEapError for details.
///
virtual DWORD save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError) const;
virtual bool save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError) const;
///
/// Load configuration from XML document
@@ -143,10 +143,10 @@ namespace eap {
/// \param[out] ppEapError Pointer to error descriptor in case of failure. Free using `module::free_error_memory()`.
///
/// \returns
/// - \c ERROR_SUCCESS if succeeded
/// - error code otherwise
/// - \c true if succeeded
/// - \c false otherwise. See \p ppEapError for details.
///
virtual DWORD load(_In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError);
virtual bool load(_In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError);
/// @}

View File

@@ -132,10 +132,10 @@ namespace eap
/// \param[out] ppEapError Pointer to error descriptor in case of failure. Free using `module::free_error_memory()`.
///
/// \returns
/// - \c ERROR_SUCCESS if succeeded
/// - error code otherwise
/// - \c true if succeeded
/// - \c false otherwise. See \p ppEapError for details.
///
virtual DWORD save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError) const;
virtual bool save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError) const;
///
/// Load credentials from XML document
@@ -144,10 +144,10 @@ namespace eap
/// \param[out] ppEapError Pointer to error descriptor in case of failure. Free using `module::free_error_memory()`.
///
/// \returns
/// - \c ERROR_SUCCESS if succeeded
/// - error code otherwise
/// - \c true if succeeded
/// - \c false otherwise. See \p ppEapError for details.
///
virtual DWORD load(_In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError);
virtual bool load(_In_ IXMLDOMNode *pConfigRoot, _Out_ EAP_ERROR **ppEapError);
/// @}
@@ -161,10 +161,10 @@ namespace eap
/// \param[out] ppEapError Pointer to error descriptor in case of failure. Free using `module::free_error_memory()`.
///
/// \returns
/// - \c ERROR_SUCCESS if succeeded
/// - error code otherwise
/// - \c true if succeeded
/// - \c false otherwise. See \p ppEapError for details.
///
virtual DWORD store(_In_ LPCTSTR pszTargetName, _Out_ EAP_ERROR **ppEapError) const;
virtual bool store(_In_ LPCTSTR pszTargetName, _Out_ EAP_ERROR **ppEapError) const;
///
/// Retrieve credentials from Windows Credential Manager
@@ -173,10 +173,10 @@ namespace eap
/// \param[out] ppEapError Pointer to error descriptor in case of failure. Free using `module::free_error_memory()`.
///
/// \returns
/// - \c ERROR_SUCCESS if succeeded
/// - error code otherwise
/// - \c true if succeeded
/// - \c false otherwise. See \p ppEapError for details.
///
virtual DWORD retrieve(_In_ LPCTSTR pszTargetName, _Out_ EAP_ERROR **ppEapError);
virtual bool retrieve(_In_ LPCTSTR pszTargetName, _Out_ EAP_ERROR **ppEapError);
/// @}

View File

@@ -48,21 +48,33 @@ namespace eap
///
/// \sa [EapPeerGetInfo function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa363613.aspx)
///
virtual DWORD initialize(_Out_ EAP_ERROR **ppEapError);
/// \returns
/// - \c true if succeeded
/// - \c false otherwise. See \p ppEapError for details.
///
virtual bool initialize(_Out_ EAP_ERROR **ppEapError);
///
/// Shuts down the EAP method and prepares to unload its corresponding DLL.
///
/// \sa [EapPeerShutdown function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa363627.aspx)
///
virtual DWORD shutdown(_Out_ EAP_ERROR **ppEapError);
/// \returns
/// - \c true if succeeded
/// - \c false otherwise. See \p ppEapError for details.
///
virtual bool shutdown(_Out_ EAP_ERROR **ppEapError);
///
/// Returns the user data and user identity after being called by EAPHost.
///
/// \sa [EapPeerGetIdentity function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa363607.aspx)
///
virtual DWORD get_identity(
/// \returns
/// - \c true if succeeded
/// - \c false otherwise. See \p ppEapError for details.
///
virtual bool get_identity(
_In_ DWORD dwFlags,
_In_ DWORD dwConnectionDataSize,
_In_count_(dwConnectionDataSize) const BYTE *pConnectionData,
@@ -80,7 +92,11 @@ namespace eap
///
/// \sa [EapPeerGetMethodProperties function](https://msdn.microsoft.com/en-us/library/windows/desktop/hh706636.aspx)
///
virtual DWORD get_method_properties(
/// \returns
/// - \c true if succeeded
/// - \c false otherwise. See \p ppEapError for details.
///
virtual bool get_method_properties(
_In_ DWORD dwVersion,
_In_ DWORD dwFlags,
_In_ HANDLE hUserImpersonationToken,

View File

@@ -39,6 +39,40 @@ namespace eap
///
/// Constructor
///
session_ttls();
/// \param[in] mod Reference of the EAP module to use for global services
///
session_ttls(_In_ module &mod);
///
/// Copies TTLS session
///
/// \param[in] other Session to copy from
///
session_ttls(_In_ const session_ttls &other);
///
/// Moves TTLS session
///
/// \param[in] other Session to move from
///
session_ttls(_Inout_ session_ttls &&other);
///
/// Copies TTLS session
///
/// \param[in] other Session to copy from
///
/// \returns Reference to this object
///
session_ttls& operator=(_In_ const session_ttls &other);
///
/// Moves TTLS session
///
/// \param[in] other Session to move from
///
/// \returns Reference to this object
///
session_ttls& operator=(_Inout_ session_ttls &&other);
};
}