version 1.13, 2006/09/27 20:13:21
|
version 1.14, 2006/10/20 19:19:44
|
|
|
// | // |
// Process each enabled subscription | // Process each enabled subscription |
// | // |
if ((subscriptionState == _STATE_ENABLED) || |
if ((subscriptionState == STATE_ENABLED) || |
(subscriptionState == _STATE_ENABLEDDEGRADED)) |
(subscriptionState == STATE_ENABLEDDEGRADED)) |
{ | { |
// | // |
// CIMInstances returned from repository do not include | // CIMInstances returned from repository do not include |
|
|
PEG_METHOD_ENTER (TRC_INDICATION_SERVICE, | PEG_METHOD_ENTER (TRC_INDICATION_SERVICE, |
"SubscriptionRepository::getState"); | "SubscriptionRepository::getState"); |
| |
Uint32 stateIndex = instance.findProperty (_PROPERTY_STATE); |
Uint32 stateIndex = instance.findProperty (PEGASUS_PROPERTYNAME_SUBSCRIPTION_STATE); |
if (stateIndex != PEG_NOT_FOUND) | if (stateIndex != PEG_NOT_FOUND) |
{ | { |
CIMValue stateValue = instance.getProperty | CIMValue stateValue = instance.getProperty |
|
|
// Get Handler reference from subscription instance | // Get Handler reference from subscription instance |
// | // |
handlerValue = subscription.getProperty (subscription.findProperty | handlerValue = subscription.getProperty (subscription.findProperty |
(_PROPERTY_HANDLER)).getValue (); |
(PEGASUS_PROPERTYNAME_HANDLER)).getValue (); |
| |
handlerValue.get (handlerRef); | handlerValue.get (handlerRef); |
| |
|
|
// Get Persistence Type | // Get Persistence Type |
// | // |
persistenceValue = instance.getProperty (instance.findProperty | persistenceValue = instance.getProperty (instance.findProperty |
(_PROPERTY_PERSISTENCETYPE)).getValue (); |
(PEGASUS_PROPERTYNAME_PERSISTENCETYPE)).getValue (); |
persistenceValue.get (persistenceType); | persistenceValue.get (persistenceType); |
| |
if (persistenceType == _PERSISTENCE_TRANSIENT) |
if (persistenceType == PERSISTENCE_TRANSIENT) |
{ | { |
PEG_METHOD_EXIT (); | PEG_METHOD_EXIT (); |
return true; | return true; |
|
|
CIMNamespaceName nameSpaceName; | CIMNamespaceName nameSpaceName; |
| |
filterValue = subscription.getProperty (subscription.findProperty | filterValue = subscription.getProperty (subscription.findProperty |
(_PROPERTY_FILTER)).getValue (); |
(PEGASUS_PROPERTYNAME_FILTER)).getValue (); |
| |
filterValue.get (filterReference); | filterValue.get (filterReference); |
| |
|
|
} | } |
| |
query = filterInstance.getProperty (filterInstance.findProperty | query = filterInstance.getProperty (filterInstance.findProperty |
(_PROPERTY_QUERY)).getValue ().toString (); |
(PEGASUS_PROPERTYNAME_QUERY)).getValue ().toString (); |
| |
sourceNameSpace = filterInstance.getProperty (filterInstance.findProperty | sourceNameSpace = filterInstance.getProperty (filterInstance.findProperty |
(_PROPERTY_SOURCENAMESPACE)).getValue ().toString (); | (_PROPERTY_SOURCENAMESPACE)).getValue ().toString (); |
| |
queryLanguage = filterInstance.getProperty | queryLanguage = filterInstance.getProperty |
(filterInstance.findProperty (_PROPERTY_QUERYLANGUAGE)). |
(filterInstance.findProperty (PEGASUS_PROPERTYNAME_QUERYLANGUAGE)). |
getValue ().toString (); | getValue ().toString (); |
| |
PEG_METHOD_EXIT (); | PEG_METHOD_EXIT (); |
|
|
CIMNamespaceName nameSpaceName; | CIMNamespaceName nameSpaceName; |
| |
filterValue = subscription.getProperty (subscription.findProperty | filterValue = subscription.getProperty (subscription.findProperty |
(_PROPERTY_FILTER)).getValue (); |
(PEGASUS_PROPERTYNAME_FILTER)).getValue (); |
| |
filterValue.get (filterReference); | filterValue.get (filterReference); |
| |
|
|
} | } |
| |
query = filterInstance.getProperty (filterInstance.findProperty | query = filterInstance.getProperty (filterInstance.findProperty |
(_PROPERTY_QUERY)).getValue ().toString (); |
(PEGASUS_PROPERTYNAME_QUERY)).getValue ().toString (); |
| |
sourceNameSpace = filterInstance.getProperty (filterInstance.findProperty | sourceNameSpace = filterInstance.getProperty (filterInstance.findProperty |
(_PROPERTY_SOURCENAMESPACE)).getValue ().toString (); | (_PROPERTY_SOURCENAMESPACE)).getValue ().toString (); |
|
|
CIMNamespaceName nameSpaceName; | CIMNamespaceName nameSpaceName; |
| |
filterValue = subscription.getProperty (subscription.findProperty | filterValue = subscription.getProperty (subscription.findProperty |
(_PROPERTY_FILTER)).getValue (); |
(PEGASUS_PROPERTYNAME_FILTER)).getValue (); |
| |
filterValue.get (filterReference); | filterValue.get (filterReference); |
| |
|
|
} | } |
| |
query = filterInstance.getProperty (filterInstance.findProperty | query = filterInstance.getProperty (filterInstance.findProperty |
(_PROPERTY_QUERY)).getValue ().toString (); |
(PEGASUS_PROPERTYNAME_QUERY)).getValue ().toString (); |
| |
PEG_METHOD_EXIT (); | PEG_METHOD_EXIT (); |
} | } |
|
|
// | // |
CIMPropertyList propertyList; | CIMPropertyList propertyList; |
Array <CIMName> properties; | Array <CIMName> properties; |
properties.append (_PROPERTY_STATE); |
properties.append (PEGASUS_PROPERTYNAME_SUBSCRIPTION_STATE); |
propertyList = CIMPropertyList (properties); | propertyList = CIMPropertyList (properties); |
| |
// | // |
|
|
// Set Subscription State to Disabled | // Set Subscription State to Disabled |
// | // |
CIMProperty state = instance.getProperty (instance.findProperty | CIMProperty state = instance.getProperty (instance.findProperty |
(_PROPERTY_STATE)); |
(PEGASUS_PROPERTYNAME_SUBSCRIPTION_STATE)); |
state.setValue (CIMValue (_STATE_DISABLED)); |
state.setValue (CIMValue (STATE_DISABLED)); |
| |
// | // |
// Modify the instance in the repository | // Modify the instance in the repository |