//***************************************************************************** // // Copyright (c) 1996-1999, Microsoft Corporation, All rights reserved // // EVENTREP.H // // This file contains basic definitions and classes for event representation. // // Classes defined: // // CEventRepresentation // // History: // // 11/27/96 a-levn Compiles. // //***************************************************************************** #ifndef __EVENT_REP__H_ #define __EVENT_REP__H_ #include #include #include "parmdefs.h" #include // Class and property names of the schema objects related to event subsystem // ========================================================================= #define SECURITY_DESCRIPTOR_PROPNAME L"SECURITY_DESCRIPTOR" #define EVENT_PROVIDER_REGISTRATION_CLASS L"__EventProviderRegistration" #define PROVIDER_CLASS L"__Provider" #define EVENT_FILTER_CLASS L"__EventFilter" #define BASE_STANDARD_FILTER_CLASS L"__BaseStandardEventFilter" #define CONSUMER_CLASS L"__EventConsumer" #define BINDING_CLASS L"__FilterToConsumerBinding" #define GENERATOR_CLASS L"__EventGenerator" #define GENERATOR_BINDING_CLASS L"__GeneratorToConsumerBinding" #define TIMER_BASE_CLASS L"__TimerInstruction" #define TIMER_ABSOLUTE_CLASS L"__AbsoluteTimerInstruction" #define TIMER_INTERVAL_CLASS L"__IntervalTimerInstruction" #define WIN32_PROVIDER_CLASS L"__Win32Provider" #define CONSUMER_PROVIDER_REGISTRATION_CLASS \ L"__EventConsumerProviderRegistration" #define EVENT_DROP_CLASS L"__EventDroppedEvent" #define QUEUE_OVERFLOW_CLASS L"__EventQueueOverflowEvent" #define CONSUMER_FAILURE_CLASS L"__ConsumerFailureEvent" #define QOS_FAILURE_CLASS L"__QoSFailureEvent" #define OWNER_SID_PROPNAME L"CreatorSID" #define FILTER_ROLE_NAME L"Filter" #define CONSUMER_ROLE_NAME L"Consumer" #define BINDING_QOS_PROPNAME L"DeliveryQoS" #define BINDING_SYNCHRONICITY_PROPNAME L"DeliverSynchronously" #define BINDING_SECURE_PROPNAME L"MaintainSecurityContext" #define BINDING_SLOWDOWN_PROPNAME L"SlowDownProviders" #define TIMER_ID_PROPNAME L"TimerID" #define FILTER_KEY_PROPNAME L"Name" #define FILTER_QUERY_PROPNAME L"Query" #define FILTER_LANGUAGE_PROPNAME L"QueryLanguage" #define FILTER_EVENTNAMESPACE_PROPNAME L"EventNamespace" #define FILTER_EVENTACCESS_PROPNAME L"EventAccess" #define FILTER_GUARDNAMESPACE_PROPNAME L"ConditionNamespace" #define FILTER_GUARD_PROPNAME L"Condition" #define FILTER_GUARDLANG_PROPNAME L"ConditionLanguage" #define CONSUMER_MACHINE_NAME_PROPNAME L"MachineName" #define CONSUMER_MAXQUEUESIZE_PROPNAME L"MaximumQueueSize" #define PROVIDER_CLSID_PROPNAME L"Clsid" #define PROVIDER_NAME_PROPNAME L"Name" #define EVPROVREG_PROVIDER_REF_PROPNAME L"Provider" #define EVPROVREG_QUERY_LIST_PROPNAME L"EventQueryList" #define CONSPROV_PROVIDER_REF_PROPNAME L"Provider" #define CONSPROV_CLSID_PROPNAME L"CLSID" #define TARGET_NAMESPACE_PROPNAME L"TargetNamespace" #define PREVIOUS_NAMESPACE_PROPNAME L"PreviousNamespace" #define TARGET_CLASS_PROPNAME L"TargetClass" #define PREVIOUS_CLASS_PROPNAME L"PreviousCLass" #define TARGET_INSTANCE_PROPNAME L"TargetInstance" #define PREVIOUS_INSTANCE_PROPNAME L"PreviousInstance" #define EVENT_DROP_EVENT_PROPNAME L"Event" #define EVENT_DROP_CONSUMER_PROPNAME L"IntendedConsumer" #define CONSUMER_FAILURE_ERROR_PROPNAME L"ErrorCode" #define CONSUMER_FAILURE_ERROROBJ_PROPNAME L"ErrorObject" #define QOS_FAILURE_ERROR_PROPNAME L"ErrorCode" #define QUEUE_OVERFLOW_SIZE_PROPNAME L"CurrentQueueSize" #define MONITOR_BASE_EVENT_CLASS L"__MonitorEvent" #define MONITOR_DATA_EVENT_CLASS L"__MonitorDataEvent" #define ASSERT_EVENT_CLASS L"__MonitorAssertEvent" #define RETRACT_EVENT_CLASS L"__MonitorRetractEvent" #define GOINGUP_EVENT_CLASS L"__MonitorUpEvent" #define GOINGDOWN_EVENT_CLASS L"__MonitorDownEvent" #define MONITORERROR_EVENT_CLASS L"__MonitorErrorEvent" #define MONITOR_CLASS L"__MonitorInstruction" #define MONITORNAME_EVENT_PROPNAME L"MonitorName" #define MONITOROBJECT_EVENT_PROPNAME L"RowObject" #define MONITORCOUNT_EVENT_PROPNAME L"TotalObjects" #define MONITORNEW_EVENT_PROPNAME L"GuaranteedNew" #define MONITOR_NAME_PROPNAME L"Name" #define MONITOR_QUERY_PROPNAME L"Query" #define MONITOR_QUERYLANG_PROPNAME L"QueryLanguage" #define MONITOR_NAMESPACE_PROPNAME L"TargetNamespace" #define E_NOTFOUND WBEM_E_NOT_FOUND typedef IWbemClassObject IWbemEvent; // Helper functions // ================ inline DELETE_ME LPWSTR CloneWstr(READ_ONLY LPCWSTR wsz) { LPWSTR wszNew = new WCHAR[wcslen(wsz)+1]; if(wszNew == NULL) return NULL; wcscpy(wszNew, wsz); return wszNew; } // Event types. These are used in IndicateEx calls, as well as internally. // ======================================================================= typedef enum{ e_EventTypeInvalid = WBEM_EVENTTYPE_Invalid, e_EventTypeExtrinsic = WBEM_EVENTTYPE_Extrinsic, e_EventTypeTimer = WBEM_EVENTTYPE_Timer, e_EventTypeNamespaceCreation = WBEM_EVENTTYPE_NamespaceCreation, e_EventTypeNamespaceDeletion = WBEM_EVENTTYPE_NamespaceDeletion, e_EventTypeNamespaceModification = WBEM_EVENTTYPE_NamespaceModification, e_EventTypeClassCreation = WBEM_EVENTTYPE_ClassCreation, e_EventTypeClassDeletion = WBEM_EVENTTYPE_ClassDeletion, e_EventTypeClassModification = WBEM_EVENTTYPE_ClassModification, e_EventTypeInstanceCreation = WBEM_EVENTTYPE_InstanceCreation, e_EventTypeInstanceDeletion = WBEM_EVENTTYPE_InstanceDeletion, e_EventTypeInstanceModification = WBEM_EVENTTYPE_InstanceModification, e_EventTypeSystem = WBEM_EVENTTYPE_System } EEventType; #define INTRINSIC_EVENTS_MASK (~(1<