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

Diff for /pegasus/src/Pegasus/IndicationService/IndicationService.h between version 1.97 and 1.97.2.3

version 1.97, 2011/01/13 06:00:28 version 1.97.2.3, 2013/06/03 22:36:14
Line 53 
Line 53 
 # include <Pegasus/IndicationService/IndicationServiceConfiguration.h> # include <Pegasus/IndicationService/IndicationServiceConfiguration.h>
 #endif #endif
  
   #include <Pegasus/General/SubscriptionKey.h>
   
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
   // Holds information of control providers servicing the indications.
   struct ControlProvIndReg
   {
       CIMName className;
       CIMNamespaceName nameSpace;
       CIMInstance providerModule;
       CIMInstance provider;
   };
   
   typedef HashTable <String, ControlProvIndReg, EqualFunc <String>,
       HashFunc <String> > ControlProvIndRegTable;
   
 class SubscriptionRepository; class SubscriptionRepository;
 class SubscriptionTable; class SubscriptionTable;
  
Line 110 
Line 124 
  
     static Mutex _mutex;     static Mutex _mutex;
  
       /**
           Sets property with name SystemName to sysname if existant. If
           property does not exist on instance, adds it.
           Should be used for instances of classes Filter, Handler only
           Does not change the objectPath of the instance !!!
   
           @param   instance              instance to set property on
           @param   sysname               system name to set
        */
   
       static void _setOrAddSystemNameInHandlerFilter(
           CIMInstance& instance,
           const String& sysname);
   
       /**
           Sets key binding with name SystemName to string if existant. Should be
           used with Handler and Filter object paths only
   
           @param   objPath              object path to change keybinding on
           @param   sysname              system name to set
        */
       static void _setSystemNameInHandlerFilter(
           CIMObjectPath& objPath,
           const String& sysname);
   
       /**
           Replace the value of SystemName in a String created from a Handler or
           Filter reference
         */
       static void _setSystemNameInHandlerFilterReference(
           String& reference,
           const String& sysname);
   
       /**
           Sets key binding with name SystemName in the two keybinding references
           Filter and Handler of a Subscription object path
   
           @param   objPath              object path to change SystemNames on
           @param   sysname              system name to set
        */
       static void _setSubscriptionSystemName(
           CIMObjectPath& objPath,
           const String& sysname);
   
       /** Replaces value in all occurences of SystemName key with String sysname
           used for Handler, Filter and Subscription object paths
   
           @param   objPath              object path to change SystemNames on
           @param   sysname              system name to set
        */
       static void _setSystemName(CIMObjectPath& objPath, const String& sysname);
   
       /** Replaces value in all occurences of SystemName key and SystemName
           property with String sysname
   
           Used for Handler, Filter and Subscription object paths
   
           @param   instance             instance to change
           @param   sysname              system name to set
        */
       static void _setSystemName(CIMInstance& instance, const String& sysname);
   
   
 private: private:
  
     void _initialize();     void _initialize();
Line 384 
Line 461 
         @param   otherPropertyName     name of Other___ property to be validated         @param   otherPropertyName     name of Other___ property to be validated
         @param   defaultValue          default value for property         @param   defaultValue          default value for property
         @param   otherValue            "Other" value for property         @param   otherValue            "Other" value for property
         @param   validValues           set of valid values for property  
         @param   supportedValues       set of supported values for property         @param   supportedValues       set of supported values for property
  
         @exception   CIM_ERR_INVALID_PARAMETER  if value of property or Other___         @exception   CIM_ERR_INVALID_PARAMETER  if value of property or Other___
