diff --git a/lib/EAPBase_UI/include/Module.h b/lib/EAPBase_UI/include/Module.h index ccc7b80..eb6bc45 100644 --- a/lib/EAPBase_UI/include/Module.h +++ b/lib/EAPBase_UI/include/Module.h @@ -63,7 +63,7 @@ namespace eap _In_ DWORD dwFlags, _In_ IXMLDOMNode *pConfigRoot, _Out_ BYTE **pConnectionDataOut, - _Out_ DWORD *pdwConnectionDataOutSize) = 0; + _Out_ DWORD *pdwConnectionDataOutSize); /// /// Converts the configuration BLOB to XML. @@ -83,7 +83,7 @@ namespace eap _In_count_(dwConnectionDataSize) const BYTE *pConnectionData, _In_ DWORD dwConnectionDataSize, _In_ IXMLDOMDocument *pDoc, - _In_ IXMLDOMNode *pConfigRoot) = 0; + _In_ IXMLDOMNode *pConfigRoot); /// /// Raises the EAP method's specific connection configuration user interface dialog on the client. diff --git a/lib/EAPBase_UI/src/Module.cpp b/lib/EAPBase_UI/src/Module.cpp index 595e39d..c60fdbc 100644 --- a/lib/EAPBase_UI/src/Module.cpp +++ b/lib/EAPBase_UI/src/Module.cpp @@ -32,6 +32,42 @@ eap::peer_ui::peer_ui(_In_ eap_type_t eap_method) : module(eap_method) } +void eap::peer_ui::config_xml2blob( + _In_ DWORD dwFlags, + _In_ IXMLDOMNode *pConfigRoot, + _Out_ BYTE **pConnectionDataOut, + _Out_ DWORD *pdwConnectionDataOutSize) +{ + UNREFERENCED_PARAMETER(dwFlags); + + // Load configuration from XML. + config_connection cfg(*this); + cfg.load(pConfigRoot); + + // Pack configuration. + pack(cfg, pConnectionDataOut, pdwConnectionDataOutSize); +} + + +void eap::peer_ui::config_blob2xml( + _In_ DWORD dwFlags, + _In_count_(dwConnectionDataSize) const BYTE *pConnectionData, + _In_ DWORD dwConnectionDataSize, + _In_ IXMLDOMDocument *pDoc, + _In_ IXMLDOMNode *pConfigRoot) +{ + UNREFERENCED_PARAMETER(dwFlags); + + // Unpack configuration. + config_connection cfg(*this); + if (dwConnectionDataSize) + unpack(cfg, pConnectionData, dwConnectionDataSize); + + // Save configuration to XML. + cfg.save(pDoc, pConfigRoot); +} + + ////////////////////////////////////////////////////////////////////// // eap::monitor_ui ////////////////////////////////////////////////////////////////////// diff --git a/lib/TTLS_UI/include/Module.h b/lib/TTLS_UI/include/Module.h index 5b4bba9..a793550 100644 --- a/lib/TTLS_UI/include/Module.h +++ b/lib/TTLS_UI/include/Module.h @@ -52,19 +52,6 @@ namespace eap /// virtual config_method* make_config_method(); - virtual void config_xml2blob( - _In_ DWORD dwFlags, - _In_ IXMLDOMNode *pConfigRoot, - _Out_ BYTE **pConnectionDataOut, - _Out_ DWORD *pdwConnectionDataOutSize); - - virtual void config_blob2xml( - _In_ DWORD dwFlags, - _In_count_(dwConnectionDataSize) const BYTE *pConnectionData, - _In_ DWORD dwConnectionDataSize, - _In_ IXMLDOMDocument *pDoc, - _In_ IXMLDOMNode *pConfigRoot); - virtual void invoke_config_ui( _In_ HWND hwndParent, _In_count_(dwConnectionDataInSize) const BYTE *pConnectionDataIn, diff --git a/lib/TTLS_UI/src/Module.cpp b/lib/TTLS_UI/src/Module.cpp index 3149408..ffae5eb 100644 --- a/lib/TTLS_UI/src/Module.cpp +++ b/lib/TTLS_UI/src/Module.cpp @@ -39,42 +39,6 @@ eap::config_method* eap::peer_ttls_ui::make_config_method() } -void eap::peer_ttls_ui::config_xml2blob( - _In_ DWORD dwFlags, - _In_ IXMLDOMNode *pConfigRoot, - _Out_ BYTE **pConnectionDataOut, - _Out_ DWORD *pdwConnectionDataOutSize) -{ - UNREFERENCED_PARAMETER(dwFlags); - - // Load configuration from XML. - config_connection cfg(*this); - cfg.load(pConfigRoot); - - // Pack configuration. - pack(cfg, pConnectionDataOut, pdwConnectionDataOutSize); -} - - -void eap::peer_ttls_ui::config_blob2xml( - _In_ DWORD dwFlags, - _In_count_(dwConnectionDataSize) const BYTE *pConnectionData, - _In_ DWORD dwConnectionDataSize, - _In_ IXMLDOMDocument *pDoc, - _In_ IXMLDOMNode *pConfigRoot) -{ - UNREFERENCED_PARAMETER(dwFlags); - - // Unpack configuration. - config_connection cfg(*this); - if (dwConnectionDataSize) - unpack(cfg, pConnectionData, dwConnectionDataSize); - - // Save configuration to XML. - cfg.save(pDoc, pConfigRoot); -} - - void eap::peer_ttls_ui::invoke_config_ui( _In_ HWND hwndParent, _In_count_(dwConnectionDataInSize) const BYTE *pConnectionDataIn,