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

   1 karl  1.65 //%2005////////////////////////////////////////////////////////////////////////
   2 kumpf 1.1  //
   3 karl  1.63 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
   4            // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
   5            // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
   6 karl  1.47 // IBM Corp.; EMC Corporation, The Open Group.
   7 karl  1.63 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
   8            // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
   9 karl  1.65 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
  10            // EMC Corporation; VERITAS Software Corporation; The Open Group.
  11 kumpf 1.1  //
  12            // Permission is hereby granted, free of charge, to any person obtaining a copy
  13            // of this software and associated documentation files (the "Software"), to
  14            // deal in the Software without restriction, including without limitation the
  15            // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  16            // sell copies of the Software, and to permit persons to whom the Software is
  17            // furnished to do so, subject to the following conditions:
  18 kumpf 1.27 // 
  19 kumpf 1.1  // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
  20            // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
  21            // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
  22            // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  23            // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  24            // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  25            // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  26            // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  27            //
  28            //==============================================================================
  29            //
  30            // Author: Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)
  31            //
  32            // Modified By:  Carol Ann Krug Graves, Hewlett-Packard Company
  33 kumpf 1.39 //                   (carolann_graves@hp.com)
  34            //               Ben Heilbronn, Hewlett-Packard Company (ben_heilbronn@hp.com)
  35            //               Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
  36 kumpf 1.1  //
  37            //%/////////////////////////////////////////////////////////////////////////////
  38            
  39            #ifndef Pegasus_IndicationService_h
  40            #define Pegasus_IndicationService_h
  41            
  42            #include <Pegasus/Common/Config.h>
  43            #include <Pegasus/Common/MessageQueueService.h>
  44            #include <Pegasus/Common/CIMMessage.h>
  45 kumpf 1.24 #include <Pegasus/Common/IPC.h>
  46 kumpf 1.54 #include <Pegasus/Common/AcceptLanguages.h> // l10n  
  47            #include <Pegasus/Common/ContentLanguages.h> // l10n
  48 kumpf 1.6  #include <Pegasus/Server/ProviderRegistrationManager/ProviderRegistrationManager.h>
  49 kumpf 1.54 #include <Pegasus/Server/Linkage.h>
  50 chuck 1.64 #include <Pegasus/Query/QueryExpression/QueryExpression.h>
  51 kumpf 1.1  
  52 kumpf 1.41 #include "ProviderClassList.h"
  53            #include "IndicationOperationAggregate.h"
  54            
  55 kumpf 1.1  PEGASUS_NAMESPACE_BEGIN
  56            
  57 kumpf 1.54 class SubscriptionRepository;
  58            class SubscriptionTable;
  59 kumpf 1.1  
  60            /**
  61            
  62 kumpf 1.5      IndicationService class is the service that serves the
  63 kumpf 1.10     Indication Subscription, Indication Filter, and Indication Handler
  64 kumpf 1.5      classes, and processes indications.
  65 kumpf 1.1  
  66                @author  Hewlett-Packard Company
  67            
  68             */
  69            
  70            class PEGASUS_SERVER_LINKAGE IndicationService : public MessageQueueService
  71            {
  72            public:
  73            
  74                /**
  75                    Constructs an IndicationSubscription instance and initializes instance
  76                    variables.
  77                 */
  78 kumpf 1.6      IndicationService (
  79                    CIMRepository * repository,
  80 kumpf 1.8          ProviderRegistrationManager * providerRegManager);
  81 kumpf 1.1  
  82                virtual ~IndicationService(void);
  83            
  84 mday  1.2      void handleEnqueue(Message* message);
  85 kumpf 1.1  
  86                virtual void handleEnqueue(void); 
  87            
  88                virtual void _handle_async_request(AsyncRequest *req);
  89            
  90 kumpf 1.54     /**
  91                    Gets a String containing the Provider Name, for use in a log message to
  92                    identify the provider.
  93            
  94                    @param   provider              provider instance
  95            
  96                    @return  String containing the Provider Name
  97                 */
  98                static String getProviderLogString
  99                    (CIMInstance & provider);
 100            
 101 kumpf 1.1      AtomicInt dienow;
 102            
 103                /**
 104 kumpf 1.5          Operation types for the NotifyProviderRegistration message
 105 kumpf 1.1       */
 106 kumpf 1.5      enum Operation {OP_CREATE = 1, OP_DELETE = 2, OP_MODIFY = 3};
 107 kumpf 1.24 
 108                static Mutex _mutex;
 109 kumpf 1.1  
 110 kumpf 1.5  private:
 111 kumpf 1.1  
 112                void _initialize (void);
 113            
 114                void _terminate (void);
 115            
 116                void _handleGetInstanceRequest(const Message * message);
 117            
 118                void _handleEnumerateInstancesRequest(const Message * message);
 119            
 120                void _handleEnumerateInstanceNamesRequest(const Message * message);
 121            
 122                void _handleCreateInstanceRequest(const Message * message);
 123            
 124                void _handleModifyInstanceRequest(const Message * message);
 125            
 126                void _handleDeleteInstanceRequest(const Message * message);
 127            
 128                void _handleProcessIndicationRequest(const Message * message);
 129            
 130                /**
 131 kumpf 1.57         Asynchronous callback function for _handleProcessIndicationRequest.
 132                    The response from the Handler is checked, and if it is not success, the
 133                    subscription's On Fatal Error Policy is implemented.  
 134            
 135                    @param  operation            shared data structure that controls message
 136                                                     processing
 137                    @param  destination          target queue of completion callback
 138                    @param  userParameter        user parameter for callback processing
 139                 */
 140                static void _handleIndicationCallBack (
 141                    AsyncOpNode * operation,
 142                    MessageQueue * destination,
 143                    void * userParameter);
 144            
 145                /**
 146 kumpf 1.1  	Notifies the Indication Service that a change in provider registration
 147            	has occurred.  The Indication Service retrieves the subscriptions
 148 kumpf 1.23 	affected by the registration change, sends the appropriate Create,
 149                    Modify, and/or Delete requests to the provider, and sends an alert to 
 150 kumpf 1.10         handler instances of subscriptions that are no longer served by the 
 151                    provider.
 152 kumpf 1.1      */
 153                void _handleNotifyProviderRegistrationRequest(const Message * message);
 154            
 155                /**
 156 kumpf 1.33         Notifies the Indication Service that a provider has been disabled.  
 157 kumpf 1.51         The Indication Service retrieves the subscriptions served by the
 158                    disabled provider, and logs a message for each subscription that is no 
 159                    longer served by the provider.
 160 kumpf 1.1       */
 161                void _handleNotifyProviderTerminationRequest(const Message * message);
 162            
 163                /**
 164 kumpf 1.51         Notifies the Indication Service that a provider has been enabled.  
 165                    The Indication Service retrieves the subscriptions that can be served 
 166                    by the enabled provider, sends Create Subscription and Enable 
 167                    Indications requests to the provider, and logs a message for each 
 168                    subscription that is now served by the provider.
 169                 */
 170                void _handleNotifyProviderEnableRequest (const Message * message);
 171            
 172                /**
 173 kumpf 1.5          Determines if it is legal to create an instance. 
 174                    Checks for existence of all key and required properties.  Checks that 
 175                    properties that MUST NOT exist (based on values of other properties), 
 176                    do not exist.  For any property that has a default value, if it does 
 177                    not exist, adds the property with the default value.
 178            
 179                    @param   instance              instance to be created
 180                    @param   nameSpace             namespace for instance to be created
 181            
 182                    @throw   CIM_ERR_INVALID_PARAMETER  if instance is invalid
 183                    @throw   CIM_ERR_NOT_SUPPORTED      if the specified class is not 
 184                                                        supported
 185            
 186 kumpf 1.54         @return  True, if the instance can be created;
 187 kumpf 1.10                  Otherwise throws an exception
 188 kumpf 1.5       */
 189                Boolean _canCreate (
 190                    CIMInstance & instance,
 191 kumpf 1.31         const CIMNamespaceName & nameSpace);
 192 kumpf 1.5  
 193 kumpf 1.21     /**
 194                    Validates the specified required property in the instance.
 195 kumpf 1.56         If the property does not exist, or has a null value, or is not of the 
 196                    expected type, an exception is thrown, using the specified message.
 197 kumpf 1.21 
 198                    This function is called by the _canCreate function, and is used to 
 199                    validate the  Filter and Handler properties in Subscription instances,
 200 carolann.graves 1.62         the Name, Query and Query Language properties in 
 201                              Filter instances, the Name and Destination 
 202                              properties in CIMXML Handler instances, and the Name, 
 203 kumpf           1.21         Trap Destination, and SNMP Version properties in SNMP Mapper instances.
 204                      
 205                              @param   instance              instance to be validated
 206                              @param   propertyName          name of property to be validated
 207 kumpf           1.56         @param   expectedType          expected CIMType of property value
 208 kumpf           1.21         @param   message               message to be used in exception
 209 yi.zhou         1.70 	@param   isArray               indicates whether the validated
 210                      				       property is array
 211 kumpf           1.21 
 212                              @throw   CIM_ERR_INVALID_PARAMETER  if required property is missing or 
 213                                                                  null
 214                           */
 215 kumpf           1.20     void _checkRequiredProperty (
 216                              CIMInstance & instance,
 217 kumpf           1.31         const CIMName & propertyName,
 218 kumpf           1.56         const CIMType expectedType,
 219 yi.zhou         1.70         const String & message,
 220                      	const Boolean isArray = false);
 221 kumpf           1.20 
 222 kumpf           1.5      /**
 223 carolann.graves 1.69         Validates the specified Uint16 (non-array) property and its 
 224                              corresponding String (non-array) Other___ property in the instance.
 225 kumpf           1.15         If the property does not exist, it is added with the default value.
 226                              If the property exists, but its value is NULL, its value is set to
 227                              the default value.
 228                              If the value of the property is Other, but the corresponding Other___
 229 kumpf           1.56         property either does not exist, has a value of NULL, or is not of the
 230                              correct type, an exception is thrown.  
 231 kumpf           1.15         If the value of the property is not Other, but the corresponding
 232                              Other___ property exists and has a non-NULL value, an exception is
 233                              thrown.
 234 kumpf           1.56         If the value of the property is not a supported value, an exception is 
 235                              thrown.
 236 kumpf           1.15         This function is called by the _canCreate function, and is used to 
 237                              validate the following pairs of properties in Subscription or Handler 
 238                              instances: Subscription State, Other Subscription State, Repeat 
 239                              Notification Policy, Other Repeat Notification Policy, On Fatal Error 
 240                              Policy, Other On Fatal Error Policy, Persistence Type, Other 
 241                              Persistence Type.
 242                      
 243                              @param   instance              instance to be validated
 244                              @param   propertyName          name of property to be validated
 245                              @param   otherPropertyName     name of Other___ property to be validated
 246                              @param   defaultValue          default value for property
 247                              @param   otherValue            "Other" value for property
 248 kumpf           1.19         @param   validValues           set of valid values for property
 249 kumpf           1.55         @param   supportedValues       set of supported values for property
 250 kumpf           1.15 
 251                              @throw   CIM_ERR_INVALID_PARAMETER  if value of property or Other___ 
 252                                                                  property is invalid
 253                           */
 254 kumpf           1.20     void _checkPropertyWithOther (
 255 kumpf           1.15         CIMInstance & instance,
 256 kumpf           1.31         const CIMName & propertyName,
 257                              const CIMName & otherPropertyName,
 258 kumpf           1.15         const Uint16 defaultValue,
 259 kumpf           1.19         const Uint16 otherValue,
 260 kumpf           1.55         const Array <Uint16> & validValues,
 261                              const Array <Uint16> & supportedValues);
 262 kumpf           1.20 
 263 kumpf           1.21     /**
 264                              Validates the specified property in the instance.
 265                              If the property does not exist, it is added with the default value.
 266                              If the property exists, but its value is NULL, its value is set to
 267                              the default value.
 268                              This function is called by the _canCreate function, and is used to 
 269 carolann.graves 1.62         validate the Source Namespace property in Filter instances.
 270 carolann.graves 1.69         This function is also called by the _initOrValidateStringProperty 
 271                              function to validate the CreationClassName, SystemName, and 
 272                              SystemCreationClassName key properties in Filter and Handler instances.
 273 kumpf           1.21 
 274 kumpf           1.56         Note: currently all properties validated by this function are of type
 275                              String.  To use this function in the future with properties of other 
 276                              types, a type parameter would need to be added, and the default value 
 277                              would need to be passed as a CIMValue instead of a String.
 278                      
 279 carolann.graves 1.69         Note: currently all properties validated by this function are non-array
 280                              properties.  To use this function in the future with both array and
 281                              non-array properties, a Boolean isArray parameter would need to be 
 282                              added.
 283                      
 284 kumpf           1.21         @param   instance              instance to be validated
 285                              @param   propertyName          name of property to be validated
 286                              @param   defaultValue          default value for property
 287                      
 288                              @return  the value of the property
 289                           */
 290 kumpf           1.20     String _checkPropertyWithDefault (
 291                              CIMInstance & instance,
 292 kumpf           1.31         const CIMName & propertyName,
 293 kumpf           1.20         const String & defaultValue);
 294 kumpf           1.56 
 295                          /**
 296                              Validates the specified property in the instance.
 297 carolann.graves 1.62         If the property does not exist, it is added with the default value.
 298                              If the property exists, but its value is NULL, its value is set to
 299                              the default value.
 300                              If the property exists and has a non-NULL value, its value is validated 
 301                              against the default (expected) value.  If the value is invalid, an 
 302                              exception is thrown.
 303                              This function is called by the _canCreate function, and is used to 
 304                              validate the Creation Class Name, System Name and System Creation Class
 305                              Name properties in Filter and Handler instances.
 306                      
 307                              Note: currently all properties validated by this function are of type
 308                              String.  To use this function in the future with properties of other 
 309                              types, a type parameter would need to be added, and the default value 
 310                              would need to be passed as a CIMValue instead of a String.
 311                      
 312 carolann.graves 1.69         Note: currently all properties validated by this function are non-array
 313                              properties.  To use this function in the future with both array and
 314                              non-array properties, a Boolean isArray parameter would need to be 
 315                              added.
 316                      
 317 carolann.graves 1.62         @param   instance              instance to be validated
 318                              @param   propertyName          name of property to be validated
 319                              @param   defaultValue          default value for property
 320                      
 321                              @return  the value of the property
 322                           */
 323                          String _initOrValidateStringProperty (
 324                              CIMInstance & instance,
 325                              const CIMName & propertyName,
 326                              const String & defaultValue);
 327                      
 328                          /**
 329                              Validates the specified property in the instance.
 330 kumpf           1.56         If the property exists and its value is not NULL, but it is not of
 331                              the correct type, an exception is thrown.
 332                              This function is called by the _canCreate function.  It is used to 
 333                              validate the FailureTriggerTimeInterval, TimeOfLastStateChange, 
 334                              SubscriptionDuration, SubscriptionStartTime, SubscriptionTimeRemaining,
 335                              RepeatNotificationInterval, RepeatNotificationGap, and
 336                              RepeatNotificationCount properties in Subscription instances, the Owner
 337                              property in Handler instances, and the PortNumber, SNMPSecurityName, 
 338                              and SNMPEngineID properties in SNMP Mapper Handler instances.
 339                      
 340 carolann.graves 1.69         Note: currently all properties validated by this function are non-array
 341                              properties.  To use this function in the future with both array and
 342                              non-array properties, a Boolean isArray parameter would need to be 
 343                              added.
 344                      
 345 kumpf           1.56         @param   instance              instance to be validated
 346                              @param   propertyName          name of property to be validated
 347                              @param   expectedType          expected CIMType for property
 348                      
 349                              @throw   CIM_ERR_INVALID_PARAMETER  if property exists and is not null
 350                                                                  but is not of the correct type
 351                           */
 352                          void _checkProperty (
 353                              CIMInstance & instance,
 354                              const CIMName & propertyName,
 355                              const CIMType expectedType);
 356 kumpf           1.15 
 357                          /**
 358 kumpf           1.10         Determines if the user is authorized to modify the instance, and if the
 359                              specified modification is supported.  Currently, the only modification 
 360                              supported is of the Subscription State property of the Subscription 
 361                              class.
 362 kumpf           1.5  
 363                              @param   request               modification request
 364                              @param   instance              instance to be modified
 365 kumpf           1.37         @param   modifiedInstance      modified instance
 366 kumpf           1.5  
 367 kumpf           1.10         @throw   CIM_ERR_NOT_SUPPORTED      if the specified modification is 
 368 kumpf           1.5                                              not supported
 369                              @throw   CIM_ERR_ACCESS_DENIED      if the user is not authorized to
 370                                                                  modify the instance
 371 kumpf           1.37         @throw   CIM_ERR_INVALID_PARAMETER  if the modifiedInstance is invalid
 372 kumpf           1.5  
 373 kumpf           1.54         @return  True, if the instance can be modified;
 374 kumpf           1.10                  Otherwise throws an exception
 375 kumpf           1.5       */
 376                          Boolean _canModify (
 377                              const CIMModifyInstanceRequestMessage * request,
 378 kumpf           1.25         const CIMObjectPath & instanceReference,
 379 kumpf           1.37         const CIMInstance & instance,
 380                              CIMInstance & modifiedInstance);
 381 kumpf           1.5  
 382                          /**
 383 kumpf           1.10         Determines if the user is authorized to delete the instance, and if it 
 384 kumpf           1.11         is legal to delete the instance.  If authorized, Subscription instances 
 385 kumpf           1.10         may always be deleted.  Filter and non-transient Handler instances may 
 386                              only be deleted if they are not being referenced by any Subscription 
 387                              instances. If the instance to be deleted is a transient Handler, any 
 388                              referencing Subscriptions are also deleted.
 389 kumpf           1.5  
 390                              @param   instanceReference     reference for instance to be deleted
 391                              @param   nameSpace             namespace for instance to be deleted
 392 kumpf           1.10         @param   currentUser           current user
 393                      
 394                              @throw   CIM_ERR_ACCESS_DENIED      if the user is not authorized to
 395                                                                  delete the instance
 396                              @throw   CIM_ERR_FAILED             if the instance to be deleted is 
 397                                                                  referenced by a subscription
 398 kumpf           1.5  
 399 kumpf           1.54         @return  True, if the instance can be deleted;
 400 kumpf           1.10                  Otherwise throws an exception
 401 kumpf           1.1       */
 402                          Boolean _canDelete (
 403 kumpf           1.25         const CIMObjectPath & instanceReference,
 404 kumpf           1.31         const CIMNamespaceName & nameSpace,
 405 kumpf           1.10         const String & currentUser);
 406 kumpf           1.1  
 407                          /**
 408                              Retrieves list of enabled subscription instances in all namespaces,
 409                              where the subscription indication class matches or is a superclass
 410 kumpf           1.10         of the supported class, and the properties required to process the
 411                              subscription are all contained in the list of supported properties.
 412 kumpf           1.42         If the checkProvider parameter value is True, a subscription is only 
 413                              included in the list returned if the specified provider accepted the 
 414                              subscription.  If the checkProvider parameter value is False, the 
 415                              provider parameter is not used (ignored).
 416 kumpf           1.1  
 417 kumpf           1.10         @param   supportedClass       the supported class
 418                              @param   nameSpaces           the list of supported namespaces
 419                              @param   supportedProperties  the list of supported properties
 420 kumpf           1.42         @param   checkProvider        indicates whether provider acceptance is
 421                                                                checked
 422                              @param   provider             the provider (used if checkProvider True)
 423 kumpf           1.1  
 424 kumpf           1.26         @return   list of CIMInstance subscriptions
 425 kumpf           1.1       */
 426 kumpf           1.26     Array <CIMInstance> _getMatchingSubscriptions (
 427 kumpf           1.31         const CIMName & supportedClass,
 428                              const Array <CIMNamespaceName> nameSpaces,
 429 kumpf           1.42         const CIMPropertyList & supportedProperties,
 430 kumpf           1.43         const Boolean checkProvider = false,
 431 kumpf           1.42         const CIMInstance & provider = CIMInstance ());
 432 kumpf           1.1  
 433                          /**
 434                              Retrieves lists of enabled subscription instances in all namespaces
 435                              that are either newly supported or previously supported, based on the
 436 kumpf           1.9          supported class, the supported namespaces before and after modification,
 437                              and the supported properties before and after modification.  For 
 438 kumpf           1.10         subscriptions based on the supported class, the newSubscriptions list 
 439 kumpf           1.9          returned contains the subscriptions for which the properties required 
 440                              to process the subscription are all contained in the new list of 
 441                              supported properties, but are not all contained in the old list of 
 442                              supported properties, and/or the filter source namespace is contained in
 443                              the new list if supported namespaces, but is not contained in the old 
 444                              list of supported namespaces.  The formerSubscriptions list returned 
 445                              contains the subscriptions for which the properties required to process
 446                              the subscription are not all contained in the new list of supported 
 447                              properties, but are all contained in the old list of supported 
 448                              properties, and/or the filter source namespace is not contained in the 
 449                              new list if supported namespaces, but is contained in the old list of 
 450                              supported namespaces.
 451                      
 452 kumpf           1.10         @param   supportedClass       the supported class
 453 kumpf           1.9          @param   newNameSpaces        namespaces supported after modification
 454                              @param   oldNameSpaces        namespaces supported before modification
 455                              @param   newProperties        properties supported after modification
 456                              @param   oldProperties        properties supported before modification
 457 kumpf           1.1          @param   newSubscriptions     the list of newly supported subscriptions
 458                              @param   formerSubscriptions  the list of previously supported
 459                                                                subscriptions
 460                           */
 461                          void _getModifiedSubscriptions (
 462 kumpf           1.31         const CIMName & supportedClass,
 463                              const Array <CIMNamespaceName> & newNameSpaces,
 464                              const Array <CIMNamespaceName> & oldNameSpaces,
 465 kumpf           1.1          const CIMPropertyList & newProperties,
 466                              const CIMPropertyList & oldProperties,
 467 kumpf           1.26         Array <CIMInstance> & newSubscriptions,
 468                              Array <CIMInstance> & formerSubscriptions);
 469 kumpf           1.1  
 470                          /**
 471 kumpf           1.9          Determines if all of the required properties in the specified list
 472                              are contained in the specified list of supported properties.
 473                      
 474                              @param   requiredProperties  the required properties
 475 kumpf           1.10         @param   supportedProperties the supported properties
 476 kumpf           1.9  
 477 kumpf           1.54         @return   true, if all required properties are supported;
 478 kumpf           1.9                    false otherwise
 479                           */
 480                          Boolean _inPropertyList (
 481                              const CIMPropertyList & requiredProperties,
 482 kumpf           1.10         const CIMPropertyList & supportedProperties);
 483 kumpf           1.9  
 484                          /**
 485 chuck           1.64         Builds a QueryExpression from the filter query string,
 486                              the query language name, and the namespace in which the query
 487                              is to be run.
 488 kumpf           1.1  
 489                              @param   filterQuery           the filter query string
 490 chuck           1.64         @param   queryLanguage         the query language name
 491                              @param   ns                    query namespace
 492 kumpf           1.1  
 493 chuck           1.64         @return  QueryExpression representing the filter query
 494 kumpf           1.1       */
 495 chuck           1.64     QueryExpression _getQueryExpression (const String& filterQuery,
 496                                                               const String& queryLanguage,
 497                                                               const CIMNamespaceName ns) const;
 498 kumpf           1.1  
 499                          /**
 500 chuck           1.64         Extracts the indication class name from the specified query expression
 501                              (WQL or CQL), and validates that the name represents a subclass of the
 502 kumpf           1.1          Indication class.
 503                      
 504 chuck           1.64         @param   queryExpression       the query expression
 505 kumpf           1.1          @param   nameSpaceName         the namespace
 506                      
 507                              @return  String containing the indication class name
 508                           */
 509 kumpf           1.31     CIMName _getIndicationClassName (
 510 chuck           1.64         const QueryExpression & queryExpression,
 511 kumpf           1.31         const CIMNamespaceName & nameSpaceName) const;
 512 kumpf           1.15 
 513                          /**
 514 kumpf           1.1          Retrieves the list of indication providers that serve the specified
 515                              indication subclasses.
 516                      
 517 chuck           1.64         @param   queryExpression       the query expression
 518                              @param   nameSpace             the namespace name
 519 kumpf           1.1          @param   indicationClassName   the indication class name
 520                              @param   indicationSubclasses  the list of indication subclass names
 521                      
 522                              @return  list of ProviderClassList structs
 523                           */
 524 kumpf           1.10     Array <ProviderClassList> _getIndicationProviders (
 525 chuck           1.64         const QueryExpression & queryExpression,                                               
 526 kumpf           1.31         const CIMNamespaceName & nameSpace,
 527                              const CIMName & indicationClassName,
 528 chuck           1.64         const Array <CIMName> & indicationSubclasses) const;
 529 kumpf           1.1  
 530                          /**
 531 carolann.graves 1.72         Retrieves the list of required properties (all the properties 
 532                              referenced in the WHERE clause) for the specified filter query 
 533                              expression.
 534 kumpf           1.1  
 535 chuck           1.64         @param   queryExpression       the query expression
 536 kumpf           1.22         @param   nameSpaceName         the namespace
 537 chuck           1.64         @param   indicationClassName   the indication class name
 538 kumpf           1.1  
 539 carolann.graves 1.72         @return  CIMPropertyList of required properties for the filter query 
 540 chuck           1.64                  expression
 541 kumpf           1.1       */
 542                          CIMPropertyList _getPropertyList (
 543 chuck           1.64         const QueryExpression & queryExpression,
 544 kumpf           1.31         const CIMNamespaceName & nameSpaceName,
 545                              const CIMName & indicationClassName) const;
 546 kumpf           1.22 
 547                          /**
 548                              Checks if the property list includes all properties in the specified 
 549                              class.  If so, a NULL CIMPropertyList is returned.  Otherwise, a
 550 carolann.graves 1.60         CIMPropertyList containing the properties is returned.  The list of 
 551                              property names in the specified indication class is also returned in 
 552                              the indicationClassProperties parameter.  
 553                      
 554                              @param   propertyList                the list of property names
 555                              @param   nameSpaceName               the namespace
 556                              @param   indicationClassName         the indication class name
 557                              @param   indicationClassProperties   the list of property names in the
 558                                                                     specified indication class
 559 kumpf           1.22 
 560                              @return  CIMPropertyList of properties referenced by the filter query 
 561                                       select statement
 562                           */
 563                          CIMPropertyList _checkPropertyList (
 564 kumpf           1.29         const Array <CIMName> & propertyList,
 565 kumpf           1.31         const CIMNamespaceName & nameSpaceName,
 566 carolann.graves 1.60         const CIMName & indicationClassName,
 567                              Array <CIMName> & indicationClassProperties) const;
 568 kumpf           1.1  
 569                          /**
 570                              Extracts the condition (WHERE Clause) from the specified filter query
 571                              string.
 572                      
 573                              @param   filterQuery       the filter query
 574                      
 575                              @return  String containing the filter query condition
 576                           */
 577                          String _getCondition (
 578                              const String & filterQuery) const;
 579                      
 580                          /**
 581 kumpf           1.4          Deletes subscriptions referencing the specified handler.
 582                      
 583                              @param   nameSpace             the name space
 584                              @param   referenceProperty     the name of the reference property in the
 585                                                                 subscription instance
 586                              @param   handler               the handler reference
 587                           */
 588                          void _deleteReferencingSubscriptions (
 589 kumpf           1.31         const CIMNamespaceName & nameSpace,
 590                              const CIMName & referenceProperty,
 591 kumpf           1.25         const CIMObjectPath & handler);
 592 kumpf           1.4  
 593                          /**
 594                              Determines if specified Subscription has expired
 595                      
 596                              NOTE: It is assumed that the instance passed to this function is a
 597                              Subscription instance, and that the Subscription Duration and
 598                              Start Time properties exist
 599                      
 600                              @param   instance              the subscription instance
 601                      
 602 kumpf           1.54         @return  True, if the Subscription has expired;
 603 kumpf           1.4                   False otherwise
 604                           */
 605                          Boolean _isExpired (
 606                              const CIMInstance & instance) const;
 607                      
 608                          /**
 609 kumpf           1.5          Deletes specified subscription 
 610                      
 611                              @param   subscription          the subscription reference
 612                           */
 613                          void _deleteExpiredSubscription (
 614 kumpf           1.25         CIMObjectPath & subscription);
 615 kumpf           1.21 
 616                          /**
 617                              Gets the Subscription Time Remaining property
 618                      
 619                              Calculates time remaining from Subscription Start Time, Subscription 
 620                              Duration, and current date time.  If the subscription has a non-null
 621                              Duration, the Time Remaining is set, and True is returned.  If the 
 622                              subscription does not have a non-null Duration, it has no expiration 
 623                              date, and the time remaining is unlimited.  In this case, the Time 
 624                              Remaining is not set and False is returned.
 625                            
 626                              NOTE: It is assumed that the instance passed to this function is a
 627                              Subscription instance, and that the Start Time property exists and 
 628                              has a value
 629                      
 630                              @param   instance              Input the subscription instance
 631                              @param   timeRemaining         Output the time remaining (seconds)
 632                      
 633 kumpf           1.54         @return  True, if the subscription has a non-null Duration;
 634 kumpf           1.21                  False otherwise
 635                           */
 636                          Boolean _getTimeRemaining (
 637                              const CIMInstance & instance,
 638                              Uint64 & timeRemaining) const;
 639 kumpf           1.5  
 640                          /**
 641 kumpf           1.4          Sets the Subscription Time Remaining property
 642                      
 643                              Calculates time remaining from Subscription Start Time, Subscription 
 644                              Duration, and current date time
 645                            
 646                              NOTE: It is assumed that the instance passed to this function is a
 647                              Subscription instance, and that the Subscription Duration and
 648                              Start Time properties exist
 649                      
 650                              @param   instance              the subscription instance
 651                           */
 652                          void _setTimeRemaining (
 653                              CIMInstance & instance);
 654                      
 655                          /**
 656 kumpf           1.23         Gets the parameter values required to Create or Modify the subscription
 657 kumpf           1.10         request.
 658 kumpf           1.5          If no indication providers are found, condition and queryLanguage are 
 659 kumpf           1.3          set to empty string.
 660                      
 661 kumpf           1.33         @param   nameSpaceName         Input namespace name (of subscription)
 662                              @param   subscriptionInstance  Input subscription instance
 663                              @param   indicationSubclasses  Output list of subclasses of indication 
 664                                                                 class in filter query
 665 kumpf           1.3          @param   indicationProviders   Output list of providers with associated
 666                                                                 classes
 667                              @param   propertyList          Output list of properties required by the
 668                                                                 subscription
 669 kumpf           1.17         @param   sourceNameSpace       Output source namespace for filter query
 670 kumpf           1.3          @param   condition             Output condition part of the filter query
 671 kumpf           1.58         @param   query                 Output filter query
 672 kumpf           1.3          @param   queryLanguage         Output query language in which the filter
 673                                                                 query is expressed
 674                           */
 675 kumpf           1.23     void _getCreateParams (
 676 kumpf           1.31         const CIMNamespaceName & nameSpaceName,
 677 kumpf           1.3          const CIMInstance & subscriptionInstance,
 678 kumpf           1.33         Array <CIMName> & indicationSubclasses,
 679 kumpf           1.10         Array <ProviderClassList> & indicationProviders,
 680                              CIMPropertyList & propertyList,
 681 kumpf           1.31         CIMNamespaceName & sourceNameSpace,
 682 kumpf           1.10         String & condition,
 683 kumpf           1.58         String & query,
 684 kumpf           1.10         String & queryLanguage);
 685                      
 686                          /**
 687 kumpf           1.23         Gets the parameter values required to Create or Modify the subscription
 688 kumpf           1.10         request.
 689                      
 690 kumpf           1.33         @param   nameSpaceName         Input namespace name (of subscription)
 691                              @param   subscriptionInstance  Input subscription instance
 692                              @param   indicationSubclasses  Output list of subclasses of indication 
 693                                                                 class in filter query
 694 kumpf           1.10         @param   propertyList          Output list of properties required by the
 695                                                                 subscription
 696 kumpf           1.17         @param   sourceNameSpace       Output source namespace for filter query
 697 kumpf           1.10         @param   condition             Output condition part of the filter query
 698 kumpf           1.58         @param   query                 Output filter query
 699 kumpf           1.10         @param   queryLanguage         Output query language in which the filter
 700                                                                 query is expressed
 701                           */
 702 kumpf           1.23     void _getCreateParams (
 703 kumpf           1.31         const CIMNamespaceName & nameSpaceName,
 704 kumpf           1.10         const CIMInstance & subscriptionInstance,
 705 kumpf           1.33         Array <CIMName> & indicationSubclasses,
 706 kumpf           1.3          CIMPropertyList & propertyList,
 707 kumpf           1.31         CIMNamespaceName & sourceNameSpace,
 708 kumpf           1.3          String & condition,
 709 kumpf           1.58         String & query,
 710 kumpf           1.3          String & queryLanguage);
 711                      
 712                          /**
 713 kumpf           1.23         Gets the parameter values required to Delete the subscription request.
 714 kumpf           1.5  
 715 kumpf           1.33         @param   nameSpaceName         Input namespace name
 716                              @param   subscriptionInstance  Input subscription instance
 717                              @param   indicationSubclasses  Output list of subclasses of indication 
 718                                                                 class in filter query
 719                              @param   sourceNameSpace       Output source namespace for filter query
 720 kumpf           1.5  
 721 kumpf           1.23         @return  List of providers with associated classes to Delete
 722 kumpf           1.5       */
 723 kumpf           1.23     Array <ProviderClassList> _getDeleteParams (
 724 kumpf           1.31         const CIMNamespaceName & nameSpaceName,
 725 kumpf           1.33         const CIMInstance & subscriptionInstance,
 726                              Array <CIMName> & indicationSubclasses,
 727                              CIMNamespaceName & sourceNameSpace);
 728 mday            1.13 
 729 kumpf           1.5      /**
 730 kumpf           1.23         Sends Create subscription request for the specified subscription
 731 carolann.graves 1.68         to each provider in the list.  The requests are sent using SendAsync,
 732                              and the responses are aggregated in the callback methods.  Create 
 733                              Subscription requests are sent to the indication providers using 
 734 carolann.graves 1.71         SendAsync in the following cases: (1) on creation of an enabled 
 735                              subscription instance, and (2) on modification of a subscription 
 736                              instance, when the state changes to enabled.  In cases (1) and (2), 
 737                              there is an original Create Instance or Modify Instance request to 
 738                              which the Indication Service must respond.
 739 kumpf           1.1  
 740                              @param   indicationProviders   list of providers with associated classes
 741 kumpf           1.54         @param   nameSpace             the nameSpace name of the resource being
 742                                                                 monitored, from the SourceNamespace 
 743                                                                 property of the CIM_IndicationFilter 
 744                                                                 instance for the specified 
 745                                                                 subscription
 746 kumpf           1.1          @param   propertyList          the properties referenced by the
 747                                                                 subscription
 748                              @param   condition             the condition part of the filter query
 749 kumpf           1.58         @param   query                 the filter query
 750 kumpf           1.1          @param   queryLanguage         the query language in which the filter
 751                                                                 query is expressed
 752 kumpf           1.23         @param   subscription          the subscription to be created
 753 chuck           1.35         @param   acceptLangs           the language of the response, and
 754                                                                 future indications
 755                              @param   contentLangs          the language of the subscription
 756 carolann.graves 1.71         @param   origRequest           the original request (Create
 757 carolann.graves 1.68                                            Instance, Modify Instance)
 758 kumpf           1.41         @param   indicationSubclasses  the indication subclasses for the 
 759                                                                 subscription
 760 kumpf           1.9          @param   userName              the userName for authentication
 761                              @param   authType              the authentication type
 762                      
 763 kumpf           1.1       */
 764 carolann.graves 1.68     void _sendAsyncCreateRequests (
 765 kumpf           1.10         const Array <ProviderClassList> & indicationProviders,
 766 kumpf           1.31         const CIMNamespaceName & nameSpace,
 767 kumpf           1.1          const CIMPropertyList & propertyList,
 768                              const String & condition,
 769 kumpf           1.58         const String & query,
 770 kumpf           1.1          const String & queryLanguage,
 771 kumpf           1.26         const CIMInstance & subscription,
 772 chuck           1.35         const AcceptLanguages & acceptLangs,
 773                              const ContentLanguages & contentLangs,
 774 kumpf           1.41         const CIMRequestMessage * origRequest,
 775                              const Array <CIMName> & indicationSubclasses,
 776 kumpf           1.9          const String & userName,
 777                              const String & authType = String::EMPTY);
 778 mday            1.13 
 779 kumpf           1.1      /**
 780 carolann.graves 1.68         Sends Create subscription request for the specified subscription
 781                              to each provider in the list.  The requests are sent using SendWait,
 782                              so no callback methods are required.  Create Subscription requests are
 783                              sent to the indication providers using SendWait in the following cases:
 784                              (1) on notification of a provider registration change newly enabling 
 785 carolann.graves 1.71         the provider to serve the subscription, (2) on notification that a 
 786                              provider has been enabled and may now serve the subscription, and 
 787                              (3) on initialization, for each enabled subscription retrieved from the
 788                              repository.  In cases (1) and (2), there is an original Notify Provider
 789                              Registration or Notify Provider Enable request to which the Indication 
 790                              Service must respond.  In case (3), there is no original request and no
 791                              response is required.
 792 carolann.graves 1.68 
 793                              @param   indicationProviders   list of providers with associated classes
 794                              @param   nameSpace             the nameSpace name of the resource being
 795                                                                 monitored, from the SourceNamespace
 796                                                                 property of the CIM_IndicationFilter
 797                                                                 instance for the specified
 798                                                                 subscription
 799                              @param   propertyList          the properties referenced by the
 800                                                                 subscription
 801                              @param   condition             the condition part of the filter query
 802                              @param   query                 the filter query
 803                              @param   queryLanguage         the query language in which the filter
 804                                                                 query is expressed
 805                              @param   subscription          the subscription to be created
 806                              @param   acceptLangs           the language of the response, and
 807                                                                 future indications
 808                              @param   contentLangs          the language of the subscription
 809                              @param   userName              the userName for authentication
 810                              @param   authType              the authentication type
 811                      
 812 carolann.graves 1.71         @return  List of providers that accepted subscription
 813 carolann.graves 1.68      */
 814 carolann.graves 1.71     Array <ProviderClassList> _sendWaitCreateRequests (
 815 carolann.graves 1.68         const Array <ProviderClassList> & indicationProviders,
 816                              const CIMNamespaceName & nameSpace,
 817                              const CIMPropertyList & propertyList,
 818                              const String & condition,
 819                              const String & query,
 820                              const String & queryLanguage,
 821                              const CIMInstance & subscription,
 822                              const AcceptLanguages & acceptLangs,
 823                              const ContentLanguages & contentLangs,
 824                              const String & userName,
 825                              const String & authType = String::EMPTY);
 826                      
 827                          /**
 828 kumpf           1.23         Sends Modify subscription request for the specified subscription
 829 carolann.graves 1.68         to each provider in the list.   The requests are sent using SendWait,
 830                              so no callback methods are required.  Modify Subscription requests must
 831                              be sent to the indication providers on notification of a provider 
 832 kumpf           1.41         registration change, when the provider was formerly serving the 
 833                              subscription, and is still serving the subscription, in the following 
 834                              cases: (1) the provider is newly serving an additional indication 
 835 carolann.graves 1.68         subclass specified by the subscription, or (2) the provider is
 836 kumpf           1.41         no longer serving an indication subclass specified by the subscription 
 837                              (but is still serving at least one of the indication subclasses).
 838 carolann.graves 1.68         In cases (1) and (2), there is an original Notify Provider Registration
 839                              request to which the Indication Service must respond.
 840 kumpf           1.1  
 841                              @param   indicationProviders   list of providers with associated classes
 842 kumpf           1.54         @param   nameSpace             the nameSpace name of the resource being
 843                                                                 monitored, from the SourceNamespace
 844                                                                 property of the CIM_IndicationFilter
 845                                                                 instance for the specified 
 846                                                                 subscription 
 847 kumpf           1.1          @param   propertyList          the properties referenced by the
 848                                                                 subscription
 849                              @param   condition             the condition part of the filter query
 850 kumpf           1.58         @param   query                 the filter query
 851 kumpf           1.1          @param   queryLanguage         the query language in which the filter
 852                                                                 query is expressed
 853                              @param   subscription          the subscription to be modified
 854 chuck           1.35         @param   acceptLangs           the language of the response, and
 855                                                                 future indications
 856                              @param   contentLangs          the language of the subscription    
 857 kumpf           1.9          @param   userName              the userName for authentication
 858                              @param   authType              the authentication type
 859 kumpf           1.1       */
 860 carolann.graves 1.68     void _sendWaitModifyRequests (
 861 kumpf           1.10         const Array <ProviderClassList> & indicationProviders,
 862 kumpf           1.31         const CIMNamespaceName & nameSpace,
 863 kumpf           1.1          const CIMPropertyList & propertyList,
 864                              const String & condition,
 865 kumpf           1.58         const String & query,
 866 kumpf           1.1          const String & queryLanguage,
 867 kumpf           1.26         const CIMInstance & subscription,
 868 chuck           1.35         const AcceptLanguages & acceptLangs,
 869                              const ContentLanguages & contentLangs,  
 870 kumpf           1.9          const String & userName,
 871                              const String & authType = String::EMPTY);
 872 kumpf           1.1  
 873                          /**
 874 kumpf           1.23         Sends Delete subscription request for the specified subscription
 875 carolann.graves 1.68         to each provider in the list.  The requests are sent using SendAsync,
 876                              and the responses are aggregated in the callback methods.  Delete 
 877                              Subscription requests are sent to the indication providers using 
 878                              SendAsync in the following cases: (1) on deletion of an enabled 
 879                              subscription instance, (2) on modification of a subscription instance, 
 880                              when the state changes to disabled, (3) on deletion of an expired 
 881                              subscription, and (4) on deletion of a subscription referencing a 
 882                              deleted transient handler.  In cases (1) and (2), there is an original 
 883                              Delete Instance or Modify Instance request to which the Indication 
 884                              Service must respond.  In cases (3) and (4), there is no orginal request
 885                              and no response is required.
 886 kumpf           1.1  
 887                              @param   indicationProviders   list of providers with associated classes
 888 kumpf           1.54         @param   nameSpace             the nameSpace name of the resource being 
 889                                                                 monitored, from the SourceNamespace
 890                                                                 property of the CIM_IndicationFilter
 891                                                                 instance for the specified 
 892                                                                 subscription 
 893 kumpf           1.1          @param   subscription          the subscription to be modified
 894 chuck           1.35         @param   acceptLangs           the language of the response
 895                              @param   contentLangs          the language of the subscription    
 896 carolann.graves 1.68         @param   origRequest           the original request (Delete Instance, 
 897                                                                 Modify Instance)
 898 kumpf           1.41         @param   indicationSubclasses  the indication subclasses for the 
 899                                                                 subscription
 900 kumpf           1.9          @param   userName              the userName for authentication
 901                              @param   authType              the authentication type
 902 kumpf           1.1       */
 903 carolann.graves 1.68     void _sendAsyncDeleteRequests (
 904 kumpf           1.10         const Array <ProviderClassList> & indicationProviders,
 905 kumpf           1.31         const CIMNamespaceName & nameSpace,
 906 kumpf           1.26         const CIMInstance & subscription,
 907 chuck           1.35         const AcceptLanguages & acceptLangs,
 908                              const ContentLanguages & contentLangs,  
 909 kumpf           1.41         const CIMRequestMessage * origRequest,
 910                              const Array <CIMName> & indicationSubclasses,
 911 kumpf           1.9          const String & userName,
 912                              const String & authType = String::EMPTY);
 913 kumpf           1.1  
 914                          /**
 915 carolann.graves 1.68         Sends Delete subscription request for the specified subscription
 916                              to each provider in the list.  The requests are sent using SendWait,
 917                              so no callback methods are required.  Delete Subscription requests are
 918                              sent to the indication providers using SendWait in the following case: 
 919                              (1) on notification of a provider registration change newly preventing 
 920                              the provider from serving the subscription.  In case (1), there is an 
 921                              original Notify Provider Registration request to which the Indication 
 922                              Service must respond.  
 923                      
 924                              @param   indicationProviders   list of providers with associated classes
 925                              @param   nameSpace             the nameSpace name of the resource being
 926                                                                 monitored, from the SourceNamespace
 927                                                                 property of the CIM_IndicationFilter
 928                                                                 instance for the specified
 929                                                                 subscription
 930                              @param   subscription          the subscription to be modified
 931                              @param   acceptLangs           the language of the response
 932                              @param   contentLangs          the language of the subscription
 933                              @param   userName              the userName for authentication
 934                              @param   authType              the authentication type
 935                           */
 936 carolann.graves 1.68     void _sendWaitDeleteRequests (
 937                              const Array <ProviderClassList> & indicationProviders,
 938                              const CIMNamespaceName & nameSpace,
 939                              const CIMInstance & subscription,
 940                              const AcceptLanguages & acceptLangs,
 941                              const ContentLanguages & contentLangs,
 942                              const String & userName,
 943                              const String & authType = String::EMPTY);
 944                      
 945                          /**
 946 kumpf           1.41         Collects responses from providers for aggregation as they are received,
 947                              and stores them in the IndicationOperationAggregate instance.  Calls 
 948                              _handleOperationResponseAggregation to process the responses, once all 
 949                              expected responses have been received.
 950                      
 951 kumpf           1.57         @param  operation            shared data structure that controls message
 952 kumpf           1.41                                          processing
 953                              @param  destination          target queue of completion callback
 954                              @param  userParameter        user parameter for callback processing
 955                           */
 956                          static void _aggregationCallBack (
 957                              AsyncOpNode * operation,
 958                              MessageQueue * destination,
 959                              void * userParameter);
 960                      
 961                          /**
 962                              Calls the appropriate function to processes responses from providers, 
 963                              based on the type of request sent to providers, once all responses have
 964                              been received.  
 965                      
 966                              @param   operationAggregate    the operation aggregate instance 
 967                           */
 968                          void _handleOperationResponseAggregation (
 969                              IndicationOperationAggregate * operationAggregate);
 970                      
 971                          /**
 972                              Processes create subscription responses from providers, once all have 
 973 kumpf           1.41         been received.  Takes the appropriate action, based on the type of the 
 974                              original request, if any, and the responses received.  Sends the 
 975                              response to the original request, if required.
 976                      
 977                              @param   operationAggregate    the operation aggregate instance 
 978                           */
 979                          void _handleCreateResponseAggregation (
 980                              IndicationOperationAggregate * operationAggregate);
 981                      
 982                          /**
 983                              Processes modify subscription responses from providers, once all have 
 984                              been received.  Updates the subscription hash tables.
 985                      
 986                              @param   operationAggregate    the operation aggregate instance 
 987                           */
 988                          void _handleModifyResponseAggregation (
 989                              IndicationOperationAggregate * operationAggregate);
 990                      
 991                          /**
 992                              Processes delete subscription responses from providers, once all have 
 993                              been received.  Updates the subscription hash tables appropriately, 
 994 kumpf           1.41         based on the type of the original request, if any.  Sends the response 
 995                              to the original request, if required.
 996                      
 997                              @param   operationAggregate    the operation aggregate instance 
 998                           */
 999                          void _handleDeleteResponseAggregation (
1000                              IndicationOperationAggregate * operationAggregate);
1001                      
1002                          /**
1003 kumpf           1.1          Creates an alert instance of the specified class.
1004                      
1005                              @param   alertClassName        the alert class name
1006 kumpf           1.7          @param   subscriptions         subscriptions for which alert is to be
1007 kumpf           1.1                                             created
1008                      
1009                              @return  the created alert instance
1010                           */
1011                          CIMInstance _createAlertInstance (
1012 kumpf           1.31         const CIMName & alertClassName,
1013 kumpf           1.26         const Array <CIMInstance> & subscriptions);
1014 mday            1.14 
1015 kumpf           1.40 #if 0
1016 kumpf           1.33      /** 
1017 mday            1.14 	  Asynchronous completion routine for _sendAlerts
1018                            */
1019                      
1020                            static void _sendAlertsCallBack(AsyncOpNode *operation, 
1021                      				      MessageQueue *callback_destination, 
1022                      				      void *parameter);
1023 kumpf           1.1  
1024                          /**
1025                              Sends specified alert to each unique handler instance for the
1026                              specified subscriptions in the list.
1027                      
1028 kumpf           1.7          @param   subscriptions         subscriptions for which alert is to be
1029 kumpf           1.1                                             sent
1030                              @param   alertInstance         the alert to be sent
1031                           */
1032                          void _sendAlerts (
1033 kumpf           1.26         const Array <CIMInstance> & subscriptions,
1034 kumpf           1.1          /* const */ CIMInstance & alertInstance);
1035 kumpf           1.40 #endif
1036 mday            1.18       
1037 kumpf           1.16     /**
1038 carolann.graves 1.67         Sends a Subscription Init Complete request to the Provider 
1039                              Manager Service.
1040                           */
1041                          void _sendSubscriptionInitComplete ();
1042 kumpf           1.16 
1043 kumpf           1.37     /**
1044                              Gets the value of the Creator property from the specified Subscription
1045                              instance.  If this function returns False, the value of the creator 
1046                              parameter is unchanged.
1047                      
1048                              @param   instance              subscription instance
1049                              @param   creator               value of Creator property if retrieved
1050                      
1051 kumpf           1.54         @return  True, if the value of the Creator property was retrieved;
1052 kumpf           1.37                  False if Creator property was missing, null, or of an
1053 kumpf           1.54                        incorrect type
1054 kumpf           1.37      */
1055                          Boolean _getCreator (
1056                              const CIMInstance & instance,
1057                              String & creator) const;
1058                      
1059                          /**
1060 kumpf           1.54         Validates the specified SubscriptionState property value.
1061 kumpf           1.37 
1062 kumpf           1.54         @param   state                 SubscriptionState property value
1063 kumpf           1.37 
1064 kumpf           1.54         @return  True, if the SubscriptionState property value is valid;
1065                                       False otherwise
1066 kumpf           1.37      */
1067 kumpf           1.54     Boolean _validateState (
1068                              const Uint16 state) const;
1069 kumpf           1.37 
1070 kumpf           1.46     /**
1071                              This function peforms an authorization test based on the
1072                              value of the enableSubscriptionForNonprivilegedUsers.
1073                      
1074                              @param   userName                String
1075                      
1076 kumpf           1.54         @return  True, if authentication is not enabled or the 
1077                                             user is a privileged system user;
1078                                       False, if authentication is enabled and the
1079                                             user is not privileged
1080 kumpf           1.46      */
1081                          void _checkNonprivilegedAuthorization (
1082                              const String & userName);
1083                      
1084 kumpf           1.48     /**
1085 kumpf           1.49         Updates the propertyList, in preparation for calling the Repository.
1086                              If the propertyList is not null, the Creator property must be added to 
1087                              the list.  Also, if the request is for the Subscription class, the 
1088                              value of the Time Remaining property need only be calculated if it is 
1089                              requested.  In that case, the Subscription Duration and Start Time 
1090                              properties must be added to the list if not already there. 
1091                      
1092                              @param   className             class name for the request
1093                              @param   propertyList          list of properties requested
1094                              @param   setTimeRemaining      indicates whether Time Remaining property
1095                                                             was requested
1096                              @param   startTimeAdded        indicates whether Start Time property was
1097                                                             added to the list
1098                              @param   durationAdded         indicates whether Duration property was
1099                                                             added to the list
1100                           */
1101                          void _updatePropertyList
1102                              (CIMName & className,
1103                               CIMPropertyList & propertyList,
1104                               Boolean & setTimeRemaining,
1105                               Boolean & startTimeAdded,
1106 kumpf           1.49          Boolean & durationAdded);
1107                      
1108                          /**
1109 kumpf           1.48         Gets a String containing the comma-separated Subscription Filter Name 
1110                              and Handler Name, for use in a log message to identify the subscription.
1111                      
1112                              @param   subscription          subscription instance
1113                      
1114                              @return  String containing the comma-separated Subscription Filter Name
1115                                       and Handler Name
1116                           */
1117                          String _getSubscriptionLogString
1118                              (CIMInstance & subscription);
1119                      
1120 kumpf           1.54     SubscriptionRepository* _subscriptionRepository;
1121 kumpf           1.51 
1122 kumpf           1.54     SubscriptionTable * _subscriptionTable;
1123 kumpf           1.6  
1124 kumpf           1.8      /**
1125                              Handle to Provider Registration Manager
1126                           */
1127                          ProviderRegistrationManager * _providerRegManager;
1128 kumpf           1.5  
1129 chuck           1.64     /** 
1130                              Pointer to CIMRepository, for use in building QueryExpression.
1131                           */
1132                          CIMRepository* _cimRepository;
1133                      
1134 kumpf           1.5      /**
1135                              Integer representing queue ID for accessing Provider Manager Service
1136                           */
1137                          Uint32 _providerManager;
1138                      
1139                          /**
1140                              Integer representing queue ID for accessing Handler Manager Service
1141                           */
1142                          Uint32 _handlerService;
1143                      
1144                          /**
1145 kumpf           1.46         Boolean indicating that the CIM Server has been configured to
1146                              allow non-privileged users read and write access to the
1147                              Subscription classes.
1148                           */
1149                          Boolean _enableSubscriptionsForNonprivilegedUsers;
1150                      
1151 kumpf           1.55     /**
1152 yi.zhou         1.66 	Gets the indication class specified by the subscription filter query. 
1153                      
1154                      	@param instance     the subscription instance
1155                      
1156                      	@return CIMClass object for the indication class
1157                          */
1158                          CIMClass _getIndicationClass(
1159                      	const CIMInstance & instance);
1160                      
1161                          /**
1162 kumpf           1.55         Arrays of valid and supported property values
1163                      
1164                              Notes: 
1165                              Valid values are defined by the CIM Event Schema MOF
1166                              Supported values are a subset of the valid values
1167                              Some valid values, as defined in the MOF, are not currently supported
1168                                  by the Pegasus IndicationService
1169                      
1170                              Supported Values 
1171                              SubscriptionState: Enabled, Disabled
1172                              RepeatNotificationPolicy: Unknown, Other, None, Suppress, Delay
1173                              OnFatalErrorPolicy: Ignore, Disable, Remove
1174                              PersistenceType: Permanent, Transient
1175                           */
1176 kumpf           1.19     Array <Uint16> _validStates;
1177                          Array <Uint16> _validRepeatPolicies;
1178                          Array <Uint16> _validErrorPolicies;
1179                          Array <Uint16> _validPersistenceTypes;
1180 kumpf           1.55     Array <Uint16> _supportedStates;
1181                          Array <Uint16> _supportedRepeatPolicies;
1182                          Array <Uint16> _supportedErrorPolicies;
1183                          Array <Uint16> _supportedPersistenceTypes;
1184 yi.zhou         1.66 
1185 kumpf           1.1  };
1186                      
1187                      PEGASUS_NAMESPACE_END
1188                      
1189 kumpf           1.41 #endif  /* Pegasus_IndicationService_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2