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

  1 marek 1.1 //%LICENSE////////////////////////////////////////////////////////////////
  2           //
  3           // Licensed to The Open Group (TOG) under one or more contributor license
  4           // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
  5           // this work for additional information regarding copyright ownership.
  6           // Each contributor licenses this file to you under the OpenPegasus Open
  7           // Source License; you may not use this file except in compliance with the
  8           // License.
  9           //
 10           // Permission is hereby granted, free of charge, to any person obtaining a
 11           // copy of this software and associated documentation files (the "Software"),
 12           // to deal in the Software without restriction, including without limitation
 13           // the rights to use, copy, modify, merge, publish, distribute, sublicense,
 14           // and/or sell copies of the Software, and to permit persons to whom the
 15           // Software is furnished to do so, subject to the following conditions:
 16           //
 17           // The above copyright notice and this permission notice shall be included
 18           // in all copies or substantial portions of the Software.
 19           //
 20           // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 21           // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 22 marek 1.1 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 23           // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 24           // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 25           // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 26           // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 27           //
 28           //////////////////////////////////////////////////////////////////////////
 29           //
 30           //%/////////////////////////////////////////////////////////////////////////////
 31           
 32           #ifndef Pegasus_SubscriptionKey_h
 33           #define Pegasus_SubscriptionKey_h
 34           
 35           #include <Pegasus/Common/Config.h>
 36           #include <Pegasus/General/Linkage.h>
 37           #include <Pegasus/Common/String.h>
 38           #include <Pegasus/Common/CIMObjectPath.h>
 39           
 40           PEGASUS_NAMESPACE_BEGIN
 41           
 42           class SubscriptionKey;
 43 marek 1.1 
 44 dev.meetei 1.2 struct PEGASUS_GENERAL_LINKAGE SubscriptionKeyEqualFunc
 45 marek      1.1 {
 46                    static Boolean equal(const SubscriptionKey& x, const SubscriptionKey& y);
 47                };
 48                
 49 dev.meetei 1.2 struct PEGASUS_GENERAL_LINKAGE SubscriptionKeyHashFunc
 50 marek      1.1 {
 51                    static Uint32 hash(const SubscriptionKey& x);
 52                };
 53                
 54                
 55                /**
 56                    Normalizes the subscription path. Host name will be removed from both
 57                    filter and handler objectPaths. Namespace will also be removed from
 58                    filter or handler if filter's or handler's namespace is same as
 59                    subscription namespace.
 60                */
 61                
 62 dev.meetei 1.2 class PEGASUS_GENERAL_LINKAGE SubscriptionKey
 63 marek      1.1 {
 64                
 65                public:
 66                    SubscriptionKey(){};
 67                
 68                    SubscriptionKey(const CIMObjectPath & subscription);
 69                
 70                    ~SubscriptionKey(){};
 71                
 72                    String toString() const;
 73                
 74                protected:
 75 dev.meetei 1.3     static void _parseObjectName(
 76 marek      1.1         const String & objectName,
 77                        String & name,
 78                        String & ns,
 79                        String & className);
 80                
 81                private:
 82                    String handlerName;
 83                    String filterName;
 84                   
 85                    String filterNamespace;
 86                    String handlerNamespace;
 87                    String subscriptionNamespace;
 88                
 89                    String filterClassName;
 90                    String handlerClassName;
 91                    String subscriptionClassName;
 92                
 93                
 94                    friend Boolean SubscriptionKeyEqualFunc::equal(
 95                        const SubscriptionKey&,
 96                        const SubscriptionKey&);
 97 marek      1.1 
 98                    friend Uint32 SubscriptionKeyHashFunc::hash(const SubscriptionKey&);
 99                };
100                
101 marek      1.4 PEGASUS_GENERAL_LINKAGE Boolean operator==(
102                    const SubscriptionKey& key1,
103                    const SubscriptionKey& key2);
104                
105 marek      1.1 PEGASUS_NAMESPACE_END
106                
107                #endif  /* Pegasus_SubscriptionKey_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2