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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2