(file) Return to IndicationService.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / IndicationService

Diff for /pegasus/src/Pegasus/IndicationService/IndicationService.cpp between version 1.82 and 1.83

version 1.82, 2003/08/19 18:11:18 version 1.83, 2003/09/02 18:11:48
Line 387 
Line 387 
     CIMPropertyList propertyList;     CIMPropertyList propertyList;
     Array <ProviderClassList> indicationProviders;     Array <ProviderClassList> indicationProviders;
  
     for (Uint8 i = 0; i < activeSubscriptions.size (); i++)      for (Uint32 i = 0; i < activeSubscriptions.size (); i++)
     {     {
         //         //
         //  Check for expired subscription         //  Check for expired subscription
Line 489 
Line 489 
         //         //
         //  Merge provider list into list of unique providers to enable         //  Merge provider list into list of unique providers to enable
         //         //
         for (Uint8 j = 0; j < indicationProviders.size (); j++)          for (Uint32 j = 0; j < indicationProviders.size (); j++)
         {         {
             duplicate = false;             duplicate = false;
             for (Uint8 k = 0; k < enableProviders.size () && !duplicate; k++)              for (Uint32 k = 0; k < enableProviders.size () && !duplicate; k++)
             {             {
                 if ((indicationProviders [j].provider.identical                 if ((indicationProviders [j].provider.identical
                     (enableProviders [k].provider)))                     (enableProviders [k].provider)))
Line 538 
Line 538 
     //     //
     //  Send Enable message to each provider     //  Send Enable message to each provider
     //     //
     for (Uint8 m = 0; m < enableProviders.size (); m++)      for (Uint32 m = 0; m < enableProviders.size (); m++)
     {     {
         //         //
         //  Send Enable message         //  Send Enable message
Line 866 
Line 866 
                     //                     //
                     //  Send Enable message to each provider                     //  Send Enable message to each provider
                     //                     //
                     for (Uint8 i = 0; i < indicationProviders.size (); i++)                      for (Uint32 i = 0; i < indicationProviders.size (); i++)
                     {                     {
                         //                         //
                         //  Send Enable message                         //  Send Enable message
Line 1078 
Line 1078 
         //         //
         //  Remove Creator and language properties from instances before returning         //  Remove Creator and language properties from instances before returning
         //         //
         for (Uint8 i = 0; i < enumInstances.size (); i++)          for (Uint32 i = 0; i < enumInstances.size (); i++)
         {         {
             String creator;             String creator;
             if (!_getCreator (enumInstances [i], creator))             if (!_getCreator (enumInstances [i], creator))
Line 1590 
Line 1590 
                     //                     //
                     //  Send Enable message to each provider                     //  Send Enable message to each provider
                     //                     //
                     for (Uint8 i = 0; i < indicationProviders.size (); i++)                      for (Uint32 i = 0; i < indicationProviders.size (); i++)
                     {                     {
                         //                         //
                         //  Send Enable message                         //  Send Enable message
Line 1903 
Line 1903 
         //         //
         Array <CIMName> propertyNames;         Array <CIMName> propertyNames;
         CIMPropertyList propertyList;         CIMPropertyList propertyList;
         for (Uint8 i = 0; i < indication.getPropertyCount(); i++)          for (Uint32 i = 0; i < indication.getPropertyCount(); i++)
             propertyNames.append(indication.getProperty(i).getName());             propertyNames.append(indication.getProperty(i).getName());
         propertyList = _checkPropertyList (propertyNames,         propertyList = _checkPropertyList (propertyNames,
             request->nameSpace, indication.getClassName ());             request->nameSpace, indication.getClassName ());
Line 1917 
Line 1917 
             stopWatch.reset ();             stopWatch.reset ();
 #endif #endif
  
             for (Uint8 i = 0; i < request->subscriptionInstanceNames.size();              for (Uint32 i = 0; i < request->subscriptionInstanceNames.size();
                  i++)                  i++)
             {             {
                 //                 //
Line 1959 
Line 1959 
 #endif #endif
         }         }
  
         for (Uint8 i = 0; i < matchedSubscriptions.size(); i++)          for (Uint32 i = 0; i < matchedSubscriptions.size(); i++)
         {         {
             match = true;             match = true;
  
Line 2208 
Line 2208 
         //  Send Create or Modify request for each subscription that can newly         //  Send Create or Modify request for each subscription that can newly
         //  be supported         //  be supported
         //         //
         for (Uint8 i = 0; i < newSubscriptions.size (); i++)          for (Uint32 i = 0; i < newSubscriptions.size (); i++)
         {         {
             CIMNamespaceName sourceNameSpace;             CIMNamespaceName sourceNameSpace;
             Array <CIMName> indicationSubclasses;             Array <CIMName> indicationSubclasses;
Line 2324 
Line 2324 
                     //                     //
                     //  Send Enable message to each provider                     //  Send Enable message to each provider
                     //                     //
                     for (Uint8 j = 0; j < indicationProviders.size (); j++)                      for (Uint32 j = 0; j < indicationProviders.size (); j++)
                     {                     {
                         //                         //
                         //  Send Enable message                         //  Send Enable message
Line 2374 
Line 2374 
         //  Send Delete or Modify request for each subscription that can no         //  Send Delete or Modify request for each subscription that can no
         //  longer be supported         //  longer be supported
         //         //
         for (Uint8 i = 0; i < formerSubscriptions.size (); i++)          for (Uint32 i = 0; i < formerSubscriptions.size (); i++)
         {         {
             //             //
             //  NOTE: These Delete or Modify requests are not associated with a             //  NOTE: These Delete or Modify requests are not associated with a
Line 2539 
Line 2539 
     //     //
     //  Look for the provider in the list     //  Look for the provider in the list
     //     //
     for (Uint8 i = 0; i < tableValue.providers.size (); i++)      for (Uint32 i = 0; i < tableValue.providers.size (); i++)
     {     {
         if (tableValue.providers [i].provider.identical (provider))         if (tableValue.providers [i].provider.identical (provider))
         {         {
Line 2562 
Line 2562 
     //     //
     //  Look for the class in the list     //  Look for the class in the list
     //     //
     for (Uint8 i = 0; i < providerClasses.classList.size (); i++)      for (Uint32 i = 0; i < providerClasses.classList.size (); i++)
     {     {
         if (providerClasses.classList [i].equal (className))         if (providerClasses.classList [i].equal (className))
         {         {
Line 2589 
Line 2589 
  
     Array <CIMInstance> providers = request->providers;     Array <CIMInstance> providers = request->providers;
  
     for (Uint8 i = 0; i < providers.size (); i++)      for (Uint32 i = 0; i < providers.size (); i++)
     {     {
         //         //
         //  Get list of affected subscriptions         //  Get list of affected subscriptions
Line 3471 
Line 3471 
         //  Check each subscription for a reference to the instance to be         //  Check each subscription for a reference to the instance to be
         //  deleted         //  deleted
         //         //
         for (Uint8 i = 0; i < subscriptions.size(); i++)          for (Uint32 i = 0; i < subscriptions.size(); i++)
         {         {
             //             //
             //  Get the subscription Filter or Handler property value             //  Get the subscription Filter or Handler property value
Line 3531 
Line 3531 
     //     //
     //  Get existing subscriptions from each namespace in the repository     //  Get existing subscriptions from each namespace in the repository
     //     //
     for (Uint8 i = 0; i < nameSpaceNames.size (); i++)      for (Uint32 i = 0; i < nameSpaceNames.size (); i++)
     {     {
  
         //         //
Line 3542 
Line 3542 
         //         //
         //  Process each subscription         //  Process each subscription
         //         //
         for (Uint8 j = 0; j < subscriptions.size (); j++)          for (Uint32 j = 0; j < subscriptions.size (); j++)
         {         {
             //             //
             //  Get subscription state             //  Get subscription state
Line 3626 
Line 3626 
     PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,     PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,
                       "IndicationService::_getMatchingSubscriptions");                       "IndicationService::_getMatchingSubscriptions");
  
     for (Uint8 i = 0; i < nameSpaces.size (); i++)      for (Uint32 i = 0; i < nameSpaces.size (); i++)
     {     {
         //         //
         //  Look up the indicationClass-sourceNamespace pair in the         //  Look up the indicationClass-sourceNamespace pair in the
Line 3639 
Line 3639 
             tableValue))             tableValue))
         {         {
             subscriptions = tableValue.subscriptions;             subscriptions = tableValue.subscriptions;
             for (Uint8 j = 0; j < subscriptions.size (); j++)              for (Uint32 j = 0; j < subscriptions.size (); j++)
             {             {
                 Boolean match = true;                 Boolean match = true;
  
Line 3690 
Line 3690 
                         //  Compare subscription property list                         //  Compare subscription property list
                         //  with supported property list                         //  with supported property list
                         //                         //
                         for (Uint8 k = 0;                          for (Uint32 k = 0;
                              k < propertyList.size () && match;                              k < propertyList.size () && match;
                              k++)                              k++)
                         {                         {
Line 3742 
Line 3742 
     //  For each newly supported namespace, lookup to retrieve list of     //  For each newly supported namespace, lookup to retrieve list of
     //  subscriptions for the indication class-source namespace pair     //  subscriptions for the indication class-source namespace pair
     //     //
     for (Uint8 i = 0; i < newNameSpaces.size (); i++)      for (Uint32 i = 0; i < newNameSpaces.size (); i++)
     {     {
         //         //
         //  Look up the indicationClass-sourceNamespace pair in the         //  Look up the indicationClass-sourceNamespace pair in the
Line 3754 
Line 3754 
         if (_subscriptionClassesTable.lookup (subscriptionClassesKey,         if (_subscriptionClassesTable.lookup (subscriptionClassesKey,
             tableValue))             tableValue))
         {         {
             for (Uint8 j = 0; j < tableValue.subscriptions.size (); j++)              for (Uint32 j = 0; j < tableValue.subscriptions.size (); j++)
                 newList.append (tableValue.subscriptions [j]);                 newList.append (tableValue.subscriptions [j]);
         }         }
     }     }
Line 3763 
Line 3763 
     //  For each formerly supported namespace, lookup to retrieve list of     //  For each formerly supported namespace, lookup to retrieve list of
     //  subscriptions for the indication class-source namespace pair     //  subscriptions for the indication class-source namespace pair
     //     //
     for (Uint8 k = 0; k < oldNameSpaces.size (); k++)      for (Uint32 k = 0; k < oldNameSpaces.size (); k++)
     {     {
         //         //
         //  Look up the indicationClass-sourceNamespace pair in the         //  Look up the indicationClass-sourceNamespace pair in the
Line 3775 
Line 3775 
         if (_subscriptionClassesTable.lookup (subscriptionClassesKey,         if (_subscriptionClassesTable.lookup (subscriptionClassesKey,
             tableValue))             tableValue))
         {         {
             for (Uint8 m = 0; m < tableValue.subscriptions.size (); m++)              for (Uint32 m = 0; m < tableValue.subscriptions.size (); m++)
                 formerList.append (tableValue.subscriptions [m]);                 formerList.append (tableValue.subscriptions [m]);
         }         }
     }     }
Line 3785 
Line 3785 
     //  list     //  list
     //     //
     Sint8 found;     Sint8 found;
     for (Uint8 p = 0; p < newList.size (); p++)      for (Uint32 p = 0; p < newList.size (); p++)
     {     {
         found = -1;         found = -1;
         for (Uint8 q = 0; q < formerList.size (); q++)          for (Uint32 q = 0; q < formerList.size (); q++)
         {         {
             if (newList [p].identical (formerList [q]))             if (newList [p].identical (formerList [q]))
             {             {
Line 3810 
Line 3810 
     //  previously was not, add to list of newly supported subscriptions if     //  previously was not, add to list of newly supported subscriptions if
     //  required properties are now supported     //  required properties are now supported
     //     //
     for (Uint8 n = 0; n < newList.size (); n++)      for (Uint32 n = 0; n < newList.size (); n++)
     {     {
         String filterQuery;         String filterQuery;
         WQLSelectStatement selectStatement;         WQLSelectStatement selectStatement;
Line 3853 
Line 3853 
     //  supported, but now is not, add to list of formerly supported     //  supported, but now is not, add to list of formerly supported
     //  subscriptions     //  subscriptions
     //     //
     for (Uint8 f = 0; f < formerList.size (); f++)      for (Uint32 f = 0; f < formerList.size (); f++)
     {     {
         formerSubscriptions.append (formerList [f]);         formerSubscriptions.append (formerList [f]);
     }     }
Line 3863 
Line 3863 
     //  and was also previously supported, add to appropriate list, based on     //  and was also previously supported, add to appropriate list, based on
     //  required properties     //  required properties
     //     //
     for (Uint8 b = 0; b < bothList.size (); b++)      for (Uint32 b = 0; b < bothList.size (); b++)
     {     {
         String filterQuery;         String filterQuery;
         WQLSelectStatement selectStatement;         WQLSelectStatement selectStatement;
Line 4015 
Line 4015 
             //  Compare required property list             //  Compare required property list
             //  with property list             //  with property list
             //             //
             for (Uint8 i = 0; i < requiredProperties.size (); i++)              for (Uint32 i = 0; i < requiredProperties.size (); i++)
             {             {
                 if (!ContainsCIMName (supportedProperties.getPropertyNameArray (),                 if (!ContainsCIMName (supportedProperties.getPropertyNameArray (),
                     requiredProperties[i]))                     requiredProperties[i]))
Line 4047 
Line 4047 
         //         //
         //  If provider matches, append subscription to the list         //  If provider matches, append subscription to the list
         //         //
         for (Uint8 j = 0; j < i.value ().providers.size (); j++)          for (Uint32 j = 0; j < i.value ().providers.size (); j++)
         {         {
             ActiveSubscriptionsTableEntry tableValue = i.value ();             ActiveSubscriptionsTableEntry tableValue = i.value ();
             if (tableValue.providers [j].provider.identical (provider))             if (tableValue.providers [j].provider.identical (provider))
Line 4398 
Line 4398 
     //     //
     //  For each indication subclass, get providers     //  For each indication subclass, get providers
     //     //
     for (Uint8 i = 0; i < indicationSubclasses.size (); i++)      for (Uint32 i = 0; i < indicationSubclasses.size (); i++)
     {     {
         //         //
         //  Get providers that can serve the subscription         //  Get providers that can serve the subscription
Line 4418 
Line 4418 
             //             //
             //  Merge into list of ProviderClassList structs             //  Merge into list of ProviderClassList structs
             //             //
             for (Uint8 j = 0; j < providerInstances.size () && !duplicate; j++)              for (Uint32 j = 0; j < providerInstances.size () && !duplicate; j++)
             {             {
                 provider.classList.clear ();                 provider.classList.clear ();
                 duplicate = false;                 duplicate = false;
Line 4426 
Line 4426 
                 //                 //
                 //  See if indication provider is already in list                 //  See if indication provider is already in list
                 //                 //
                 for (Uint8 k = 0;                  for (Uint32 k = 0;
                      k < indicationProviders.size () && !duplicate; k++)                      k < indicationProviders.size () && !duplicate; k++)
                 {                 {
                     if ((providerInstances [j].identical                     if ((providerInstances [j].identical
Line 4716 
Line 4716 
     //     //
     //  Check each subscription for a reference to the specified instance     //  Check each subscription for a reference to the specified instance
     //     //
     for (Uint8 i = 0; i < subscriptions.size (); i++)      for (Uint32 i = 0; i < subscriptions.size (); i++)
     {     {
         //         //
         //  Get the reference property value from the subscription instance         //  Get the reference property value from the subscription instance
Line 5241 
Line 5241 
     //  Send Create request to each provider     //  Send Create request to each provider
     //     //
  
     for (Uint8 i = 0; i < indicationProviders.size (); i++)      for (Uint32 i = 0; i < indicationProviders.size (); i++)
     {     {
  
        struct enableProviderList *epl =        struct enableProviderList *epl =
Line 5379 
Line 5379 
     //     //
     //  Send Modify request to each provider     //  Send Modify request to each provider
     //     //
     for (Uint8 i = 0; i < indicationProviders.size (); i++)      for (Uint32 i = 0; i < indicationProviders.size (); i++)
     {     {
  
        struct enableProviderList *epl =        struct enableProviderList *epl =
Line 5494 
Line 5494 
     //     //
     //  Send Delete request to each provider     //  Send Delete request to each provider
     //     //
     for (Uint8 i = 0; i < indicationProviders.size (); i++)      for (Uint32 i = 0; i < indicationProviders.size (); i++)
     {     {
  
        struct enableProviderList *epl =        struct enableProviderList *epl =
Line 5559 
Line 5559 
     Array<CIMKeyBinding> subscriptionKB = subscriptionRef.getKeyBindings ();     Array<CIMKeyBinding> subscriptionKB = subscriptionRef.getKeyBindings ();
     Array<CIMKeyBinding> filterKB;     Array<CIMKeyBinding> filterKB;
     Array<CIMKeyBinding> handlerKB;     Array<CIMKeyBinding> handlerKB;
     for (Uint8 i = 0; i < subscriptionKB.size (); i++)      for (Uint32 i = 0; i < subscriptionKB.size (); i++)
     {     {
         if ((subscriptionKB [i].getName () == _PROPERTY_FILTER) &&         if ((subscriptionKB [i].getName () == _PROPERTY_FILTER) &&
             (subscriptionKB [i].getType () == CIMKeyBinding::REFERENCE))             (subscriptionKB [i].getType () == CIMKeyBinding::REFERENCE))
Line 5578 
Line 5578 
     //     //
     //  Append subscription filter key values to key     //  Append subscription filter key values to key
     //     //
     for (Uint8 j = 0; j < filterKB.size (); j++)      for (Uint32 j = 0; j < filterKB.size (); j++)
     {     {
         activeSubscriptionsKey.append (filterKB [j].getValue ());         activeSubscriptionsKey.append (filterKB [j].getValue ());
     }     }
Line 5586 
Line 5586 
     //     //
     //  Append subscription handler key values to key     //  Append subscription handler key values to key
     //     //
     for (Uint8 k = 0; k < handlerKB.size (); k++)      for (Uint32 k = 0; k < handlerKB.size (); k++)
     {     {
         activeSubscriptionsKey.append (handlerKB [k].getValue ());         activeSubscriptionsKey.append (handlerKB [k].getValue ());
     }     }
Line 5613 
Line 5613 
     String traceString;     String traceString;
     traceString.append (activeSubscriptionsKey);     traceString.append (activeSubscriptionsKey);
     traceString.append (" Providers: ");     traceString.append (" Providers: ");
     for (Uint8 i = 0; i < providers.size (); i++)      for (Uint32 i = 0; i < providers.size (); i++)
     {     {
         String providerName = providers [i].provider.getProperty         String providerName = providers [i].provider.getProperty
             (providers [i].provider.findProperty             (providers [i].provider.findProperty
             (_PROPERTY_NAME)).getValue ().toString ();             (_PROPERTY_NAME)).getValue ().toString ();
         traceString.append (providerName);         traceString.append (providerName);
         traceString.append ("  Classes: ");         traceString.append ("  Classes: ");
         for (Uint8 j = 0; j < providers[i].classList.size (); j++)          for (Uint32 j = 0; j < providers[i].classList.size (); j++)
         {         {
              traceString.append (providers[i].classList[j].getString());              traceString.append (providers[i].classList[j].getString());
              traceString.append ("  ");              traceString.append ("  ");
Line 5677 
Line 5677 
     String traceString;     String traceString;
     traceString.append (subscriptionClassesKey);     traceString.append (subscriptionClassesKey);
     traceString.append (" Subscriptions: ");     traceString.append (" Subscriptions: ");
     for (Uint8 i = 0; i < subscriptions.size (); i++)      for (Uint32 i = 0; i < subscriptions.size (); i++)
     {     {
         traceString.append (subscriptions [i].getPath ().toString());         traceString.append (subscriptions [i].getPath ().toString());
         traceString.append ("  ");         traceString.append ("  ");
Line 5707 
Line 5707 
     //     //
     //  Insert or update entries in subscription classes table     //  Insert or update entries in subscription classes table
     //     //
     for (Uint8 i = 0; i < indicationSubclassNames.size (); i++)      for (Uint32 i = 0; i < indicationSubclassNames.size (); i++)
     {     {
         String subscriptionClassesKey = _generateSubscriptionClassesKey         String subscriptionClassesKey = _generateSubscriptionClassesKey
             (indicationSubclassNames [i], sourceNamespaceName);             (indicationSubclassNames [i], sourceNamespaceName);
Line 5770 
Line 5770 
     //     //
     //  Remove or update entries in subscription classes table     //  Remove or update entries in subscription classes table
     //     //
     for (Uint8 i = 0; i < indicationSubclassNames.size (); i++)      for (Uint32 i = 0; i < indicationSubclassNames.size (); i++)
     {     {
         String subscriptionClassesKey = _generateSubscriptionClassesKey         String subscriptionClassesKey = _generateSubscriptionClassesKey
             (indicationSubclassNames [i], sourceNamespaceName);             (indicationSubclassNames [i], sourceNamespaceName);
Line 5783 
Line 5783 
             //  pair, remove subscription from the list             //  pair, remove subscription from the list
             //             //
             Array <CIMInstance> subscriptions = tableValue.subscriptions;             Array <CIMInstance> subscriptions = tableValue.subscriptions;
             for (Uint8 j = 0; j < subscriptions.size (); j++)              for (Uint32 j = 0; j < subscriptions.size (); j++)
             {             {
                 if (subscriptions [j].getPath().identical                 if (subscriptions [j].getPath().identical
                    (subscription.getPath()))                    (subscription.getPath()))
Line 5949 
Line 5949 
     //     //
     //  Get list of unique handler instances for all subscriptions in list     //  Get list of unique handler instances for all subscriptions in list
     //     //
     for (Uint8 i = 0; i < subscriptions.size (); i++)      for (Uint32 i = 0; i < subscriptions.size (); i++)
     {     {
         PEG_TRACE_STRING (TRC_INDICATION_SERVICE, Tracer::LEVEL4,         PEG_TRACE_STRING (TRC_INDICATION_SERVICE, Tracer::LEVEL4,
             "Alert subscription: " + subscriptions [i].getPath().toString());             "Alert subscription: " + subscriptions [i].getPath().toString());
Line 5963 
Line 5963 
         //  Merge into list of unique handler instances         //  Merge into list of unique handler instances
         //         //
         duplicate = false;         duplicate = false;
         for (Uint8 j = 0; j < handlers.size () && !duplicate; j++)          for (Uint32 j = 0; j < handlers.size () && !duplicate; j++)
         {         {
             if ((current.identical (handlers [j])) &&             if ((current.identical (handlers [j])) &&
                 (current.getPath () == handlers [j].getPath ()))                 (current.getPath () == handlers [j].getPath ()))
Line 5981 
Line 5981 
     //     //
     //  Send handle indication request to each handler     //  Send handle indication request to each handler
     //     //
     for (Uint8 k = 0; k < handlers.size (); k++)      for (Uint32 k = 0; k < handlers.size (); k++)
     {     {
         CIMHandleIndicationRequestMessage * handler_request =         CIMHandleIndicationRequestMessage * handler_request =
             new CIMHandleIndicationRequestMessage (             new CIMHandleIndicationRequestMessage (
Line 6105 
Line 6105 
     PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,     PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,
                       "IndicationService::_getPropertySourceFromInstance");                       "IndicationService::_getPropertySourceFromInstance");
  
     for (Uint8 i=0; i < indicationInstance.getPropertyCount(); i++)      for (Uint32 i=0; i < indicationInstance.getPropertyCount(); i++)
     {     {
         CIMProperty property = indicationInstance.getProperty(i);         CIMProperty property = indicationInstance.getProperty(i);
         CIMValue propertyValue = property.getValue();         CIMValue propertyValue = property.getValue();


Legend:
Removed from v.1.82  
changed lines
  Added in v.1.83

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2