OW_Authorizer2IFC.hpp

Go to the documentation of this file.
00001 /*******************************************************************************
00002 * Copyright (C) 2003-2004 Novell, Inc. All rights reserved.
00003 *
00004 * Redistribution and use in source and binary forms, with or without
00005 * modification, are permitted provided that the following conditions are met:
00006 *
00007 *  - Redistributions of source code must retain the above copyright notice,
00008 *    this list of conditions and the following disclaimer.
00009 *
00010 *  - Redistributions in binary form must reproduce the above copyright notice,
00011 *    this list of conditions and the following disclaimer in the documentation
00012 *    and/or other materials provided with the distribution.
00013 *
00014 *  - Neither the name of Novell, Inc. nor the names of its
00015 *    contributors may be used to endorse or promote products derived from this
00016 *    software without specific prior written permission.
00017 *
00018 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00019 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00020 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00021 * ARE DISCLAIMED. IN NO EVENT SHALL Novell, Inc. OR THE CONTRIBUTORS
00022 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00023 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00024 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00025 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00026 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00027 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00028 * POSSIBILITY OF SUCH DAMAGE.
00029 *******************************************************************************/
00030 
00036 #ifndef OW_AUTHORIZER2IFC_HPP_INCLUDE_GUARD_
00037 #define OW_AUTHORIZER2IFC_HPP_INCLUDE_GUARD_
00038 
00039 #include "OW_config.h"
00040 #include "OW_ServiceEnvironmentIFC.hpp"
00041 #include "OW_SharedLibraryReference.hpp"
00042 #include "OW_IntrusiveReference.hpp"
00043 #include "OW_IntrusiveCountableBase.hpp"
00044 #include "OW_IfcsFwd.hpp"
00045 
00046 namespace OW_NAMESPACE
00047 {
00048 
00049 class OW_COMMON_API Authorizer2IFC : public IntrusiveCountableBase
00050 {
00051 public:
00052 
00053    enum EWriteFlag { E_CREATE, E_MODIFY, E_DELETE };
00054 
00055    enum EAccessType { E_READ, E_WRITE, E_READWRITE };
00056 
00057    enum EDynamicFlag { E_NOT_DYNAMIC, E_DYNAMIC };
00058 
00059    virtual ~Authorizer2IFC();
00060 
00085    virtual bool doAllowReadInstance(
00086       const ServiceEnvironmentIFCRef& env,
00087         const String& ns,
00088       const String& className,
00089       const StringArray* clientPropertyList,
00090       StringArray& authorizedPropertyList,
00091       OperationContext& context) = 0;
00092 
00093 #ifndef OW_DISABLE_INSTANCE_MANIPULATION
00094 
00107    virtual bool doAllowWriteInstance(
00108       const ServiceEnvironmentIFCRef& env,
00109       const String& ns,
00110       const CIMObjectPath& instanceName,
00111       EDynamicFlag dynamic,
00112       EWriteFlag flag,
00113       OperationContext& context) = 0;
00114 #endif
00115 
00123    virtual bool doAllowReadSchema(
00124       const ServiceEnvironmentIFCRef& env,
00125       const String& ns,
00126       OperationContext& context) = 0;
00127 
00128 #if !defined(OW_DISABLE_SCHEMA_MANIPULATION) || !defined(OW_DISABLE_QUALIFIER_DECLARATION)
00129 
00137    virtual bool doAllowWriteSchema(
00138       const ServiceEnvironmentIFCRef& env,
00139       const String& ns,
00140       EWriteFlag flag,
00141       OperationContext& context) = 0;
00142 #endif
00143 
00152    virtual bool doAllowAccessToNameSpace(
00153       const ServiceEnvironmentIFCRef& env,
00154       const String& ns,
00155       EAccessType accessType,
00156       OperationContext& context) = 0;
00157 
00158 #if !defined(OW_DISABLE_INSTANCE_MANIPULATION) && !defined(OW_DISABLE_NAMESPACE_MANIPULATION)
00159 
00166    virtual bool doAllowCreateNameSpace(
00167       const ServiceEnvironmentIFCRef& env,
00168       const String& ns,
00169       OperationContext& context) = 0;
00170 
00178    virtual bool doAllowDeleteNameSpace(
00179       const ServiceEnvironmentIFCRef& env,
00180       const String& ns,
00181       OperationContext& context) = 0;
00182 #endif
00183 
00190    virtual bool doAllowEnumNameSpace(
00191       const ServiceEnvironmentIFCRef& env,
00192       OperationContext& context) = 0;
00193 
00204    virtual bool doAllowMethodInvocation(
00205       const ServiceEnvironmentIFCRef& env,
00206       const String& ns,
00207       const CIMObjectPath& path,
00208       const String& methodName,
00209       OperationContext& context) = 0;
00210 
00211    virtual void init(ServiceEnvironmentIFCRef&);
00212 };
00213 
00214 }
00215 
00216 #if !defined(OW_STATIC_SERVICES)
00217    #define OW_AUTHORIZER2_FACTORY(derived, authorizerName) \
00218    extern "C" OW_EXPORT OW_NAMESPACE::Authorizer2IFC* \
00219    createAuthorizer2() \
00220    { \
00221       return new derived; \
00222    } \
00223    extern "C" OW_EXPORT const char* \
00224    getOWVersion() \
00225    { \
00226       return OW_VERSION; \
00227    }
00228 #else
00229    #define OW_AUTHORIZER2_FACTORY(derived, authorizerName) \
00230    extern "C" OW_NAMESPACE::Authorizer2IFC* \
00231    createAuthorizer2_##authorizerName() \
00232    { \
00233       return new derived; \
00234    }
00235 #endif /* !defined(OW_STATIC_SERVICES) */
00236 
00237 
00238 #endif
00239 

Generated on Thu Feb 9 08:47:52 2006 for openwbem by  doxygen 1.4.6