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

   1 kumpf 1.27 //%/////////////////////////////////////////////////////////////////////////////
   2 kumpf 1.1  //
   3 kumpf 1.27 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,
   4 kumpf 1.1  // The Open Group, Tivoli Systems
   5            //
   6            // Permission is hereby granted, free of charge, to any person obtaining a copy
   7            // of this software and associated documentation files (the "Software"), to
   8            // deal in the Software without restriction, including without limitation the
   9            // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  10            // sell copies of the Software, and to permit persons to whom the Software is
  11            // furnished to do so, subject to the following conditions:
  12 kumpf 1.27 // 
  13 kumpf 1.1  // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
  14            // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
  15            // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
  16            // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  17            // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  18            // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  19            // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  20            // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  21            //
  22            //==============================================================================
  23            //
  24            // Author: Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)
  25            //
  26            // Modified By:  Carol Ann Krug Graves, Hewlett-Packard Company
  27            //               (carolann_graves@hp.com)
  28            //
  29            // Modified By:  Ben Heilbronn, Hewlett-Packard Company
  30            //               (ben_heilbronn@hp.com)
  31            //
  32            //%/////////////////////////////////////////////////////////////////////////////
  33            
  34 kumpf 1.1  #ifndef Pegasus_IndicationService_h
  35            #define Pegasus_IndicationService_h
  36            
  37            #include <Pegasus/Common/Config.h>
  38            #include <Pegasus/Common/MessageQueueService.h>
  39            #include <Pegasus/Common/CIMMessage.h>
  40 kumpf 1.24 #include <Pegasus/Common/IPC.h>
  41 kumpf 1.1  #include <Pegasus/Repository/CIMRepository.h>
  42 kumpf 1.6  #include <Pegasus/Server/ProviderRegistrationManager/ProviderRegistrationManager.h>
  43 kumpf 1.1  #include <Pegasus/WQL/WQLParser.h>
  44            #include <Pegasus/WQL/WQLSelectStatement.h>
  45            #include <Pegasus/WQL/WQLSimplePropertySource.h>
  46 kumpf 1.28 #include <Pegasus/Server/Linkage.h>
  47 kumpf 1.1  
  48            PEGASUS_NAMESPACE_BEGIN
  49            
  50 kumpf 1.10 /**
  51                Entry for list of indication providers
  52             */
  53            struct providerClassList
  54 kumpf 1.1  {
  55 kumpf 1.6      CIMInstance provider;
  56                CIMInstance providerModule;
  57 kumpf 1.31     Array <CIMName> classList;
  58 mday  1.13       providerClassList() 
  59                  {
  60                  }
  61                  
  62                  providerClassList(const providerClassList & rh)
  63            	 : provider(rh.provider),
  64            	   providerModule(rh.providerModule),
  65            	   classList(rh.classList)
  66                  {
  67            	 
  68                  }
  69                  providerClassList & operator= (const providerClassList & rh)
  70                  {
  71            	 if( this != &rh)
  72            	 {
  73            	    provider = rh.provider;
  74            	    providerModule = rh.providerModule;
  75            	    classList = rh.classList;
  76            	 }
  77            	 return *this;
  78                  }
  79 kumpf 1.1  };
  80 mday  1.13 
  81 kumpf 1.10 typedef struct providerClassList ProviderClassList;
  82            
  83 mday  1.13 struct enableProviderList
  84            {
  85                  ProviderClassList *pcl;
  86 kumpf 1.26       CIMInstance *cni;
  87 mday  1.13       
  88                  enableProviderList(const ProviderClassList & list, 
  89 kumpf 1.26 			 const CIMInstance & instance)
  90 mday  1.13       {
  91            	 pcl = new ProviderClassList(list);
  92 kumpf 1.26 	 cni = new CIMInstance (instance);
  93 mday  1.13 	 
  94                  }
  95            
  96                  ~enableProviderList() 
  97                  {
  98            	 delete pcl;
  99            	 delete cni;
 100                  }
 101                  
 102            };
 103            
 104 kumpf 1.10 /**
 105 kumpf 1.33     Entry for ActiveSubscriptions table
 106 kumpf 1.10  */
 107 kumpf 1.33 struct ActiveSubscriptionsTableEntry
 108 kumpf 1.10 {
 109 kumpf 1.26     CIMInstance subscription;
 110 kumpf 1.33     Array <ProviderClassList> providers;
 111 kumpf 1.10 };
 112 kumpf 1.1  
 113 kumpf 1.10 /**
 114 kumpf 1.33     Table for active subscription information
 115            
 116                The ActiveSubscriptions table is used to keep track of active subscriptions.
 117                Each entry consists of a Subscription instance, and a list of 
 118                ProviderClassList structs representing the providers currently serving each
 119                subscription and the relevant indication subclasses served by each provider.
 120                The Key is generated by concatenating the namespace name of the 
 121                subscription instance, and the subscription instance key values (filter and
 122                handler key values).
 123                The _handleProcessIndicationRequest() function, when a list of 
 124                subscriptions is included in request, looks up each subscription in the 
 125                table.
 126                The _handleNotifyProviderRegistrationRequest() function, once matching
 127                subscriptions have been identified, looks up the provider information for 
 128                each matching subscription in the table.
 129                The _handleModifyInstanceRequest() and _handleDeleteInstanceRequest() 
 130                functions, when sending delete requests to providers, look up the providers
 131                for the subscription in the table.
 132                The _handleNotifyProviderTerminationRequest() function, when a provider is 
 133                disabled, iterates through the table to retrieve all active 
 134                subscriptions being served by the provider.
 135 kumpf 1.33     The terminate() function, when the CIM Server is being shut down, iterates 
 136                through the table to retrieve all active subscriptions.
 137 kumpf 1.10  */
 138            typedef HashTable <String, 
 139 kumpf 1.33                    ActiveSubscriptionsTableEntry, 
 140 kumpf 1.10                    EqualFunc <String>, 
 141 kumpf 1.33                    HashFunc <String> > ActiveSubscriptionsTable;
 142            
 143            /**
 144                Entry for SubscriptionClasses table
 145             */
 146            struct SubscriptionClassesTableEntry
 147            {
 148                CIMName indicationClassName;
 149                CIMNamespaceName sourceNamespaceName;
 150                Array <CIMInstance> subscriptions;
 151            };
 152            
 153            /**
 154                Table for subscription classes information
 155            
 156                The SubscriptionClasses Table is used to keep track of active subscriptions 
 157                for each indication subclass-source namespace pair.
 158                Each entry consists of an indication subclass name, a source namespace name,
 159                and a list of subscription instances.
 160                The Key is generated by concatenating the indication subclass name, and the
 161                source namespace name.
 162 kumpf 1.33     The _handleProcessIndicationRequest() function, when no list of 
 163                subscriptions is included in the request, looks up matching subscriptions 
 164                in the table, using the class name and namespace name of the indication 
 165                instance.
 166                The _handleNotifyProviderRegistrationRequest() function, when an indication
 167                provider registration instance has been created or deleted, looks up 
 168                matching subscriptions in the table, using the class name and namespace 
 169                names from the provider registration instance.  
 170             */
 171            typedef HashTable <String,
 172                               SubscriptionClassesTableEntry,
 173                               EqualFunc <String>,
 174                               HashFunc <String> > SubscriptionClassesTable;
 175 kumpf 1.1  
 176            /**
 177            
 178 kumpf 1.5      IndicationService class is the service that serves the
 179 kumpf 1.10     Indication Subscription, Indication Filter, and Indication Handler
 180 kumpf 1.5      classes, and processes indications.
 181 kumpf 1.1  
 182                @author  Hewlett-Packard Company
 183            
 184             */
 185            
 186            class PEGASUS_SERVER_LINKAGE IndicationService : public MessageQueueService
 187            {
 188            public:
 189            
 190                typedef MessageQueueService Base;
 191            
 192                /**
 193                    Constructs an IndicationSubscription instance and initializes instance
 194                    variables.
 195                 */
 196 kumpf 1.6      IndicationService (
 197                    CIMRepository * repository,
 198 kumpf 1.8          ProviderRegistrationManager * providerRegManager);
 199 kumpf 1.1  
 200                virtual ~IndicationService(void);
 201            
 202 mday  1.2      void handleEnqueue(Message* message);
 203 kumpf 1.1  
 204                virtual void handleEnqueue(void); 
 205            
 206                virtual void _handle_async_request(AsyncRequest *req);
 207            
 208                AtomicInt dienow;
 209            
 210                /**
 211 kumpf 1.5          Operation types for the NotifyProviderRegistration message
 212 kumpf 1.1       */
 213 kumpf 1.5      enum Operation {OP_CREATE = 1, OP_DELETE = 2, OP_MODIFY = 3};
 214 kumpf 1.24 
 215                static Mutex _mutex;
 216 kumpf 1.1  
 217 kumpf 1.5  private:
 218 kumpf 1.1  
 219                void _initialize (void);
 220            
 221                void _terminate (void);
 222            
 223                void _handleGetInstanceRequest(const Message * message);
 224            
 225                void _handleEnumerateInstancesRequest(const Message * message);
 226            
 227                void _handleEnumerateInstanceNamesRequest(const Message * message);
 228            
 229                void _handleCreateInstanceRequest(const Message * message);
 230            
 231                void _handleModifyInstanceRequest(const Message * message);
 232            
 233                void _handleDeleteInstanceRequest(const Message * message);
 234            
 235                void _handleProcessIndicationRequest(const Message * message);
 236            
 237                /**
 238            	Notifies the Indication Service that a change in provider registration
 239 kumpf 1.1  	has occurred.  The Indication Service retrieves the subscriptions
 240 kumpf 1.23 	affected by the registration change, sends the appropriate Create,
 241                    Modify, and/or Delete requests to the provider, and sends an alert to 
 242 kumpf 1.10         handler instances of subscriptions that are no longer served by the 
 243                    provider.
 244 kumpf 1.1      */
 245                void _handleNotifyProviderRegistrationRequest(const Message * message);
 246            
 247                /**
 248 kumpf 1.33         Determines if the specified provider is in the list of providers 
 249                    serving the subscription.  
 250            
 251                    @param   provider              the provider instance
 252                    @param   tableValue            the Active Subscriptions Table entry
 253            
 254                    @return  The index of the provider in the list, if found
 255                             PEG_NOT_FOUND otherwise
 256                */
 257                Uint32 _providerInList 
 258                    (const CIMInstance & provider,
 259                     const ActiveSubscriptionsTableEntry & tableValue);
 260            
 261                /**
 262                    Determines if the specified class is in the list of indication 
 263                    subclasses served by the specified provider, serving the subscription.  
 264            
 265                    @param   className             the class name
 266                    @param   providerClasses       the list of providers serving the 
 267                                                   subscription, with the classes served
 268            
 269 kumpf 1.33         @return  The index of the class name in the list, if found
 270                             PEG_NOT_FOUND otherwise
 271                */
 272                Uint32 _classInList
 273                    (const CIMName & className,
 274                     const ProviderClassList & providerClasses);
 275            
 276                /**
 277                    Notifies the Indication Service that a provider has been disabled.  
 278                    The Indication Service retrieves the subscriptions affected by the
 279 kumpf 1.1          termination, and sends an alert to handler instances of
 280                    subscriptions that are no longer served by the provider.
 281                 */
 282                void _handleNotifyProviderTerminationRequest(const Message * message);
 283            
 284                /**
 285 kumpf 1.12         Implements the subscription's On Fatal Error Policy.
 286                    This function is called when a fatal error has occurred in the
 287                    indication provider or indication handler, and the subscription can no
 288                    longer be served.
 289                    If the subscription's policy is Disable, the Subscription State is
 290                    set to Disabled.
 291                    If the subscription's policy is Remove, the subscription instance is 
 292                    deleted.
 293            
 294 kumpf 1.33         @param   subscription          the subscription instance
 295 kumpf 1.12 
 296                    @return  True if the subscription has been disabled or deleted
 297                             False otherwise
 298                 */
 299                Boolean _handleError (
 300 kumpf 1.26         const CIMInstance subscription);
 301 kumpf 1.12 
 302                /**
 303                    Disables the subscription.
 304                    This function is called when a fatal error has occurred in the
 305                    indication provider or indication handler, the subscription can no
 306                    longer be served, and the subscription's policy is Disable.
 307                    The Subscription State is set to Disabled.
 308            
 309 kumpf 1.33         @param   subscription          the subscription instance
 310 kumpf 1.12      */
 311                void _disableSubscription (
 312 kumpf 1.26         CIMInstance subscription);
 313 kumpf 1.12 
 314                /**
 315                    Deletes the subscription instance.
 316                    This function is called when a fatal error has occurred in the
 317                    indication provider or indication handler, the subscription can no
 318                    longer be served, and the subscription's policy is Remove.
 319                    The subscription instance is deleted.
 320            
 321 kumpf 1.33         @param   subscription          the subscription instance
 322 kumpf 1.12      */
 323                void _deleteSubscription (
 324 kumpf 1.26         const CIMInstance subscription);
 325 kumpf 1.12 
 326                /**
 327 kumpf 1.5          Determines if it is legal to create an instance. 
 328                    Checks for existence of all key and required properties.  Checks that 
 329                    properties that MUST NOT exist (based on values of other properties), 
 330                    do not exist.  For any property that has a default value, if it does 
 331                    not exist, adds the property with the default value.
 332            
 333                    @param   instance              instance to be created
 334                    @param   nameSpace             namespace for instance to be created
 335            
 336                    @throw   CIM_ERR_INVALID_PARAMETER  if instance is invalid
 337                    @throw   CIM_ERR_NOT_SUPPORTED      if the specified class is not 
 338                                                        supported
 339            
 340                    @return  True if the instance can be created
 341 kumpf 1.10                  Otherwise throws an exception
 342 kumpf 1.5       */
 343                Boolean _canCreate (
 344                    CIMInstance & instance,
 345 kumpf 1.31         const CIMNamespaceName & nameSpace);
 346 kumpf 1.5  
 347 kumpf 1.21     /**
 348                    Validates the specified required property in the instance.
 349                    If the property does not exist, or has a null value, an exceptiuon is 
 350                    thrown, using the specified message.
 351            
 352                    This function is called by the _canCreate function, and is used to 
 353                    validate the  Filter and Handler properties in Subscription instances,
 354                    the Name, CreationClassName, Query and Query Language properties in 
 355                    Filter instances, the Name, CreationClassName, and Destination 
 356                    properties in CIMXML Handler instances, and the Name, CreationClassName,
 357                    Trap Destination, and SNMP Version properties in SNMP Mapper instances.
 358            
 359                    @param   instance              instance to be validated
 360                    @param   propertyName          name of property to be validated
 361                    @param   message               message to be used in exception
 362            
 363                    @throw   CIM_ERR_INVALID_PARAMETER  if required property is missing or 
 364                                                        null
 365                 */
 366 kumpf 1.20     void _checkRequiredProperty (
 367                    CIMInstance & instance,
 368 kumpf 1.31         const CIMName & propertyName,
 369 kumpf 1.20         const String & message);
 370            
 371 kumpf 1.5      /**
 372 kumpf 1.15         Validates the specified property and its corresponding Other___
 373                    property in the instance.
 374                    If the property does not exist, it is added with the default value.
 375                    If the property exists, but its value is NULL, its value is set to
 376                    the default value.
 377                    If the value of the property is Other, but the corresponding Other___
 378                    property either does not exist or has a value of NULL, an exception is 
 379                    thrown.  
 380                    If the value of the property is not Other, but the corresponding
 381                    Other___ property exists and has a non-NULL value, an exception is
 382                    thrown.
 383                    This function is called by the _canCreate function, and is used to 
 384                    validate the following pairs of properties in Subscription or Handler 
 385                    instances: Subscription State, Other Subscription State, Repeat 
 386                    Notification Policy, Other Repeat Notification Policy, On Fatal Error 
 387                    Policy, Other On Fatal Error Policy, Persistence Type, Other 
 388                    Persistence Type.
 389            
 390                    @param   instance              instance to be validated
 391                    @param   propertyName          name of property to be validated
 392                    @param   otherPropertyName     name of Other___ property to be validated
 393 kumpf 1.15         @param   defaultValue          default value for property
 394                    @param   otherValue            "Other" value for property
 395 kumpf 1.19         @param   validValues           set of valid values for property
 396 kumpf 1.15 
 397                    @throw   CIM_ERR_INVALID_PARAMETER  if value of property or Other___ 
 398                                                        property is invalid
 399                 */
 400 kumpf 1.20     void _checkPropertyWithOther (
 401 kumpf 1.15         CIMInstance & instance,
 402 kumpf 1.31         const CIMName & propertyName,
 403                    const CIMName & otherPropertyName,
 404 kumpf 1.15         const Uint16 defaultValue,
 405 kumpf 1.19         const Uint16 otherValue,
 406                    const Array <Uint16> & validValues);
 407 kumpf 1.20 
 408 kumpf 1.21     /**
 409                    Validates the specified property in the instance.
 410                    If the property does not exist, it is added with the default value.
 411                    If the property exists, but its value is NULL, its value is set to
 412                    the default value.
 413                    This function is called by the _canCreate function, and is used to 
 414                    validate the System Name and System Creation Class Name properties in
 415                    Filter and Handler instances, and the Source Namespace property in 
 416                    Filter instances.
 417            
 418                    @param   instance              instance to be validated
 419                    @param   propertyName          name of property to be validated
 420                    @param   defaultValue          default value for property
 421            
 422                    @return  the value of the property
 423            
 424                 */
 425 kumpf 1.20     String _checkPropertyWithDefault (
 426                    CIMInstance & instance,
 427 kumpf 1.31         const CIMName & propertyName,
 428 kumpf 1.20         const String & defaultValue);
 429 kumpf 1.15 
 430                /**
 431 kumpf 1.10         Determines if the user is authorized to modify the instance, and if the
 432                    specified modification is supported.  Currently, the only modification 
 433                    supported is of the Subscription State property of the Subscription 
 434                    class.
 435 kumpf 1.5  
 436                    @param   request               modification request
 437                    @param   instance              instance to be modified
 438            
 439 kumpf 1.10         @throw   CIM_ERR_NOT_SUPPORTED      if the specified modification is 
 440 kumpf 1.5                                              not supported
 441                    @throw   CIM_ERR_ACCESS_DENIED      if the user is not authorized to
 442                                                        modify the instance
 443            
 444                    @return  True if the instance can be modified
 445 kumpf 1.10                  Otherwise throws an exception
 446 kumpf 1.5       */
 447                Boolean _canModify (
 448                    const CIMModifyInstanceRequestMessage * request,
 449 kumpf 1.25         const CIMObjectPath & instanceReference,
 450 kumpf 1.19         CIMInstance & instance);
 451 kumpf 1.5  
 452                /**
 453 kumpf 1.10         Determines if the user is authorized to delete the instance, and if it 
 454 kumpf 1.11         is legal to delete the instance.  If authorized, Subscription instances 
 455 kumpf 1.10         may always be deleted.  Filter and non-transient Handler instances may 
 456                    only be deleted if they are not being referenced by any Subscription 
 457                    instances. If the instance to be deleted is a transient Handler, any 
 458                    referencing Subscriptions are also deleted.
 459 kumpf 1.5  
 460                    @param   instanceReference     reference for instance to be deleted
 461                    @param   nameSpace             namespace for instance to be deleted
 462 kumpf 1.10         @param   currentUser           current user
 463            
 464                    @throw   CIM_ERR_ACCESS_DENIED      if the user is not authorized to
 465                                                        delete the instance
 466                    @throw   CIM_ERR_FAILED             if the instance to be deleted is 
 467                                                        referenced by a subscription
 468 kumpf 1.5  
 469                    @return  True if the instance can be deleted
 470 kumpf 1.10                  Otherwise throws an exception
 471 kumpf 1.1       */
 472                Boolean _canDelete (
 473 kumpf 1.25         const CIMObjectPath & instanceReference,
 474 kumpf 1.31         const CIMNamespaceName & nameSpace,
 475 kumpf 1.10         const String & currentUser);
 476 kumpf 1.1  
 477                /**
 478 kumpf 1.33         Retrieves list of enabled subscription instances in all namespaces from
 479                    the repository.
 480            
 481                    @return   list of CIMInstance subscriptions
 482                 */
 483                Array <CIMInstance> _getActiveSubscriptionsFromRepository () const;
 484            
 485                /**
 486                    Retrieves list of enabled subscription instances in all namespaces from
 487                    the Active Subscriptions table.
 488 kumpf 1.1  
 489 kumpf 1.26         @return   list of CIMInstance subscriptions
 490 kumpf 1.1       */
 491 kumpf 1.26     Array <CIMInstance> _getActiveSubscriptions () const;
 492 kumpf 1.1  
 493                /**
 494                    Retrieves list of enabled subscription instances in all namespaces,
 495                    where the subscription indication class matches or is a superclass
 496 kumpf 1.10         of the supported class, and the properties required to process the
 497                    subscription are all contained in the list of supported properties.
 498 kumpf 1.1  
 499 kumpf 1.10         @param   supportedClass       the supported class
 500                    @param   nameSpaces           the list of supported namespaces
 501                    @param   supportedProperties  the list of supported properties
 502 kumpf 1.1  
 503 kumpf 1.26         @return   list of CIMInstance subscriptions
 504 kumpf 1.1       */
 505 kumpf 1.26     Array <CIMInstance> _getMatchingSubscriptions (
 506 kumpf 1.31         const CIMName & supportedClass,
 507                    const Array <CIMNamespaceName> nameSpaces,
 508 kumpf 1.10         const CIMPropertyList & supportedProperties);
 509 kumpf 1.1  
 510                /**
 511                    Retrieves lists of enabled subscription instances in all namespaces
 512                    that are either newly supported or previously supported, based on the
 513 kumpf 1.9          supported class, the supported namespaces before and after modification,
 514                    and the supported properties before and after modification.  For 
 515 kumpf 1.10         subscriptions based on the supported class, the newSubscriptions list 
 516 kumpf 1.9          returned contains the subscriptions for which the properties required 
 517                    to process the subscription are all contained in the new list of 
 518                    supported properties, but are not all contained in the old list of 
 519                    supported properties, and/or the filter source namespace is contained in
 520                    the new list if supported namespaces, but is not contained in the old 
 521                    list of supported namespaces.  The formerSubscriptions list returned 
 522                    contains the subscriptions for which the properties required to process
 523                    the subscription are not all contained in the new list of supported 
 524                    properties, but are all contained in the old list of supported 
 525                    properties, and/or the filter source namespace is not contained in the 
 526                    new list if supported namespaces, but is contained in the old list of 
 527                    supported namespaces.
 528            
 529 kumpf 1.10         @param   supportedClass       the supported class
 530 kumpf 1.9          @param   newNameSpaces        namespaces supported after modification
 531                    @param   oldNameSpaces        namespaces supported before modification
 532                    @param   newProperties        properties supported after modification
 533                    @param   oldProperties        properties supported before modification
 534 kumpf 1.1          @param   newSubscriptions     the list of newly supported subscriptions
 535                    @param   formerSubscriptions  the list of previously supported
 536                                                      subscriptions
 537                 */
 538                void _getModifiedSubscriptions (
 539 kumpf 1.31         const CIMName & supportedClass,
 540                    const Array <CIMNamespaceName> & newNameSpaces,
 541                    const Array <CIMNamespaceName> & oldNameSpaces,
 542 kumpf 1.1          const CIMPropertyList & newProperties,
 543                    const CIMPropertyList & oldProperties,
 544 kumpf 1.26         Array <CIMInstance> & newSubscriptions,
 545                    Array <CIMInstance> & formerSubscriptions);
 546 kumpf 1.1  
 547                /**
 548 kumpf 1.15         Retrieves list of all namespaces from the repository.
 549            
 550                    @return   List of all namespace names
 551                 */
 552 kumpf 1.31     Array <CIMNamespaceName> _getNameSpaceNames (void) const;
 553 kumpf 1.15 
 554                /**
 555                    Retrieves list of subscriptions in the specified namespace.
 556            
 557                    @param   nameSpace             the namespace
 558            
 559 kumpf 1.33         @return   List of subscription instances
 560 kumpf 1.15      */
 561 kumpf 1.26     Array <CIMInstance> _getSubscriptions (
 562 kumpf 1.31         const CIMNamespaceName & nameSpaceName) const;
 563 kumpf 1.15 
 564                /**
 565 kumpf 1.9          Determines if all of the required properties in the specified list
 566                    are contained in the specified list of supported properties.
 567            
 568                    @param   requiredProperties  the required properties
 569 kumpf 1.10         @param   supportedProperties the supported properties
 570 kumpf 1.9  
 571                    @return   true if all required properties are supported
 572                              false otherwise
 573                 */
 574                Boolean _inPropertyList (
 575                    const CIMPropertyList & requiredProperties,
 576 kumpf 1.10         const CIMPropertyList & supportedProperties);
 577 kumpf 1.9  
 578                /**
 579 kumpf 1.1          Retrieves list of enabled subscription instances in all namespaces,
 580 kumpf 1.33         that are served by the specified provider.  This function is called 
 581                    when a provider is disabled.  In the Active Subscriptions table, the 
 582                    specified provider is removed from the list of providers serving the 
 583                    subscription.  If there are no remaining providers serving the 
 584                    subscription, the subscription is removed from the Active Subscriptions
 585                    table.
 586 kumpf 1.1  
 587 kumpf 1.10         @param   provider          the provider instance
 588 kumpf 1.1  
 589 kumpf 1.26         @return   list of CIMInstance subscriptions
 590 kumpf 1.1       */
 591 kumpf 1.26     Array <CIMInstance> _getProviderSubscriptions (
 592 kumpf 1.10         const CIMInstance & provider);
 593 kumpf 1.1  
 594                /**
 595 kumpf 1.10         Retrieves the values of the filter query, source namespace,
 596                    and query language properties for the specified subscription instance.
 597 kumpf 1.1  
 598 kumpf 1.10         @param   subscription      Input subscription instance
 599                    @param   nameSpaceName     Input namespace name
 600                    @param   query             Output query for the filter
 601                    @param   sourceNameSpace   Output source namespace for the filter
 602                                                   subscription
 603                    @param   queryLanguage     Output query language in which the filter
 604                                                   query is expressed
 605 kumpf 1.1       */
 606 kumpf 1.10     void _getFilterProperties (
 607 kumpf 1.1          const CIMInstance & subscription,
 608 kumpf 1.31         const CIMNamespaceName & nameSpaceName,
 609 kumpf 1.10         String & query,
 610 kumpf 1.31         CIMNamespaceName & sourceNameSpace,
 611 kumpf 1.10         String & queryLanguage);
 612 kumpf 1.1  
 613                /**
 614 kumpf 1.10         Retrieves the values of the filter query and source namespace
 615                    properties for the specified subscription instance.
 616 kumpf 1.8  
 617 kumpf 1.10         @param   subscription      Input subscription instance
 618                    @param   nameSpaceName     Input namespace name
 619                    @param   query             Output query for the filter
 620                    @param   sourceNameSpace   Output source namespace for the filter
 621                                                   subscription
 622 kumpf 1.8       */
 623 kumpf 1.10     void _getFilterProperties (
 624 kumpf 1.8          const CIMInstance & subscription,
 625 kumpf 1.31         const CIMNamespaceName & nameSpaceName,
 626 kumpf 1.10         String & query,
 627 kumpf 1.31         CIMNamespaceName & sourceNameSpace);
 628 kumpf 1.8  
 629                /**
 630 kumpf 1.32         Retrieves the value of the filter query property 
 631 kumpf 1.1          for the specified subscription instance.
 632            
 633 kumpf 1.10         @param   subscription      Input subscription instance
 634                    @param   nameSpaceName     Input namespace name
 635                    @param   query             Output query for the filter
 636 kumpf 1.1       */
 637 kumpf 1.10     void _getFilterProperties (
 638 kumpf 1.1          const CIMInstance & subscription,
 639 kumpf 1.31         const CIMNamespaceName & nameSpaceName,
 640 kumpf 1.10         String & query);
 641 kumpf 1.1  
 642                /**
 643                    Parses the filter query string, and returns the corresponding
 644                    WQLSelectStatement object.
 645            
 646                    @param   filterQuery           the filter query string
 647            
 648                    @return  WQLSelectStatement representing the filter query
 649                 */
 650                WQLSelectStatement _getSelectStatement (
 651                    const String & filterQuery) const;
 652            
 653                /**
 654                    Extracts the indication class name from the specified WQL select
 655                    statement, and validates that the name represents a subclass of the
 656                    Indication class.
 657            
 658                    @param   selectStatement       the WQL select statement
 659                    @param   nameSpaceName         the namespace
 660            
 661                    @return  String containing the indication class name
 662 kumpf 1.1       */
 663 kumpf 1.31     CIMName _getIndicationClassName (
 664 kumpf 1.1          const WQLSelectStatement & selectStatement,
 665 kumpf 1.31         const CIMNamespaceName & nameSpaceName) const;
 666 kumpf 1.15 
 667                /**
 668                    Enumerates the subclass names of the specified indication class.
 669            
 670                    @param   nameSpace             the namespace
 671                    @param   indicationClassName   the indication class name
 672            
 673                    @return  List of indication subclass names
 674                 */
 675 kumpf 1.31     Array <CIMName> _getIndicationSubclasses (
 676                    const CIMNamespaceName & nameSpace,
 677                    const CIMName & indicationClassName) const;
 678 kumpf 1.1  
 679                /**
 680                    Retrieves the list of indication providers that serve the specified
 681                    indication subclasses.
 682            
 683                    @param   nameSpaceName         the namespace name
 684                    @param   indicationClassName   the indication class name
 685                    @param   indicationSubclasses  the list of indication subclass names
 686                    @param   requiredPropertyList  the properties required
 687            
 688                    @return  list of ProviderClassList structs
 689                 */
 690 kumpf 1.10     Array <ProviderClassList> _getIndicationProviders (
 691 kumpf 1.31         const CIMNamespaceName & nameSpace,
 692                    const CIMName & indicationClassName,
 693                    const Array <CIMName> & indicationSubclasses,
 694 kumpf 1.1          const CIMPropertyList & requiredPropertyList) const;
 695            
 696                /**
 697                    Retrieves the list of properties referenced by the specified
 698                    filter query select statement.
 699            
 700                    @param   selectStatement       the WQL select statement
 701 kumpf 1.22         @param   nameSpaceName         the namespace
 702                    @param   indicationClassName   the indciation class name
 703 kumpf 1.1  
 704 kumpf 1.22         @return  CIMPropertyList of properties referenced by the filter query 
 705                             select statement
 706 kumpf 1.1       */
 707                CIMPropertyList _getPropertyList (
 708 kumpf 1.11         const WQLSelectStatement & selectStatement,
 709 kumpf 1.31         const CIMNamespaceName & nameSpaceName,
 710                    const CIMName & indicationClassName) const;
 711 kumpf 1.22 
 712                /**
 713                    Checks if the property list includes all properties in the specified 
 714                    class.  If so, a NULL CIMPropertyList is returned.  Otherwise, a
 715 kumpf 1.32         CIMPropertyList containing the properties is returned.
 716 kumpf 1.22 
 717                    @param   propertyList          the list of property names
 718                    @param   nameSpaceName         the namespace
 719                    @param   indicationClassName   the indciation class name
 720            
 721                    @return  CIMPropertyList of properties referenced by the filter query 
 722                             select statement
 723                 */
 724                CIMPropertyList _checkPropertyList (
 725 kumpf 1.29         const Array <CIMName> & propertyList,
 726 kumpf 1.31         const CIMNamespaceName & nameSpaceName,
 727                    const CIMName & indicationClassName) const;
 728 kumpf 1.1  
 729                /**
 730                    Extracts the condition (WHERE Clause) from the specified filter query
 731                    string.
 732            
 733                    @param   filterQuery       the filter query
 734            
 735                    @return  String containing the filter query condition
 736                 */
 737                String _getCondition (
 738                    const String & filterQuery) const;
 739            
 740                /**
 741 kumpf 1.26         Retrieves the Handler CIMInstance representing the handler of the
 742 kumpf 1.1          specified subscription.
 743            
 744 kumpf 1.7          @param   subscription          the subscription
 745 kumpf 1.1  
 746 kumpf 1.26         @return  a Handler CIMInstance for the subscription's handler
 747 kumpf 1.1       */
 748 kumpf 1.26     CIMInstance _getHandler (
 749                    const CIMInstance & subscription) const;
 750 kumpf 1.1  
 751                /**
 752 kumpf 1.4          Determines if specified handler is Transient.
 753            
 754                    @param   nameSpace             the name space
 755                    @param   handler               the handler reference
 756            
 757                    @return  True if the Handler is Transient, 
 758                             False otherwise
 759                 */
 760                Boolean _isTransient (
 761 kumpf 1.31         const CIMNamespaceName & nameSpace,
 762 kumpf 1.25         const CIMObjectPath & handler) const;
 763 kumpf 1.4  
 764                /**
 765                    Deletes subscriptions referencing the specified handler.
 766            
 767                    @param   nameSpace             the name space
 768                    @param   referenceProperty     the name of the reference property in the
 769                                                       subscription instance
 770                    @param   handler               the handler reference
 771                 */
 772                void _deleteReferencingSubscriptions (
 773 kumpf 1.31         const CIMNamespaceName & nameSpace,
 774                    const CIMName & referenceProperty,
 775 kumpf 1.25         const CIMObjectPath & handler);
 776 kumpf 1.4  
 777                /**
 778                    Determines if specified Subscription has expired
 779            
 780                    NOTE: It is assumed that the instance passed to this function is a
 781                    Subscription instance, and that the Subscription Duration and
 782                    Start Time properties exist
 783            
 784                    @param   instance              the subscription instance
 785            
 786                    @return  True if the Subscription has expired, 
 787                             False otherwise
 788                 */
 789                Boolean _isExpired (
 790                    const CIMInstance & instance) const;
 791            
 792                /**
 793 kumpf 1.5          Deletes specified subscription 
 794            
 795                    @param   subscription          the subscription reference
 796                 */
 797                void _deleteExpiredSubscription (
 798 kumpf 1.25         CIMObjectPath & subscription);
 799 kumpf 1.21 
 800                /**
 801                    Gets the Subscription Time Remaining property
 802            
 803                    Calculates time remaining from Subscription Start Time, Subscription 
 804                    Duration, and current date time.  If the subscription has a non-null
 805                    Duration, the Time Remaining is set, and True is returned.  If the 
 806                    subscription does not have a non-null Duration, it has no expiration 
 807                    date, and the time remaining is unlimited.  In this case, the Time 
 808                    Remaining is not set and False is returned.
 809                  
 810                    NOTE: It is assumed that the instance passed to this function is a
 811                    Subscription instance, and that the Start Time property exists and 
 812                    has a value
 813            
 814                    @param   instance              Input the subscription instance
 815                    @param   timeRemaining         Output the time remaining (seconds)
 816            
 817                    @return  True if the subscription has a non-null Duration
 818                             False otherwise
 819                 */
 820 kumpf 1.21     Boolean _getTimeRemaining (
 821                    const CIMInstance & instance,
 822                    Uint64 & timeRemaining) const;
 823 kumpf 1.5  
 824                /**
 825 kumpf 1.4          Sets the Subscription Time Remaining property
 826            
 827                    Calculates time remaining from Subscription Start Time, Subscription 
 828                    Duration, and current date time
 829                  
 830                    NOTE: It is assumed that the instance passed to this function is a
 831                    Subscription instance, and that the Subscription Duration and
 832                    Start Time properties exist
 833            
 834                    @param   instance              the subscription instance
 835                 */
 836                void _setTimeRemaining (
 837                    CIMInstance & instance);
 838            
 839                /**
 840 kumpf 1.23         Gets the parameter values required to Create or Modify the subscription
 841 kumpf 1.10         request.
 842 kumpf 1.5          If no indication providers are found, condition and queryLanguage are 
 843 kumpf 1.3          set to empty string.
 844            
 845 kumpf 1.33         @param   nameSpaceName         Input namespace name (of subscription)
 846                    @param   subscriptionInstance  Input subscription instance
 847                    @param   indicationSubclasses  Output list of subclasses of indication 
 848                                                       class in filter query
 849 kumpf 1.3          @param   indicationProviders   Output list of providers with associated
 850                                                       classes
 851                    @param   propertyList          Output list of properties required by the
 852                                                       subscription
 853 kumpf 1.17         @param   sourceNameSpace       Output source namespace for filter query
 854 kumpf 1.3          @param   condition             Output condition part of the filter query
 855                    @param   queryLanguage         Output query language in which the filter
 856                                                       query is expressed
 857                 */
 858 kumpf 1.23     void _getCreateParams (
 859 kumpf 1.31         const CIMNamespaceName & nameSpaceName,
 860 kumpf 1.3          const CIMInstance & subscriptionInstance,
 861 kumpf 1.33         Array <CIMName> & indicationSubclasses,
 862 kumpf 1.10         Array <ProviderClassList> & indicationProviders,
 863                    CIMPropertyList & propertyList,
 864 kumpf 1.31         CIMNamespaceName & sourceNameSpace,
 865 kumpf 1.10         String & condition,
 866                    String & queryLanguage);
 867            
 868                /**
 869 kumpf 1.23         Gets the parameter values required to Create or Modify the subscription
 870 kumpf 1.10         request.
 871            
 872 kumpf 1.33         @param   nameSpaceName         Input namespace name (of subscription)
 873                    @param   subscriptionInstance  Input subscription instance
 874                    @param   indicationSubclasses  Output list of subclasses of indication 
 875                                                       class in filter query
 876 kumpf 1.10         @param   propertyList          Output list of properties required by the
 877                                                       subscription
 878 kumpf 1.17         @param   sourceNameSpace       Output source namespace for filter query
 879 kumpf 1.10         @param   condition             Output condition part of the filter query
 880                    @param   queryLanguage         Output query language in which the filter
 881                                                       query is expressed
 882                 */
 883 kumpf 1.23     void _getCreateParams (
 884 kumpf 1.31         const CIMNamespaceName & nameSpaceName,
 885 kumpf 1.10         const CIMInstance & subscriptionInstance,
 886 kumpf 1.33         Array <CIMName> & indicationSubclasses,
 887 kumpf 1.3          CIMPropertyList & propertyList,
 888 kumpf 1.31         CIMNamespaceName & sourceNameSpace,
 889 kumpf 1.3          String & condition,
 890                    String & queryLanguage);
 891            
 892                /**
 893 kumpf 1.23         Gets the parameter values required to Delete the subscription request.
 894 kumpf 1.5  
 895 kumpf 1.33         @param   nameSpaceName         Input namespace name
 896                    @param   subscriptionInstance  Input subscription instance
 897                    @param   indicationSubclasses  Output list of subclasses of indication 
 898                                                       class in filter query
 899                    @param   sourceNameSpace       Output source namespace for filter query
 900 kumpf 1.5  
 901 kumpf 1.23         @return  List of providers with associated classes to Delete
 902 kumpf 1.5       */
 903 kumpf 1.23     Array <ProviderClassList> _getDeleteParams (
 904 kumpf 1.31         const CIMNamespaceName & nameSpaceName,
 905 kumpf 1.33         const CIMInstance & subscriptionInstance,
 906                    Array <CIMName> & indicationSubclasses,
 907                    CIMNamespaceName & sourceNameSpace);
 908 mday  1.13 
 909                  /**
 910 kumpf 1.23 	 Asynchronous completion routine for _sendCreateRequests.
 911 mday  1.13 	 
 912 kumpf 1.23 	 @param  operation            shared data structure that controls msg 
 913                                                  processing
 914 mday  1.13 	 @param  destination          target queue of completion callback
 915            	 @param  parm                 user parameter for callback processing
 916                  */
 917            
 918 kumpf 1.23       static void _sendCreateRequestsCallBack(AsyncOpNode *operation, 
 919 mday  1.13 					      MessageQueue *destination, 
 920            					      void *parm);
 921                   
 922            
 923 kumpf 1.5      /**
 924 kumpf 1.23         Sends Create subscription request for the specified subscription
 925 kumpf 1.1          to each provider in the list.
 926            
 927                    @param   indicationProviders   list of providers with associated classes
 928                    @param   nameSpace             the namespace name
 929                    @param   propertyList          the properties referenced by the
 930                                                       subscription
 931                    @param   condition             the condition part of the filter query
 932                    @param   queryLanguage         the query language in which the filter
 933                                                       query is expressed
 934 kumpf 1.23         @param   subscription          the subscription to be created
 935 kumpf 1.9          @param   userName              the userName for authentication
 936                    @param   authType              the authentication type
 937            
 938                    @return  True if at least one provider accepted the subscription
 939                             False otherwise
 940 kumpf 1.1       */
 941 kumpf 1.23     Boolean _sendCreateRequests (
 942 kumpf 1.10         const Array <ProviderClassList> & indicationProviders,
 943 kumpf 1.31         const CIMNamespaceName & nameSpace,
 944 kumpf 1.1          const CIMPropertyList & propertyList,
 945                    const String & condition,
 946                    const String & queryLanguage,
 947 kumpf 1.26         const CIMInstance & subscription,
 948 kumpf 1.9          const String & userName,
 949                    const String & authType = String::EMPTY);
 950 mday  1.13 
 951            
 952                  /** 
 953            	  Callback completion routine for _sendModifyRequests
 954            	 
 955                  */
 956            
 957                  static void _sendModifyRequestsCallBack(AsyncOpNode *operation,
 958            					      MessageQueue *destination,
 959            					      void *parm);
 960                  
 961 kumpf 1.1  
 962                /**
 963 kumpf 1.23         Sends Modify subscription request for the specified subscription
 964 kumpf 1.1          to each provider in the list.
 965            
 966                    @param   indicationProviders   list of providers with associated classes
 967                    @param   nameSpace             the namespace name
 968                    @param   propertyList          the properties referenced by the
 969                                                       subscription
 970                    @param   condition             the condition part of the filter query
 971                    @param   queryLanguage         the query language in which the filter
 972                                                       query is expressed
 973                    @param   subscription          the subscription to be modified
 974 kumpf 1.9          @param   userName              the userName for authentication
 975                    @param   authType              the authentication type
 976 kumpf 1.1       */
 977                void _sendModifyRequests (
 978 kumpf 1.10         const Array <ProviderClassList> & indicationProviders,
 979 kumpf 1.31         const CIMNamespaceName & nameSpace,
 980 kumpf 1.1          const CIMPropertyList & propertyList,
 981                    const String & condition,
 982                    const String & queryLanguage,
 983 kumpf 1.26         const CIMInstance & subscription,
 984 kumpf 1.9          const String & userName,
 985                    const String & authType = String::EMPTY);
 986 kumpf 1.1  
 987 mday  1.14 
 988                  /** 
 989 kumpf 1.23 	  Asynchronous completion routine for _sendDeleteRequests. 
 990 mday  1.14       */
 991            
 992 kumpf 1.23       static void _sendDeleteRequestsCallBack (
 993                      AsyncOpNode *operation, 
 994                      MessageQueue *callback_destination,
 995                      void *parameter);
 996 mday  1.14 
 997 kumpf 1.1      /**
 998 kumpf 1.23         Sends Delete subscription request for the specified subscription
 999 kumpf 1.1          to each provider in the list.
1000            
1001                    @param   indicationProviders   list of providers with associated classes
1002                    @param   nameSpace             the namespace name
1003                    @param   subscription          the subscription to be modified
1004 kumpf 1.9          @param   userName              the userName for authentication
1005                    @param   authType              the authentication type
1006 kumpf 1.1       */
1007 kumpf 1.23     void _sendDeleteRequests (
1008 kumpf 1.10         const Array <ProviderClassList> & indicationProviders,
1009 kumpf 1.31         const CIMNamespaceName & nameSpace,
1010 kumpf 1.26         const CIMInstance & subscription,
1011 kumpf 1.9          const String & userName,
1012                    const String & authType = String::EMPTY);
1013 kumpf 1.1  
1014                /**
1015 kumpf 1.33         Generates a unique String key for the Active Subscriptions table from 
1016                    the subscription namespace name and key values.
1017            
1018                    @param   subscription          the subscription instance
1019            
1020                    @return  the generated key
1021                 */
1022                String _generateActiveSubscriptionsKey (
1023                    const CIMObjectPath & subscriptionRef);
1024            
1025                /**
1026                    Inserts an entry into the Active Subscriptions table.
1027 kumpf 1.10 
1028 kumpf 1.32         @param   subscription          the subscription instance
1029 kumpf 1.33         @param   providers             the list of providers 
1030                 */
1031                void _insertActiveSubscriptionsEntry (
1032                    const CIMInstance & subscription,
1033                    const Array <ProviderClassList> & providers);
1034            
1035                /**
1036                    Generates a unique String key for the Subscription Classes table from
1037                    the indication class name and source namespace name.
1038            
1039                    @param   indicationClassName   the indication class name
1040                    @param   sourceNamespaceName   the source namespace name
1041 kumpf 1.10 
1042                    @return  the generated key
1043                 */
1044 kumpf 1.33     String _generateSubscriptionClassesKey (
1045                    const CIMName & indicationClassName,
1046                    const CIMNamespaceName & sourceNamespaceName);
1047            
1048                /**
1049                    Inserts an entry into the Subscription Classes table.
1050            
1051                    @param   indicationClassName   the indication class name
1052                    @param   sourceNamespaceName   the source namespace name
1053                    @param   subscriptions         the list of subscription instances
1054                 */
1055                void _insertSubscriptionClassesEntry (
1056                    const CIMName & indicationClassName,
1057                    const CIMNamespaceName & sourceNamespaceName,
1058                    const Array <CIMInstance> & subscriptions);
1059            
1060                /**
1061                    Inserts entries (or updates existing entries) in the 
1062                    Active Subscriptions and Subscription Classes tables.
1063            
1064                    @param   subscription            the subscription instance
1065 kumpf 1.33         @param   providers               the list of providers
1066                    @param   indicationSubclassNames the list of indication subclass names
1067                    @param   sourceNamespaceName     the source namespace name
1068                 */
1069                void _insertToHashTables (
1070 kumpf 1.26         const CIMInstance & subscription,
1071 kumpf 1.33         const Array <ProviderClassList> & providers,
1072                    const Array <CIMName> & indicationSubclassNames,
1073                    const CIMNamespaceName & sourceNamespaceName);
1074 kumpf 1.10 
1075                /**
1076 kumpf 1.33         Removes entries (or updates entries) in the Active Subscriptions and 
1077                    Subscription Classes tables.
1078 kumpf 1.10 
1079 kumpf 1.33         @param   subscription            the subscription instance
1080                    @param   indicationSubclassNames the list of indication subclass names
1081                    @param   sourceNamespaceName     the source namespace name
1082 kumpf 1.10      */
1083 kumpf 1.33     void _removeFromHashTables (
1084 kumpf 1.26         const CIMInstance & subscription,
1085 kumpf 1.33         const Array <CIMName> & indicationSubclassNames,
1086                    const CIMNamespaceName & sourceNamespaceName);
1087 kumpf 1.10 
1088                /**
1089 kumpf 1.1          Creates an alert instance of the specified class.
1090            
1091                    @param   alertClassName        the alert class name
1092 kumpf 1.7          @param   subscriptions         subscriptions for which alert is to be
1093 kumpf 1.1                                             created
1094            
1095                    @return  the created alert instance
1096                 */
1097                CIMInstance _createAlertInstance (
1098 kumpf 1.31         const CIMName & alertClassName,
1099 kumpf 1.26         const Array <CIMInstance> & subscriptions);
1100 mday  1.14 
1101 kumpf 1.33      /** 
1102 mday  1.14 	  Asynchronous completion routine for _sendAlerts
1103                  */
1104            
1105                  static void _sendAlertsCallBack(AsyncOpNode *operation, 
1106            				      MessageQueue *callback_destination, 
1107            				      void *parameter);
1108 kumpf 1.1  
1109                /**
1110                    Sends specified alert to each unique handler instance for the
1111                    specified subscriptions in the list.
1112            
1113 kumpf 1.7          @param   subscriptions         subscriptions for which alert is to be
1114 kumpf 1.1                                             sent
1115                    @param   alertInstance         the alert to be sent
1116                 */
1117                void _sendAlerts (
1118 kumpf 1.26         const Array <CIMInstance> & subscriptions,
1119 kumpf 1.1          /* const */ CIMInstance & alertInstance);
1120 mday  1.18       
1121 kumpf 1.33      /** Async completion routine for _sendEnable */
1122 mday  1.18 
1123 kumpf 1.23       static void _sendEnableCallBack(AsyncOpNode *operation, 
1124 mday  1.18 				     MessageQueue *callback_destination, 
1125            				     void *parameter);
1126                  
1127 kumpf 1.16     /**
1128 kumpf 1.23         Sends an Enable message to the specified provider.
1129 kumpf 1.16 
1130 kumpf 1.23         @param   enableProvider        the provider to be enabled
1131 kumpf 1.16      */
1132 kumpf 1.23     void _sendEnable (
1133                    const ProviderClassList & enableProvider);
1134 kumpf 1.16 
1135 kumpf 1.1      WQLSimplePropertySource _getPropertySourceFromInstance(
1136                    CIMInstance & indicationInstance);
1137 kumpf 1.5  
1138 kumpf 1.6      CIMRepository * _repository;
1139            
1140 kumpf 1.8      /**
1141                    Handle to Provider Registration Manager
1142                 */
1143                ProviderRegistrationManager * _providerRegManager;
1144 kumpf 1.5  
1145                /**
1146                    Integer representing queue ID for accessing Provider Manager Service
1147                 */
1148                Uint32 _providerManager;
1149            
1150                /**
1151                    Integer representing queue ID for accessing Handler Manager Service
1152                 */
1153                Uint32 _handlerService;
1154            
1155                /**
1156 kumpf 1.32         FUTURE: Integer representing queue ID for accessing Repository Service
1157 kumpf 1.5       */
1158                //Uint32 _repository;
1159            
1160                /**
1161 kumpf 1.33         Active Subscriptions information table
1162                 */
1163                ActiveSubscriptionsTable _activeSubscriptionsTable;
1164            
1165                /**
1166                    Subscription Classes information table
1167 kumpf 1.10      */
1168 kumpf 1.33     SubscriptionClassesTable _subscriptionClassesTable;
1169 kumpf 1.10 
1170 kumpf 1.19     Array <Uint16> _validStates;
1171                Array <Uint16> _validRepeatPolicies;
1172                Array <Uint16> _validErrorPolicies;
1173                Array <Uint16> _validPersistenceTypes;
1174                
1175 kumpf 1.10     /**
1176 kumpf 1.5          Values for the Subscription State property of the Subscription class,
1177                    as defined in the CIM Events MOF
1178                 */
1179                enum SubscriptionState {_STATE_UNKNOWN = 0, _STATE_OTHER = 1, 
1180                     _STATE_ENABLED = 2, _STATE_ENABLEDDEGRADED = 3, _STATE_DISABLED = 4};
1181            
1182                /**
1183                    Values for the Repeat Notification Policy property of the Subscription 
1184                    class, as defined in the CIM Events MOF
1185                 */
1186                enum RepeatNotificationPolicy {_POLICY_UNKNOWN = 0, _POLICY_OTHER = 1,
1187                     _POLICY_NONE = 2, _POLICY_SUPPRESS = 3, _POLICY_DELAY = 4};
1188            
1189                /**
1190                    Values for the On Fatal Error Policy property of the Subscription 
1191                    class, as defined in the CIM Events MOF
1192                 */
1193                enum OnFatalErrorPolicy {_ERRORPOLICY_OTHER = 1, _ERRORPOLICY_IGNORE = 2, 
1194                    _ERRORPOLICY_DISABLE = 3, _ERRORPOLICY_REMOVE = 4};
1195            
1196                /**
1197 kumpf 1.5          Values for the Persistence Type property of the Handler class, 
1198                    as defined in the CIM Events MOF
1199                 */
1200                enum PersistenceType {_PERSISTENCE_OTHER = 1, _PERSISTENCE_PERMANENT = 2, 
1201                    _PERSISTENCE_TRANSIENT = 3};
1202            
1203                /**
1204                    Values for the Perceived Severity property of the Alert Indication 
1205                    class, as defined in the CIM Events MOF
1206                 */
1207                enum PerceivedSeverity {_SEVERITY_UNKNOWN = 0, _SEVERITY_OTHER = 1, 
1208                     _SEVERITY_INFORMATION = 2, _SEVERITY_WARNING = 3, _SEVERITY_MINOR = 4,
1209                     _SEVERITY_MAJOR = 5, _SEVERITY_CRITICAL = 6, _SEVERITY_FATAL = 7};
1210            
1211                /**
1212                    Values for the Probable Cause property of the Alert Indication 
1213                    class, as defined in the CIM Events MOF
1214                    Note: not all possible values have been included
1215                 */
1216                enum ProbableCause {_CAUSE_UNKNOWN = 0, _CAUSE_OTHER = 1};
1217            
1218 kumpf 1.5      /**
1219                    Values for the Alert Type property of the Alert Indication class, 
1220                    as defined in the CIM Events MOF
1221                 */
1222                enum AlertType {_TYPE_OTHER = 1, _TYPE_COMMUNICATIONS = 2, _TYPE_QOS = 3,
1223                     _TYPE_PROCESSING = 4, _TYPE_DEVICE = 5, _TYPE_ENVIRONMENTAL = 6,
1224                     _TYPE_MODELCHANGE = 7, _TYPE_SECURITY = 8};
1225 kumpf 1.1  
1226 kumpf 1.3      //
1227                //  Class names
1228                //
1229            
1230 kumpf 1.1      /**
1231                    The name of the CIMOM Shutdown alert indication class
1232                 */
1233 kumpf 1.31     static const CIMName   _CLASS_CIMOM_SHUTDOWN_ALERT;
1234 kumpf 1.1  
1235                /**
1236                    The name of the No Provider alert indication class
1237                 */
1238 kumpf 1.31     static const CIMName   _CLASS_NO_PROVIDER_ALERT;
1239 kumpf 1.1  
1240                /**
1241                    The name of the CIMOM shutdown alert indication class
1242                 */
1243 kumpf 1.31     static const CIMName   _CLASS_PROVIDER_TERMINATED_ALERT;
1244 kumpf 1.1  
1245            
1246 kumpf 1.3      //
1247                //  Property names
1248                //
1249            
1250 kumpf 1.1      /**
1251                    The name of the Subscription State property for Indication Subscription
1252                    class
1253                 */
1254 kumpf 1.31     static const CIMName   _PROPERTY_STATE;
1255 kumpf 1.1  
1256                /**
1257                    The name of the Other Subscription State property for Indication
1258                    Subscription class
1259                 */
1260 kumpf 1.31     static const CIMName   _PROPERTY_OTHERSTATE;
1261 kumpf 1.1  
1262                /**
1263                    The name of the repeat notification policy property for indication
1264                    subscription class
1265                 */
1266 kumpf 1.31     static const CIMName   _PROPERTY_REPEATNOTIFICATIONPOLICY;
1267 kumpf 1.1  
1268                /**
1269                    The name of the other repeat notification policy property for
1270                    indication subscription class
1271                 */
1272 kumpf 1.31     static const CIMName   _PROPERTY_OTHERREPEATNOTIFICATIONPOLICY;
1273 kumpf 1.1  
1274                /**
1275                    The name of the repeat notification interval property for indication
1276                    subscription class
1277                 */
1278 kumpf 1.31     static const CIMName   _PROPERTY_REPEATNOTIFICATIONINTERVAL;
1279 kumpf 1.1  
1280                /**
1281                    The name of the repeat notification gap property for indication
1282                    subscription class
1283                 */
1284 kumpf 1.31     static const CIMName   _PROPERTY_REPEATNOTIFICATIONGAP;
1285 kumpf 1.1  
1286                /**
1287                    The name of the repeat notification count property for indication
1288                    subscription class
1289                 */
1290 kumpf 1.31     static const CIMName   _PROPERTY_REPEATNOTIFICATIONCOUNT;
1291 kumpf 1.1  
1292                /**
1293                    The name of the On Fatal Error Policy property for Indication 
1294                    Subscription class
1295                 */
1296 kumpf 1.31     static const CIMName   _PROPERTY_ONFATALERRORPOLICY;
1297 kumpf 1.1  
1298                /**
1299                    The name of the Other On Fatal Error Policy property for Indication
1300                    Subscription class
1301                 */
1302 kumpf 1.31     static const CIMName   _PROPERTY_OTHERONFATALERRORPOLICY;
1303 kumpf 1.1  
1304                /**
1305 kumpf 1.4          The name of the Time Of Last State Change property for Indication 
1306                    Subscription class
1307                 */
1308 kumpf 1.31     static const CIMName   _PROPERTY_LASTCHANGE;
1309 kumpf 1.4  
1310                /**
1311                    The name of the Subscription Start Time property for Indication 
1312                    Subscription class
1313                 */
1314 kumpf 1.31     static const CIMName   _PROPERTY_STARTTIME;
1315 kumpf 1.4  
1316                /**
1317                    The name of the Subscription Duration property for Indication 
1318                    Subscription class
1319                 */
1320 kumpf 1.31     static const CIMName   _PROPERTY_DURATION;
1321 kumpf 1.4  
1322                /**
1323                    The name of the Subscription Time Remaining property for Indication 
1324                    Subscription class
1325                 */
1326 kumpf 1.31     static const CIMName   _PROPERTY_TIMEREMAINING;
1327 kumpf 1.4  
1328                /**
1329 kumpf 1.1          The name of the filter reference property for indication subscription
1330                    class
1331                 */
1332 kumpf 1.31     static const CIMName   _PROPERTY_FILTER;
1333 kumpf 1.1  
1334                /**
1335                    The name of the handler reference property for indication subscription
1336                    class
1337                 */
1338 kumpf 1.31     static const CIMName   _PROPERTY_HANDLER;
1339 kumpf 1.1  
1340                /**
1341                    The name of the query property for indication filter class
1342                 */
1343 kumpf 1.31     static const CIMName   _PROPERTY_QUERY;
1344 kumpf 1.1  
1345                /**
1346                    The name of the query language property for indication filter class
1347                 */
1348 kumpf 1.31     static const CIMName   _PROPERTY_QUERYLANGUAGE;
1349 kumpf 1.1  
1350                /**
1351                    The name of the Source Namespace property for indication filter class
1352                 */
1353 kumpf 1.31     static const CIMName   _PROPERTY_SOURCENAMESPACE;
1354 kumpf 1.1  
1355                /**
1356                    The name of the name property for indication filter and indication
1357                    handler classes
1358                 */
1359 kumpf 1.31     static const CIMName   _PROPERTY_NAME;
1360 kumpf 1.1  
1361                /**
1362                    The name of the creation class name property for indication filter and
1363                    indication handler classes
1364                 */
1365 kumpf 1.31     static const CIMName   _PROPERTY_CREATIONCLASSNAME;
1366 kumpf 1.1  
1367                /**
1368                    The name of the system name property for indication filter and
1369                    indication handler classes
1370                 */
1371 kumpf 1.31     static const CIMName   _PROPERTY_SYSTEMNAME;
1372 kumpf 1.1  
1373                /**
1374                    The name of the system creation class name property for indication
1375                    filter and indication handler classes
1376                 */
1377 kumpf 1.31     static const CIMName   _PROPERTY_SYSTEMCREATIONCLASSNAME;
1378 kumpf 1.1  
1379                /**
1380                    The name of the Persistence Type property for Indication Handler class
1381                 */
1382 kumpf 1.31     static const CIMName   _PROPERTY_PERSISTENCETYPE;
1383 kumpf 1.1  
1384                /**
1385                    The name of the Other Persistence Type property for Indication Handler
1386                    class
1387                 */
1388 kumpf 1.31     static const CIMName   _PROPERTY_OTHERPERSISTENCETYPE;
1389 kumpf 1.1  
1390                /**
1391 kumpf 1.7          The name of the Destination property for CIM XML Indication Handler 
1392                    subclass
1393 kumpf 1.1       */
1394 kumpf 1.31     static const CIMName   _PROPERTY_DESTINATION;
1395 kumpf 1.7  
1396                /**
1397 kumpf 1.34         The name of the TargetHost property for SNMP Mapper Indication
1398 kumpf 1.7          Handler subclass
1399                 */
1400 kumpf 1.34     static const CIMName   _PROPERTY_TARGETHOST;
1401 kumpf 1.1  
1402                /**
1403 kumpf 1.34         The name of the TargetHostFormat property for SNMP Indication Handler subclass
1404 kumpf 1.1       */
1405 kumpf 1.34     static const CIMName   _PROPERTY_TARGETHOSTFORMAT;
1406            
1407                /**
1408                    The name of the SNMP Version property for SNMP Indication Handler subclass
1409                  */
1410                static const CIMName   _PROPERTY_SNMPVERSION;
1411 kumpf 1.1  
1412                /**
1413                    The name of the Alert Type property for Alert Indication class
1414                 */
1415 kumpf 1.31     static const CIMName   _PROPERTY_ALERTTYPE;
1416 kumpf 1.1  
1417                /**
1418                    The name of the Other Alert Type property for Alert Indication class
1419                 */
1420 kumpf 1.31     static const CIMName   _PROPERTY_OTHERALERTTYPE;
1421 kumpf 1.1  
1422                /**
1423                    The name of the Perceived Severity property for Alert Indication class
1424                 */
1425 kumpf 1.31     static const CIMName   _PROPERTY_PERCEIVEDSEVERITY;
1426 kumpf 1.1  
1427                /**
1428                    The name of the Probable Cause property for Alert Indication class
1429                 */
1430 kumpf 1.31     static const CIMName   _PROPERTY_PROBABLECAUSE;
1431 kumpf 1.1  
1432                /**
1433 kumpf 1.10         The name of the Provider Name property for Provider class
1434 kumpf 1.1       */
1435 kumpf 1.31     static const CIMName   _PROPERTY_PROVIDERNAME;
1436 kumpf 1.1  
1437                /**
1438 kumpf 1.10         The name of the Provider Module Name property for Provider class
1439 kumpf 1.1       */
1440 kumpf 1.31     static const CIMName   _PROPERTY_PROVIDERMODULENAME;
1441 kumpf 1.1  
1442 kumpf 1.9  
1443                //
1444                //  Qualifier names
1445                //
1446            
1447                /**
1448                    The name of the Indication qualifier for classes
1449                 */
1450 kumpf 1.31     static const CIMName   _QUALIFIER_INDICATION;
1451 kumpf 1.9  
1452 kumpf 1.4  
1453                //
1454                //  Other literal values
1455                //
1456 kumpf 1.1  
1457                /**
1458 kumpf 1.4          The WHERE keyword in WQL
1459 kumpf 1.1       */
1460 kumpf 1.4      static const char   _QUERY_WHERE [];
1461 kumpf 1.1  
1462                /**
1463 kumpf 1.4          The string representing the asterisk all properties symbol in WQL
1464 kumpf 1.1       */
1465 kumpf 1.4      static const char   _QUERY_ALLPROPERTIES [];
1466 kumpf 1.3  
1467 kumpf 1.30     /**
1468                    A zero value CIMDateTime interval
1469                 */
1470                static const char _ZERO_INTERVAL_STRING [];
1471            
1472            
1473 kumpf 1.3      //
1474                //  Message substrings used in exception messages
1475                //
1476            
1477                static const char _MSG_MISSING_REQUIRED [];
1478            
1479                static const char _MSG_KEY_PROPERTY [];
1480            
1481                static const char _MSG_PROPERTY [];
1482            
1483                static const char _MSG_PROPERTY_PRESENT [];
1484            
1485                static const char _MSG_VALUE_NOT [];
1486            
1487                static const char _MSG_NO_PROVIDERS [];
1488            
1489 kumpf 1.9      static const char _MSG_NOT_ACCEPTED [];
1490            
1491 kumpf 1.3      static const char _MSG_INVALID_CLASSNAME [];
1492            
1493                static const char _MSG_IN_FROM [];
1494 kumpf 1.4  
1495                static const char _MSG_EXPIRED [];
1496 kumpf 1.9  
1497                static const char _MSG_REFERENCED [];
1498 kumpf 1.19 
1499                static const char _MSG_INVALID_VALUE [];
1500            
1501                static const char _MSG_FOR_PROPERTY [];
1502 kumpf 1.23 
1503                static const char _MSG_CLASS_NOT_SERVED [];
1504 kumpf 1.1  };
1505            
1506            PEGASUS_NAMESPACE_END
1507            
1508            #endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2