Line 396 
Line 472 
         const CIMName& otherPropertyName,         const CIMName& otherPropertyName,
         const Uint16 defaultValue,         const Uint16 defaultValue,
         const Uint16 otherValue,         const Uint16 otherValue,
         const Array<Uint16>& validValues,  
         const Array<Uint16>& supportedValues);         const Array<Uint16>& supportedValues);
  
     /**     /**
Line 513 
Line 588 
         const Boolean isArray = false);         const Boolean isArray = false);
  
     /**     /**
         Validates that all properties in the instance are supported properties,  
         and throws an exception if an unknown, unsupported property is found.  
   
         @param   instance              instance to be validated  
   
         @exception   CIM_ERR_NOT_SUPPORTED      if instance includes an unknown,  
                                                 unsupported property  
      */  
     void _checkSupportedProperties(  
         const CIMInstance& instance);  
   
     /**  
         Validates value of the specified Uint16 property in the instance.         Validates value of the specified Uint16 property in the instance.
         If the value of the property is not a valid value, or is not a         If the value of the property is not a valid value, or is not a
         supported value, an exception is thrown.         supported value, an exception is thrown.
  
         @param   instance              instance to be validated         @param   instance              instance to be validated
         @param   propertyName          name of property to be validated         @param   propertyName          name of property to be validated
         @param   validValues           set of valid values for property  
         @param   supportedValues       set of supported values for property         @param   supportedValues       set of supported values for property
  
         @exception   CIM_ERR_NOT_SUPPORTED      if the property value is not         @exception   CIM_ERR_NOT_SUPPORTED      if the property value is not
Line 542 
Line 604 
     void _checkValue(     void _checkValue(
         const CIMInstance& instance,         const CIMInstance& instance,
         const CIMName& propertyName,         const CIMName& propertyName,
         const Array<Uint16>& validValues,  
         const Array<Uint16>& supportedValues);         const Array<Uint16>& supportedValues);
  
     /**     /**
Line 615 
Line 676 
  
         @return   list of CIMInstance subscriptions         @return   list of CIMInstance subscriptions
      */      */
     Array<CIMInstance> _getMatchingSubscriptions(      Array<SubscriptionWithSrcNamespace> _getMatchingSubscriptions(
         const CIMName& supportedClass,         const CIMName& supportedClass,
         const Array<CIMNamespaceName> nameSpaces,         const Array<CIMNamespaceName> nameSpaces,
         const CIMPropertyList& supportedProperties,         const CIMPropertyList& supportedProperties,
Line 656 
Line 717 
         const Array<CIMNamespaceName>& oldNameSpaces,         const Array<CIMNamespaceName>& oldNameSpaces,
         const CIMPropertyList& newProperties,         const CIMPropertyList& newProperties,
         const CIMPropertyList& oldProperties,         const CIMPropertyList& oldProperties,
         Array<CIMInstance>& newSubscriptions,          Array<SubscriptionWithSrcNamespace>& newSubscriptions,
         Array<CIMInstance>& formerSubscriptions);          Array<SubscriptionWithSrcNamespace>& formerSubscriptions);
  
     /**     /**
         Determines if all of the required properties in the specified list         Determines if all of the required properties in the specified list
Line 707 
Line 768 
         Retrieves the list of indication providers that serve the specified         Retrieves the list of indication providers that serve the specified
         indication subclasses.         indication subclasses.
  
         @param   queryExpression       the query expression          @param   query                 the query
         @param   nameSpace             the namespace name          @param   queyLang              the query language
         @param   indicationClassName   the indication class name         @param   indicationClassName   the indication class name
         @param   indicationSubclasses  the list of indication subclass names         @param   indicationSubclasses  the list of indication subclass names
  
         @return  list of ProviderClassList structs         @return  list of ProviderClassList structs
      */      */
     Array<ProviderClassList> _getIndicationProviders(     Array<ProviderClassList> _getIndicationProviders(
         const QueryExpression& queryExpression,          const String &query,
         const CIMNamespaceName& nameSpace,          const String &queryLang,
         const CIMName& indicationClassName,         const CIMName& indicationClassName,
         const Array<CIMName>& indicationSubclasses) const;          const Array<NamespaceClassList>& indicationSubclasses) const;
  
     /**     /**
         Retrieves the list of required properties (all the properties         Retrieves the list of required properties (all the properties
Line 808 
Line 869 
     void _deleteExpiredSubscription(     void _deleteExpiredSubscription(
         CIMObjectPath& subscription);         CIMObjectPath& subscription);
  
   #ifdef PEGASUS_ENABLE_PROTOCOL_WSMAN
       /**
           Deletes filter and handler of the specified subscription
   
           @param   subscription instance
        */
        void _deleteFilterHandler(
            CIMInstance &subscriptionInstance);
   #endif
   
     /**     /**
         Gets the Subscription Time Remaining property         Gets the Subscription Time Remaining property
  
Line 859 
Line 930 
                                            classes                                            classes
         @param   propertyList          Output list of properties required by the         @param   propertyList          Output list of properties required by the
                                            subscription                                            subscription
         @param   sourceNameSpace       Output source namespace for filter query  
         @param   condition             Output condition part of the filter query         @param   condition             Output condition part of the filter query
         @param   query                 Output filter query         @param   query                 Output filter query
         @param   queryLanguage         Output query language in which the filter         @param   queryLanguage         Output query language in which the filter
Line 867 
Line 937 
      */      */
     void _getCreateParams(     void _getCreateParams(
         const CIMInstance& subscriptionInstance,         const CIMInstance& subscriptionInstance,
         Array<CIMName>& indicationSubclasses,          Array<NamespaceClassList>& indicationSubclasses,
         Array<ProviderClassList>& indicationProviders,         Array<ProviderClassList>& indicationProviders,
         CIMPropertyList& propertyList,         CIMPropertyList& propertyList,
         CIMNamespaceName& sourceNameSpace,  
         String& condition,         String& condition,
         String& query,         String& query,
         String& queryLanguage);         String& queryLanguage);
