⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 subscriptionrepository.h

📁 Pegasus is an open-source implementationof the DMTF CIM and WBEM standards. It is designed to be por
💻 H
📖 第 1 页 / 共 2 页
字号:
//%2006//////////////////////////////////////////////////////////////////////////// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;// IBM Corp.; EMC Corporation, The Open Group.// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;// EMC Corporation; VERITAS Software Corporation; The Open Group.// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;// EMC Corporation; Symantec Corporation; The Open Group.//// Permission is hereby granted, free of charge, to any person obtaining a copy// of this software and associated documentation files (the "Software"), to// deal in the Software without restriction, including without limitation the// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or// sell copies of the Software, and to permit persons to whom the Software is// furnished to do so, subject to the following conditions:// // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN// ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED// "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.////==============================================================================//// Author: Carol Ann Krug Graves, Hewlett-Packard Company//             (carolann_graves@hp.com)//// Modified By:////%/////////////////////////////////////////////////////////////////////////////#ifndef Pegasus_SubscriptionRepository_h#define Pegasus_SubscriptionRepository_h#include <Pegasus/Common/Config.h>#include <Pegasus/Server/Linkage.h>#include <Pegasus/Common/Array.h>#include <Pegasus/Common/String.h>#include <Pegasus/Common/CIMName.h>#include <Pegasus/Common/CIMInstance.h>#include <Pegasus/Common/CIMObjectPath.h>#include <Pegasus/Common/AcceptLanguageList.h>#include <Pegasus/Common/ContentLanguageList.h>#include <Pegasus/Repository/CIMRepository.h>PEGASUS_NAMESPACE_BEGIN/**    The SubscriptionRepository class manages Subscription, Filter, and    Handler instances in the Repository.    @author  Hewlett-Packard Company */class PEGASUS_SERVER_LINKAGE SubscriptionRepository{public:    /**        Constructs SubscriptionRepository instance.     */    SubscriptionRepository (        CIMRepository * repository);    /**        Destructs SubscriptionRepository instance.     */    ~SubscriptionRepository (void);    /**        Adds a Filter, Handler or Subscription instance in the repository.        Adds or sets properties as necessary.        @param   instance              instance to be added        @param   nameSpace             namespace in which instance to be added        @param   userName              user issuing request        @param   acceptLanguages       acceptLanguages of request        @param   contentLanguages      contentLanguages of request        @param   enabled               indicates instance is a subscription                                         instance and is enabled        @return  the CIMObjectPath for the instance     */    CIMObjectPath createInstance (        CIMInstance instance,        const CIMNamespaceName & nameSpace,        const String & userName,        const AcceptLanguageList & acceptLanguages,        const ContentLanguageList & contentLanguages,        Boolean enabled);    /**        Retrieves list of enabled subscription instances in all namespaces from        the repository.  If an invalid instance is found, it is skipped, and        processing of remaining valid subscriptions continues.        @param   activeSubscriptions  the returned subscription instances        @return  True, if an invalid instance was found;                 False otherwise     */    Boolean getActiveSubscriptions (        Array <CIMInstance> & activeSubscriptions) const;    /**        Retrieves list of all subscription instances (including inactive        disabled subscriptions) in all namespaces from the repository.        @return  List of all subscriptions     */    Array <CIMInstance> getAllSubscriptions () const;    /**        Retrieves list of subscriptions in the specified namespace.        @param   nameSpace             the namespace        @return   List of subscription instances     */    Array <CIMInstance> getSubscriptions (        const CIMNamespaceName & nameSpace) const;    /**        Gets the value of the SubscriptionState property from the specified        Subscription instance.  If this function returns False, the value of        the state parameter is unchanged.        @param   instance              subscription instance        @param   state                 value of SubscriptionState property if                                       retrieved        @return  True, if the value of the SubscriptionState property was                       retrieved;                 False if SubscriptionState property was missing, null, or of an                       incorrect type     */    Boolean getState (        const CIMInstance & instance,        Uint16 & state) const;    /**        Deletes the specified subscription.        Note: If the specified subscription cannot be successfully retrieved,        it may have already been deleted by another thread.  In that case, an        uninitialized CIMInstance is returned.        @param   subscription          the subscription object path        @return  CIMInstance representing deleted subscription     */    CIMInstance deleteSubscription (        CIMObjectPath & subscription);    /**        Deletes subscriptions referencing the specified handler.  All namespaces        are searched for subscriptions that reference the handler to be deleted.        @param   nameSpace             the name space of the handler being                                           deleted        @param   referenceProperty     the name of the reference property in the                                           subscription instance        @param   handler               the handler reference        @return  Array of CIMInstance objects representing deleted subscriptions     */    Array <CIMInstance> deleteReferencingSubscriptions (        const CIMNamespaceName & nameSpace,        const CIMName & referenceProperty,        const CIMObjectPath & handler);    /**        Retrieves the Handler CIMInstance representing the handler of the        specified subscription.        @param   subscription          the subscription        @return  a Handler CIMInstance for the subscription's handler     */    CIMInstance getHandler (        const CIMInstance & subscription) const;    /**        Determines if specified handler is Transient.        @param   nameSpace             the name space        @param   handler               the handler reference        @return  True, if the Handler is Transient;                 False otherwise     */    Boolean isTransient (        const CIMNamespaceName & nameSpace,        const CIMObjectPath & handler) const;    /**        Retrieves the values of the filter query, source namespace,        and query language properties for the specified subscription instance.        @param   subscription      Input subscription instance

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -