peer_ui: Move config_xml2blob and config_blob2xml upstream
Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
fb8ca2de24
commit
18184a2762
@ -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.
|
||||
|
@ -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
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user