Line 884 
Line 953 
                                            class in filter query                                            class in filter query
         @param   propertyList          Output list of properties required by the         @param   propertyList          Output list of properties required by the
                                            subscription                                            subscription
         @param   sourceNameSpace       Output source namespace for filter query  
         @param   condition             Output condition part of the filter query         @param   condition             Output condition part of the filter query
         @param   query                 Output filter query         @param   query                 Output filter query
         @param   queryLanguage         Output query language in which the filter         @param   queryLanguage         Output query language in which the filter
Line 892 
Line 960 
      */      */
     void _getCreateParams(     void _getCreateParams(
         const CIMInstance& subscriptionInstance,         const CIMInstance& subscriptionInstance,
         Array<CIMName>& indicationSubclasses,          Array<NamespaceClassList>& indicationSubclasses,
         CIMPropertyList& propertyList,         CIMPropertyList& propertyList,
         CIMNamespaceName& sourceNameSpace,  
         String& condition,         String& condition,
         String& query,         String& query,
         String& queryLanguage);         String& queryLanguage);
Line 905 
Line 972 
         @param   subscriptionInstance  Input subscription instance         @param   subscriptionInstance  Input subscription instance
         @param   indicationSubclasses  Output list of subclasses of indication         @param   indicationSubclasses  Output list of subclasses of indication
                                            class in filter query                                            class in filter query
         @param   sourceNameSpace       Output source namespace for filter query  
  
         @return  List of providers with associated classes to Delete         @return  List of providers with associated classes to Delete
      */      */
     Array<ProviderClassList> _getDeleteParams(     Array<ProviderClassList> _getDeleteParams(
         const CIMInstance& subscriptionInstance,         const CIMInstance& subscriptionInstance,
         Array<CIMName>& indicationSubclasses,          Array<NamespaceClassList>& indicationSubclasses);
         CIMNamespaceName& sourceNameSpace);  
  
     /**     /**
         Sends Create subscription request for the specified subscription         Sends Create subscription request for the specified subscription
Line 928 
Line 993 
         In case (3), there is no original request and no response is required.         In case (3), there is no original request and no response is required.
  
         @param   indicationProviders   list of providers with associated classes         @param   indicationProviders   list of providers with associated classes
         @param   nameSpace             the nameSpace name of the resource being                                         with the nameSpace name of the resource
                                            monitored, from the SourceNamespace                                         being monitored, from the SourceNamespace
                                            property of the CIM_IndicationFilter                                            property of the CIM_IndicationFilter
                                            instance for the specified                                            instance for the specified
                                            subscription                                            subscription
Line 953 
Line 1018 
      */      */
     void _sendAsyncCreateRequests(     void _sendAsyncCreateRequests(
         const Array<ProviderClassList>& indicationProviders,         const Array<ProviderClassList>& indicationProviders,
         const CIMNamespaceName& nameSpace,  
         const CIMPropertyList& propertyList,         const CIMPropertyList& propertyList,
         const String& condition,         const String& condition,
         const String& query,         const String& query,
Line 962 
Line 1026 
         const AcceptLanguageList& acceptLangs,         const AcceptLanguageList& acceptLangs,
         const ContentLanguageList& contentLangs,         const ContentLanguageList& contentLangs,
         const CIMRequestMessage * origRequest,         const CIMRequestMessage * origRequest,
         const Array<CIMName>& indicationSubclasses,          const Array<NamespaceClassList>& indicationSubclasses,
         const String& userName,         const String& userName,
         const String& authType = String::EMPTY);         const String& authType = String::EMPTY);
  
