Update of /cvsroot/sblim/cmpi-dns/provider/Linux_DnsNotifyACLForService In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20455/provider/Linux_DnsNotifyACLForService Added Files: CmpiLinux_DnsNotifyACLForServiceProvider.cpp Linux_DnsNotifyACLForServiceFactory.h Linux_DnsNotifyACLForServiceManualInstance.cpp Linux_DnsNotifyACLForServiceManualInstance.h setting.provider Linux_DnsNotifyACLForServiceInterface.h Linux_DnsNotifyACLForServiceRepositoryInstance.cpp Linux_DnsNotifyACLForServiceFakeFactory.cpp Linux_DnsNotifyACLForServiceRepositoryExternal.cpp Linux_DnsNotifyACLForServiceInstance.h Linux_DnsNotifyACLForServiceInstance.cpp Linux_DnsNotifyACLForServiceRepositoryExternal.h Linux_DnsNotifyACLForServiceResourceAccess.h Linux_DnsNotifyACLForServiceResourceAccess.cpp Linux_DnsNotifyACLForServiceDefaultImplementation.h Linux_DnsNotifyACLForServiceInstanceName.cpp Linux_DnsNotifyACLForServiceRepositoryInstance.h CmpiLinux_DnsNotifyACLForServiceProvider.h makefile Linux_DnsNotifyACLForServiceInstanceName.h Linux_DnsNotifyACLForServiceDefaultImplementation.cpp Linux_DnsNotifyACLForServiceFactory.cpp Linux_DnsNotifyACLForServiceExternal.h Linux_DnsNotifyACLForServiceExternal.cpp Log Message: WBEM-SMT DNS provider component. First initial upload. This module includes: - CIM model for DNS - CMPI provider for DNS - Resource Access layer for DNS --- NEW FILE: setting.provider --- #Provider configuration #CPPFLAGS.provider LDFLAGS.provider=-ldnssupport --- NEW FILE: Linux_DnsNotifyACLForServiceFakeFactory.cpp --- /** * Linux_DnsNotifyACLForServiceFakeFactory.cpp * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * author: Murillo Bernardes <ber...@br...> * * Contributors: * */ #include <iostream> #include <strings.h> #include "Linux_DnsNotifyACLForServiceFactory.h" using namespace std; namespace genProvider{ Linux_DnsNotifyACLForServiceInterface* Linux_DnsNotifyACLForServiceFactory::getImplementation(){ cout<<"ERROR: incomplete support library is being used"<<endl; cout<<" in provider from class Linux_DnsNotifyACLForService"<<endl; cout<<" Use the link-install options for the makefile"<<endl; return 0; }; } --- NEW FILE: Linux_DnsNotifyACLForServiceResourceAccess.h --- /** * Linux_DnsNotifyACLForServiceResourceAccess.h * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * author: Murillo Bernardes <ber...@br...> * * Contributors: * */ #ifndef Linux_DnsNotifyACLForServiceResourceAccess_h #define Linux_DnsNotifyACLForServiceResourceAccess_h #include "Linux_DnsNotifyACLForServiceInstanceName.h" #include "Linux_DnsNotifyACLForServiceManualInstance.h" #include "CmpiObjectPath.h" #include "CmpiInstance.h" #include "CmpiDateTime.h" #include "CmpiBroker.h" #include "Linux_DnsServiceInstance.h" #include "Linux_DnsAddressMatchListInstance.h" #include "Linux_DnsServiceExternal.h" #include "Linux_DnsAddressMatchListExternal.h" #include "Linux_DnsNotifyACLForServiceDefaultImplementation.h" #include <string> #include <list> using namespace std; #include "dnssupport.h" #include "defaultvalues.h" #include "DnsArray.h" #include "DnsValueMap.h" namespace genProvider { class Linux_DnsNotifyACLForServiceResourceAccess: public Linux_DnsNotifyACLForServiceDefaultImplementation { public: /*Linux_DnsNotifyACLForServiceResourceAccess(); */ virtual ~Linux_DnsNotifyACLForServiceResourceAccess() ; /* intrinsic methods */ virtual void enumInstanceNames( const CmpiContext& ctx, const CmpiBroker &mbp, const char *nsp, Linux_DnsNotifyACLForServiceInstanceNameEnumeration& instnames); virtual void enumInstances( const CmpiContext& ctx, const CmpiBroker &mbp, const char *nsp, const char* *properties, Linux_DnsNotifyACLForServiceManualInstanceEnumeration& instances); virtual Linux_DnsNotifyACLForServiceManualInstance getInstance( const CmpiContext& ctx, const CmpiBroker &mbp, const char* *properties, const Linux_DnsNotifyACLForServiceInstanceName&); /* virtual void setInstance( const CmpiContext& ctx, const CmpiBroker &mbp, const char* *properties, const Linux_DnsNotifyACLForServiceManualInstance&); */ virtual void createInstance( const CmpiContext& ctx, const CmpiBroker &mbp, const Linux_DnsNotifyACLForServiceManualInstance&); virtual void deleteInstance( const CmpiContext& ctx, const CmpiBroker &mbp, const Linux_DnsNotifyACLForServiceInstanceName&); /* Association Interface */ virtual void referencesElement( const CmpiContext& ctx, const CmpiBroker &mbp, const char *nsp, const char** properties, const Linux_DnsAddressMatchListInstanceName& sourceInst, Linux_DnsNotifyACLForServiceManualInstanceEnumeration& instances); virtual void referencesSetting( const CmpiContext& ctx, const CmpiBroker &mbp, const char *nsp, const char** properties, const Linux_DnsServiceInstanceName& sourceInst, Linux_DnsNotifyACLForServiceManualInstanceEnumeration& instances); virtual void associatorsElement( const CmpiContext& ctx, const CmpiBroker &mbp, const char *nsp, const char** properties, const Linux_DnsAddressMatchListInstanceName& sourceInst, Linux_DnsServiceInstanceEnumeration& instances); virtual void associatorsSetting( const CmpiContext& ctx, const CmpiBroker &mbp, const char *nsp, const char** properties, const Linux_DnsServiceInstanceName& sourceInst, Linux_DnsAddressMatchListInstanceEnumeration& instances); /* extrinsic methods */ }; } #endif --- NEW FILE: makefile --- include ../setting.cmpi include setting.provider CPPFLAGS=$(CPPFLAGS.provider) -I. -I$(CIMOMINC) -I$(COMMONINC) -I$(CIMOMINC)/cpp -I../CIM_CollectionOfMSEs -I../Linux_DnsService -I../Linux_DnsAddressMatchList -I../CIM_ConcreteJob -I../CIM_ManagedSystemElement -D_COMPILE_UNIX -DCMPI_STANDALONE CXXFLAGS=-Wall -g -fPIC -fno-implicit-templates LDFLAGS=-L. -L$(COMMONLIB) -L$(COMMONLIB_OUT) -shared -lLinux_DnsServiceSupport -lLinux_DnsAddressMatchListSupport -lcmpiCppImpl -lIBM_ProviderTooling OBJECTS=Linux_DnsNotifyACLForServiceInstanceName.o \ Linux_DnsNotifyACLForServiceInstance.o \ Linux_DnsNotifyACLForServiceExternal.o \ Linux_DnsNotifyACLForServiceRepositoryInstance.o \ Linux_DnsNotifyACLForServiceRepositoryExternal.o \ Linux_DnsNotifyACLForServiceManualInstance.o \ Linux_DnsNotifyACLForServiceDefaultImplementation.o FAKEFACTORY= Linux_DnsNotifyACLForServiceFakeFactory.o NORMALFACTORY= Linux_DnsNotifyACLForServiceFactory.o RESOURCEOBJECT= Linux_DnsNotifyACLForServiceResourceAccess.o PROVIDEROBJECT=CmpiLinux_DnsNotifyACLForServiceProvider.o all: testfiles preinstall install buildall: clean all #------------------------------------------------------------------------------# compile: $(OBJECTS) $(FAKEFACTORY) $(NORMALFACTORY) $(RESOURCEOBJECT) $(PROVIDEROBJECT) #------------------------------------------------------------------------------# prelink: $(OBJECTS) $(FAKEFACTORY) $(LINK.cpp) -o libLinux_DnsNotifyACLForServiceSupport.so $^ link: deleteFakeLib \ libLinux_DnsNotifyACLForServiceSupport.so \ libLinux_DnsNotifyACLForService.so libLinux_DnsNotifyACLForServiceSupport.so: LDFLAGS+=$(LDFLAGS.provider) libLinux_DnsNotifyACLForServiceSupport.so: $(OBJECTS) $(NORMALFACTORY) $(RESOURCEOBJECT) $(PROVIDEROBJECT) $(LINK.cpp) -o $@ $^ libLinux_DnsNotifyACLForService.so: LDFLAGS+=-lLinux_DnsNotifyACLForServiceSupport libLinux_DnsNotifyACLForService.so: $(PROVIDEROBJECT) $(LINK.cpp) -o $@ $^ deleteFakeLib: $(RM) *.so #------------------------------------------------------------------------------# preinstall: prelink install libLinux_DnsNotifyACLForServiceSupport.so $(COMMONLIB_OUT) #------------------------------------------------------------------------------# install: link install libLinux_DnsNotifyACLForServiceSupport.so $(COMMONLIB_OUT) install libLinux_DnsNotifyACLForService.so $(CIMOMLIB_OUT) # install -m 644 Linux_DnsNotifyACLForService*.h $(COMMONINC) $(MAKE) -C mof -f $(MOFMAKEFILE) install #------------------------------------------------------------------------------# testfiles: @[ -d $(CIMOMLIB) ] || ( echo directory $(CIMOMLIB) does not exist && false) @[ -d $(CIMOMINC) ] || ( echo directory $(CIMOMINC) does not exist - please create manually && false) @[ -d $(CIMOMMOF) ] || ( echo directory $(CIMOMMOF) does not exist - please create manually && false) @[ -d $(COMMONINC) ] || ( echo directory $(COMMONINC) does not exist - please create manually && false) @[ -d $(COMMONLIB) ] || ( echo directory $(COMMONLIB) does not exist - please create manually && false) #------------------------------------------------------------------------------# clean: $(RM) *.so *.o *~ #------------------------------------------------------------------------------# uninstall: $(MAKE) -C mof -f $(MOFMAKEFILE) uninstall; # $(RM) $(COMMONINC)/Linux_DnsNotifyACLForService*.h \ $(RM) $(COMMONLIB)/libLinux_DnsNotifyACLForServiceSupport.so \ $(RM) $(CIMOMLIB)/libLinux_DnsNotifyACLForService.so --- NEW FILE: Linux_DnsNotifyACLForServiceFactory.cpp --- /** * Linux_DnsNotifyACLForServiceFactory.cpp * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * author: Murillo Bernardes <ber...@br...> * * Contributors: * */ #include "Linux_DnsNotifyACLForServiceFactory.h" #include "Linux_DnsNotifyACLForServiceResourceAccess.h" namespace genProvider{ Linux_DnsNotifyACLForServiceInterface* Linux_DnsNotifyACLForServiceFactory::getImplementation(){ return (new Linux_DnsNotifyACLForServiceResourceAccess()); }; } --- NEW FILE: Linux_DnsNotifyACLForServiceExternal.cpp --- /** * Linux_DnsNotifyACLForServiceExternal.cpp * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * author: Murillo Bernardes <ber...@br...> * * Contributors: * */ #include "Linux_DnsNotifyACLForServiceExternal.h" namespace genProvider{ Linux_DnsNotifyACLForServiceExternal::Linux_DnsNotifyACLForServiceExternal( const CmpiBroker& brkr, const CmpiContext& ctx ) : broker(brkr), context(ctx) {}; Linux_DnsNotifyACLForServiceExternal:: ~Linux_DnsNotifyACLForServiceExternal(){}; void Linux_DnsNotifyACLForServiceExternal::enumInstanceNames( const char *nsp, Linux_DnsNotifyACLForServiceInstanceNameEnumeration& instnames) { CmpiObjectPath op(nsp,"Linux_DnsNotifyACLForService"); CmpiEnumeration en=broker.enumInstanceNames(context,op); while(en.hasNext()) { CmpiObjectPath opi = en.getNext(); Linux_DnsNotifyACLForServiceInstanceName iname(opi); instnames.addElement(iname); } }; void Linux_DnsNotifyACLForServiceExternal::enumInstances( const char *nsp, const char* *properties, Linux_DnsNotifyACLForServiceInstanceEnumeration& instances) { CmpiObjectPath op(nsp,"Linux_DnsNotifyACLForService"); CmpiEnumeration en=broker.enumInstances(context,op,properties); while(en.hasNext()) { CmpiInstance inst = en.getNext(); Linux_DnsNotifyACLForServiceInstance instance(inst,nsp); instances.addElement(instance); } }; Linux_DnsNotifyACLForServiceInstance Linux_DnsNotifyACLForServiceExternal::getInstance( const char* *properties, const Linux_DnsNotifyACLForServiceInstanceName& instanceName) { CmpiObjectPath op=instanceName.getObjectPath(); CmpiInstance inst=broker.getInstance(context,op,properties); return Linux_DnsNotifyACLForServiceInstance(inst,instanceName.getNamespace()); } void Linux_DnsNotifyACLForServiceExternal::setInstance( const char* *properties, const Linux_DnsNotifyACLForServiceInstance& instance){ CmpiObjectPath op=instance.getInstanceName().getObjectPath(); CmpiInstance inst=instance.getCmpiInstance(); broker.setInstance(context,op,inst,properties); } void Linux_DnsNotifyACLForServiceExternal::createInstance( const Linux_DnsNotifyACLForServiceInstance& instance){ CmpiObjectPath op=instance.getInstanceName().getObjectPath(); CmpiInstance inst=instance.getCmpiInstance(); broker.createInstance(context,op,inst); } void Linux_DnsNotifyACLForServiceExternal::deleteInstance( const Linux_DnsNotifyACLForServiceInstanceName& instanceName){ CmpiObjectPath op=instanceName.getObjectPath(); broker.deleteInstance(context,op); } //Reference calls void Linux_DnsNotifyACLForServiceExternal:: referencesElement( const char *nsp, const char** properties, const Linux_DnsAddressMatchListInstanceName& sourceInst, Linux_DnsNotifyACLForServiceInstanceEnumeration& instances){ CmpiObjectPath op=sourceInst.getObjectPath(); CmpiEnumeration en=broker.references (context, op, "Linux_DnsAddressMatchList", "Element", properties); while(en.hasNext()) { CmpiInstance inst = en.getNext(); Linux_DnsNotifyACLForServiceInstance instance(inst,nsp); instances.addElement(instance); } } void Linux_DnsNotifyACLForServiceExternal:: referenceNamesElement( const char *nsp, const Linux_DnsAddressMatchListInstanceName& sourceInst, Linux_DnsNotifyACLForServiceInstanceNameEnumeration& instanceNames){ CmpiObjectPath op=sourceInst.getObjectPath(); CmpiEnumeration en=broker.referenceNames (context, op, "Linux_DnsAddressMatchList", "Element"); while(en.hasNext()) { CmpiObjectPath instName = en.getNext(); Linux_DnsNotifyACLForServiceInstanceName instanceName(instName); instanceNames.addElement(instanceName); } } void Linux_DnsNotifyACLForServiceExternal:: referencesSetting( const char *nsp, const char** properties, const Linux_DnsServiceInstanceName& sourceInst, Linux_DnsNotifyACLForServiceInstanceEnumeration& instances){ CmpiObjectPath op=sourceInst.getObjectPath(); CmpiEnumeration en=broker.references (context, op, "Linux_DnsService", "Setting", properties); while(en.hasNext()) { CmpiInstance inst = en.getNext(); Linux_DnsNotifyACLForServiceInstance instance(inst,nsp); instances.addElement(instance); } } void Linux_DnsNotifyACLForServiceExternal:: referenceNamesSetting( const char *nsp, const Linux_DnsServiceInstanceName& sourceInst, Linux_DnsNotifyACLForServiceInstanceNameEnumeration& instanceNames){ CmpiObjectPath op=sourceInst.getObjectPath(); CmpiEnumeration en=broker.referenceNames (context, op, "Linux_DnsService", "Setting"); while(en.hasNext()) { CmpiObjectPath instName = en.getNext(); Linux_DnsNotifyACLForServiceInstanceName instanceName(instName); instanceNames.addElement(instanceName); } } //Associator calls void Linux_DnsNotifyACLForServiceExternal:: associatorsElement( const char *nsp, const char** properties, const Linux_DnsAddressMatchListInstanceName& sourceInst, Linux_DnsServiceInstanceEnumeration& instances){ CmpiObjectPath op=sourceInst.getObjectPath(); CmpiEnumeration en=broker.associators (context,op,0,0,0,0,properties); while(en.hasNext()) { CmpiInstance inst = en.getNext(); Linux_DnsServiceInstance instance(inst,nsp); instances.addElement(instance); } } void Linux_DnsNotifyACLForServiceExternal:: associatorNamesElement( const char *nsp, const Linux_DnsAddressMatchListInstanceName& sourceInst, Linux_DnsServiceInstanceNameEnumeration& instanceNames){ CmpiObjectPath op=sourceInst.getObjectPath(); CmpiEnumeration en=broker.associatorNames (context,op,0,0,0,0); while(en.hasNext()) { CmpiObjectPath instName = en.getNext(); Linux_DnsServiceInstanceName instanceName(instName); instanceNames.addElement(instanceName); } } void Linux_DnsNotifyACLForServiceExternal:: associatorsSetting( const char *nsp, const char** properties, const Linux_DnsServiceInstanceName& sourceInst, Linux_DnsAddressMatchListInstanceEnumeration& instances){ CmpiObjectPath op=sourceInst.getObjectPath(); CmpiEnumeration en=broker.associators (context,op,0,0,0,0,properties); while(en.hasNext()) { CmpiInstance inst = en.getNext(); Linux_DnsAddressMatchListInstance instance(inst,nsp); instances.addElement(instance); } } void Linux_DnsNotifyACLForServiceExternal:: associatorNamesSetting( const char *nsp, const Linux_DnsServiceInstanceName& sourceInst, Linux_DnsAddressMatchListInstanceNameEnumeration& instanceNames){ CmpiObjectPath op=sourceInst.getObjectPath(); CmpiEnumeration en=broker.associatorNames (context,op,0,0,0,0); while(en.hasNext()) { CmpiObjectPath instName = en.getNext(); Linux_DnsAddressMatchListInstanceName instanceName(instName); instanceNames.addElement(instanceName); } } } --- NEW FILE: Linux_DnsNotifyACLForServiceExternal.h --- /** * Linux_DnsNotifyACLForServiceExternal.h * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * author: Murillo Bernardes <ber...@br...> * * Contributors: * */ #ifndef Linux_DnsNotifyACLForServiceExternal_h #define Linux_DnsNotifyACLForServiceExternal_h #include "Linux_DnsNotifyACLForServiceInstance.h" #include "Linux_DnsServiceInstance.h" #include "Linux_DnsAddressMatchListInstance.h" #include "CmpiBroker.h" namespace genProvider { class Linux_DnsNotifyACLForServiceExternal { public: Linux_DnsNotifyACLForServiceExternal( const CmpiBroker& brkr, const CmpiContext& ctx); virtual ~Linux_DnsNotifyACLForServiceExternal(); virtual void enumInstanceNames( const char *nsp, Linux_DnsNotifyACLForServiceInstanceNameEnumeration&); virtual void enumInstances( const char *nsp, const char* *properties, Linux_DnsNotifyACLForServiceInstanceEnumeration&); virtual Linux_DnsNotifyACLForServiceInstance getInstance( const char* *properties, const Linux_DnsNotifyACLForServiceInstanceName&); virtual void setInstance( const char* *properties, const Linux_DnsNotifyACLForServiceInstance&); virtual void createInstance( const Linux_DnsNotifyACLForServiceInstance&); virtual void deleteInstance( const Linux_DnsNotifyACLForServiceInstanceName&); //association calls void referencesElement( const char *nsp, const char** properties, const Linux_DnsAddressMatchListInstanceName& sourceInst, Linux_DnsNotifyACLForServiceInstanceEnumeration& instances); void referenceNamesElement( const char *nsp, const Linux_DnsAddressMatchListInstanceName& sourceInst, Linux_DnsNotifyACLForServiceInstanceNameEnumeration& instanceNames); void referencesSetting( const char *nsp, const char** properties, const Linux_DnsServiceInstanceName& sourceInst, Linux_DnsNotifyACLForServiceInstanceEnumeration& instances); void referenceNamesSetting( const char *nsp, const Linux_DnsServiceInstanceName& sourceInst, Linux_DnsNotifyACLForServiceInstanceNameEnumeration& instanceNames); void associatorsElement( const char *nsp, const char** properties, const Linux_DnsAddressMatchListInstanceName& sourceInst, Linux_DnsServiceInstanceEnumeration& instances); void associatorNamesElement( const char *nsp, const Linux_DnsAddressMatchListInstanceName& sourceInst, Linux_DnsServiceInstanceNameEnumeration& instanceNames); void associatorsSetting( const char *nsp, const char** properties, const Linux_DnsServiceInstanceName& sourceInst, Linux_DnsAddressMatchListInstanceEnumeration& instances); void associatorNamesSetting( const char *nsp, const Linux_DnsServiceInstanceName& sourceInst, Linux_DnsAddressMatchListInstanceNameEnumeration& instanceNames); private: CmpiBroker broker; CmpiContext context; }; } #endif --- NEW FILE: Linux_DnsNotifyACLForServiceDefaultImplementation.cpp --- /** * Linux_DnsNotifyACLForServiceDefaultImplementation.cpp * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * author: Murillo Bernardes <ber...@br...> * * Contributors: * */ #include "Linux_DnsNotifyACLForServiceDefaultImplementation.h" #include <iostream> using namespace std; namespace genProvider { /* intrinsic methods */ void Linux_DnsNotifyACLForServiceDefaultImplementation::enumInstanceNames( const CmpiContext& ctx, const CmpiBroker &mbp, const char *nsp, Linux_DnsNotifyACLForServiceInstanceNameEnumeration& instnames){ cout<<"enumInstances not supported for Linux_DnsNotifyACLForService"<<endl; throw CmpiErrorFormater::getErrorException( CmpiErrorFormater::NOT_IMPLEMENTED, "enumInstances not implemented for Linux_DnsNotifyACLForService"); } void Linux_DnsNotifyACLForServiceDefaultImplementation::enumInstances( const CmpiContext& ctx, const CmpiBroker &mbp, const char *nsp, const char* *properties, Linux_DnsNotifyACLForServiceManualInstanceEnumeration& instances){ cout<<"Using default enumInstances implementation for Linux_DnsNotifyACLForService"<<endl; cout<<"LetŽs get the instanceNames"<<endl; Linux_DnsNotifyACLForServiceInstanceNameEnumeration namesEnumeration; enumInstanceNames(ctx, mbp,nsp,namesEnumeration); cout<<"Getting each instance"<<endl; while(namesEnumeration.hasNext()){ Linux_DnsNotifyACLForServiceInstanceName name= namesEnumeration.getNext(); cout<<"Getting an instance for instanceName"<<endl; Linux_DnsNotifyACLForServiceManualInstance instance= getInstance(ctx, mbp, properties, name); cout<<"adding instance to enum"<<endl; instances.addElement(instance); cout<<"Added!"<<endl; }; } Linux_DnsNotifyACLForServiceManualInstance Linux_DnsNotifyACLForServiceDefaultImplementation::getInstance( const CmpiContext& ctx, const CmpiBroker &mbp, const char* *properties, const Linux_DnsNotifyACLForServiceInstanceName&){ cout<<"getInstance not supported for Linux_DnsNotifyACLForService"<<endl; throw CmpiErrorFormater::getErrorException( CmpiErrorFormater::NOT_IMPLEMENTED, "getInstance not implemented for Linux_DnsNotifyACLForService"); } void Linux_DnsNotifyACLForServiceDefaultImplementation::setInstance( const CmpiContext& ctx, const CmpiBroker &mbp, const char* *properties, const Linux_DnsNotifyACLForServiceManualInstance&){ cout<<"setInstance not supported for Linux_DnsNotifyACLForService"<<endl; throw CmpiErrorFormater::getErrorException( CmpiErrorFormater::NOT_IMPLEMENTED, "setInstance not implemented for Linux_DnsNotifyACLForService"); } void Linux_DnsNotifyACLForServiceDefaultImplementation:: createInstance(const CmpiContext& ctx, const CmpiBroker &mbp, const Linux_DnsNotifyACLForServiceManualInstance&){ cout<<"createInstance not supported for Linux_DnsNotifyACLForService"<<endl; throw CmpiErrorFormater::getErrorException( CmpiErrorFormater::NOT_IMPLEMENTED, "createInstance not implemented for Linux_DnsNotifyACLForService"); } void Linux_DnsNotifyACLForServiceDefaultImplementation:: deleteInstance(const CmpiContext& ctx, const CmpiBroker &mbp, const Linux_DnsNotifyACLForServiceInstanceName&){ cout<<"deleteInstance not supported for Linux_DnsNotifyACLForService"<<endl; throw CmpiErrorFormater::getErrorException( CmpiErrorFormater::NOT_IMPLEMENTED, "deleteInstance not implemented for Linux_DnsNotifyACLForService"); } /* Association Interface */ void Linux_DnsNotifyACLForServiceDefaultImplementation:: referencesElement( const CmpiContext& ctx, const CmpiBroker &mbp, const char *nsp, const char** properties, const Linux_DnsAddressMatchListInstanceName& sourceInst, Linux_DnsNotifyACLForServiceManualInstanceEnumeration& instances){ throw CmpiErrorFormater::getErrorException( CmpiErrorFormater::NOT_IMPLEMENTED, "getElementReferences between Linux_DnsService and Linux_DnsAddressMatchList not implemented for Linux_DnsNotifyACLForService"); } void Linux_DnsNotifyACLForServiceDefaultImplementation:: referencesSetting( const CmpiContext& ctx, const CmpiBroker &mbp, const char *nsp, const char** properties, const Linux_DnsServiceInstanceName& sourceInst, Linux_DnsNotifyACLForServiceManualInstanceEnumeration& instances){ throw CmpiErrorFormater::getErrorException( CmpiErrorFormater::NOT_IMPLEMENTED, "getSettingReferences between Linux_DnsService and Linux_DnsAddressMatchList not implemented for Linux_DnsNotifyACLForService"); } void Linux_DnsNotifyACLForServiceDefaultImplementation:: associatorsElement( const CmpiContext& ctx, const CmpiBroker &mbp, const char *nsp, const char** properties, const Linux_DnsAddressMatchListInstanceName& sourceInst, Linux_DnsServiceInstanceEnumeration& instances){ std::cout<<"Linux_DnsNotifyACLForService : associatorsLinux_DnsService() ... returns one instance"<<std::endl; Linux_DnsNotifyACLForServiceManualInstanceEnumeration enumeration; referencesElement(ctx, mbp, sourceInst.getNamespace(), properties, sourceInst, enumeration); Linux_DnsServiceExternal external(mbp, ctx); while(enumeration.hasNext()) { const Linux_DnsNotifyACLForServiceManualInstance instance = enumeration.getNext(); const Linux_DnsNotifyACLForServiceInstanceName instanceName = instance.getInstanceName(); const Linux_DnsServiceInstanceName Element = instanceName.getElement(); Linux_DnsServiceInstance inst = external.getInstance(properties,Element); instances.addElement(inst); } } void Linux_DnsNotifyACLForServiceDefaultImplementation:: associatorsSetting( const CmpiContext& ctx, const CmpiBroker &mbp, const char *nsp, const char** properties, const Linux_DnsServiceInstanceName& sourceInst, Linux_DnsAddressMatchListInstanceEnumeration& instances){ std::cout<<"Linux_DnsNotifyACLForService : associatorsLinux_DnsAddressMatchList() ... returns one instance"<<std::endl; Linux_DnsNotifyACLForServiceManualInstanceEnumeration enumeration; referencesSetting(ctx, mbp, sourceInst.getNamespace(), properties, sourceInst, enumeration); Linux_DnsAddressMatchListExternal external(mbp, ctx); while(enumeration.hasNext()) { const Linux_DnsNotifyACLForServiceManualInstance instance = enumeration.getNext(); const Linux_DnsNotifyACLForServiceInstanceName instanceName = instance.getInstanceName(); const Linux_DnsAddressMatchListInstanceName Setting = instanceName.getSetting(); Linux_DnsAddressMatchListInstance inst = external.getInstance(properties,Setting); instances.addElement(inst); } } /* extrinsic methods */ } --- NEW FILE: Linux_DnsNotifyACLForServiceInstance.cpp --- /** * Linux_DnsNotifyACLForServiceInstance.cpp * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * author: Murillo Bernardes <ber...@br...> * * Contributors: * */ #include "Linux_DnsNotifyACLForServiceInstance.h" #include "CmpiData.h" #include "CmpiString.h" #include "CmpiArray.h" #include <string> namespace genProvider { //********************************************************* //Linux_DnsNotifyACLForServiceInstance //********************************************************* //empty constructor Linux_DnsNotifyACLForServiceInstance:: Linux_DnsNotifyACLForServiceInstance(){ init(); }; //copy constructor Linux_DnsNotifyACLForServiceInstance:: Linux_DnsNotifyACLForServiceInstance (const Linux_DnsNotifyACLForServiceInstance& original){ init(original); }; //constructor using CmpiInstance Linux_DnsNotifyACLForServiceInstance:: Linux_DnsNotifyACLForServiceInstance (const CmpiInstance& inst, const char* instanceNamespace){ CmpiData cmpiData; init(); CmpiObjectPath cop=inst.getObjectPath(); cop.setNameSpace(instanceNamespace); setInstanceName(Linux_DnsNotifyACLForServiceInstanceName(cop)); } //Destructor Linux_DnsNotifyACLForServiceInstance:: ~Linux_DnsNotifyACLForServiceInstance(){ reset(); }; //copy operator Linux_DnsNotifyACLForServiceInstance& Linux_DnsNotifyACLForServiceInstance::operator= (const Linux_DnsNotifyACLForServiceInstance& original){ init(original); return *this; }; //converts to CmpiInstance CmpiInstance Linux_DnsNotifyACLForServiceInstance:: getCmpiInstance(const char** properties) const{ CmpiObjectPath objectPath=getInstanceName().getObjectPath(); CmpiInstance cmpiInstance(objectPath); getInstanceName().fillKeys(cmpiInstance); if (properties) { cmpiInstance.setPropertyFilter(properties,0); } return cmpiInstance; } //InstanceName related methods unsigned int Linux_DnsNotifyACLForServiceInstance:: isInstanceNameSet() const{ return isSet.instanceName; } const Linux_DnsNotifyACLForServiceInstanceName& Linux_DnsNotifyACLForServiceInstance::getInstanceName() const{ if(!isSet.instanceName) throw CmpiErrorFormater::getErrorException( CmpiErrorFormater::NOT_SET, "InstanceName not set in Linux_DnsNotifyACLForService instance"); return m_instanceName; } void Linux_DnsNotifyACLForServiceInstance::setInstanceName( const Linux_DnsNotifyACLForServiceInstanceName& val){ m_instanceName = val; isSet.instanceName=1; } //set isSet attributes to FALSE void Linux_DnsNotifyACLForServiceInstance::init(){ isSet.instanceName=0; }; //copies another instance properties in this void Linux_DnsNotifyACLForServiceInstance::init (const Linux_DnsNotifyACLForServiceInstance& original){ init(); if(original.isInstanceNameSet()){ setInstanceName(original.getInstanceName()); } } //reset the instance data void Linux_DnsNotifyACLForServiceInstance::reset(){ }; //********************************************************* //Linux_DnsNotifyACLForServiceInstanceEnumerationElement //********************************************************* Linux_DnsNotifyACLForServiceInstanceEnumerationElement:: Linux_DnsNotifyACLForServiceInstanceEnumerationElement(){ m_elementP=0; m_nextP=0; }; Linux_DnsNotifyACLForServiceInstanceEnumerationElement:: ~Linux_DnsNotifyACLForServiceInstanceEnumerationElement(){ if (m_elementP!=0) delete(m_elementP); if (m_nextP!=0) delete(m_nextP); }; //********************************************************* //Linux_DnsNotifyACLForServiceInstanceNameEnumeration //********************************************************* Linux_DnsNotifyACLForServiceInstanceEnumeration:: Linux_DnsNotifyACLForServiceInstanceEnumeration(){ firstElementP=0; currentElementP=0; endElementP=0; }; Linux_DnsNotifyACLForServiceInstanceEnumeration:: Linux_DnsNotifyACLForServiceInstanceEnumeration( const Linux_DnsNotifyACLForServiceInstanceEnumeration& original){ firstElementP=0; currentElementP=0; endElementP=0; int size=original.getSize(); for(int i=0;i<size;i++) addElement(original.getElement(i)); }; Linux_DnsNotifyACLForServiceInstanceEnumeration:: ~Linux_DnsNotifyACLForServiceInstanceEnumeration(){ if (firstElementP!=0) delete(firstElementP); }; void Linux_DnsNotifyACLForServiceInstanceEnumeration::reset(){ currentElementP=firstElementP; }; bool Linux_DnsNotifyACLForServiceInstanceEnumeration::hasNext() const{ return (currentElementP!=0); }; int Linux_DnsNotifyACLForServiceInstanceEnumeration::getSize() const{ int size=0; Linux_DnsNotifyACLForServiceInstanceEnumerationElement* followingP=firstElementP; while(followingP!=0){ followingP=followingP->m_nextP; size++; } return size; }; const Linux_DnsNotifyACLForServiceInstance& Linux_DnsNotifyACLForServiceInstanceEnumeration::getElement(int pos) const{ Linux_DnsNotifyACLForServiceInstanceEnumerationElement* followingP=firstElementP; int i=0; while((followingP!=0)&&(i<pos)){ followingP=followingP->m_nextP; i++; } return *(followingP->m_elementP); }; const Linux_DnsNotifyACLForServiceInstance& Linux_DnsNotifyACLForServiceInstanceEnumeration::getNext() { Linux_DnsNotifyACLForServiceInstanceEnumerationElement* currentP= currentElementP; currentElementP=currentElementP->m_nextP; return *(currentP->m_elementP); }; void Linux_DnsNotifyACLForServiceInstanceEnumeration::addElement (const Linux_DnsNotifyACLForServiceInstance& elementP){ if(firstElementP==0){ firstElementP=new Linux_DnsNotifyACLForServiceInstanceEnumerationElement(); firstElementP->m_elementP=new Linux_DnsNotifyACLForServiceInstance(elementP); endElementP=firstElementP; currentElementP=firstElementP; }else{ endElementP->m_nextP=new Linux_DnsNotifyACLForServiceInstanceEnumerationElement(); endElementP=endElementP->m_nextP; endElementP->m_elementP=new Linux_DnsNotifyACLForServiceInstance(elementP); } }; } --- NEW FILE: Linux_DnsNotifyACLForServiceRepositoryInstance.cpp --- /** * Linux_DnsNotifyACLForServiceRepositoryInstance.cpp * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * author: Murillo Bernardes <ber...@br...> * * Contributors: * */ #include "Linux_DnsNotifyACLForServiceRepositoryInstance.h" #include "CmpiData.h" #include "CmpiString.h" #include "CmpiArray.h" #include <string> namespace genProvider { //********************************************************* //Linux_DnsNotifyACLForServiceRepositoryInstance //********************************************************* //empty constructor Linux_DnsNotifyACLForServiceRepositoryInstance:: Linux_DnsNotifyACLForServiceRepositoryInstance(){ init(); }; //copy constructor Linux_DnsNotifyACLForServiceRepositoryInstance:: Linux_DnsNotifyACLForServiceRepositoryInstance (const Linux_DnsNotifyACLForServiceRepositoryInstance& original){ init(original); }; //constructor using CmpiInstance Linux_DnsNotifyACLForServiceRepositoryInstance:: Linux_DnsNotifyACLForServiceRepositoryInstance (const CmpiInstance& inst, const char* instanceNamespace){ CmpiData cmpiData; init(); CmpiObjectPath cop=inst.getObjectPath(); cop.setNameSpace(instanceNamespace); setInstanceName(Linux_DnsNotifyACLForServiceInstanceName(cop)); } //Destructor Linux_DnsNotifyACLForServiceRepositoryInstance:: ~Linux_DnsNotifyACLForServiceRepositoryInstance(){ reset(); }; //copy operator Linux_DnsNotifyACLForServiceRepositoryInstance& Linux_DnsNotifyACLForServiceRepositoryInstance::operator= (const Linux_DnsNotifyACLForServiceRepositoryInstance& original){ init(original); return *this; }; //converts to CmpiInstance CmpiInstance Linux_DnsNotifyACLForServiceRepositoryInstance:: getCmpiInstance(const char** properties) const{ CmpiObjectPath objectPath=getInstanceName().getObjectPath(); CmpiInstance cmpiInstance(objectPath); getInstanceName().fillKeys(cmpiInstance); if (properties) { cmpiInstance.setPropertyFilter(properties,0); } return cmpiInstance; } //InstanceName related methods unsigned int Linux_DnsNotifyACLForServiceRepositoryInstance:: isInstanceNameSet() const{ return isSet.instanceName; } const Linux_DnsNotifyACLForServiceInstanceName& Linux_DnsNotifyACLForServiceRepositoryInstance::getInstanceName() const{ if(!isSet.instanceName) throw CmpiErrorFormater::getErrorException( CmpiErrorFormater::NOT_SET, "InstanceName not set in Linux_DnsNotifyACLForService instance"); return m_instanceName; } void Linux_DnsNotifyACLForServiceRepositoryInstance::setInstanceName( const Linux_DnsNotifyACLForServiceInstanceName& val){ m_instanceName = val; isSet.instanceName=1; } //set isSet attributes to FALSE void Linux_DnsNotifyACLForServiceRepositoryInstance::init(){ isSet.instanceName=0; }; //copies another instance properties in this void Linux_DnsNotifyACLForServiceRepositoryInstance::init (const Linux_DnsNotifyACLForServiceRepositoryInstance& original){ init(); if(original.isInstanceNameSet()){ setInstanceName(original.getInstanceName()); } } //reset the instance data void Linux_DnsNotifyACLForServiceRepositoryInstance::reset(){ }; //********************************************************* //Linux_DnsNotifyACLForServiceRepositoryInstanceEnumerationElement //********************************************************* Linux_DnsNotifyACLForServiceRepositoryInstanceEnumerationElement:: Linux_DnsNotifyACLForServiceRepositoryInstanceEnumerationElement(){ m_elementP=0; m_nextP=0; }; Linux_DnsNotifyACLForServiceRepositoryInstanceEnumerationElement:: ~Linux_DnsNotifyACLForServiceRepositoryInstanceEnumerationElement(){ if (m_elementP!=0) delete(m_elementP); if (m_nextP!=0) delete(m_nextP); }; //********************************************************* //Linux_DnsNotifyACLForServiceRepositoryInstanceNameEnumeration //********************************************************* Linux_DnsNotifyACLForServiceRepositoryInstanceEnumeration:: Linux_DnsNotifyACLForServiceRepositoryInstanceEnumeration(){ firstElementP=0; currentElementP=0; endElementP=0; }; Linux_DnsNotifyACLForServiceRepositoryInstanceEnumeration:: Linux_DnsNotifyACLForServiceRepositoryInstanceEnumeration( const Linux_DnsNotifyACLForServiceRepositoryInstanceEnumeration& original){ firstElementP=0; currentElementP=0; endElementP=0; int size=original.getSize(); for(int i=0;i<size;i++) addElement(original.getElement(i)); }; Linux_DnsNotifyACLForServiceRepositoryInstanceEnumeration:: ~Linux_DnsNotifyACLForServiceRepositoryInstanceEnumeration(){ if (firstElementP!=0) delete(firstElementP); }; void Linux_DnsNotifyACLForServiceRepositoryInstanceEnumeration::reset(){ currentElementP=firstElementP; }; bool Linux_DnsNotifyACLForServiceRepositoryInstanceEnumeration::hasNext() const{ return (currentElementP!=0); }; int Linux_DnsNotifyACLForServiceRepositoryInstanceEnumeration::getSize() const{ int size=0; Linux_DnsNotifyACLForServiceRepositoryInstanceEnumerationElement* followingP=firstElementP; while(followingP!=0){ followingP=followingP->m_nextP; size++; } return size; }; const Linux_DnsNotifyACLForServiceRepositoryInstance& Linux_DnsNotifyACLForServiceRepositoryInstanceEnumeration::getElement(int pos) const{ Linux_DnsNotifyACLForServiceRepositoryInstanceEnumerationElement* followingP=firstElementP; int i=0; while((followingP!=0)&&(i<pos)){ followingP=followingP->m_nextP; i++; } return *(followingP->m_elementP); }; const Linux_DnsNotifyACLForServiceRepositoryInstance& Linux_DnsNotifyACLForServiceRepositoryInstanceEnumeration::getNext() { Linux_DnsNotifyACLForServiceRepositoryInstanceEnumerationElement* currentP= currentElementP; currentElementP=currentElementP->m_nextP; return *(currentP->m_elementP); }; void Linux_DnsNotifyACLForServiceRepositoryInstanceEnumeration::addElement (const Linux_DnsNotifyACLForServiceRepositoryInstance& elementP){ if(firstElementP==0){ firstElementP=new Linux_DnsNotifyACLForServiceRepositoryInstanceEnumerationElement(); firstElementP->m_elementP=new Linux_DnsNotifyACLForServiceRepositoryInstance(elementP); endElementP=firstElementP; currentElementP=firstElementP; }else{ endElementP->m_nextP=new Linux_DnsNotifyACLForServiceRepositoryInstanceEnumerationElement(); endElementP=endElementP->m_nextP; endElementP->m_elementP=new Linux_DnsNotifyACLForServiceRepositoryInstance(elementP); } }; } --- NEW FILE: Linux_DnsNotifyACLForServiceManualInstance.h --- /** * Linux_DnsNotifyACLForServiceManualInstance.h * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * author: Murillo Bernardes <ber...@br...> * * Contributors: * */ #ifndef Linux_DnsNotifyACLForServiceManualInstance_h #define Linux_DnsNotifyACLForServiceManualInstance_h #include "cmpidt.h" #include "CmpiObjectPath.h" #include "CmpiInstance.h" #include "CmpiBooleanData.h" #include "CmpiCharData.h" #include "CmpiDateTime.h" #include "Linux_DnsNotifyACLForServiceInstanceName.h" namespace genProvider { class Linux_DnsNotifyACLForServiceManualInstance { public: Linux_DnsNotifyACLForServiceManualInstance(); Linux_DnsNotifyACLForServiceManualInstance (const Linux_DnsNotifyACLForServiceManualInstance& original); Linux_DnsNotifyACLForServiceManualInstance (const CmpiInstance& inst, const char* instanceNamespace); ~Linux_DnsNotifyACLForServiceManualInstance(); Linux_DnsNotifyACLForServiceManualInstance& operator= (const Linux_DnsNotifyACLForServiceManualInstance& original); CmpiInstance getCmpiInstance(const char** properties=0) const; unsigned int isInstanceNameSet() const; void setInstanceName( const Linux_DnsNotifyACLForServiceInstanceName& val); const Linux_DnsNotifyACLForServiceInstanceName& getInstanceName() const; private: void init(); void init(const Linux_DnsNotifyACLForServiceManualInstance& original); void reset(); Linux_DnsNotifyACLForServiceInstanceName m_instanceName; struct isSetType{ unsigned int instanceName:1; } isSet; }; struct Linux_DnsNotifyACLForServiceManualInstanceEnumerationElement{ Linux_DnsNotifyACLForServiceManualInstance* m_elementP; Linux_DnsNotifyACLForServiceManualInstanceEnumerationElement* m_nextP; Linux_DnsNotifyACLForServiceManualInstanceEnumerationElement(); ~Linux_DnsNotifyACLForServiceManualInstanceEnumerationElement(); }; class Linux_DnsNotifyACLForServiceManualInstanceEnumeration { private: Linux_DnsNotifyACLForServiceManualInstanceEnumerationElement* firstElementP; Linux_DnsNotifyACLForServiceManualInstanceEnumerationElement* currentElementP; Linux_DnsNotifyACLForServiceManualInstanceEnumerationElement* endElementP; public: Linux_DnsNotifyACLForServiceManualInstanceEnumeration(); Linux_DnsNotifyACLForServiceManualInstanceEnumeration( const Linux_DnsNotifyACLForServiceManualInstanceEnumeration& original); ~Linux_DnsNotifyACLForServiceManualInstanceEnumeration(); void reset(); bool hasNext() const; const Linux_DnsNotifyACLForServiceManualInstance& getNext(); int getSize() const; const Linux_DnsNotifyACLForServiceManualInstance& getElement(int pos) const; void addElement(const Linux_DnsNotifyACLForServiceManualInstance& elementP); }; } #endif --- NEW FILE: Linux_DnsNotifyACLForServiceManualInstance.cpp --- /** * Linux_DnsNotifyACLForServiceManualInstance.cpp * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * author: Murillo Bernardes <ber...@br...> * * Contributors: * */ #include "Linux_DnsNotifyACLForServiceManualInstance.h" #include "CmpiData.h" #include "CmpiString.h" #include "CmpiArray.h" #include <string> namespace genProvider { //********************************************************* //Linux_DnsNotifyACLForServiceManualInstance //********************************************************* //empty constructor Linux_DnsNotifyACLForServiceManualInstance:: Linux_DnsNotifyACLForServiceManualInstance(){ init(); }; //copy constructor Linux_DnsNotifyACLForServiceManualInstance:: Linux_DnsNotifyACLForServiceManualInstance (const Linux_DnsNotifyACLForServiceManualInstance& original){ init(original); }; //constructor using CmpiInstance Linux_DnsNotifyACLForServiceManualInstance:: Linux_DnsNotifyACLForServiceManualInstance (const CmpiInstance& inst, const char* instanceNamespace){ CmpiData cmpiData; init(); CmpiObjectPath cop=inst.getObjectPath(); cop.setNameSpace(instanceNamespace); setInstanceName(Linux_DnsNotifyACLForServiceInstanceName(cop)); } //Destructor Linux_DnsNotifyACLForServiceManualInstance:: ~Linux_DnsNotifyACLForServiceManualInstance(){ reset(); }; //copy operator Linux_DnsNotifyACLForServiceManualInstance& Linux_DnsNotifyACLForServiceManualInstance::operator= (const Linux_DnsNotifyACLForServiceManualInstance& original){ init(original); return *this; }; //converts to CmpiInstance CmpiInstance Linux_DnsNotifyACLForServiceManualInstance:: getCmpiInstance(const char** properties) const{ CmpiObjectPath objectPath=getInstanceName().getObjectPath(); CmpiInstance cmpiInstance(objectPath); getInstanceName().fillKeys(cmpiInstance); if (properties) { cmpiInstance.setPropertyFilter(properties,0); } return cmpiInstance; } //InstanceName related methods unsigned int Linux_DnsNotifyACLForServiceManualInstance:: isInstanceNameSet() const{ return isSet.instanceName; } const Linux_DnsNotifyACLForServiceInstanceName& Linux_DnsNotifyACLForServiceManualInstance::getInstanceName() const{ if(!isSet.instanceName) throw CmpiErrorFormater::getErrorException( CmpiErrorFormater::NOT_SET, "InstanceName not set in Linux_DnsNotifyACLForService instance"); return m_instanceName; } void Linux_DnsNotifyACLForServiceManualInstance::setInstanceName( const Linux_DnsNotifyACLForServiceInstanceName& val){ m_instanceName = val; isSet.instanceName=1; } //set isSet attributes to FALSE void Linux_DnsNotifyACLForServiceManualInstance::init(){ isSet.instanceName=0; }; //copies another instance properties in this void Linux_DnsNotifyACLForServiceManualInstance::init (const Linux_DnsNotifyACLForServiceManualInstance& original){ init(); if(original.isInstanceNameSet()){ setInstanceName(original.getInstanceName()); } } //reset the instance data void Linux_DnsNotifyACLForServiceManualInstance::reset(){ }; //********************************************************* //Linux_DnsNotifyACLForServiceManualInstanceEnumerationElement //********************************************************* Linux_DnsNotifyACLForServiceManualInstanceEnumerationElement:: Linux_DnsNotifyACLForServiceManualInstanceEnumerationElement(){ m_elementP=0; m_nextP=0; }; Linux_DnsNotifyACLForServiceManualInstanceEnumerationElement:: ~Linux_DnsNotifyACLForServiceManualInstanceEnumerationElement(){ if (m_elementP!=0) delete(m_elementP); if (m_nextP!=0) delete(m_nextP); }; //********************************************************* //Linux_DnsNotifyACLForServiceManualInstanceNameEnumeration //********************************************************* Linux_DnsNotifyACLForServiceManualInstanceEnumeration:: Linux_DnsNotifyACLForServiceManualInstanceEnumeration(){ firstElementP=0; currentElementP=0; endElementP=0; }; Linux_DnsNotifyACLForServiceManualInstanceEnumeration:: Linux_DnsNotifyACLForServiceManualInstanceEnumeration( const Linux_DnsNotifyACLForServiceManualInstanceEnumeration& original){ firstElementP=0; currentElementP=0; endElementP=0; int size=original.getSize(); for(int i=0;i<size;i++) addElement(original.getElement(i)); }; Linux_DnsNotifyACLForServiceManualInstanceEnumeration:: ~Linux_DnsNotifyACLForServiceManualInstanceEnumeration(){ if (firstElementP!=0) delete(firstElementP); }; void Linux_DnsNotifyACLForServiceManualInstanceEnumeration::reset(){ currentElementP=firstElementP; }; bool Linux_DnsNotifyACLForServiceManualInstanceEnumeration::hasNext() const{ return (currentElementP!=0); }; int Linux_DnsNotifyACLForServiceManualInstanceEnumeration::getSize() const{ int size=0; Linux_DnsNotifyACLForServiceManualInstanceEnumerationElement* followingP=firstElementP; while(followingP!=0){ followingP=followingP->m_nextP; size++; } return size; }; const Linux_DnsNotifyACLForServiceManualInstance& Linux_DnsNotifyACLForServiceManualInstanceEnumeration::getElement(int pos) const{ Linux_DnsNotifyACLForServiceManualInstanceEnumerationElement* followingP=firstElementP; int i=0; while((followingP!=0)&&(i<pos)){ followingP=followingP->m_nextP; i++; } return *(followingP->m_elementP); }; const Linux_DnsNotifyACLForServiceManualInstance& Linux_DnsNotifyACLForServiceManualInstanceEnumeration::getNext() { Linux_DnsNotifyACLForServiceManualInstanceEnumerationElement* currentP= currentElementP; currentElementP=currentElementP->m_nextP; return *(currentP->m_elementP); }; void Linux_DnsNotifyACLForServiceManualInstanceEnumeration::addElement (const Linux_DnsNotifyACLForServiceManualInstance& elementP){ if(firstElementP==0){ firstElementP=new Linux_DnsNotifyACLForServiceManualInstanceEnumerationElement(); firstElementP->m_elementP=new Linux_DnsNotifyACLForServiceManualInstance(elementP); endElementP=firstElementP; currentElementP=firstElementP; }else{ endElementP->m_nextP=new Linux_DnsNotifyACLForServiceManualInstanceEnumerationElement(); endElementP=endElementP->m_nextP; endElementP->m_elementP=new Linux_DnsNotifyACLForServiceManualInstance(elementP); } }; } --- NEW FILE: CmpiLinux_DnsNotifyACLForServiceProvider.h --- /** * CmpiLinux_DnsNotifyACLForServiceProvider.h * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * author: Murillo Bernardes <ber...@br...> * * Contributors: * */ #ifndef CmpiLinux_DnsNotifyACLForServiceProvider_h #define CmpiLinux_DnsNotifyACLForServiceProvider_h #include "CmpiInstanceMI.h" #include "CmpiMethodMI.h" #include "Linux_DnsNotifyACLForServiceFactory.h" #include "CmpiAssociationMI.h" namespace genProvider{ class CmpiLinux_DnsNotifyACLForServiceProvider : public CmpiInstanceMI, public CmpiMethodMI, public CmpiAssociationMI{ private: Linux_DnsNotifyACLForServiceInterface* interfaceP; const static char * shadowNameSpaceP; CmpiBroker cppBroker; void completeInstance ( const Linux_DnsNotifyACLForServiceInstanceName& intanceNameP, CmpiInstance& target, const CmpiContext& ctx); void copyShadowData ( const CmpiInstance* source, CmpiInstance* target); CmpiInstance* getShadowInstance ( const CmpiInstance& original, const Linux_DnsNotifyACLForServiceInstanceName& intanceName); void removeDanglingShadowInstances ( const Linux_DnsNotifyACLForServiceInstanceNameEnumeration& dinInsNames); public: CmpiLinux_DnsNotifyACLForServiceProvider ( const CmpiBroker &mbp, const CmpiContext& ctx); ~CmpiLinux_DnsNotifyACLForServiceProvider (); int isUnloadable() const; CmpiStatus enumInstanceNames ( const CmpiContext& ctx, CmpiResult& rslt, const CmpiObjectPath& cop); CmpiStatus enumInstances ( const CmpiContext& ctx, CmpiResult& rslt, const CmpiObjectPath& cop, const char* *properties); CmpiStatus getInstance ( const CmpiContext& ctx, CmpiResult& rslt, const CmpiObjectPath& cop, const char* *properties); virtual CmpiStatus createInstance ( const CmpiContext& ctx, CmpiResult& rslt, const CmpiObjectPath& cop, const CmpiInstance& inst); virtual CmpiStatus setInstance ( const CmpiContext& ctx, CmpiResult& rslt, const CmpiObjectPath& cop, const CmpiInstance& inst, const char* *properties); virtual CmpiStatus deleteInstance ( const CmpiContext& ctx, CmpiResult& rslt, const CmpiObjectPath& cop); /* virtual CmpiStatus execQuery ( const CmpiContext& ctx, CmpiResult& rslt, const CmpiObjectPath& cop, const char* language, const char* query); */ virtual CmpiStatus invokeMethod ( const CmpiContext& ctx, CmpiResult& rslt, const CmpiObjectPath& ref, const char* methodName, const CmpiArgs& in, CmpiArgs& out); CmpiStatus associationLogic (const CmpiContext& ctx, CmpiResult& rslt, const CmpiObjectPath& cop, const int instances, const int references, const char** properties=0); CmpiStatus associators ( const CmpiContext& ctx, CmpiResult& rslt, const CmpiObjectPath& cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties); CmpiStatus associatorNames ( const CmpiContext & ctx, CmpiResult & rslt, const CmpiObjectPath & cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole); CmpiStatus references ( const CmpiContext& ctx, CmpiResult& rslt, const CmpiObjectPath& cop, const char* assocClass, const char* role, const char** properties); CmpiStatus referenceNames ( const CmpiContext& ctx, CmpiResult& rslt, const CmpiObjectPath& cop, const char* assocClass, const char* role); }; } #endif --- NEW FILE: CmpiLinux_DnsNotifyACLForServiceProvider.cpp --- /** * CmpiLinux_DnsNotifyACLForServiceProvider.cpp * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * author: Murillo Bernardes <ber...@br...> * * Contributors: * */ #include "CmpiLinux_DnsNotifyACLForServiceProvider.h" #include "ArrayConverter.h" #include "Linux_DnsNotifyACLForServiceManualInstance.h" #include "Linux_DnsNotifyACLForServiceRepositoryInstance.h" #include "Linux_DnsServiceInstance.h" #include "Linux_DnsAddressMatchListInstance.h" #include <iostream> #include <strings.h> using namespace std; namespace genProvider { CmpiLinux_DnsNotifyACLForServiceProvider:: CmpiLinux_DnsNotifyACLForServiceProvider ( const CmpiBroker &mbp, const CmpiContext& ctx): CmpiBaseMI(mbp, ctx), CmpiInstanceMI(mbp,ctx), CmpiMethodMI(mbp,ctx), CmpiAssociationMI(mbp,ctx), cppBroker(mbp) { interfaceP=Linux_DnsNotifyACLForServiceFactory::getImplementation(); cout<<"Provider was constructed"<<endl; }; const char * CmpiLinux_DnsNotifyACLForServiceProvider:: shadowNameSpaceP="IBMShadow/cimv2"; CmpiLinux_DnsNotifyACLForServiceProvider:: ~CmpiLinux_DnsNotifyACLForServiceProvider(){ delete interfaceP; }; int CmpiLinux_DnsNotifyACLForServiceProvider::isUnloadable() const{ return 0; } /* -----------------------------------------------------------------------*/ /* Adding shadow properties ... [truncated message content] |