version 1.12, 2006/01/30 16:17:55
|
version 1.13, 2006/09/27 20:13:21
|
|
|
Array <CIMInstance> subscriptions; | Array <CIMInstance> subscriptions; |
| |
// | // |
// Get existing subscriptions in specified namespace |
// Get the CIM_IndicationSubscription and |
|
// CIM_FormattedIndicationSubscription instances in specified namespace |
// | // |
try | try |
{ | { |
subscriptions = _repository->enumerateInstances |
subscriptions = _repository->enumerateInstancesForClass( |
(nameSpace, PEGASUS_CLASSNAME_INDSUBSCRIPTION); |
nameSpace, PEGASUS_CLASSNAME_INDSUBSCRIPTION); |
|
subscriptions.appendArray(_repository->enumerateInstancesForClass( |
|
nameSpace, PEGASUS_CLASSNAME_FORMATTEDINDSUBSCRIPTION)); |
|
} |
|
catch (const CIMException& e) |
|
{ |
|
// |
|
// Some namespaces may not include the subscription class |
|
// In that case, just return no subscriptions |
|
// Any other exception is an error |
|
// |
|
if (e.getCode () != CIM_ERR_INVALID_CLASS) |
|
{ |
|
PEG_METHOD_EXIT (); |
|
throw; |
|
} |
|
} |
| |
// | // |
// Process each subscription | // Process each subscription |
|
|
instanceName.setNameSpace (nameSpace); | instanceName.setNameSpace (nameSpace); |
subscriptions [i].setPath (instanceName); | subscriptions [i].setPath (instanceName); |
} | } |
} |
|
catch (const CIMException& e) |
|
{ |
|
// |
|
// Some namespaces may not include the subscription class |
|
// In that case, just return no subscriptions |
|
// Any other exception is an error |
|
// |
|
if (e.getCode () != CIM_ERR_INVALID_CLASS) |
|
{ |
|
PEG_METHOD_EXIT (); |
|
throw; |
|
} |
|
} |
|
| |
PEG_METHOD_EXIT (); | PEG_METHOD_EXIT (); |
return subscriptions; | return subscriptions; |
|
|
Array <CIMInstance> SubscriptionRepository::enumerateInstancesForClass ( | Array <CIMInstance> SubscriptionRepository::enumerateInstancesForClass ( |
const CIMNamespaceName & nameSpace, | const CIMNamespaceName & nameSpace, |
const CIMName & className, | const CIMName & className, |
Boolean deepInheritance, |
|
Boolean localOnly, | Boolean localOnly, |
Boolean includeQualifiers, | Boolean includeQualifiers, |
Boolean includeClassOrigin, | Boolean includeClassOrigin, |
Boolean includeInheritance, |
|
const CIMPropertyList & propertyList) | const CIMPropertyList & propertyList) |
{ | { |
return _repository->enumerateInstancesForClass (nameSpace, className, | return _repository->enumerateInstancesForClass (nameSpace, className, |
deepInheritance, localOnly, includeQualifiers, includeClassOrigin, |
localOnly, includeQualifiers, includeClassOrigin, propertyList); |
false, propertyList); |
|
} | } |
| |
Array <CIMObjectPath> SubscriptionRepository::enumerateInstanceNamesForClass ( | Array <CIMObjectPath> SubscriptionRepository::enumerateInstanceNamesForClass ( |
const CIMNamespaceName & nameSpace, | const CIMNamespaceName & nameSpace, |
const CIMName & className, |
const CIMName & className) |
Boolean includeInheritance) |
|
{ | { |
return _repository->enumerateInstanceNamesForClass (nameSpace, className, |
return _repository->enumerateInstanceNamesForClass(nameSpace, className); |
false); |
|
} | } |
| |
void SubscriptionRepository::_disableSubscription ( | void SubscriptionRepository::_disableSubscription ( |