Line 981 
Line 1045 
         response is required.         response is required.
  
         @param   indicationProviders   list of providers with associated classes         @param   indicationProviders   list of providers with associated classes
         @param   nameSpace             the nameSpace name of the resource being                                         with the nameSpace name of the resource
                                            monitored, from the SourceNamespace                                         being monitored, from the SourceNamespace
                                            property of the CIM_IndicationFilter                                            property of the CIM_IndicationFilter
                                            instance for the specified                                            instance for the specified
                                            subscription                                            subscription
Line 1003 
Line 1067 
      */      */
     Array<ProviderClassList> _sendWaitCreateRequests(     Array<ProviderClassList> _sendWaitCreateRequests(
         const Array<ProviderClassList>& indicationProviders,         const Array<ProviderClassList>& indicationProviders,
         const CIMNamespaceName& nameSpace,  
         const CIMPropertyList& propertyList,         const CIMPropertyList& propertyList,
         const String& condition,         const String& condition,
         const String& query,         const String& query,
Line 1029 
Line 1092 
         request to which the Indication Service must respond.         request to which the Indication Service must respond.
  
         @param   indicationProviders   list of providers with associated classes         @param   indicationProviders   list of providers with associated classes
         @param   nameSpace             the nameSpace name of the resource being                                         with the nameSpace name of the resource
                                            monitored, from the SourceNamespace                                         being monitored, from the SourceNamespace
                                            property of the CIM_IndicationFilter                                            property of the CIM_IndicationFilter
                                            instance for the specified                                            instance for the specified
                                            subscription                                            subscription
Line 1049 
Line 1112 
      */      */
     void _sendWaitModifyRequests(     void _sendWaitModifyRequests(
         const Array<ProviderClassList>& indicationProviders,         const Array<ProviderClassList>& indicationProviders,
         const CIMNamespaceName& nameSpace,  
         const CIMPropertyList& propertyList,         const CIMPropertyList& propertyList,
         const String& condition,         const String& condition,
         const String& query,         const String& query,
Line 1076 
Line 1138 
         orginal request and no response is required.         orginal request and no response is required.
  
         @param   indicationProviders   list of providers with associated classes         @param   indicationProviders   list of providers with associated classes
         @param   nameSpace             the nameSpace name of the resource being                                         with the nameSpace name of the resource
                                            monitored, from the SourceNamespace                                         being monitored, from the SourceNamespace
                                            property of the CIM_IndicationFilter                                            property of the CIM_IndicationFilter
                                            instance for the specified                                            instance for the specified
                                            subscription                                            subscription
Line 1093 
Line 1155 
      */      */
     void _sendAsyncDeleteRequests(     void _sendAsyncDeleteRequests(
         const Array<ProviderClassList>& indicationProviders,         const Array<ProviderClassList>& indicationProviders,
         const CIMNamespaceName& nameSpace,  
         const CIMInstance& subscription,         const CIMInstance& subscription,
         const AcceptLanguageList& acceptLangs,         const AcceptLanguageList& acceptLangs,
         const ContentLanguageList& contentLangs,         const ContentLanguageList& contentLangs,
         const CIMRequestMessage * origRequest,         const CIMRequestMessage * origRequest,
         const Array<CIMName>& indicationSubclasses,          const Array<NamespaceClassList>& indicationSubclasses,
         const String& userName,         const String& userName,
         const String& authType = String::EMPTY);         const String& authType = String::EMPTY);
  
Line 1113 
Line 1174 
         Service must respond.         Service must respond.
  
         @param   indicationProviders   list of providers with associated classes         @param   indicationProviders   list of providers with associated classes
         @param   nameSpace             the nameSpace name of the resource being                                         with the nameSpace name of the resource
                                            monitored, from the SourceNamespace                                         being monitored, from the SourceNamespace
                                            property of the CIM_IndicationFilter                                            property of the CIM_IndicationFilter
                                            instance for the specified                                            instance for the specified
                                            subscription                                            subscription
Line 1126 
Line 1187 
      */      */
     void _sendWaitDeleteRequests(     void _sendWaitDeleteRequests(
         const Array<ProviderClassList>& indicationProviders,         const Array<ProviderClassList>& indicationProviders,
         const CIMNamespaceName& nameSpace,  
         const CIMInstance& subscription,         const CIMInstance& subscription,
         const AcceptLanguageList& acceptLangs,         const AcceptLanguageList& acceptLangs,
         const ContentLanguageList& contentLangs,         const ContentLanguageList& contentLangs,
Line 1243 
Line 1303 
         String& creator) const;         String& creator) const;
  
     /**     /**
         Validates the specified SubscriptionState property value.  
   
         @param   state                 SubscriptionState property value  
   
         @return  True, if the SubscriptionState property value is valid;  
                  False otherwise  
      */  
     Boolean _validateState(  
         const Uint16 state) const;  
   
     /**  
         This function peforms an authorization test based on the         This function peforms an authorization test based on the
         value of the enableSubscriptionForNonprivilegedUsers.         value of the enableSubscriptionForNonprivilegedUsers.
  
Line 1334 
Line 1383 
         const CIMNamespaceName& nameSpace,         const CIMNamespaceName& nameSpace,
         const CIMInstance& indicationProvider,         const CIMInstance& indicationProvider,
         Array<CIMInstance>& subscriptions,         Array<CIMInstance>& subscriptions,
         Array<String>& subscriptionKeys);          Array<SubscriptionKey>& subscriptionKeys);
  
     /**     /**
         Evaluate if the specified subscription matches the indication based on:         Evaluate if the specified subscription matches the indication based on:
Line 1404 
Line 1453 
         const CIMInstance& handlerInstance,         const CIMInstance& handlerInstance,
         const CIMInstance& formattedIndication,         const CIMInstance& formattedIndication,
         const CIMNamespaceName& namespaceName,         const CIMNamespaceName& namespaceName,
         const OperationContext& operationContext);          const OperationContext& operationContext,
           DeliveryStatusAggregator *deliveryStatusAggregator);
  
     /**     /**
         Updates the subscription table with the information of the providers         Updates the subscription table with the information of the providers
Line 1414 
Line 1464 
         @param  subscription           The accepted subscription.         @param  subscription           The accepted subscription.
         @param  acceptedProviders      Subscription accepted providers list.         @param  acceptedProviders      Subscription accepted providers list.
         @param  indicationSubclasses   The indication subclasses for the         @param  indicationSubclasses   The indication subclasses for the
                                            subscription                                         subscription with the source namespace.
         @param  sourceNameSpace        The nameSpace name of the resource being  
                                            monitored, from the SourceNamespace  
                                            property of the CIM_IndicationFilter  
                                            instance for the specified  
                                            subscription  
  
     */     */
     void _updateAcceptedSubscription(     void _updateAcceptedSubscription(
         CIMInstance &subscription,         CIMInstance &subscription,
         const Array<ProviderClassList> &acceptedProviders,         const Array<ProviderClassList> &acceptedProviders,
         const Array<CIMName> &indicationSubclasses,          const Array<NamespaceClassList> &indicationSubclasses);
         const CIMNamespaceName &sourceNameSpace);  
       Array<ProviderClassList> _getIndicationProvidersWithNamespaceClassList(
           const Array<ProviderClassList> &providers);
   
       void _addProviderToAcceptedProviderList(
           Array<ProviderClassList> &acceptedProviders,
           ProviderClassList &provider);
  
     void _deliverWaitingIndications();     void _deliverWaitingIndications();
     void _beginCreateSubscription(const CIMObjectPath &objPath);     void _beginCreateSubscription(const CIMObjectPath &objPath);
Line 1486 
Line 1537 
     Uint32 _handlerService;     Uint32 _handlerService;
  
     /**     /**
           Integer representing queue ID for accessing Module Controller
        */
       Uint32 _moduleController;
   
       /**
         Boolean indicating that the CIM Server has been configured to         Boolean indicating that the CIM Server has been configured to
         allow non-privileged users read and write access to the         allow non-privileged users read and write access to the
         Subscription classes.         Subscription classes.
Line 1507 
Line 1563 
     */     */
     CIMClass _getIndicationClass(const CIMInstance& instance);     CIMClass _getIndicationClass(const CIMInstance& instance);
  
       void _buildInternalControlProvidersRegistration();
   
       Array<ProviderClassList> _getInternalIndProviders(
           const Array<NamespaceClassList>& indicationSubclasses) const;
   
     /**     /**
         Arrays of valid and supported property values         Arrays of valid and supported property values
  
         Notes:         Notes:
         Valid values are defined by the CIM Event Schema MOF  
         Supported values are a subset of the valid values  
         Some valid values, as defined in the MOF, are not currently supported  
             by the Pegasus IndicationService  
  
         Supported Values         Supported Values
         SubscriptionState: Enabled, Disabled         SubscriptionState: Enabled, Disabled
Line 1523 
Line 1580 
         PersistenceType: Permanent, Transient         PersistenceType: Permanent, Transient
         SNMPVersion: SNMPv1 Trap, SNMPv2C Trap         SNMPVersion: SNMPv1 Trap, SNMPv2C Trap
      */      */
     Array<Uint16> _validStates;  
     Array<Uint16> _validRepeatPolicies;  
     Array<Uint16> _validErrorPolicies;  
     Array<Uint16> _validPersistenceTypes;  
     Array<Uint16> _validSNMPVersion;  
     Array<Uint16> _supportedStates;     Array<Uint16> _supportedStates;
     Array<Uint16> _supportedRepeatPolicies;     Array<Uint16> _supportedRepeatPolicies;
     Array<Uint16> _supportedErrorPolicies;     Array<Uint16> _supportedErrorPolicies;
     Array<Uint16> _supportedPersistenceTypes;     Array<Uint16> _supportedPersistenceTypes;
     Array<Uint16> _supportedSNMPVersion;     Array<Uint16> _supportedSNMPVersion;
  
     /**      ControlProvIndRegTable _controlProvIndRegTable;
         Arrays of names of supported properties for each class  
      */  
     Array<CIMName> _supportedSubscriptionProperties;  
     Array<CIMName> _supportedFormattedSubscriptionProperties;  
     Array<CIMName> _supportedFilterProperties;  
     Array<CIMName> _supportedCIMXMLHandlerProperties;  
     Array<CIMName> _supportedCIMXMLListenerDestinationProperties;  
     Array<CIMName> _supportedSNMPHandlerProperties;  
     Array<CIMName> _supportedSyslogListenerDestinationProperties;  
     Array<CIMName> _supportedEmailListenerDestinationProperties;  
 }; };
  
 // Use with AutoPtr to automatically decrement AtomicInt // Use with AutoPtr to automatically decrement AtomicInt
Line 1559 
Line 1601 
     }     }
 }; };
  
   struct ExpectedResponseCountSetDone
   {
       void operator()(DeliveryStatusAggregator* ptr)
       {
           if (ptr)
           {
               ptr->expectedResponseCountSetDone();
           }
       }
   };
   
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END
  
 #endif  /* Pegasus_IndicationService_h */ #endif  /* Pegasus_IndicationService_h */


Legend:
Removed from v.1.97  
changed lines
  Added in v.1.97.2.3

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2