70 lines
1.5 KiB
C++
70 lines
1.5 KiB
C++
// Copyright (C) 2004 Intel Corporation
|
|
#include "WsmanIdentifier.h"
|
|
using namespace CimClassNamespace;
|
|
|
|
void SecurityProfileNames::ClearValues()
|
|
{
|
|
securityProfileNames.clear();
|
|
}
|
|
|
|
void SecurityProfileNames::SetValue(const XMLElement &elem)
|
|
{
|
|
if (0 == elem.GetNodeName().compare(SECURITY_PROFILE_NAME))
|
|
{
|
|
securityProfileNames.push_back(elem.GetTextValue());
|
|
}
|
|
}
|
|
|
|
void SecurityProfileNames::ClearSecurityProfileNames()
|
|
{
|
|
ClearValues();
|
|
}
|
|
|
|
|
|
WsmanIdentifier::WsmanIdentifier(string data):DeSerializable("Identify")
|
|
{
|
|
Deserialize(data);
|
|
}
|
|
|
|
void WsmanIdentifier::SetValue(const XMLElement& elem)
|
|
{
|
|
if (0 == elem.GetNodeName().compare(PROTOCOL_VERSION))
|
|
{
|
|
protocolVersion = elem.GetTextValue();
|
|
}
|
|
else if (0 == elem.GetNodeName().compare(PRODUCT_VENDOR))
|
|
{
|
|
productVendor = elem.GetTextValue();
|
|
}
|
|
else if (0 == elem.GetNodeName().compare(PRODUCT_VERSION))
|
|
{
|
|
if (elem.GetTextValue().length()>=AMT_PREFIX_LENGTH)
|
|
{
|
|
productVersion = elem.GetTextValue().substr(AMT_PREFIX_LENGTH);
|
|
}
|
|
}
|
|
else if (0 == elem.GetNodeName().compare(DASH_VERSION))
|
|
{
|
|
dashVersion = elem.GetTextValue();
|
|
}
|
|
else if (0 == elem.GetNodeName().compare(SECURITY_PROFILES))
|
|
{
|
|
securityProfileNames.Deserialize(elem);
|
|
}
|
|
|
|
}
|
|
|
|
void WsmanIdentifier::ClearValues()
|
|
{
|
|
protocolVersion = "";
|
|
productVendor = "";
|
|
productVersion = "";
|
|
dashVersion = "";
|
|
securityProfileNames.ClearSecurityProfileNames();
|
|
}
|
|
|
|
vector<string> WsmanIdentifier::GetSecurityProfileNames() const
|
|
{
|
|
return securityProfileNames.GetSecurityProfileNames();
|
|
}
|