version 1.12, 2006/01/30 16:19:38
|
version 1.13, 2007/03/16 17:17:01
|
|
|
| |
setup(nameSpace, userName, password); | setup(nameSpace, userName, password); |
| |
Tracer::trace(TRC_WMIPROVIDER, Tracer::LEVEL3, |
PEG_TRACE((TRC_WMIPROVIDER, Tracer::LEVEL3, |
"getInstance - localOnly %x, includeQualifiers %x, includeClassOrigin %x", | "getInstance - localOnly %x, includeQualifiers %x, includeClassOrigin %x", |
localOnly, | localOnly, |
includeQualifiers, | includeQualifiers, |
includeClassOrigin); |
includeClassOrigin)); |
| |
Tracer::trace(TRC_WMIPROVIDER, Tracer::LEVEL3, |
PEG_TRACE((TRC_WMIPROVIDER, Tracer::LEVEL3, |
"getInstance - classname - %s, namespace - %s, instancename - %s", | "getInstance - classname - %s, namespace - %s, instancename - %s", |
sClassName, nameSpace ,sInstanceName ); |
sClassName, nameSpace ,sInstanceName)); |
| |
if (!m_bInitialized) | if (!m_bInitialized) |
{ | { |
Tracer::trace(TRC_WMIPROVIDER, Tracer::LEVEL3, |
PEG_TRACE((TRC_WMIPROVIDER, Tracer::LEVEL3, |
"WMIInstanceProvider::getInstance - m_bInitilized= %x, throw CIM_ERR_FAILED exception", | "WMIInstanceProvider::getInstance - m_bInitilized= %x, throw CIM_ERR_FAILED exception", |
m_bInitialized); |
m_bInitialized)); |
| |
throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, "Collector initialation failed."); | throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, "Collector initialation failed."); |
} | } |
|
|
| |
setup(nameSpace, userName, password); | setup(nameSpace, userName, password); |
| |
Tracer::trace(TRC_WMIPROVIDER, Tracer::LEVEL3, |
PEG_TRACE((TRC_WMIPROVIDER, Tracer::LEVEL3, |
"enumerateInstances - deepInheritance %x, localOnly %x, includeQualifiers %x, includeClassOrigin %x", | "enumerateInstances - deepInheritance %x, localOnly %x, includeQualifiers %x, includeClassOrigin %x", |
deepInheritance, localOnly, includeQualifiers, includeClassOrigin); |
deepInheritance, localOnly, includeQualifiers, includeClassOrigin)); |
| |
if (!m_bInitialized) | if (!m_bInitialized) |
{ | { |
Tracer::trace(TRC_WMIPROVIDER, Tracer::LEVEL3, |
PEG_TRACE_CSTRING(TRC_WMIPROVIDER, Tracer::LEVEL3, |
"enumerateInstances - m_bInitialized is false; throw exception"); | "enumerateInstances - m_bInitialized is false; throw exception"); |
| |
throw CIMException(CIM_ERR_FAILED); | throw CIMException(CIM_ERR_FAILED); |
|
|
if (pInstEnum) | if (pInstEnum) |
pInstEnum.Release(); | pInstEnum.Release(); |
| |
Tracer::trace(TRC_WMIPROVIDER, Tracer::LEVEL3, |
PEG_TRACE((TRC_WMIPROVIDER, Tracer::LEVEL3, |
"WMIInstanceProvider::enumerateInstances() - Instance count is %d", lCount); |
"WMIInstanceProvider::enumerateInstances() - Instance count is %d", lCount)); |
| |
if (lCount == 0) | if (lCount == 0) |
{ | { |
Tracer::trace(TRC_WMIPROVIDER, Tracer::LEVEL3, |
PEG_TRACE((TRC_WMIPROVIDER, Tracer::LEVEL3, |
"WMIInstanceProvider::enumerateInstances() - hResult value is %x", hr); |
"WMIInstanceProvider::enumerateInstances() - hResult value is %x", hr)); |
} | } |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
|
|
| |
if (!m_bInitialized) | if (!m_bInitialized) |
{ | { |
Tracer::trace(TRC_WMIPROVIDER, Tracer::LEVEL3, |
PEG_TRACE((TRC_WMIPROVIDER, Tracer::LEVEL3, |
"WMIInstanceProvider::enumerateInstanceNames - m_bInitilized= %x, throw CIM_ERR_FAILED exception", | "WMIInstanceProvider::enumerateInstanceNames - m_bInitilized= %x, throw CIM_ERR_FAILED exception", |
m_bInitialized); |
m_bInitialized)); |
| |
throw CIMException(CIM_ERR_FAILED); | throw CIMException(CIM_ERR_FAILED); |
} | } |
|
|
if (pInstEnum) | if (pInstEnum) |
pInstEnum.Release(); | pInstEnum.Release(); |
| |
Tracer::trace(TRC_WMIPROVIDER, |
PEG_TRACE((TRC_WMIPROVIDER, |
Tracer::LEVEL3, | Tracer::LEVEL3, |
"WMIInstanceProvider::enumerateInstanceNames() - Instance count is %d", | "WMIInstanceProvider::enumerateInstanceNames() - Instance count is %d", |
lCount); |
lCount)); |
| |
if (lCount == 0) | if (lCount == 0) |
{ | { |
Tracer::trace(TRC_WMIPROVIDER, |
PEG_TRACE((TRC_WMIPROVIDER, |
Tracer::LEVEL3, | Tracer::LEVEL3, |
"WMIInstanceProvider::enumerateInstanceNames() - hResult value is %x", | "WMIInstanceProvider::enumerateInstanceNames() - hResult value is %x", |
hr); |
hr)); |
} | } |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
|
|
| |
setup(nameSpace, userName, password); | setup(nameSpace, userName, password); |
| |
Tracer::trace(TRC_WMIPROVIDER, |
PEG_TRACE((TRC_WMIPROVIDER, |
Tracer::LEVEL3, | Tracer::LEVEL3, |
"setProperty() - setting property %s in %s", | "setProperty() - setting property %s in %s", |
propertyName, | propertyName, |
sInstanceName); |
sInstanceName)); |
| |
if (!m_bInitialized) | if (!m_bInitialized) |
{ | { |
Tracer::trace(TRC_WMIPROVIDER, Tracer::LEVEL3, |
PEG_TRACE((TRC_WMIPROVIDER, Tracer::LEVEL3, |
"WMIInstanceProvider::setProperty - m_bInitilized= %x, throw CIM_ERR_FAILED exception", | "WMIInstanceProvider::setProperty - m_bInitilized= %x, throw CIM_ERR_FAILED exception", |
m_bInitialized); |
m_bInitialized)); |
| |
throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, "Collector initialization failed."); | throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, "Collector initialization failed."); |
} | } |
|
|
case WBEM_E_TYPE_MISMATCH: | case WBEM_E_TYPE_MISMATCH: |
throw CIMException(CIM_ERR_TYPE_MISMATCH); | throw CIMException(CIM_ERR_TYPE_MISMATCH); |
default: | default: |
Tracer::trace(TRC_WMIPROVIDER, |
PEG_TRACE((TRC_WMIPROVIDER, |
Tracer::LEVEL3, | Tracer::LEVEL3, |
"setProperty() - Put failed, hr = %x", | "setProperty() - Put failed, hr = %x", |
hr); |
hr)); |
| |
throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, "WMI Put property failed."); | throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, "WMI Put property failed."); |
} | } |
|
|
| |
if (FAILED(hr)) | if (FAILED(hr)) |
{ | { |
Tracer::trace(TRC_WMIPROVIDER, |
PEG_TRACE((TRC_WMIPROVIDER, |
Tracer::LEVEL3, | Tracer::LEVEL3, |
"setProperty() - PutInstance failed, hr = %x", | "setProperty() - PutInstance failed, hr = %x", |
hr); |
hr)); |
| |
throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, "WMI Put instance failed."); | throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, "WMI Put instance failed."); |
} | } |
|
|
| |
setup(nameSpace, userName, password); | setup(nameSpace, userName, password); |
| |
Tracer::trace(TRC_WMIPROVIDER, |
PEG_TRACE((TRC_WMIPROVIDER, |
Tracer::LEVEL3, | Tracer::LEVEL3, |
"ModifyInstance() - nameSpace %s, userName %s", | "ModifyInstance() - nameSpace %s, userName %s", |
nameSpace.getCString(), | nameSpace.getCString(), |
userName.getCString()); |
userName.getCString())); |
| |
if (!m_bInitialized) | if (!m_bInitialized) |
{ | { |
Tracer::trace(TRC_WMIPROVIDER, Tracer::LEVEL3, |
PEG_TRACE((TRC_WMIPROVIDER, Tracer::LEVEL3, |
"WMIInstanceProvider::ModifyInstance - m_bInitilized= %x, throw CIM_ERR_FAILED exception", | "WMIInstanceProvider::ModifyInstance - m_bInitilized= %x, throw CIM_ERR_FAILED exception", |
m_bInitialized); |
m_bInitialized)); |
| |
throw CIMException(CIM_ERR_FAILED); | throw CIMException(CIM_ERR_FAILED); |
} | } |
|
|
// otherwise throw invalid parameter error | // otherwise throw invalid parameter error |
if(!bPropertySet) | if(!bPropertySet) |
{ | { |
Tracer::trace(TRC_WMIPROVIDER, |
PEG_TRACE((TRC_WMIPROVIDER, |
Tracer::LEVEL3, | Tracer::LEVEL3, |
"modifyInstance() - Put Failed hr=0x%x.", | "modifyInstance() - Put Failed hr=0x%x.", |
hr); |
hr)); |
| |
throw CIMException(CIM_ERR_FAILED); | throw CIMException(CIM_ERR_FAILED); |
} | } |
|
|
| |
setup(nameSpace, userName, password); | setup(nameSpace, userName, password); |
| |
Tracer::trace(TRC_WMIPROVIDER, |
PEG_TRACE((TRC_WMIPROVIDER, |
Tracer::LEVEL3, | Tracer::LEVEL3, |
"createInstance() - nameSpace %s, userName %s", | "createInstance() - nameSpace %s, userName %s", |
nameSpace.getCString(), | nameSpace.getCString(), |
userName.getCString()); |
userName.getCString())); |
| |
if (!m_bInitialized) | if (!m_bInitialized) |
{ | { |