opendrim-lmp-softwareinventory-1.0.0~ppa/0000755000175000017500000000000011401066502021345 5ustar guillaumeguillaumeopendrim-lmp-softwareinventory-1.0.0~ppa/Makefile.am0000644000175000017500000001227511401066502023410 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### VENDOR = OpenDRIM VERSION = $(shell cat ./VERSION) APP_NAME = opendrim-lmp-softwareinventory RPM_PACKAGE_DIR = packaging PLATFORM = $(shell rpm --eval %_target_cpu) WORKING_DIR = $(shell pwd) SUBDIRS = Common OpenDRIM_SystemSpecificSoftwareInventoryCollection OpenDRIM_SoftwareIdentityResource OpenDRIM_SoftwareIdentityConformsToProfile OpenDRIM_SoftwareIdentity OpenDRIM_RegisteredSoftwareInventoryProfile OpenDRIM_OrderedSoftwareInventoryComponent OpenDRIM_InstalledSoftwareIdentity OpenDRIM_HostedSoftwareInventoryCollection OpenDRIM_SAPAvailableForSoftwareInventory OpenDRIM_SoftwareInventoryIdentity OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint OpenDRIM_OrderedSoftwareInventoryDependency OpenDRIM_MemberOfAvailableSoftwareCollection test postinstall: registration/SoftwareInventory.sh @CIMNAMESPACE@ $(VENDOR) @CIMSERVER@ @INTEROPNAMESPACE@ $(VERSION) . preuninstall: registration/SoftwareInventory-remove.sh @CIMNAMESPACE@ @CIMSERVER@ @INTEROPNAMESPACE@ . test-OpenDRIM_SystemSpecificSoftwareInventoryCollection: all make -C test test-OpenDRIM_SystemSpecificSoftwareInventoryCollection test-OpenDRIM_SoftwareIdentityResource: all make -C test test-OpenDRIM_SoftwareIdentityResource test-OpenDRIM_OrderedSoftwareInventoryComponent: all make -C test test-OpenDRIM_OrderedSoftwareInventoryComponent test-OpenDRIM_InstalledSoftwareIdentity: all make -C test test-OpenDRIM_InstalledSoftwareIdentity test-OpenDRIM_SoftwareIdentityConformsToProfile: all make -C test test-OpenDRIM_SoftwareIdentityConformsToProfile test-OpenDRIM_SoftwareIdentity: all make -C test test-OpenDRIM_SoftwareIdentity test-OpenDRIM_HostedSoftwareInventoryCollection: all make -C test test-OpenDRIM_HostedSoftwareInventoryCollection test-OpenDRIM_SAPAvailableForSoftwareInventory: all make -C test test-OpenDRIM_SAPAvailableForSoftwareInventory test-OpenDRIM_SoftwareInventoryIdentity: all make -C test test-OpenDRIM_SoftwareInventoryIdentity test-OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint: all make -C test test-OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint test-OpenDRIM_OrderedSoftwareInventoryDependency: all make -C test test-OpenDRIM_OrderedSoftwareInventoryDependency test-OpenDRIM_MemberOfAvailableSoftwareCollection: all make -C test test-OpenDRIM_MemberOfAvailableSoftwareCollection test-OpenDRIM_RegisteredSoftwareInventoryProfile: all make -C test test-OpenDRIM_RegisteredSoftwareInventoryProfile pkg-src: rm -rf packaging/$(APP_NAME)-$(VERSION) rm -rf .tmp mkdir .tmp cp -r ./* .tmp/ rm -rf ./tmp/packaging/ mv .tmp packaging/$(APP_NAME)-$(VERSION) tar --directory packaging -zcf packaging/$(APP_NAME)-$(VERSION).tar.gz $(APP_NAME)-$(VERSION) rm -rf packaging/$(APP_NAME)-$(VERSION) pkg-rpm: pkg-src mkdir -p $(RPM_PACKAGE_DIR)/rpm/RPMS/$(PLATFORM) mkdir -p $(RPM_PACKAGE_DIR)/rpm/SRPMS mkdir -p $(RPM_PACKAGE_DIR)/rpm/BUILD mkdir -p $(RPM_PACKAGE_DIR)/rpm/SOURCES mkdir -p $(RPM_PACKAGE_DIR)/rpm/tmp - rm -r $(RPM_PACKAGE_DIR)/rpm/BUILD/$(APP_NAME)-root - rm -r $(RPM_PACKAGE_DIR)/rpm/RPMS/$(APP_NAME)-* - rm -r $(RPM_PACKAGE_DIR)/rpm/SRPMS/$(APP_NAME)-* - rm -r $(RPM_PACKAGE_DIR)/rpm/SOURCES/$(APP_NAME)-* mv packaging/$(APP_NAME)-$(VERSION).tar.gz $(RPM_PACKAGE_DIR)/rpm/SOURCES/ rpmbuild --define="_topdir $(WORKING_DIR)/$(RPM_PACKAGE_DIR)/rpm" --define="version $(VERSION)" -ba $(RPM_PACKAGE_DIR)/$(APP_NAME).spec pkg-deb: pkg-src cp packaging/$(APP_NAME)-$(VERSION).tar.gz packaging/$(APP_NAME)-$(VERSION).orig.tar.gz cd packaging/ && tar axf $(APP_NAME)-$(VERSION).tar.gz cp -R packaging/debian packaging/$(APP_NAME)-$(VERSION) - cd packaging/$(APP_NAME)-$(VERSION) && dpkg-buildpackage -b rm -rf packaging/$(APP_NAME)-$(VERSION)* packaging/*.changes opendrim-lmp-softwareinventory-1.0.0~ppa/registration/0000755000175000017500000000000011401066502024057 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_OrderedSoftwareInventoryComponent-remove.shopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_OrderedSoftwareInventoryComponent-rem0000755000175000017500000000663211401066502035132 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$2" = pegasus then cimprovider -d -m SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentModule cimprovider -r -m SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentModule OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE < EOFC namespace=$1 index=`expr index $namespace /` while [ $index != 0 ] do namespaceFragment=${namespace:0:index-1} namespace=${namespace:index:${#namespace}-index} index=`expr index $namespace /` cat >> $OUTFILE < EOFC done cat >> $OUTFILE < EOFC cat >> $OUTFILE < EOFC PATH=$PATH:$PEGASUS_HOME/bin wbemexec $OUTFILE rm -f $OUTFILE fi if test "$2" = sfcb then OUTFILE=./OpenDRIM_OrderedSoftwareInventoryComponent.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_OrderedSoftwareInventoryComponent.sh0000755000175000017500000000724611401066502034764 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_OrderedSoftwareInventoryComponent.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_OrderedSoftwareInventoryComponent provider module"; Name = "SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentModule"; Location = "cmpiSoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_OrderedSoftwareInventoryComponent provider"; Name = "SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProvider"; ProviderModuleName = "SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_OrderedSoftwareInventoryComponent provider capabilities"; ProviderModuleName = "SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentModule"; ProviderName = "SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProvider"; ClassName = "OpenDRIM_OrderedSoftwareInventoryComponent"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"GroupComponent", "PartComponent", "AssignedSequence"}; CapabilityID = "SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_OrderedSoftwareInventoryComponent.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_SoftwareIdentityResource.sh0000755000175000017500000001005511401066502033070 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_SoftwareIdentityResource.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_SoftwareIdentityResource provider module"; Name = "SoftwareInventory_OpenDRIM_SoftwareIdentityResourceModule"; Location = "cmpiSoftwareInventory_OpenDRIM_SoftwareIdentityResourceProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_SoftwareIdentityResource provider"; Name = "SoftwareInventory_OpenDRIM_SoftwareIdentityResourceProvider"; ProviderModuleName = "SoftwareInventory_OpenDRIM_SoftwareIdentityResourceModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_SoftwareIdentityResource provider capabilities"; ProviderModuleName = "SoftwareInventory_OpenDRIM_SoftwareIdentityResourceModule"; ProviderName = "SoftwareInventory_OpenDRIM_SoftwareIdentityResourceProvider"; ClassName = "OpenDRIM_SoftwareIdentityResource"; ProviderType = {2, 5}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "Description", "ElementName", "InstallDate", "OperationalStatus", "StatusDescriptions", "Status", "HealthState", "PrimaryStatus", "DetailedStatus", "OperatingStatus", "CommunicationStatus", "EnabledState", "OtherEnabledState", "RequestedState", "EnabledDefault", "TimeOfLastStateChange", "AvailableRequestedStates", "TransitioningToState", "SystemCreationClassName", "SystemName", "CreationClassName", "Name", "AccessInfo", "OtherInfoFormatDescription", "AccessContext", "OtherAccessContext", "InfoFormat", "ResourceType", "ExtendedResourceType", "OtherResourceType"}; SupportedMethods = {"RequestStateChange"}; CapabilityID = "SoftwareInventory_OpenDRIM_SoftwareIdentityResource"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_SoftwareIdentityResource.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_SAPAvailableForSoftwareInventory-remove.shopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_SAPAvailableForSoftwareInventory-remo0000755000175000017500000000662011401066502034732 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$2" = pegasus then cimprovider -d -m SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryModule cimprovider -r -m SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryModule OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE < EOFC namespace=$1 index=`expr index $namespace /` while [ $index != 0 ] do namespaceFragment=${namespace:0:index-1} namespace=${namespace:index:${#namespace}-index} index=`expr index $namespace /` cat >> $OUTFILE < EOFC done cat >> $OUTFILE < EOFC cat >> $OUTFILE < EOFC PATH=$PATH:$PEGASUS_HOME/bin wbemexec $OUTFILE rm -f $OUTFILE fi if test "$2" = sfcb then OUTFILE=./OpenDRIM_SAPAvailableForSoftwareInventory.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_SystemSpecificSoftwareInventoryCollection-remove.shopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_SystemSpecificSoftwareInventoryCollec0000755000175000017500000000673611401066502035163 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$2" = pegasus then cimprovider -d -m SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollectionModule cimprovider -r -m SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollectionModule OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE < EOFC namespace=$1 index=`expr index $namespace /` while [ $index != 0 ] do namespaceFragment=${namespace:0:index-1} namespace=${namespace:index:${#namespace}-index} index=`expr index $namespace /` cat >> $OUTFILE < EOFC done cat >> $OUTFILE < EOFC cat >> $OUTFILE < EOFC PATH=$PATH:$PEGASUS_HOME/bin wbemexec $OUTFILE rm -f $OUTFILE fi if test "$2" = sfcb then OUTFILE=./OpenDRIM_SystemSpecificSoftwareInventoryCollection.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_InstalledSoftwareIdentity.sh0000755000175000017500000000676611401066502033236 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_InstalledSoftwareIdentity.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_InstalledSoftwareIdentity provider module"; Name = "SoftwareInventory_OpenDRIM_InstalledSoftwareIdentityModule"; Location = "cmpiSoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_InstalledSoftwareIdentity provider"; Name = "SoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProvider"; ProviderModuleName = "SoftwareInventory_OpenDRIM_InstalledSoftwareIdentityModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_InstalledSoftwareIdentity provider capabilities"; ProviderModuleName = "SoftwareInventory_OpenDRIM_InstalledSoftwareIdentityModule"; ProviderName = "SoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProvider"; ClassName = "OpenDRIM_InstalledSoftwareIdentity"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"System", "InstalledSoftware"}; CapabilityID = "SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_InstalledSoftwareIdentity.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_HostedSoftwareInventoryCollection-remove.shopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_HostedSoftwareInventoryCollection-rem0000755000175000017500000000663211401066502035125 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$2" = pegasus then cimprovider -d -m SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionModule cimprovider -r -m SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionModule OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE < EOFC namespace=$1 index=`expr index $namespace /` while [ $index != 0 ] do namespaceFragment=${namespace:0:index-1} namespace=${namespace:index:${#namespace}-index} index=`expr index $namespace /` cat >> $OUTFILE < EOFC done cat >> $OUTFILE < EOFC cat >> $OUTFILE < EOFC PATH=$PATH:$PEGASUS_HOME/bin wbemexec $OUTFILE rm -f $OUTFILE fi if test "$2" = sfcb then OUTFILE=./OpenDRIM_HostedSoftwareInventoryCollection.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_SystemSpecificSoftwareInventoryCollection.shopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_SystemSpecificSoftwareInventoryCollec0000755000175000017500000000745711401066502035164 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_SystemSpecificSoftwareInventoryCollection.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_SystemSpecificSoftwareInventoryCollection provider module"; Name = "SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollectionModule"; Location = "cmpiSoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollectionProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_SystemSpecificSoftwareInventoryCollection provider"; Name = "SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollectionProvider"; ProviderModuleName = "SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollectionModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_SystemSpecificSoftwareInventoryCollection provider capabilities"; ProviderModuleName = "SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollectionModule"; ProviderName = "SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollectionProvider"; ClassName = "OpenDRIM_SystemSpecificSoftwareInventoryCollection"; ProviderType = {2}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "Description", "ElementName", "InstanceID"}; CapabilityID = "SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_SystemSpecificSoftwareInventoryCollection.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_RegisteredSoftwareInventoryProfile-remove.shopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_RegisteredSoftwareInventoryProfile-re0000755000175000017500000000663011401066502035122 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$2" = pegasus then cimprovider -d -m SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfileModule cimprovider -r -m SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfileModule OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE < EOFC namespace=$3 index=`expr index $namespace /` while [ $index != 0 ] do namespaceFragment=${namespace:0:index-1} namespace=${namespace:index:${#namespace}-index} index=`expr index $namespace /` cat >> $OUTFILE < EOFC done cat >> $OUTFILE < EOFC cat >> $OUTFILE < EOFC PATH=$PATH:$PEGASUS_HOME/bin wbemexec $OUTFILE rm -f $OUTFILE fi if test "$2" = sfcb then OUTFILE=./OpenDRIM_RegisteredSoftwareInventoryProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$3 -r $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_OrderedSoftwareInventoryDependency-remove.shopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_OrderedSoftwareInventoryDependency-re0000755000175000017500000000664411401066502035074 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$2" = pegasus then cimprovider -d -m SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyModule cimprovider -r -m SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyModule OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE < EOFC namespace=$1 index=`expr index $namespace /` while [ $index != 0 ] do namespaceFragment=${namespace:0:index-1} namespace=${namespace:index:${#namespace}-index} index=`expr index $namespace /` cat >> $OUTFILE < EOFC done cat >> $OUTFILE < EOFC cat >> $OUTFILE < EOFC PATH=$PATH:$PEGASUS_HOME/bin wbemexec $OUTFILE rm -f $OUTFILE fi if test "$2" = sfcb then OUTFILE=./OpenDRIM_OrderedSoftwareInventoryDependency.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_InstalledSoftwareIdentity-remove.sh0000755000175000017500000000651211401066502034516 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$2" = pegasus then cimprovider -d -m SoftwareInventory_OpenDRIM_InstalledSoftwareIdentityModule cimprovider -r -m SoftwareInventory_OpenDRIM_InstalledSoftwareIdentityModule OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE < EOFC namespace=$1 index=`expr index $namespace /` while [ $index != 0 ] do namespaceFragment=${namespace:0:index-1} namespace=${namespace:index:${#namespace}-index} index=`expr index $namespace /` cat >> $OUTFILE < EOFC done cat >> $OUTFILE < EOFC cat >> $OUTFILE < EOFC PATH=$PATH:$PEGASUS_HOME/bin wbemexec $OUTFILE rm -f $OUTFILE fi if test "$2" = sfcb then OUTFILE=./OpenDRIM_InstalledSoftwareIdentity.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_MemberOfAvailableSoftwareCollection-remove.shopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_MemberOfAvailableSoftwareCollection-r0000755000175000017500000000665611401066502034742 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$2" = pegasus then cimprovider -d -m SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionModule cimprovider -r -m SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionModule OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE < EOFC namespace=$1 index=`expr index $namespace /` while [ $index != 0 ] do namespaceFragment=${namespace:0:index-1} namespace=${namespace:index:${#namespace}-index} index=`expr index $namespace /` cat >> $OUTFILE < EOFC done cat >> $OUTFILE < EOFC cat >> $OUTFILE < EOFC PATH=$PATH:$PEGASUS_HOME/bin wbemexec $OUTFILE rm -f $OUTFILE fi if test "$2" = sfcb then OUTFILE=./OpenDRIM_MemberOfAvailableSoftwareCollection.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_SoftwareIdentity.sh0000755000175000017500000001000711401066502031355 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_SoftwareIdentity.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_SoftwareIdentity provider module"; Name = "SoftwareInventory_OpenDRIM_SoftwareIdentityModule"; Location = "cmpiSoftwareInventory_OpenDRIM_SoftwareIdentityProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_SoftwareIdentity provider"; Name = "SoftwareInventory_OpenDRIM_SoftwareIdentityProvider"; ProviderModuleName = "SoftwareInventory_OpenDRIM_SoftwareIdentityModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_SoftwareIdentity provider capabilities"; ProviderModuleName = "SoftwareInventory_OpenDRIM_SoftwareIdentityModule"; ProviderName = "SoftwareInventory_OpenDRIM_SoftwareIdentityProvider"; ClassName = "OpenDRIM_SoftwareIdentity"; ProviderType = {2}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "Description", "ElementName", "InstallDate", "Name", "OperationalStatus", "StatusDescriptions", "Status", "HealthState", "PrimaryStatus", "DetailedStatus", "OperatingStatus", "CommunicationStatus", "InstanceID", "MajorVersion", "MinorVersion", "RevisionNumber", "BuildNumber", "VersionString", "TargetOperatingSystems", "Manufacturer", "Languages", "Classifications", "ClassificationDescriptions", "SerialNumber", "TargetTypes", "IdentityInfoValue", "IdentityInfoType", "ReleaseDate", "IsEntity", "ExtendedResourceType", "OtherExtendedResourceTypeDescription", "MinExtendedResourceTypeMajorVersion", "MinExtendedResourceTypeMinorVersion", "MinExtendedResourceTypeRevisionNumber", "MinExtendedResourceTypeBuildNumber", "TargetOSTypes"}; CapabilityID = "SoftwareInventory_OpenDRIM_SoftwareIdentity"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_SoftwareIdentity.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_SoftwareInventoryIdentity-remove.sh0000755000175000017500000000651211401066502034574 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$2" = pegasus then cimprovider -d -m SoftwareInventory_OpenDRIM_SoftwareInventoryIdentityModule cimprovider -r -m SoftwareInventory_OpenDRIM_SoftwareInventoryIdentityModule OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE < EOFC namespace=$1 index=`expr index $namespace /` while [ $index != 0 ] do namespaceFragment=${namespace:0:index-1} namespace=${namespace:index:${#namespace}-index} index=`expr index $namespace /` cat >> $OUTFILE < EOFC done cat >> $OUTFILE < EOFC cat >> $OUTFILE < EOFC PATH=$PATH:$PEGASUS_HOME/bin wbemexec $OUTFILE rm -f $OUTFILE fi if test "$2" = sfcb then OUTFILE=./OpenDRIM_SoftwareInventoryIdentity.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_OrderedSoftwareInventoryDependency.shopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_OrderedSoftwareInventoryDependency.sh0000755000175000017500000000726111401066502035075 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_OrderedSoftwareInventoryDependency.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_OrderedSoftwareInventoryDependency provider module"; Name = "SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyModule"; Location = "cmpiSoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_OrderedSoftwareInventoryDependency provider"; Name = "SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProvider"; ProviderModuleName = "SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_OrderedSoftwareInventoryDependency provider capabilities"; ProviderModuleName = "SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyModule"; ProviderName = "SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProvider"; ClassName = "OpenDRIM_OrderedSoftwareInventoryDependency"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"Antecedent", "Dependent", "AssignedSequence"}; CapabilityID = "SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_OrderedSoftwareInventoryDependency.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint.shopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_ComputerSystemSoftwareIdentityResourc0000755000175000017500000000767211401066502035251 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint provider module"; Name = "SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointModule"; Location = "cmpiSoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint provider"; Name = "SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProvider"; ProviderModuleName = "SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint provider capabilities"; ProviderModuleName = "SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointModule"; ProviderName = "SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProvider"; ClassName = "OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"Antecedent", "Dependent"}; CapabilityID = "SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_SoftwareIdentityConformsToProfile.sh0000755000175000017500000000754311401066502034723 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_SoftwareIdentityConformsToProfile.mof cimmof -aE -n $4 $6/mof/OpenDRIM_SoftwareIdentityConformsToProfile.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_SoftwareIdentityConformsToProfile provider module"; Name = "SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileModule"; Location = "cmpiSoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_SoftwareIdentityConformsToProfile provider"; Name = "SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProvider"; ProviderModuleName = "SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_SoftwareIdentityConformsToProfile provider capabilities"; ProviderModuleName = "SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileModule"; ProviderName = "SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProvider"; ClassName = "OpenDRIM_SoftwareIdentityConformsToProfile"; ProviderType = {2, 3}; Namespaces = {"$1", "$4"}; SupportedProperties = {"ConformantStandard", "ManagedElement"}; CapabilityID = "SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_SoftwareIdentityConformsToProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE owmofc -u http://localhost/$4 $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_SoftwareIdentityConformsToProfile-remove.shopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_SoftwareIdentityConformsToProfile-rem0000755000175000017500000001057211401066502035067 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$2" = pegasus then cimprovider -d -m SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileModule cimprovider -r -m SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileModule OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE < EOFC namespace=$1 index=`expr index $namespace /` while [ $index != 0 ] do namespaceFragment=${namespace:0:index-1} namespace=${namespace:index:${#namespace}-index} index=`expr index $namespace /` cat >> $OUTFILE < EOFC done cat >> $OUTFILE < EOFC cat >> $OUTFILE < EOFC PATH=$PATH:$PEGASUS_HOME/bin wbemexec $OUTFILE rm -f $OUTFILE cat >> $OUTFILE < EOFC namespace=$3 index=`expr index $namespace /` while [ $index != 0 ] do namespaceFragment=${namespace:0:index-1} namespace=${namespace:index:${#namespace}-index} index=`expr index $namespace /` cat >> $OUTFILE < EOFC done cat >> $OUTFILE < EOFC cat >> $OUTFILE < EOFC wbemexec $OUTFILE rm -f $OUTFILE fi if test "$2" = sfcb then OUTFILE=./OpenDRIM_SoftwareIdentityConformsToProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE owmofc -u http://localhost/$3 -r $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint-remove.shopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_ComputerSystemSoftwareIdentityResourc0000755000175000017500000000707211401066502035243 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$2" = pegasus then cimprovider -d -m SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointModule cimprovider -r -m SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointModule OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE < EOFC namespace=$1 index=`expr index $namespace /` while [ $index != 0 ] do namespaceFragment=${namespace:0:index-1} namespace=${namespace:index:${#namespace}-index} index=`expr index $namespace /` cat >> $OUTFILE < EOFC done cat >> $OUTFILE < EOFC cat >> $OUTFILE < EOFC PATH=$PATH:$PEGASUS_HOME/bin wbemexec $OUTFILE rm -f $OUTFILE fi if test "$2" = sfcb then OUTFILE=./OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_SoftwareIdentity-remove.sh0000755000175000017500000000634411401066502032661 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$2" = pegasus then cimprovider -d -m SoftwareInventory_OpenDRIM_SoftwareIdentityModule cimprovider -r -m SoftwareInventory_OpenDRIM_SoftwareIdentityModule OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE < EOFC namespace=$1 index=`expr index $namespace /` while [ $index != 0 ] do namespaceFragment=${namespace:0:index-1} namespace=${namespace:index:${#namespace}-index} index=`expr index $namespace /` cat >> $OUTFILE < EOFC done cat >> $OUTFILE < EOFC cat >> $OUTFILE < EOFC PATH=$PATH:$PEGASUS_HOME/bin wbemexec $OUTFILE rm -f $OUTFILE fi if test "$2" = sfcb then OUTFILE=./OpenDRIM_SoftwareIdentity.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_SoftwareIdentityResource-remove.sh0000755000175000017500000000647311401066502034374 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$2" = pegasus then cimprovider -d -m SoftwareInventory_OpenDRIM_SoftwareIdentityResourceModule cimprovider -r -m SoftwareInventory_OpenDRIM_SoftwareIdentityResourceModule OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE < EOFC namespace=$1 index=`expr index $namespace /` while [ $index != 0 ] do namespaceFragment=${namespace:0:index-1} namespace=${namespace:index:${#namespace}-index} index=`expr index $namespace /` cat >> $OUTFILE < EOFC done cat >> $OUTFILE < EOFC cat >> $OUTFILE < EOFC PATH=$PATH:$PEGASUS_HOME/bin wbemexec $OUTFILE rm -f $OUTFILE fi if test "$2" = sfcb then OUTFILE=./OpenDRIM_SoftwareIdentityResource.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_HostedSoftwareInventoryCollection.sh0000755000175000017500000000721211401066502034750 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_HostedSoftwareInventoryCollection.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_HostedSoftwareInventoryCollection provider module"; Name = "SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionModule"; Location = "cmpiSoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_HostedSoftwareInventoryCollection provider"; Name = "SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProvider"; ProviderModuleName = "SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_HostedSoftwareInventoryCollection provider capabilities"; ProviderModuleName = "SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionModule"; ProviderName = "SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProvider"; ClassName = "OpenDRIM_HostedSoftwareInventoryCollection"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"Antecedent", "Dependent"}; CapabilityID = "SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_HostedSoftwareInventoryCollection.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_SoftwareInventoryIdentity.sh0000755000175000017500000000707011401066502033301 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_SoftwareInventoryIdentity.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_SoftwareInventoryIdentity provider module"; Name = "SoftwareInventory_OpenDRIM_SoftwareInventoryIdentityModule"; Location = "cmpiSoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_SoftwareInventoryIdentity provider"; Name = "SoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProvider"; ProviderModuleName = "SoftwareInventory_OpenDRIM_SoftwareInventoryIdentityModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_SoftwareInventoryIdentity provider capabilities"; ProviderModuleName = "SoftwareInventory_OpenDRIM_SoftwareInventoryIdentityModule"; ProviderName = "SoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProvider"; ClassName = "OpenDRIM_SoftwareInventoryIdentity"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"Antecedent", "Dependent", "UpgradeCondition", "OtherUpgradeCondition", "ElementSoftwareStatus"}; CapabilityID = "SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_SoftwareInventoryIdentity.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_SAPAvailableForSoftwareInventory.sh0000755000175000017500000000717611401066502034412 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_SAPAvailableForSoftwareInventory.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_SAPAvailableForSoftwareInventory provider module"; Name = "SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryModule"; Location = "cmpiSoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_SAPAvailableForSoftwareInventory provider"; Name = "SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProvider"; ProviderModuleName = "SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_SAPAvailableForSoftwareInventory provider capabilities"; ProviderModuleName = "SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryModule"; ProviderName = "SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProvider"; ClassName = "OpenDRIM_SAPAvailableForSoftwareInventory"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"AvailableSAP", "ManagedElement"}; CapabilityID = "SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_SAPAvailableForSoftwareInventory.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_MemberOfAvailableSoftwareCollection.shopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_MemberOfAvailableSoftwareCollection.s0000755000175000017500000000725511401066502034740 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_MemberOfAvailableSoftwareCollection.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_MemberOfAvailableSoftwareCollection provider module"; Name = "SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionModule"; Location = "cmpiSoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_MemberOfAvailableSoftwareCollection provider"; Name = "SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProvider"; ProviderModuleName = "SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_MemberOfAvailableSoftwareCollection provider capabilities"; ProviderModuleName = "SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionModule"; ProviderName = "SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProvider"; ClassName = "OpenDRIM_MemberOfAvailableSoftwareCollection"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"Collection", "Member"}; CapabilityID = "SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_MemberOfAvailableSoftwareCollection.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_RegisteredSoftwareInventoryProfile.shopendrim-lmp-softwareinventory-1.0.0~ppa/registration/OpenDRIM_RegisteredSoftwareInventoryProfile.sh0000755000175000017500000000747111401066502035133 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$3" = pegasus then cimmof -aE -n $4 $6/mof/OpenDRIM_RegisteredSoftwareInventoryProfile.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_RegisteredSoftwareInventoryProfile provider module"; Name = "SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfileModule"; Location = "cmpiSoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfileProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_RegisteredSoftwareInventoryProfile provider"; Name = "SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfileProvider"; ProviderModuleName = "SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfileModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_RegisteredSoftwareInventoryProfile provider capabilities"; ProviderModuleName = "SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfileModule"; ProviderName = "SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfileProvider"; ClassName = "OpenDRIM_RegisteredSoftwareInventoryProfile"; ProviderType = {2}; Namespaces = {"$4"}; SupportedProperties = {"Caption", "Description", "ElementName", "InstanceID", "RegisteredOrganization", "OtherRegisteredOrganization", "RegisteredName", "RegisteredVersion", "AdvertiseTypes", "AdvertiseTypeDescriptions"}; CapabilityID = "SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_RegisteredSoftwareInventoryProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$4 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-softwareinventory-1.0.0~ppa/registration/SoftwareInventory-remove.sh0000755000175000017500000000564711401066502031435 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$2" = pegasus then if !( ps -C cimserver > /dev/null 2>&1 ) then echo "ERROR: Pegasus CIM server is not running" exit 1 fi fi if test "$2" = openwbem then if !( ps -C owcimomd > /dev/null 2>&1 ) then echo "ERROR: OpenWBEM CIM server is not running" exit 1 fi fi if test "$2" = sfcb then /etc/init.d/sfcb stop fi $4/registration/OpenDRIM_RegisteredSoftwareInventoryProfile-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_MemberOfAvailableSoftwareCollection-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_OrderedSoftwareInventoryDependency-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_SoftwareInventoryIdentity-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_SAPAvailableForSoftwareInventory-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_HostedSoftwareInventoryCollection-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_SoftwareIdentity-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_SoftwareIdentityConformsToProfile-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_InstalledSoftwareIdentity-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_OrderedSoftwareInventoryComponent-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_SoftwareIdentityResource-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_SystemSpecificSoftwareInventoryCollection-remove.sh $1 $2 $3 $4 if test "$2" = sfcb then /etc/init.d/sfcb start fi opendrim-lmp-softwareinventory-1.0.0~ppa/registration/SoftwareInventory.sh0000755000175000017500000000563211401066502030134 0ustar guillaumeguillaume#!/bin/bash ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### if test "$3" = pegasus then if !( ps -C cimserver > /dev/null 2>&1 ) then echo "ERROR: Pegasus CIM server is not running" exit 1 fi fi if test "$3" = openwbem then if !( ps -C owcimomd > /dev/null 2>&1 ) then echo "ERROR: OpenWBEM CIM server is not running" exit 1 fi fi if test "$3" = sfcb then /etc/init.d/sfcb stop fi $6/registration/OpenDRIM_SystemSpecificSoftwareInventoryCollection.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_SoftwareIdentityResource.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_OrderedSoftwareInventoryComponent.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_InstalledSoftwareIdentity.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_SoftwareIdentityConformsToProfile.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_SoftwareIdentity.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_HostedSoftwareInventoryCollection.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_SAPAvailableForSoftwareInventory.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_SoftwareInventoryIdentity.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_OrderedSoftwareInventoryDependency.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_MemberOfAvailableSoftwareCollection.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_RegisteredSoftwareInventoryProfile.sh $1 $2 $3 $4 $5 $6 if test "$3" = sfcb then /etc/init.d/sfcb start fi opendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityConformsToProfile/0000755000175000017500000000000011401066502031641 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000021000000000000011556 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityConformsToProfile/assocOpenDRIM_SoftwareIdentityConformsToProfile.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityConformsToProfile/assocOpenDRIM_So0000644000175000017500000002227411401066502034642 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "assocOpenDRIM_SoftwareIdentityConformsToProfile.h" int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage) { _E_; string _assocClass, _resultClass, _resultRole, _role; assocClass == NULL ? _assocClass = "null" : _assocClass = assocClass; resultClass == NULL ? _resultClass = "null" : _resultClass = resultClass; resultRole == NULL ? _resultRole = "null" : _resultRole = resultRole; role == NULL ? _role = "null" : _role = role; for (unsigned int i=0; i& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant) { _E_; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_associatorFilter(broker, ctx, cop, knownInstance, assocClass, resultClass, role, resultRole, leftToRight, errorMessage); if (errorCode == -1) return OK; if (errorCode != OK) return errorCode; if (leftToRight) { if (role != NULL && strcasecmp(role, "ConformantStandard") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "ManagedElement") != 0) return OK; CF_assert(SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_associatorConformantStandardToManagedElement(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "ManagedElement") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "ConformantStandard") != 0) return OK; CF_assert(SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_associatorManagedElementToConformantStandard(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_enumerateConformantStandards(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, ConformantStandard_NAMESPACE, ConformantStandard_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(SoftwareInventory_CIM_RegisteredProfile_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareInventory_CIM_RegisteredProfile_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareInventory_CIM_RegisteredProfile_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_getConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), ConformantStandard_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), ConformantStandard_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_RegisteredProfile _instance; SoftwareInventory_CIM_RegisteredProfile_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareInventory_CIM_RegisteredProfile_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareInventory_CIM_RegisteredProfile_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_enumerateManagedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, ManagedElement_NAMESPACE, ManagedElement_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(SoftwareInventory_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareInventory_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareInventory_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_getManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), ManagedElement_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), ManagedElement_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ManagedElement _instance; SoftwareInventory_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareInventory_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareInventory_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityConformsToProfile/Makefile.am0000644000175000017500000000534711401066502033706 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProvider.la libcmpiSoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProvider_la_SOURCES = OpenDRIM_SoftwareIdentityConformsToProfileAccess.cpp OpenDRIM_SoftwareIdentityConformsToProfileProvider.cpp cmpiOpenDRIM_SoftwareIdentityConformsToProfile.cpp assocOpenDRIM_SoftwareIdentityConformsToProfile.cpp # May have to be adjusted for direct invocation libcmpiSoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProvider_la_CPPFLAGS = -I../CIM_RegisteredProfile -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiSoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProvider_la_LIBADD = ../Common/libcmpiSoftwareInventory_Common.la #../CIM_RegisteredProfile/libcmpiSoftwareInventory_CIM_RegisteredProfileProvider.la ../CIM_ManagedElement/libcmpiSoftwareInventory_CIM_ManagedElementProvider.la libcmpiSoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_SoftwareIdentityConformsToProfile.h OpenDRIM_SoftwareIdentityConformsToProfile.h OpenDRIM_SoftwareIdentityConformsToProfileAccess.h ././@LongLink0000000000000000000000000000020700000000000011564 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityConformsToProfile/cmpiOpenDRIM_SoftwareIdentityConformsToProfile.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityConformsToProfile/cmpiOpenDRIM_Sof0000644000175000017500000000662311401066502034630 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SoftwareIdentityConformsToProfile.h" CMPIObjectPath* SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_SoftwareIdentityConformsToProfile& instance) { _E_; Objectpath op(broker, OpenDRIM_SoftwareIdentityConformsToProfile_classnames[0], OpenDRIM_SoftwareIdentityConformsToProfile_NAMESPACE); if (!instance.ConformantStandard_isNULL) op.addKey("ConformantStandard", instance.ConformantStandard); if (!instance.ManagedElement_isNULL) op.addKey("ManagedElement", instance.ManagedElement); _L_; return op.getHdl(); } CMPIInstance* SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_SoftwareIdentityConformsToProfile& instance) { _E_; Objectpath op(broker, SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_SoftwareIdentityConformsToProfile& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("ConformantStandard", instance.ConformantStandard) == OK) instance.ConformantStandard_isNULL = false; if (op.getKey("ManagedElement", instance.ManagedElement) == OK) instance.ManagedElement_isNULL = false; _L_; } void SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_SoftwareIdentityConformsToProfile& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("ConformantStandard", instance.ConformantStandard) == OK) instance.ConformantStandard_isNULL = false; if (inst.getProperty("ManagedElement", instance.ManagedElement) == OK) instance.ManagedElement_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000021100000000000011557 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityConformsToProfile/OpenDRIM_SoftwareIdentityConformsToProfileAccess.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityConformsToProfile/OpenDRIM_Softwar0000644000175000017500000002707411401066502034660 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_SoftwareIdentityConformsToProfileAccess.h" int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareInventory_CIM_RegisteredProfile_load(broker, errorMessage)); CF_assert(SoftwareInventory_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareInventory_CIM_RegisteredProfile_unload(errorMessage)); CF_assert(SoftwareInventory_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_isAssociated(const Instance& ConformantStandard, const Instance& ManagedElement, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector subjects; // Only get the instance names CF_assert(SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_enumerateConformantStandards(broker, ctx, subjects, NULL, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_enumerateConformantStandards(broker, ctx, subjects, NULL, false, errorMessage)); vector::iterator c = subjects.begin(); vector::iterator end = subjects.end(); for (; c != end; ++c) { bool leftToRight = true; vector associatedInstances; SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), ConformantStandard_classnames[0], ManagedElement_classnames[0], ConformantStandard_role.c_str(), ManagedElement_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_referenceConformantStandardToManagedElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_SoftwareIdentityConformsToProfile& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath ConformantStandard_objectpath; instance.getConformantStandard(ConformantStandard_objectpath); Instance ConformantStandard_instance; CF_assert(SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_getConformantStandard(broker, ctx, ConformantStandard_objectpath, ConformantStandard_instance, NULL, errorMessage)); Objectpath ManagedElement_objectpath; instance.getManagedElement(ManagedElement_objectpath); Instance ManagedElement_instance; CF_assert(SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_getManagedElement(broker, ctx, ManagedElement_objectpath, ManagedElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_isAssociated(ConformantStandard_instance, ManagedElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareIdentityConformsToProfile& newInstance, const OpenDRIM_SoftwareIdentityConformsToProfile& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareIdentityConformsToProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareIdentityConformsToProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_associatorConformantStandardToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ConformantStandard_instance, const char** properties, vector& ManagedElement_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector ManagedElement_instances; if (discriminant=="a") CF_assert(SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); } for (size_t i=0; i& ConformantStandard_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector ConformantStandard_instances; if (discriminant=="a") CF_assert(SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_enumerateConformantStandards(broker, ctx, ConformantStandard_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_enumerateConformantStandards(broker, ctx, ConformantStandard_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_enumerateConformantStandards(broker, ctx, ConformantStandard_instances, properties, false, errorMessage)); } for (size_t i=0; i& ManagedElement_instances, vector& OpenDRIM_SoftwareIdentityConformsToProfile_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < ManagedElement_instances.size(); i++) { OpenDRIM_SoftwareIdentityConformsToProfile instance; instance.setConformantStandard(((Instance) ConformantStandard_instance).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instances[i]).getObjectpath()); OpenDRIM_SoftwareIdentityConformsToProfile_instances.push_back(instance); } _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_referenceManagedElementToConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& ConformantStandard_instances, vector& OpenDRIM_SoftwareIdentityConformsToProfile_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < ConformantStandard_instances.size(); i++) { OpenDRIM_SoftwareIdentityConformsToProfile instance; instance.setConformantStandard(((Instance) ConformantStandard_instances[i]).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instance).getObjectpath()); OpenDRIM_SoftwareIdentityConformsToProfile_instances.push_back(instance); } _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_populate(OpenDRIM_SoftwareIdentityConformsToProfile& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000020100000000000011556 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityConformsToProfile/OpenDRIM_SoftwareIdentityConformsToProfile.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityConformsToProfile/OpenDRIM_Softwar0000644000175000017500000000745711401066502034663 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SOFTWAREIDENTITYCONFORMSTOPROFILE_H_ #define OPENDRIM_SOFTWAREIDENTITYCONFORMSTOPROFILE_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_RegisteredProfile.h" #include "CIM_RegisteredProfileAccess.h" #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" */ const static char* OpenDRIM_SoftwareIdentityConformsToProfile_classnames[] = {"OpenDRIM_SoftwareIdentityConformsToProfile"}; static string OpenDRIM_SoftwareIdentityConformsToProfile_NAMESPACE = _INTEROP_NAMESPACE; const static string ConformantStandard_role = "ConformantStandard"; const static char* ConformantStandard_classnames[] = {"OpenDRIM_RegisteredSoftwareInventoryProfile"}; const static string ConformantStandard_NAMESPACE = _INTEROP_NAMESPACE; const static string ManagedElement_role = "ManagedElement"; const static char* ManagedElement_classnames[] = {"OpenDRIM_SoftwareIdentity"}; const static string ManagedElement_NAMESPACE = _NAMESPACE; class OpenDRIM_SoftwareIdentityConformsToProfile { public: Objectpath ConformantStandard; bool ConformantStandard_isNULL; Objectpath ManagedElement; bool ManagedElement_isNULL; OpenDRIM_SoftwareIdentityConformsToProfile() { ConformantStandard_isNULL = true; ManagedElement_isNULL = true; } ~OpenDRIM_SoftwareIdentityConformsToProfile() {} string getKeys() const { return CF_toLowCase(".ConformantStandard=\"" + CF_quoteString(ConformantStandard.toString()) + "\""".ManagedElement=\"" + CF_quoteString(ManagedElement.toString()) + "\""); } int getConformantStandard(Objectpath& value) const { if (ConformantStandard_isNULL==true) return NOT_FOUND; value = ConformantStandard; return OK; } int setConformantStandard(const Objectpath& newValue) { ConformantStandard = newValue; ConformantStandard.setNamespace(ConformantStandard_NAMESPACE); ConformantStandard_isNULL = false; return OK; } int getManagedElement(Objectpath& value) const { if (ManagedElement_isNULL==true) return NOT_FOUND; value = ManagedElement; return OK; } int setManagedElement(const Objectpath& newValue) { ManagedElement = newValue; ManagedElement.setNamespace(ManagedElement_NAMESPACE); ManagedElement_isNULL = false; return OK; } }; #endif /*OPENDRIM_SOFTWAREIDENTITYCONFORMSTOPROFILE_H_*/ ././@LongLink0000000000000000000000000000021300000000000011561 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityConformsToProfile/OpenDRIM_SoftwareIdentityConformsToProfileProvider.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityConformsToProfile/OpenDRIM_Softwar0000644000175000017500000004563711401066502034665 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SoftwareIdentityConformsToProfile.h" #include "OpenDRIM_SoftwareIdentityConformsToProfileAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProviderSetInstance SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProviderModifyInstance #endif int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_init(const CMPIBroker* broker); int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentityConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProviderEnumInstances(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentityConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareIdentityConformsToProfile instance; SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentityConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProviderSetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareIdentityConformsToProfile newInstance, oldInstance; SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_toCPP(_broker, ci, newInstance); SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentityConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentityConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareIdentityConformsToProfile instance; SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_toCPP(_broker, ci, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_SoftwareIdentityConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentityConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentityConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareIdentityConformsToProfile instance; SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentityConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentityConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProviderExecQuery(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* lang, const char* query) { _E_; CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } /* ---------------------------------------------------------------------------*/ /* End of Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Association Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProviderAssociatorNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentityConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnObjectPath(rslt, associatedInstances[i].getObjectpath().getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProviderAssociators(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentityConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnInstance(rslt, associatedInstances[i].getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProviderReferenceNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentityConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_referenceConformantStandardToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_referenceManagedElementToConformantStandard(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentityConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProviderReferences(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentityConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_referenceConformantStandardToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_referenceManagedElementToConformantStandard(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentityConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_init FAILED: " + (string) OpenDRIM_SoftwareIdentityConformsToProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_unload(errorMessage); if (errorCode != OK) { errorMessage += "SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_unload FAILED: " + (string) OpenDRIM_SoftwareIdentityConformsToProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_INIT if (SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_init(_broker) < 0) return NULL CMInstanceMIStub(SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProvider, SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProvider, _broker, SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_INIT); CMAssociationMIStub(SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProvider, SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProvider, _broker, SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityConformsToProfile/assocOpenDRIM_SoftwareIdentityConformsToProfile.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityConformsToProfile/assocOpenDRIM_So0000644000175000017500000000657011401066502034643 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ASSOCOPENDRIM_SOFTWAREIDENTITYCONFORMSTOPROFILE_H_ #define ASSOCOPENDRIM_SOFTWAREIDENTITYCONFORMSTOPROFILE_H_ #include "OpenDRIM_SoftwareIdentityConformsToProfileAccess.h" int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_associator(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties, vector& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant); int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_enumerateConformantStandards(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_getConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_enumerateManagedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_getManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_SOFTWAREIDENTITYCONFORMSTOPROFILE_H_*/ ././@LongLink0000000000000000000000000000020500000000000011562 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityConformsToProfile/cmpiOpenDRIM_SoftwareIdentityConformsToProfile.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityConformsToProfile/cmpiOpenDRIM_Sof0000644000175000017500000000470211401066502034624 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_SOFTWAREIDENTITYCONFORMSTOPROFILE_H_ #define CMPIOPENDRIM_SOFTWAREIDENTITYCONFORMSTOPROFILE_H_ #include "OpenDRIM_SoftwareIdentityConformsToProfile.h" CMPIObjectPath* SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_SoftwareIdentityConformsToProfile& instance); CMPIInstance* SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_SoftwareIdentityConformsToProfile& instance); void SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_SoftwareIdentityConformsToProfile& instance); void SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_SoftwareIdentityConformsToProfile& instance); #endif /*CMPIOPENDRIM_SOFTWAREIDENTITYCONFORMSTOPROFILE_H_*/ ././@LongLink0000000000000000000000000000020700000000000011564 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityConformsToProfile/OpenDRIM_SoftwareIdentityConformsToProfileAccess.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityConformsToProfile/OpenDRIM_Softwar0000644000175000017500000001163611401066502034655 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SOFTWAREIDENTITYCONFORMSTOPROFILEACCESS_H_ #define OPENDRIM_SOFTWAREIDENTITYCONFORMSTOPROFILEACCESS_H_ #include "SoftwareInventory_Common.h" #include "OpenDRIM_SoftwareIdentityConformsToProfile.h" #include "assocOpenDRIM_SoftwareIdentityConformsToProfile.h" int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_load(const CMPIBroker* broker, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_unload(string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_SoftwareIdentityConformsToProfile& instance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareIdentityConformsToProfile& newInstance, const OpenDRIM_SoftwareIdentityConformsToProfile& oldInstance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareIdentityConformsToProfile& instance, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareIdentityConformsToProfile& instance, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_associatorConformantStandardToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ConformantStandard_instance, const char** properties, vector& ManagedElement_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_associatorManagedElementToConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const char** properties, vector& ConformantStandard_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_referenceConformantStandardToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ConformantStandard_instance, const vector& ManagedElement_instances, vector& OpenDRIM_SoftwareIdentityConformsToProfile_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_referenceManagedElementToConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& ConformantStandard_instances, vector& OpenDRIM_SoftwareIdentityConformsToProfile_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_populate(OpenDRIM_SoftwareIdentityConformsToProfile& instance, string& errorMessage); #endif /*OPENDRIM_SOFTWAREIDENTITYCONFORMSTOPROFILEACCESS_H_*/ opendrim-lmp-softwareinventory-1.0.0~ppa/VERSION0000644000175000017500000000000611401066502022411 0ustar guillaumeguillaume1.0.0 opendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_MemberOfAvailableSoftwareCollection/0000755000175000017500000000000011401066502032026 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000020500000000000011562 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_MemberOfAvailableSoftwareCollection/OpenDRIM_MemberOfAvailableSoftwareCollection.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_MemberOfAvailableSoftwareCollection/OpenDRIM_Membe0000644000175000017500000000703211401066502034435 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_MEMBEROFAVAILABLESOFTWARECOLLECTION_H_ #define OPENDRIM_MEMBEROFAVAILABLESOFTWARECOLLECTION_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" #include "cmpiCIM_Collection.h" #include "CIM_CollectionAccess.h" */ const static char* OpenDRIM_MemberOfAvailableSoftwareCollection_classnames[] = {"OpenDRIM_MemberOfAvailableSoftwareCollection"}; static string OpenDRIM_MemberOfAvailableSoftwareCollection_NAMESPACE = _NAMESPACE; const static string Member_role = "Member"; const static char* Member_classnames[] = {"OpenDRIM_SoftwareIdentity"}; const static string Member_NAMESPACE = _NAMESPACE; const static string Collection_role = "Collection"; const static char* Collection_classnames[] = {"OpenDRIM_SystemSpecificSoftwareInventoryCollection"}; const static string Collection_NAMESPACE = _NAMESPACE; class OpenDRIM_MemberOfAvailableSoftwareCollection { public: Objectpath Collection; bool Collection_isNULL; Objectpath Member; bool Member_isNULL; OpenDRIM_MemberOfAvailableSoftwareCollection() { Collection_isNULL = true; Member_isNULL = true; } ~OpenDRIM_MemberOfAvailableSoftwareCollection() {} string getKeys() const { return CF_toLowCase(".Collection=\"" + CF_quoteString(Collection.toString()) + "\""".Member=\"" + CF_quoteString(Member.toString()) + "\""); } int getCollection(Objectpath& value) const { if (Collection_isNULL==true) return NOT_FOUND; value = Collection; return OK; } int setCollection(const Objectpath& newValue) { Collection = newValue; Collection.setNamespace(Collection_NAMESPACE); Collection_isNULL = false; return OK; } int getMember(Objectpath& value) const { if (Member_isNULL==true) return NOT_FOUND; value = Member; return OK; } int setMember(const Objectpath& newValue) { Member = newValue; Member.setNamespace(Member_NAMESPACE); Member_isNULL = false; return OK; } }; #endif /*OPENDRIM_MEMBEROFAVAILABLESOFTWARECOLLECTION_H_*/ opendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_MemberOfAvailableSoftwareCollection/Makefile.am0000644000175000017500000000535211401066502034067 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProvider.la libcmpiSoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProvider_la_SOURCES = OpenDRIM_MemberOfAvailableSoftwareCollectionAccess.cpp OpenDRIM_MemberOfAvailableSoftwareCollectionProvider.cpp cmpiOpenDRIM_MemberOfAvailableSoftwareCollection.cpp assocOpenDRIM_MemberOfAvailableSoftwareCollection.cpp # May have to be adjusted for direct invocation libcmpiSoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProvider_la_CPPFLAGS = -I../CIM_ManagedElement -I../CIM_Collection # Uncomment the end for direct invocation, may have to be adjusted libcmpiSoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProvider_la_LIBADD = ../Common/libcmpiSoftwareInventory_Common.la #../CIM_ManagedElement/libcmpiSoftwareInventory_CIM_ManagedElementProvider.la ../CIM_Collection/libcmpiSoftwareInventory_CIM_CollectionProvider.la libcmpiSoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_MemberOfAvailableSoftwareCollection.h OpenDRIM_MemberOfAvailableSoftwareCollection.h OpenDRIM_MemberOfAvailableSoftwareCollectionAccess.h ././@LongLink0000000000000000000000000000021400000000000011562 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_MemberOfAvailableSoftwareCollection/assocOpenDRIM_MemberOfAvailableSoftwareCollection.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_MemberOfAvailableSoftwareCollection/assocOpenDRIM_0000644000175000017500000002164411401066502034525 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "assocOpenDRIM_MemberOfAvailableSoftwareCollection.h" int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage) { _E_; string _assocClass, _resultClass, _resultRole, _role; assocClass == NULL ? _assocClass = "null" : _assocClass = assocClass; resultClass == NULL ? _resultClass = "null" : _resultClass = resultClass; resultRole == NULL ? _resultRole = "null" : _resultRole = resultRole; role == NULL ? _role = "null" : _role = role; for (unsigned int i=0; i& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant) { _E_; int errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_associatorFilter(broker, ctx, cop, knownInstance, assocClass, resultClass, role, resultRole, leftToRight, errorMessage); if (errorCode == -1) return OK; if (errorCode != OK) return errorCode; if (leftToRight) { if (role != NULL && strcasecmp(role, "Member") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "Collection") != 0) return OK; CF_assert(SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_associatorMemberToCollection(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "Collection") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "Member") != 0) return OK; CF_assert(SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_associatorCollectionToMember(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_enumerateMembers(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, Member_NAMESPACE, Member_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(SoftwareInventory_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareInventory_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareInventory_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_getMember(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Member_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Member_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ManagedElement _instance; SoftwareInventory_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareInventory_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareInventory_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_enumerateCollections(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, Collection_NAMESPACE, Collection_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(SoftwareInventory_CIM_Collection_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareInventory_CIM_Collection_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareInventory_CIM_Collection_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_getCollection(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Collection_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Collection_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_Collection _instance; SoftwareInventory_CIM_Collection_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareInventory_CIM_Collection_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareInventory_CIM_Collection_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000021300000000000011561 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_MemberOfAvailableSoftwareCollection/cmpiOpenDRIM_MemberOfAvailableSoftwareCollection.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_MemberOfAvailableSoftwareCollection/cmpiOpenDRIM_M0000644000175000017500000000643311401066502034461 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_MemberOfAvailableSoftwareCollection.h" CMPIObjectPath* SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_MemberOfAvailableSoftwareCollection& instance) { _E_; Objectpath op(broker, OpenDRIM_MemberOfAvailableSoftwareCollection_classnames[0], OpenDRIM_MemberOfAvailableSoftwareCollection_NAMESPACE); if (!instance.Collection_isNULL) op.addKey("Collection", instance.Collection); if (!instance.Member_isNULL) op.addKey("Member", instance.Member); _L_; return op.getHdl(); } CMPIInstance* SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_MemberOfAvailableSoftwareCollection& instance) { _E_; Objectpath op(broker, SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_MemberOfAvailableSoftwareCollection& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("Member", instance.Member) == OK) instance.Member_isNULL = false; if (op.getKey("Collection", instance.Collection) == OK) instance.Collection_isNULL = false; _L_; } void SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_MemberOfAvailableSoftwareCollection& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Collection", instance.Collection) == OK) instance.Collection_isNULL = false; if (inst.getProperty("Member", instance.Member) == OK) instance.Member_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000021100000000000011557 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_MemberOfAvailableSoftwareCollection/cmpiOpenDRIM_MemberOfAvailableSoftwareCollection.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_MemberOfAvailableSoftwareCollection/cmpiOpenDRIM_M0000644000175000017500000000473211401066502034461 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_MEMBEROFAVAILABLESOFTWARECOLLECTION_H_ #define CMPIOPENDRIM_MEMBEROFAVAILABLESOFTWARECOLLECTION_H_ #include "OpenDRIM_MemberOfAvailableSoftwareCollection.h" CMPIObjectPath* SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_MemberOfAvailableSoftwareCollection& instance); CMPIInstance* SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_MemberOfAvailableSoftwareCollection& instance); void SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_MemberOfAvailableSoftwareCollection& instance); void SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_MemberOfAvailableSoftwareCollection& instance); #endif /*CMPIOPENDRIM_MEMBEROFAVAILABLESOFTWARECOLLECTION_H_*/ ././@LongLink0000000000000000000000000000021500000000000011563 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_MemberOfAvailableSoftwareCollection/OpenDRIM_MemberOfAvailableSoftwareCollectionAccess.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_MemberOfAvailableSoftwareCollection/OpenDRIM_Membe0000644000175000017500000002603611401066502034442 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_MemberOfAvailableSoftwareCollectionAccess.h" int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareInventory_CIM_ManagedElement_load(broker, errorMessage)); CF_assert(SoftwareInventory_CIM_Collection_load(broker, errorMessage)); */ // TODO _L_; return OK; } int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareInventory_CIM_ManagedElement_unload(errorMessage)); CF_assert(SoftwareInventory_CIM_Collection_unload(errorMessage)); */ // TODO _L_; return OK; } int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_isAssociated(const Instance& Member, const Instance& Collection, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector subjects; // Only get the instance names CF_assert(SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_enumerateMembers(broker, ctx, subjects, NULL, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_enumerateMembers(broker, ctx, subjects, NULL, false, errorMessage)); vector::iterator c = subjects.begin(); vector::iterator end = subjects.end(); for (; c != end; ++c) { bool leftToRight = true; vector associatedInstances; SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), Member_classnames[0], Collection_classnames[0], Member_role.c_str(), Collection_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_referenceMemberToCollection(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_MemberOfAvailableSoftwareCollection& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath Member_objectpath; instance.getMember(Member_objectpath); Instance Member_instance; CF_assert(SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_getMember(broker, ctx, Member_objectpath, Member_instance, NULL, errorMessage)); Objectpath Collection_objectpath; instance.getCollection(Collection_objectpath); Instance Collection_instance; CF_assert(SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_getCollection(broker, ctx, Collection_objectpath, Collection_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_isAssociated(Member_instance, Collection_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_MemberOfAvailableSoftwareCollection& newInstance, const OpenDRIM_MemberOfAvailableSoftwareCollection& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_MemberOfAvailableSoftwareCollection& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_MemberOfAvailableSoftwareCollection& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_associatorMemberToCollection(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Member_instance, const char** properties, vector& Collection_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector Collection_instances; if (discriminant=="a") CF_assert(SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_enumerateCollections(broker, ctx, Collection_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_enumerateCollections(broker, ctx, Collection_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_enumerateCollections(broker, ctx, Collection_instances, properties, false, errorMessage)); } for (size_t i=0; i& Member_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector Member_instances; if (discriminant=="a") CF_assert(SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_enumerateMembers(broker, ctx, Member_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_enumerateMembers(broker, ctx, Member_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_enumerateMembers(broker, ctx, Member_instances, properties, false, errorMessage)); } for (size_t i=0; i& Collection_instances, vector& OpenDRIM_MemberOfAvailableSoftwareCollection_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < Collection_instances.size(); i++) { OpenDRIM_MemberOfAvailableSoftwareCollection instance; instance.setMember(((Instance) Member_instance).getObjectpath()); instance.setCollection(((Instance) Collection_instances[i]).getObjectpath()); OpenDRIM_MemberOfAvailableSoftwareCollection_instances.push_back(instance); } _L_; return OK; } int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_referenceCollectionToMember(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Collection_instance, const vector& Member_instances, vector& OpenDRIM_MemberOfAvailableSoftwareCollection_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < Member_instances.size(); i++) { OpenDRIM_MemberOfAvailableSoftwareCollection instance; instance.setMember(((Instance) Member_instances[i]).getObjectpath()); instance.setCollection(((Instance) Collection_instance).getObjectpath()); OpenDRIM_MemberOfAvailableSoftwareCollection_instances.push_back(instance); } _L_; return OK; } int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_populate(OpenDRIM_MemberOfAvailableSoftwareCollection& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000021300000000000011561 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_MemberOfAvailableSoftwareCollection/OpenDRIM_MemberOfAvailableSoftwareCollectionAccess.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_MemberOfAvailableSoftwareCollection/OpenDRIM_Membe0000644000175000017500000001152611401066502034440 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_MEMBEROFAVAILABLESOFTWARECOLLECTIONACCESS_H_ #define OPENDRIM_MEMBEROFAVAILABLESOFTWARECOLLECTIONACCESS_H_ #include "SoftwareInventory_Common.h" #include "OpenDRIM_MemberOfAvailableSoftwareCollection.h" #include "assocOpenDRIM_MemberOfAvailableSoftwareCollection.h" int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_load(const CMPIBroker* broker, string& errorMessage); int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_unload(string& errorMessage); int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_MemberOfAvailableSoftwareCollection& instance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_MemberOfAvailableSoftwareCollection& newInstance, const OpenDRIM_MemberOfAvailableSoftwareCollection& oldInstance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_MemberOfAvailableSoftwareCollection& instance, string& errorMessage); int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_MemberOfAvailableSoftwareCollection& instance, string& errorMessage); int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_associatorMemberToCollection(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Member_instance, const char** properties, vector& Collection_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_associatorCollectionToMember(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Collection_instance, const char** properties, vector& Member_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_referenceMemberToCollection(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Member_instance, const vector& Collection_instances, vector& OpenDRIM_MemberOfAvailableSoftwareCollection_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_referenceCollectionToMember(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Collection_instance, const vector& Member_instances, vector& OpenDRIM_MemberOfAvailableSoftwareCollection_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_populate(OpenDRIM_MemberOfAvailableSoftwareCollection& instance, string& errorMessage); #endif /*OPENDRIM_MEMBEROFAVAILABLESOFTWARECOLLECTIONACCESS_H_*/ ././@LongLink0000000000000000000000000000021200000000000011560 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_MemberOfAvailableSoftwareCollection/assocOpenDRIM_MemberOfAvailableSoftwareCollection.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_MemberOfAvailableSoftwareCollection/assocOpenDRIM_0000644000175000017500000000655411401066502034530 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ASSOCOPENDRIM_MEMBEROFAVAILABLESOFTWARECOLLECTION_H_ #define ASSOCOPENDRIM_MEMBEROFAVAILABLESOFTWARECOLLECTION_H_ #include "OpenDRIM_MemberOfAvailableSoftwareCollectionAccess.h" int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage); int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_associator(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties, vector& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant); int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_enumerateMembers(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_getMember(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_enumerateCollections(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_getCollection(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_MEMBEROFAVAILABLESOFTWARECOLLECTION_H_*/ ././@LongLink0000000000000000000000000000021700000000000011565 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_MemberOfAvailableSoftwareCollection/OpenDRIM_MemberOfAvailableSoftwareCollectionProvider.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_MemberOfAvailableSoftwareCollection/OpenDRIM_Membe0000644000175000017500000004602311401066502034440 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_MemberOfAvailableSoftwareCollection.h" #include "OpenDRIM_MemberOfAvailableSoftwareCollectionAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProviderSetInstance SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProviderModifyInstance #endif int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_init(const CMPIBroker* broker); int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_MemberOfAvailableSoftwareCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProviderEnumInstances(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_MemberOfAvailableSoftwareCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_MemberOfAvailableSoftwareCollection instance; SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_MemberOfAvailableSoftwareCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProviderSetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_MemberOfAvailableSoftwareCollection newInstance, oldInstance; SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_toCPP(_broker, ci, newInstance); SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_MemberOfAvailableSoftwareCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_MemberOfAvailableSoftwareCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_MemberOfAvailableSoftwareCollection instance; SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_toCPP(_broker, ci, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_MemberOfAvailableSoftwareCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_MemberOfAvailableSoftwareCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_MemberOfAvailableSoftwareCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_MemberOfAvailableSoftwareCollection instance; SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_MemberOfAvailableSoftwareCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_MemberOfAvailableSoftwareCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProviderExecQuery(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* lang, const char* query) { _E_; CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } /* ---------------------------------------------------------------------------*/ /* End of Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Association Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProviderAssociatorNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_MemberOfAvailableSoftwareCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnObjectPath(rslt, associatedInstances[i].getObjectpath().getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProviderAssociators(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_MemberOfAvailableSoftwareCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnInstance(rslt, associatedInstances[i].getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProviderReferenceNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_MemberOfAvailableSoftwareCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_referenceMemberToCollection(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_referenceCollectionToMember(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_MemberOfAvailableSoftwareCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProviderReferences(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_MemberOfAvailableSoftwareCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_referenceMemberToCollection(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_referenceCollectionToMember(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_MemberOfAvailableSoftwareCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_init FAILED: " + (string) OpenDRIM_MemberOfAvailableSoftwareCollection_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_unload(errorMessage); if (errorCode != OK) { errorMessage += "SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_unload FAILED: " + (string) OpenDRIM_MemberOfAvailableSoftwareCollection_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_INIT if (SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_init(_broker) < 0) return NULL CMInstanceMIStub(SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProvider, SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProvider, _broker, SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_INIT); CMAssociationMIStub(SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProvider, SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProvider, _broker, SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-softwareinventory-1.0.0~ppa/test/0000755000175000017500000000000011401066502022324 5ustar guillaumeguillaumeopendrim-lmp-softwareinventory-1.0.0~ppa/test/testOpenDRIM_SoftwareIdentity.cpp0000644000175000017500000001653311401066502030701 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SoftwareIdentity.h" #include "OpenDRIM_SoftwareIdentityAccess.h" #include #define ToString(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value; os << endl #define ToStringInt(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << (long) instance.value; os << endl #define ToStringRef(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value.toString(); os << endl #define ToStringArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringArrayInt(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << (long) instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringRefArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i].toString(); if (i < instance.value.size()-1) os << ","; } os << "]" << endl ostream& operator<<(ostream& os, OpenDRIM_SoftwareIdentity& instance) { os << " [OpenDRIM_SoftwareIdentity]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("InstallDate", InstallDate, InstallDate_isNULL); ToString("Name", Name, Name_isNULL); ToStringArrayInt("OperationalStatus", OperationalStatus, OperationalStatus_isNULL); ToStringArray("StatusDescriptions", StatusDescriptions, StatusDescriptions_isNULL); ToString("Status", Status, Status_isNULL); ToStringInt("HealthState", HealthState, HealthState_isNULL); ToStringInt("PrimaryStatus", PrimaryStatus, PrimaryStatus_isNULL); ToStringInt("DetailedStatus", DetailedStatus, DetailedStatus_isNULL); ToStringInt("OperatingStatus", OperatingStatus, OperatingStatus_isNULL); ToStringInt("CommunicationStatus", CommunicationStatus, CommunicationStatus_isNULL); ToString("InstanceID", InstanceID, InstanceID_isNULL); ToStringInt("MajorVersion", MajorVersion, MajorVersion_isNULL); ToStringInt("MinorVersion", MinorVersion, MinorVersion_isNULL); ToStringInt("RevisionNumber", RevisionNumber, RevisionNumber_isNULL); ToStringInt("BuildNumber", BuildNumber, BuildNumber_isNULL); ToString("VersionString", VersionString, VersionString_isNULL); ToStringArray("TargetOperatingSystems", TargetOperatingSystems, TargetOperatingSystems_isNULL); ToString("Manufacturer", Manufacturer, Manufacturer_isNULL); ToStringArray("Languages", Languages, Languages_isNULL); ToStringArrayInt("Classifications", Classifications, Classifications_isNULL); ToStringArray("ClassificationDescriptions", ClassificationDescriptions, ClassificationDescriptions_isNULL); ToString("SerialNumber", SerialNumber, SerialNumber_isNULL); ToStringArray("TargetTypes", TargetTypes, TargetTypes_isNULL); ToStringArray("IdentityInfoValue", IdentityInfoValue, IdentityInfoValue_isNULL); ToStringArray("IdentityInfoType", IdentityInfoType, IdentityInfoType_isNULL); ToString("ReleaseDate", ReleaseDate, ReleaseDate_isNULL); ToString("IsEntity", IsEntity, IsEntity_isNULL); ToStringInt("ExtendedResourceType", ExtendedResourceType, ExtendedResourceType_isNULL); ToString("OtherExtendedResourceTypeDescription", OtherExtendedResourceTypeDescription, OtherExtendedResourceTypeDescription_isNULL); ToStringInt("MinExtendedResourceTypeMajorVersion", MinExtendedResourceTypeMajorVersion, MinExtendedResourceTypeMajorVersion_isNULL); ToStringInt("MinExtendedResourceTypeMinorVersion", MinExtendedResourceTypeMinorVersion, MinExtendedResourceTypeMinorVersion_isNULL); ToStringInt("MinExtendedResourceTypeRevisionNumber", MinExtendedResourceTypeRevisionNumber, MinExtendedResourceTypeRevisionNumber_isNULL); ToStringInt("MinExtendedResourceTypeBuildNumber", MinExtendedResourceTypeBuildNumber, MinExtendedResourceTypeBuildNumber_isNULL); ToStringArrayInt("TargetOSTypes", TargetOSTypes, TargetOSTypes_isNULL); os << " [\\OpenDRIM_SoftwareIdentity]" << endl; return os; } int main() { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentity_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentity_retrieve(NULL, NULL, instances, NULL, errorMessage, "ei"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } vector::iterator it = instances.begin(); for (; it != instances.end(); ++it) { cout << *it; } cout << "[\\enumInstances]" << endl; cout << endl << "[enumInstanceNames & getInstance]" << endl; instances.clear(); errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentity_retrieve(NULL, NULL, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } it = instances.begin(); for (; it != instances.end(); ++it) { errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentity_getInstance(NULL, NULL, *it, NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << *it; } cout << "[\\enumInstanceNames & getInstance]" << endl; cout << endl; errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentity_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-softwareinventory-1.0.0~ppa/test/testOpenDRIM_SAPAvailableForSoftwareInventory.cpp0000644000175000017500000001157211401066502033717 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SAPAvailableForSoftwareInventory.h" #include "OpenDRIM_SAPAvailableForSoftwareInventoryAccess.h" #include #define ToString(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value; os << endl #define ToStringInt(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << (long) instance.value; os << endl #define ToStringRef(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value.toString(); os << endl #define ToStringArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringArrayInt(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << (long) instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringRefArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i].toString(); if (i < instance.value.size()-1) os << ","; } os << "]" << endl ostream& operator<<(ostream& os, OpenDRIM_SAPAvailableForSoftwareInventory& instance) { os << " [OpenDRIM_SAPAvailableForSoftwareInventory]" << endl; ToStringRef("AvailableSAP", AvailableSAP, AvailableSAP_isNULL); ToStringRef("ManagedElement", ManagedElement, ManagedElement_isNULL); os << " [\\OpenDRIM_SAPAvailableForSoftwareInventory]" << endl; return os; } int main() { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_retrieve(NULL, NULL, instances, NULL, errorMessage, "ei"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } vector::iterator it = instances.begin(); for (; it != instances.end(); ++it) { cout << *it; } cout << "[\\enumInstances]" << endl; cout << endl << "[enumInstanceNames & getInstance]" << endl; instances.clear(); errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_retrieve(NULL, NULL, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } it = instances.begin(); for (; it != instances.end(); ++it) { errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_getInstance(NULL, NULL, *it, NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << *it; } cout << "[\\enumInstanceNames & getInstance]" << endl; cout << endl; errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-softwareinventory-1.0.0~ppa/test/Makefile.am0000644000175000017500000002266011401066502024366 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### noinst_PROGRAMS = testOpenDRIM_SystemSpecificSoftwareInventoryCollection testOpenDRIM_SoftwareIdentityResource testOpenDRIM_OrderedSoftwareInventoryComponent testOpenDRIM_InstalledSoftwareIdentity testOpenDRIM_SoftwareIdentityConformsToProfile testOpenDRIM_SoftwareIdentity testOpenDRIM_HostedSoftwareInventoryCollection testOpenDRIM_SAPAvailableForSoftwareInventory testOpenDRIM_SoftwareInventoryIdentity testOpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint testOpenDRIM_OrderedSoftwareInventoryDependency testOpenDRIM_MemberOfAvailableSoftwareCollection testOpenDRIM_RegisteredSoftwareInventoryProfile testOpenDRIM_SystemSpecificSoftwareInventoryCollection_CPPFLAGS = -I../OpenDRIM_SystemSpecificSoftwareInventoryCollection/ testOpenDRIM_SystemSpecificSoftwareInventoryCollection_SOURCES = testOpenDRIM_SystemSpecificSoftwareInventoryCollection.cpp testOpenDRIM_SystemSpecificSoftwareInventoryCollection_LDADD = ../OpenDRIM_SystemSpecificSoftwareInventoryCollection/libcmpiSoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollectionProvider.la test-OpenDRIM_SystemSpecificSoftwareInventoryCollection: testOpenDRIM_SystemSpecificSoftwareInventoryCollection ./testOpenDRIM_SystemSpecificSoftwareInventoryCollection testOpenDRIM_SoftwareIdentityResource_CPPFLAGS = -I../OpenDRIM_SoftwareIdentityResource/ testOpenDRIM_SoftwareIdentityResource_SOURCES = testOpenDRIM_SoftwareIdentityResource.cpp testOpenDRIM_SoftwareIdentityResource_LDADD = ../OpenDRIM_SoftwareIdentityResource/libcmpiSoftwareInventory_OpenDRIM_SoftwareIdentityResourceProvider.la test-OpenDRIM_SoftwareIdentityResource: testOpenDRIM_SoftwareIdentityResource ./testOpenDRIM_SoftwareIdentityResource # May have to be adjusted for direct invocation testOpenDRIM_OrderedSoftwareInventoryComponent_CPPFLAGS = -I../OpenDRIM_OrderedSoftwareInventoryComponent/ -I../null/ -I../null/ testOpenDRIM_OrderedSoftwareInventoryComponent_SOURCES = testOpenDRIM_OrderedSoftwareInventoryComponent.cpp testOpenDRIM_OrderedSoftwareInventoryComponent_LDADD = ../OpenDRIM_OrderedSoftwareInventoryComponent/libcmpiSoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProvider.la test-OpenDRIM_OrderedSoftwareInventoryComponent: testOpenDRIM_OrderedSoftwareInventoryComponent ./testOpenDRIM_OrderedSoftwareInventoryComponent # May have to be adjusted for direct invocation testOpenDRIM_InstalledSoftwareIdentity_CPPFLAGS = -I../OpenDRIM_InstalledSoftwareIdentity/ -I../null/ -I../null/ testOpenDRIM_InstalledSoftwareIdentity_SOURCES = testOpenDRIM_InstalledSoftwareIdentity.cpp testOpenDRIM_InstalledSoftwareIdentity_LDADD = ../OpenDRIM_InstalledSoftwareIdentity/libcmpiSoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProvider.la test-OpenDRIM_InstalledSoftwareIdentity: testOpenDRIM_InstalledSoftwareIdentity ./testOpenDRIM_InstalledSoftwareIdentity testOpenDRIM_SoftwareIdentityConformsToProfile_CPPFLAGS = -I../OpenDRIM_SoftwareIdentityConformsToProfile/ testOpenDRIM_SoftwareIdentityConformsToProfile_SOURCES = testOpenDRIM_SoftwareIdentityConformsToProfile.cpp testOpenDRIM_SoftwareIdentityConformsToProfile_LDADD = ../OpenDRIM_SoftwareIdentityConformsToProfile/libcmpiSoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProvider.la test-OpenDRIM_SoftwareIdentityConformsToProfile: testOpenDRIM_SoftwareIdentityConformsToProfile ./testOpenDRIM_SoftwareIdentityConformsToProfile testOpenDRIM_SoftwareIdentity_CPPFLAGS = -I../OpenDRIM_SoftwareIdentity/ testOpenDRIM_SoftwareIdentity_SOURCES = testOpenDRIM_SoftwareIdentity.cpp testOpenDRIM_SoftwareIdentity_LDADD = ../OpenDRIM_SoftwareIdentity/libcmpiSoftwareInventory_OpenDRIM_SoftwareIdentityProvider.la test-OpenDRIM_SoftwareIdentity: testOpenDRIM_SoftwareIdentity ./testOpenDRIM_SoftwareIdentity # May have to be adjusted for direct invocation testOpenDRIM_HostedSoftwareInventoryCollection_CPPFLAGS = -I../OpenDRIM_HostedSoftwareInventoryCollection/ -I../null/ -I../null/ testOpenDRIM_HostedSoftwareInventoryCollection_SOURCES = testOpenDRIM_HostedSoftwareInventoryCollection.cpp testOpenDRIM_HostedSoftwareInventoryCollection_LDADD = ../OpenDRIM_HostedSoftwareInventoryCollection/libcmpiSoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProvider.la test-OpenDRIM_HostedSoftwareInventoryCollection: testOpenDRIM_HostedSoftwareInventoryCollection ./testOpenDRIM_HostedSoftwareInventoryCollection # May have to be adjusted for direct invocation testOpenDRIM_SAPAvailableForSoftwareInventory_CPPFLAGS = -I../OpenDRIM_SAPAvailableForSoftwareInventory/ -I../null/ -I../null/ testOpenDRIM_SAPAvailableForSoftwareInventory_SOURCES = testOpenDRIM_SAPAvailableForSoftwareInventory.cpp testOpenDRIM_SAPAvailableForSoftwareInventory_LDADD = ../OpenDRIM_SAPAvailableForSoftwareInventory/libcmpiSoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProvider.la test-OpenDRIM_SAPAvailableForSoftwareInventory: testOpenDRIM_SAPAvailableForSoftwareInventory ./testOpenDRIM_SAPAvailableForSoftwareInventory # May have to be adjusted for direct invocation testOpenDRIM_SoftwareInventoryIdentity_CPPFLAGS = -I../OpenDRIM_SoftwareInventoryIdentity/ -I../null/ -I../null/ testOpenDRIM_SoftwareInventoryIdentity_SOURCES = testOpenDRIM_SoftwareInventoryIdentity.cpp testOpenDRIM_SoftwareInventoryIdentity_LDADD = ../OpenDRIM_SoftwareInventoryIdentity/libcmpiSoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProvider.la test-OpenDRIM_SoftwareInventoryIdentity: testOpenDRIM_SoftwareInventoryIdentity ./testOpenDRIM_SoftwareInventoryIdentity # May have to be adjusted for direct invocation testOpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_CPPFLAGS = -I../OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint/ -I../null/ -I../null/ testOpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_SOURCES = testOpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint.cpp testOpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_LDADD = ../OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint/libcmpiSoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProvider.la test-OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint: testOpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint ./testOpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint # May have to be adjusted for direct invocation testOpenDRIM_OrderedSoftwareInventoryDependency_CPPFLAGS = -I../OpenDRIM_OrderedSoftwareInventoryDependency/ -I../null/ -I../null/ testOpenDRIM_OrderedSoftwareInventoryDependency_SOURCES = testOpenDRIM_OrderedSoftwareInventoryDependency.cpp testOpenDRIM_OrderedSoftwareInventoryDependency_LDADD = ../OpenDRIM_OrderedSoftwareInventoryDependency/libcmpiSoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProvider.la test-OpenDRIM_OrderedSoftwareInventoryDependency: testOpenDRIM_OrderedSoftwareInventoryDependency ./testOpenDRIM_OrderedSoftwareInventoryDependency # May have to be adjusted for direct invocation testOpenDRIM_MemberOfAvailableSoftwareCollection_CPPFLAGS = -I../OpenDRIM_MemberOfAvailableSoftwareCollection/ -I../null/ -I../null/ testOpenDRIM_MemberOfAvailableSoftwareCollection_SOURCES = testOpenDRIM_MemberOfAvailableSoftwareCollection.cpp testOpenDRIM_MemberOfAvailableSoftwareCollection_LDADD = ../OpenDRIM_MemberOfAvailableSoftwareCollection/libcmpiSoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProvider.la test-OpenDRIM_MemberOfAvailableSoftwareCollection: testOpenDRIM_MemberOfAvailableSoftwareCollection ./testOpenDRIM_MemberOfAvailableSoftwareCollection testOpenDRIM_RegisteredSoftwareInventoryProfile_CPPFLAGS = -I../OpenDRIM_RegisteredSoftwareInventoryProfile/ testOpenDRIM_RegisteredSoftwareInventoryProfile_SOURCES = testOpenDRIM_RegisteredSoftwareInventoryProfile.cpp testOpenDRIM_RegisteredSoftwareInventoryProfile_LDADD = ../OpenDRIM_RegisteredSoftwareInventoryProfile/libcmpiSoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfileProvider.la test-OpenDRIM_RegisteredSoftwareInventoryProfile: testOpenDRIM_RegisteredSoftwareInventoryProfile ./testOpenDRIM_RegisteredSoftwareInventoryProfile opendrim-lmp-softwareinventory-1.0.0~ppa/test/testOpenDRIM_InstalledSoftwareIdentity.cpp0000644000175000017500000001143511401066502032535 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_InstalledSoftwareIdentity.h" #include "OpenDRIM_InstalledSoftwareIdentityAccess.h" #include #define ToString(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value; os << endl #define ToStringInt(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << (long) instance.value; os << endl #define ToStringRef(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value.toString(); os << endl #define ToStringArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringArrayInt(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << (long) instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringRefArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i].toString(); if (i < instance.value.size()-1) os << ","; } os << "]" << endl ostream& operator<<(ostream& os, OpenDRIM_InstalledSoftwareIdentity& instance) { os << " [OpenDRIM_InstalledSoftwareIdentity]" << endl; ToStringRef("System", System, System_isNULL); ToStringRef("InstalledSoftware", InstalledSoftware, InstalledSoftware_isNULL); os << " [\\OpenDRIM_InstalledSoftwareIdentity]" << endl; return os; } int main() { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_retrieve(NULL, NULL, instances, NULL, errorMessage, "ei"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } vector::iterator it = instances.begin(); for (; it != instances.end(); ++it) { cout << *it; } cout << "[\\enumInstances]" << endl; cout << endl << "[enumInstanceNames & getInstance]" << endl; instances.clear(); errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_retrieve(NULL, NULL, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } it = instances.begin(); for (; it != instances.end(); ++it) { errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_getInstance(NULL, NULL, *it, NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << *it; } cout << "[\\enumInstanceNames & getInstance]" << endl; cout << endl; errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-softwareinventory-1.0.0~ppa/test/testOpenDRIM_OrderedSoftwareInventoryDependency.cpp0000644000175000017500000001170711401066502034407 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_OrderedSoftwareInventoryDependency.h" #include "OpenDRIM_OrderedSoftwareInventoryDependencyAccess.h" #include #define ToString(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value; os << endl #define ToStringInt(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << (long) instance.value; os << endl #define ToStringRef(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value.toString(); os << endl #define ToStringArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringArrayInt(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << (long) instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringRefArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i].toString(); if (i < instance.value.size()-1) os << ","; } os << "]" << endl ostream& operator<<(ostream& os, OpenDRIM_OrderedSoftwareInventoryDependency& instance) { os << " [OpenDRIM_OrderedSoftwareInventoryDependency]" << endl; ToStringRef("Antecedent", Antecedent, Antecedent_isNULL); ToStringRef("Dependent", Dependent, Dependent_isNULL); ToString("AssignedSequence", AssignedSequence, AssignedSequence_isNULL); os << " [\\OpenDRIM_OrderedSoftwareInventoryDependency]" << endl; return os; } int main() { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_retrieve(NULL, NULL, instances, NULL, errorMessage, "ei"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } vector::iterator it = instances.begin(); for (; it != instances.end(); ++it) { cout << *it; } cout << "[\\enumInstances]" << endl; cout << endl << "[enumInstanceNames & getInstance]" << endl; instances.clear(); errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_retrieve(NULL, NULL, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } it = instances.begin(); for (; it != instances.end(); ++it) { errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_getInstance(NULL, NULL, *it, NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << *it; } cout << "[\\enumInstanceNames & getInstance]" << endl; cout << endl; errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-softwareinventory-1.0.0~ppa/test/testOpenDRIM_SoftwareInventoryIdentity.cpp0000644000175000017500000001203011401066502032603 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SoftwareInventoryIdentity.h" #include "OpenDRIM_SoftwareInventoryIdentityAccess.h" #include #define ToString(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value; os << endl #define ToStringInt(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << (long) instance.value; os << endl #define ToStringRef(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value.toString(); os << endl #define ToStringArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringArrayInt(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << (long) instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringRefArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i].toString(); if (i < instance.value.size()-1) os << ","; } os << "]" << endl ostream& operator<<(ostream& os, OpenDRIM_SoftwareInventoryIdentity& instance) { os << " [OpenDRIM_SoftwareInventoryIdentity]" << endl; ToStringRef("Antecedent", Antecedent, Antecedent_isNULL); ToStringRef("Dependent", Dependent, Dependent_isNULL); ToStringInt("UpgradeCondition", UpgradeCondition, UpgradeCondition_isNULL); ToString("OtherUpgradeCondition", OtherUpgradeCondition, OtherUpgradeCondition_isNULL); ToStringArrayInt("ElementSoftwareStatus", ElementSoftwareStatus, ElementSoftwareStatus_isNULL); os << " [\\OpenDRIM_SoftwareInventoryIdentity]" << endl; return os; } int main() { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_retrieve(NULL, NULL, instances, NULL, errorMessage, "ei"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } vector::iterator it = instances.begin(); for (; it != instances.end(); ++it) { cout << *it; } cout << "[\\enumInstances]" << endl; cout << endl << "[enumInstanceNames & getInstance]" << endl; instances.clear(); errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_retrieve(NULL, NULL, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } it = instances.begin(); for (; it != instances.end(); ++it) { errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_getInstance(NULL, NULL, *it, NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << *it; } cout << "[\\enumInstanceNames & getInstance]" << endl; cout << endl; errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-softwareinventory-1.0.0~ppa/test/testOpenDRIM_MemberOfAvailableSoftwareCollection.cpp0000644000175000017500000001160011401066502034407 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_MemberOfAvailableSoftwareCollection.h" #include "OpenDRIM_MemberOfAvailableSoftwareCollectionAccess.h" #include #define ToString(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value; os << endl #define ToStringInt(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << (long) instance.value; os << endl #define ToStringRef(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value.toString(); os << endl #define ToStringArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringArrayInt(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << (long) instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringRefArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i].toString(); if (i < instance.value.size()-1) os << ","; } os << "]" << endl ostream& operator<<(ostream& os, OpenDRIM_MemberOfAvailableSoftwareCollection& instance) { os << " [OpenDRIM_MemberOfAvailableSoftwareCollection]" << endl; ToStringRef("Collection", Collection, Collection_isNULL); ToStringRef("Member", Member, Member_isNULL); os << " [\\OpenDRIM_MemberOfAvailableSoftwareCollection]" << endl; return os; } int main() { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_retrieve(NULL, NULL, instances, NULL, errorMessage, "ei"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } vector::iterator it = instances.begin(); for (; it != instances.end(); ++it) { cout << *it; } cout << "[\\enumInstances]" << endl; cout << endl << "[enumInstanceNames & getInstance]" << endl; instances.clear(); errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_retrieve(NULL, NULL, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } it = instances.begin(); for (; it != instances.end(); ++it) { errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_getInstance(NULL, NULL, *it, NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << *it; } cout << "[\\enumInstanceNames & getInstance]" << endl; cout << endl; errorCode = SoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollection_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-softwareinventory-1.0.0~ppa/test/testOpenDRIM_SoftwareIdentityResource.cpp0000644000175000017500000001551111401066502032404 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SoftwareIdentityResource.h" #include "OpenDRIM_SoftwareIdentityResourceAccess.h" #include #define ToString(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value; os << endl #define ToStringInt(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << (long) instance.value; os << endl #define ToStringRef(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value.toString(); os << endl #define ToStringArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringArrayInt(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << (long) instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringRefArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i].toString(); if (i < instance.value.size()-1) os << ","; } os << "]" << endl ostream& operator<<(ostream& os, OpenDRIM_SoftwareIdentityResource& instance) { os << " [OpenDRIM_SoftwareIdentityResource]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("InstallDate", InstallDate, InstallDate_isNULL); ToStringArrayInt("OperationalStatus", OperationalStatus, OperationalStatus_isNULL); ToStringArray("StatusDescriptions", StatusDescriptions, StatusDescriptions_isNULL); ToString("Status", Status, Status_isNULL); ToStringInt("HealthState", HealthState, HealthState_isNULL); ToStringInt("PrimaryStatus", PrimaryStatus, PrimaryStatus_isNULL); ToStringInt("DetailedStatus", DetailedStatus, DetailedStatus_isNULL); ToStringInt("OperatingStatus", OperatingStatus, OperatingStatus_isNULL); ToStringInt("CommunicationStatus", CommunicationStatus, CommunicationStatus_isNULL); ToStringInt("EnabledState", EnabledState, EnabledState_isNULL); ToString("OtherEnabledState", OtherEnabledState, OtherEnabledState_isNULL); ToStringInt("RequestedState", RequestedState, RequestedState_isNULL); ToStringInt("EnabledDefault", EnabledDefault, EnabledDefault_isNULL); ToString("TimeOfLastStateChange", TimeOfLastStateChange, TimeOfLastStateChange_isNULL); ToStringArrayInt("AvailableRequestedStates", AvailableRequestedStates, AvailableRequestedStates_isNULL); ToStringInt("TransitioningToState", TransitioningToState, TransitioningToState_isNULL); ToString("SystemCreationClassName", SystemCreationClassName, SystemCreationClassName_isNULL); ToString("SystemName", SystemName, SystemName_isNULL); ToString("CreationClassName", CreationClassName, CreationClassName_isNULL); ToString("Name", Name, Name_isNULL); ToString("AccessInfo", AccessInfo, AccessInfo_isNULL); ToString("OtherInfoFormatDescription", OtherInfoFormatDescription, OtherInfoFormatDescription_isNULL); ToStringInt("AccessContext", AccessContext, AccessContext_isNULL); ToString("OtherAccessContext", OtherAccessContext, OtherAccessContext_isNULL); ToStringInt("InfoFormat", InfoFormat, InfoFormat_isNULL); ToStringInt("ResourceType", ResourceType, ResourceType_isNULL); ToStringInt("ExtendedResourceType", ExtendedResourceType, ExtendedResourceType_isNULL); ToString("OtherResourceType", OtherResourceType, OtherResourceType_isNULL); os << " [\\OpenDRIM_SoftwareIdentityResource]" << endl; return os; } int main() { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityResource_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityResource_retrieve(NULL, NULL, instances, NULL, errorMessage, "ei"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } vector::iterator it = instances.begin(); for (; it != instances.end(); ++it) { cout << *it; } cout << "[\\enumInstances]" << endl; cout << endl << "[enumInstanceNames & getInstance]" << endl; instances.clear(); errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityResource_retrieve(NULL, NULL, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } it = instances.begin(); for (; it != instances.end(); ++it) { errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityResource_getInstance(NULL, NULL, *it, NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << *it; } cout << "[\\enumInstanceNames & getInstance]" << endl; cout << endl; errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityResource_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-softwareinventory-1.0.0~ppa/test/testOpenDRIM_OrderedSoftwareInventoryComponent.cpp0000644000175000017500000001172311401066502034271 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_OrderedSoftwareInventoryComponent.h" #include "OpenDRIM_OrderedSoftwareInventoryComponentAccess.h" #include #define ToString(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value; os << endl #define ToStringInt(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << (long) instance.value; os << endl #define ToStringRef(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value.toString(); os << endl #define ToStringArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringArrayInt(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << (long) instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringRefArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i].toString(); if (i < instance.value.size()-1) os << ","; } os << "]" << endl ostream& operator<<(ostream& os, OpenDRIM_OrderedSoftwareInventoryComponent& instance) { os << " [OpenDRIM_OrderedSoftwareInventoryComponent]" << endl; ToStringRef("GroupComponent", GroupComponent, GroupComponent_isNULL); ToStringRef("PartComponent", PartComponent, PartComponent_isNULL); ToString("AssignedSequence", AssignedSequence, AssignedSequence_isNULL); os << " [\\OpenDRIM_OrderedSoftwareInventoryComponent]" << endl; return os; } int main() { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_retrieve(NULL, NULL, instances, NULL, errorMessage, "ei"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } vector::iterator it = instances.begin(); for (; it != instances.end(); ++it) { cout << *it; } cout << "[\\enumInstances]" << endl; cout << endl << "[enumInstanceNames & getInstance]" << endl; instances.clear(); errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_retrieve(NULL, NULL, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } it = instances.begin(); for (; it != instances.end(); ++it) { errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_getInstance(NULL, NULL, *it, NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << *it; } cout << "[\\enumInstanceNames & getInstance]" << endl; cout << endl; errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-softwareinventory-1.0.0~ppa/test/testOpenDRIM_HostedSoftwareInventoryCollection.cpp0000644000175000017500000001156111401066502034264 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_HostedSoftwareInventoryCollection.h" #include "OpenDRIM_HostedSoftwareInventoryCollectionAccess.h" #include #define ToString(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value; os << endl #define ToStringInt(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << (long) instance.value; os << endl #define ToStringRef(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value.toString(); os << endl #define ToStringArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringArrayInt(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << (long) instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringRefArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i].toString(); if (i < instance.value.size()-1) os << ","; } os << "]" << endl ostream& operator<<(ostream& os, OpenDRIM_HostedSoftwareInventoryCollection& instance) { os << " [OpenDRIM_HostedSoftwareInventoryCollection]" << endl; ToStringRef("Antecedent", Antecedent, Antecedent_isNULL); ToStringRef("Dependent", Dependent, Dependent_isNULL); os << " [\\OpenDRIM_HostedSoftwareInventoryCollection]" << endl; return os; } int main() { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_retrieve(NULL, NULL, instances, NULL, errorMessage, "ei"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } vector::iterator it = instances.begin(); for (; it != instances.end(); ++it) { cout << *it; } cout << "[\\enumInstances]" << endl; cout << endl << "[enumInstanceNames & getInstance]" << endl; instances.clear(); errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_retrieve(NULL, NULL, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } it = instances.begin(); for (; it != instances.end(); ++it) { errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_getInstance(NULL, NULL, *it, NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << *it; } cout << "[\\enumInstanceNames & getInstance]" << endl; cout << endl; errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/test/testOpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint.cppopendrim-lmp-softwareinventory-1.0.0~ppa/test/testOpenDRIM_ComputerSystemSoftwareIdentityResourceAcc0000644000175000017500000001206111401066502035153 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint.h" #include "OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointAccess.h" #include #define ToString(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value; os << endl #define ToStringInt(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << (long) instance.value; os << endl #define ToStringRef(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value.toString(); os << endl #define ToStringArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringArrayInt(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << (long) instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringRefArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i].toString(); if (i < instance.value.size()-1) os << ","; } os << "]" << endl ostream& operator<<(ostream& os, OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint& instance) { os << " [OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint]" << endl; ToStringRef("Antecedent", Antecedent, Antecedent_isNULL); ToStringRef("Dependent", Dependent, Dependent_isNULL); os << " [\\OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint]" << endl; return os; } int main() { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_retrieve(NULL, NULL, instances, NULL, errorMessage, "ei"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } vector::iterator it = instances.begin(); for (; it != instances.end(); ++it) { cout << *it; } cout << "[\\enumInstances]" << endl; cout << endl << "[enumInstanceNames & getInstance]" << endl; instances.clear(); errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_retrieve(NULL, NULL, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } it = instances.begin(); for (; it != instances.end(); ++it) { errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_getInstance(NULL, NULL, *it, NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << *it; } cout << "[\\enumInstanceNames & getInstance]" << endl; cout << endl; errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/test/testOpenDRIM_SystemSpecificSoftwareInventoryCollection.cppopendrim-lmp-softwareinventory-1.0.0~ppa/test/testOpenDRIM_SystemSpecificSoftwareInventoryCollection0000644000175000017500000001207311401066502035206 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SystemSpecificSoftwareInventoryCollection.h" #include "OpenDRIM_SystemSpecificSoftwareInventoryCollectionAccess.h" #include #define ToString(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value; os << endl #define ToStringInt(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << (long) instance.value; os << endl #define ToStringRef(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value.toString(); os << endl #define ToStringArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringArrayInt(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << (long) instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringRefArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i].toString(); if (i < instance.value.size()-1) os << ","; } os << "]" << endl ostream& operator<<(ostream& os, OpenDRIM_SystemSpecificSoftwareInventoryCollection& instance) { os << " [OpenDRIM_SystemSpecificSoftwareInventoryCollection]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("InstanceID", InstanceID, InstanceID_isNULL); os << " [\\OpenDRIM_SystemSpecificSoftwareInventoryCollection]" << endl; return os; } int main() { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_retrieve(NULL, NULL, instances, NULL, errorMessage, "ei"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } vector::iterator it = instances.begin(); for (; it != instances.end(); ++it) { cout << *it; } cout << "[\\enumInstances]" << endl; cout << endl << "[enumInstanceNames & getInstance]" << endl; instances.clear(); errorCode = SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_retrieve(NULL, NULL, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } it = instances.begin(); for (; it != instances.end(); ++it) { errorCode = SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_getInstance(NULL, NULL, *it, NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << *it; } cout << "[\\enumInstanceNames & getInstance]" << endl; cout << endl; errorCode = SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-softwareinventory-1.0.0~ppa/test/testOpenDRIM_RegisteredSoftwareInventoryProfile.cpp0000644000175000017500000001277011401066502034443 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_RegisteredSoftwareInventoryProfile.h" #include "OpenDRIM_RegisteredSoftwareInventoryProfileAccess.h" #include #define ToString(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value; os << endl #define ToStringInt(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << (long) instance.value; os << endl #define ToStringRef(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value.toString(); os << endl #define ToStringArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringArrayInt(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << (long) instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringRefArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i].toString(); if (i < instance.value.size()-1) os << ","; } os << "]" << endl ostream& operator<<(ostream& os, OpenDRIM_RegisteredSoftwareInventoryProfile& instance) { os << " [OpenDRIM_RegisteredSoftwareInventoryProfile]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("InstanceID", InstanceID, InstanceID_isNULL); ToStringInt("RegisteredOrganization", RegisteredOrganization, RegisteredOrganization_isNULL); ToString("OtherRegisteredOrganization", OtherRegisteredOrganization, OtherRegisteredOrganization_isNULL); ToString("RegisteredName", RegisteredName, RegisteredName_isNULL); ToString("RegisteredVersion", RegisteredVersion, RegisteredVersion_isNULL); ToStringArrayInt("AdvertiseTypes", AdvertiseTypes, AdvertiseTypes_isNULL); ToStringArray("AdvertiseTypeDescriptions", AdvertiseTypeDescriptions, AdvertiseTypeDescriptions_isNULL); os << " [\\OpenDRIM_RegisteredSoftwareInventoryProfile]" << endl; return os; } int main() { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_retrieve(NULL, NULL, instances, NULL, errorMessage, "ei"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } vector::iterator it = instances.begin(); for (; it != instances.end(); ++it) { cout << *it; } cout << "[\\enumInstances]" << endl; cout << endl << "[enumInstanceNames & getInstance]" << endl; instances.clear(); errorCode = SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_retrieve(NULL, NULL, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } it = instances.begin(); for (; it != instances.end(); ++it) { errorCode = SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_getInstance(NULL, NULL, *it, NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << *it; } cout << "[\\enumInstanceNames & getInstance]" << endl; cout << endl; errorCode = SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-softwareinventory-1.0.0~ppa/test/testOpenDRIM_SoftwareIdentityConformsToProfile.cpp0000644000175000017500000001163011401066502034225 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SoftwareIdentityConformsToProfile.h" #include "OpenDRIM_SoftwareIdentityConformsToProfileAccess.h" #include #define ToString(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value; os << endl #define ToStringInt(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << (long) instance.value; os << endl #define ToStringRef(name, value, condition) os << (string) " " + name + (string) "="; instance.condition ? os << "NULL" : os << instance.value.toString(); os << endl #define ToStringArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringArrayInt(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << (long) instance.value[i]; if (i < instance.value.size()-1) os << ","; } os << "]" << endl #define ToStringRefArray(name, value, condition) os << (string) " " + name + (string) "=["; for (size_t i = 0; i < instance.value.size(); i++) { os << instance.value[i].toString(); if (i < instance.value.size()-1) os << ","; } os << "]" << endl ostream& operator<<(ostream& os, OpenDRIM_SoftwareIdentityConformsToProfile& instance) { os << " [OpenDRIM_SoftwareIdentityConformsToProfile]" << endl; ToStringRef("ConformantStandard", ConformantStandard, ConformantStandard_isNULL); ToStringRef("ManagedElement", ManagedElement, ManagedElement_isNULL); os << " [\\OpenDRIM_SoftwareIdentityConformsToProfile]" << endl; return os; } int main() { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_retrieve(NULL, NULL, instances, NULL, errorMessage, "ei"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } vector::iterator it = instances.begin(); for (; it != instances.end(); ++it) { cout << *it; } cout << "[\\enumInstances]" << endl; cout << endl << "[enumInstanceNames & getInstance]" << endl; instances.clear(); errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_retrieve(NULL, NULL, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } it = instances.begin(); for (; it != instances.end(); ++it) { errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_getInstance(NULL, NULL, *it, NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << *it; } cout << "[\\enumInstanceNames & getInstance]" << endl; cout << endl; errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfile_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-softwareinventory-1.0.0~ppa/acinclude.m40000644000175000017500000002111411401066502023535 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### AC_DEFUN([SHOW_COPYRIGHT], [ echo "################################################################################# # Linux Management Providers (LMP), SoftwareInventory provider package # Copyright (C) 2009 Nodir Nazarov # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# " ] ) AC_DEFUN([CHECK_CIMSERVER], [ AC_MSG_CHECKING(for CIM servers) if test x"$CIMSERVER" == x then AC_MSG_ERROR([[please define the CIMSERVER variable (see ./configure --help)]]) fi if test "$CIMSERVER" != pegasus && test "$CIMSERVER" != sfcb && test "$CIMSERVER" != openwbem then AC_MSG_ERROR([[please define the CIMSERVER variable (see ./configure --help)]]) fi if test "$CIMSERVER" == pegasus then if !( command -v cimmof > /dev/null ) then AC_MSG_ERROR([[no. the Pegasus mof compiler could not be found (cimmof)]]) fi fi if test "$CIMSERVER" == openwbem then if !( command -v owmofc > /dev/null) then AC_MSG_ERROR([[no. the OpenWBEM mof compiler could not be found (owmofc)]]) fi fi if test "$CIMSERVER" == sfcb then if !( command -v sfcbd > /dev/null ) then AC_MSG_ERROR([[no. the SBLIM sfcb deamon could not be found (sfcbd)]]) fi if !( command -v sfcbstage > /dev/null ) then AC_MSG_ERROR([[no. the SBLIM mof stager could not be found (sfcbstage)]]) fi if !( command -v sfcbrepos > /dev/null ) then AC_MSG_ERROR([[no. the SBLIM repository builder could no be found (sfcbrepos)]]) fi fi if test "$CIMSERVER" == pegasus then if test x"$prefix" == xNONE then if test "$HW" == X86_64 || test "$HW" == IA64 then PROVIDERDIR_TMP=/usr/lib64/Pegasus/providers COMMONLIBDIR_TMP=/usr/lib64 OPENDRIMCOMMONLIBDIR_TMP=/usr/lib64 else PROVIDERDIR_TMP=/usr/lib/Pegasus/providers COMMONLIBDIR_TMP=/usr/lib OPENDRIMCOMMONLIBDIR_TMP=/usr/lib fi OPENDRIMCOMMONINCLUDE_TMP=/usr/include/OpenDRIM else if test "$HW" == X86_64 || test "$HW" == IA64 then PROVIDERDIR_TMP=$prefix/lib64/Pegasus/providers COMMONLIBDIR_TMP=$prefix/lib64 OPENDRIMCOMMONLIBDIR_TMP=$prefix/lib64 else PROVIDERDIR_TMP=$prefix/lib/Pegasus/providers COMMONLIBDIR_TMP=$prefix/lib OPENDRIMCOMMONLIBDIR_TMP=$prefix/lib fi OPENDRIMCOMMONINCLUDE_TMP=$prefix/include/OpenDRIM fi if test x"$PEGASUS_HOME" != x then PROVIDERDIR_TMP=$PEGASUS_HOME/lib COMMONLIBDIR_TMP=$PEGASUS_HOME/lib OPENDRIMCOMMONLIBDIR_TMP=$PEGASUS_HOME/lib OPENDRIMCOMMONINCLUDE_TMP=$PEGASUS_HOME/include/OpenDRIM fi fi if test "$CIMSERVER" == sfcb then if test x"$prefix" == xNONE then PROVIDERDIR_TMP=$ac_default_prefix/lib/cmpi COMMONLIBDIR_TMP=$ac_default_prefix/lib OPENDRIMCOMMONLIBDIR_TMP=$ac_default_prefix/lib OPENDRIMCOMMONINCLUDE_TMP=$ac_default_prefix/include/OpenDRIM else PROVIDERDIR_TMP=$prefix/lib/cmpi COMMONLIBDIR_TMP=$prefix/lib OPENDRIMCOMMONLIBDIR_TMP=$prefix/lib OPENDRIMCOMMONINCLUDE_TMP=$prefix/include/OpenDRIM fi fi if test "$CIMSERVER" == openwbem then if test x"$prefix" == xNONE then if test "$HW" == X86_64 || test "$HW" == IA64 then PROVIDERDIR_TMP=/usr/lib64/openwbem/cmpiproviders COMMONLIBDIR_TMP=/usr/lib64 OPENDRIMCOMMONLIBDIR_TMP=/usr/lib64 else PROVIDERDIR_TMP=/usr/lib/openwbem/cmpiproviders COMMONLIBDIR_TMP=/usr/lib OPENDRIMCOMMONLIBDIR_TMP=/usr/lib fi OPENDRIMCOMMONINCLUDE_TMP=/usr/include/OpenDRIM else PROVIDERDIR_TMP=$prefix/lib/openwbem/cmpiproviders COMMONLIBDIR_TMP=$prefix/lib OPENDRIMCOMMONLIBDIR_TMP=$prefix/lib OPENDRIMCOMMONINCLUDE_TMP=$prefix/include/OpenDRIM fi fi if test x"$PROVIDERDIR" = x then PROVIDERDIR=$PROVIDERDIR_TMP fi if test x"$COMMONLIBDIR" = x then COMMONLIBDIR=$COMMONLIBDIR_TMP fi if test x"$OPENDRIMCOMMONLIBDIR" = x then OPENDRIMCOMMONLIBDIR=$OPENDRIMCOMMONLIBDIR_TMP fi if test x"$OPENDRIMCOMMONINCLUDE" = x then OPENDRIMCOMMONINCLUDE=$OPENDRIMCOMMONINCLUDE_TMP fi TEMP_CPPFLAGS="$CPPFLAGS -D_REENTRANT" CFLAGS="-Wall -Wunused -fPIC -O2 $CFLAGS" CXXFLAGS="-Wall -Wunused -fPIC -fno-rtti -fno-exceptions -O2 $CXXFLAGS" LDFLAGS="$LDFLAGS -L. -L$PROVIDERDIR -L$COMMONLIBDIR" AC_MSG_RESULT(yes) ] ) AC_DEFUN([CHECK_CIMNAMESPACE], [ if test x"$CIMNAMESPACE" == x then CIMNAMESPACE=root/cimv2 fi TEMP_CPPFLAGS="$TEMP_CPPFLAGS -D_NAMESPACE=\\\"$CIMNAMESPACE\\\"" ] ) AC_DEFUN([CHECK_INTEROPNAMESPACE], [ if test x"$INTEROPNAMESPACE" == x then if test "$CIMSERVER" == pegasus then INTEROPNAMESPACE=Interop fi if test "$CIMSERVER" == openwbem then INTEROPNAMESPACE=root/Interop fi if test "$CIMSERVER" == sfcb then INTEROPNAMESPACE=Interop fi fi TEMP_CPPFLAGS="$TEMP_CPPFLAGS -D_INTEROP_NAMESPACE=\\\"$INTEROPNAMESPACE\\\"" ] ) AC_DEFUN([CHECK_OPENDRIMCOMMONHEADERS], [ AC_MSG_CHECKING(for OpenDRIM Common headers) _HEADERS="Common.h Datastore.h CMPIBroking.h Association.h Indication.h Instance.h Objectpath.h Transtype.h" for _HEADER in $_HEADERS do if !( test -e $OPENDRIMCOMMONINCLUDE/$_HEADER ) then AC_MSG_ERROR([[no. Could not find OpenDRIM Common headers:] $_HEADER]) fi done AC_MSG_RESULT(yes) ] ) AC_DEFUN([CHECK_OPENDRIMCOMMONLIBRARY], [ AC_MSG_CHECKING(for OpenDRIM Common library) if test -e $OPENDRIMCOMMONLIBDIR/libopendrim.so then AC_MSG_RESULT(yes) else AC_MSG_ERROR([[no. The OpenDRIM Common library could not be found (libopendrim.so)]]) fi ] ) AC_DEFUN([_CHECK_CMPIHEADERS], [ AC_MSG_CHECKING($1) AC_TRY_LINK( [ #include #include #include ], [ CMPIBroker broker; CMPIStatus status = {CMPI_RC_OK, NULL}; CMPIString *s = CMNewString(&broker, "TEST", &status); ], [ have_CMPI=yes ], [ have_CMPI=no ]) ]) AC_DEFUN([CHECK_CMPIHEADERS], [ AC_MSG_CHECKING(for CMPI headers) CPPFLAGS="$TEMP_CPPFLAGS -DCMPI_PLATFORM_LINUX_GENERIC_GNU -I$OPENDRIMCOMMONINCLUDE/cmpi" _CHECK_CMPIHEADERS($OPENDRIMCOMMONINCLUDE) if test "$have_CMPI" == "yes" then CPPFLAGS="$TEMP_CPPFLAGS" AC_MSG_RESULT(yes) else _CHECK_CMPIHEADERS(standard) if test "$have_CMPI" == "yes" then CPPFLAGS="$TEMP_CPPFLAGS" AC_MSG_RESULT(yes) fi fi if test "$have_CMPI" == "no" then AC_MSG_ERROR([[no. The CMPI headers could not be found (cmpidt.h, cmpimacs.h, cmpift.h)]]) fi ] ) opendrim-lmp-softwareinventory-1.0.0~ppa/Common/0000755000175000017500000000000011401066502022575 5ustar guillaumeguillaumeopendrim-lmp-softwareinventory-1.0.0~ppa/Common/Makefile.am0000644000175000017500000000351211401066502024632 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### commonlibdir = @COMMONLIBDIR@ commonlib_LTLIBRARIES = libcmpiSoftwareInventory_Common.la libcmpiSoftwareInventory_Common_la_SOURCES = SoftwareInventory_Common.cpp libcmpiSoftwareInventory_Common_la_LDFLAGS = -avoid-version libcmpiSoftwareInventory_Common_la_LIBADD = -lopendrim noinst_HEADERS = SoftwareInventory_Common.h opendrim-lmp-softwareinventory-1.0.0~ppa/Common/SoftwareInventory_Common.h0000644000175000017500000000321411401066502027766 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef SOFTWAREINVENTORY_COMMON_H_ #define SOFTWAREINVENTORY_COMMON_H_ #include #endif /*SOFTWAREINVENTORY_COMMON_H_*/ opendrim-lmp-softwareinventory-1.0.0~ppa/Common/SoftwareInventory_Common.cpp0000644000175000017500000000305511401066502030324 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "SoftwareInventory_Common.h" opendrim-lmp-softwareinventory-1.0.0~ppa/configure.ac0000644000175000017500000001331511401066502023636 0ustar guillaumeguillaume# Process this file with autoconf to produce a configure script. ############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### AC_PREREQ(2.59) AC_COPYRIGHT([[############################################################################### Note: This Copyright statement covers the OpenDRIM original parts of this file. It does NOT concern the parts generated by autoconf. Linux Management Providers (LMP), SoftwareInventory provider package Copyright (C) 2009 Nodir Nazarov This program is being developed under the "OpenDRIM" project. The "OpenDRIM" project web page: http://opendrim.sourceforge.net The "OpenDRIM" project mailing list: opendrim@googlegroups.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ###############################################################################]]) AC_INIT(SoftwareInventory provider package, -, -) SHOW_COPYRIGHT AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE([foreign]) AC_CANONICAL_HOST case $host_cpu in i*86) HW=INTEL;; s390*) HW=S390;; ppc*) HW=PPC;; x86_64) HW=X86_64;; ia64) HW=IA64;; **) HW=GENERIC;; esac # Configuration AC_ARG_VAR([CIMSERVER],[the target CIM server (pegasus|sfcb|openwbem).]) AC_ARG_VAR([CIMNAMESPACE],[the target CIM namespace (default: root/cimv2)]) AC_ARG_VAR([INTEROPNAMESPACE],[the target interoperability namespace (default: Interop (pegasus and sfcb) or root/Interop (openwbem))]) AC_ARG_VAR([PROVIDERDIR],[the directory where the CMPI providers will be installed.]) AC_ARG_VAR([COMMONLIBDIR],[the directory where the package common libraries will be installed.]) # Checks for programs. AC_PROG_CXX AC_PROG_CC AC_PROG_INSTALL AC_PROG_LIBTOOL # Check for CIM server (defined in acinclude.m4) CHECK_CIMSERVER # Check for CIM namespace (defined in acinclude.m4) CHECK_CIMNAMESPACE # Check for interoperability namespace (defined in acinclude.m4) CHECK_INTEROPNAMESPACE # Check for OpenDRIM Common library (defined in acinclude.m4) CHECK_OPENDRIMCOMMONLIBRARY # Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS([pthread.h]) # Check for CMPI headers (defined in acinclude.m4) CHECK_CMPIHEADERS # Check for OpenDRIM Common headers (defined in acinclude.m4) CHECK_OPENDRIMCOMMONHEADERS # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_C_CONST AC_C_INLINE AC_TYPE_MODE_T AC_TYPE_OFF_T AC_TYPE_SIZE_T AC_HEADER_TIME AC_STRUCT_TM AC_CONFIG_FILES([Makefile Common/Makefile OpenDRIM_SystemSpecificSoftwareInventoryCollection/Makefile OpenDRIM_SoftwareIdentityResource/Makefile OpenDRIM_OrderedSoftwareInventoryComponent/Makefile OpenDRIM_InstalledSoftwareIdentity/Makefile OpenDRIM_SoftwareIdentityConformsToProfile/Makefile OpenDRIM_SoftwareIdentity/Makefile OpenDRIM_HostedSoftwareInventoryCollection/Makefile OpenDRIM_SAPAvailableForSoftwareInventory/Makefile OpenDRIM_SoftwareInventoryIdentity/Makefile OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint/Makefile OpenDRIM_OrderedSoftwareInventoryDependency/Makefile OpenDRIM_MemberOfAvailableSoftwareCollection/Makefile OpenDRIM_RegisteredSoftwareInventoryProfile/Makefile test/Makefile]) CFLAGS="$CFLAGS -D$HW -DCMPI_PLATFORM_LINUX_GENERIC_GNU -I../Common -I$OPENDRIMCOMMONINCLUDE -I$OPENDRIMCOMMONINCLUDE/cmpi" CPPFLAGS="$CPPFLAGS -D$HW -DCMPI_PLATFORM_LINUX_GENERIC_GNU -I../Common -I$OPENDRIMCOMMONINCLUDE -I$OPENDRIMCOMMONINCLUDE/cmpi" echo "-------------------------------------------------------" echo "CIMSERVER: " $CIMSERVER echo "PROVIDERDIR: " $PROVIDERDIR echo "COMMONLIBDIR: " $COMMONLIBDIR echo "CFLAGS : " $CFLAGS echo "CXXFLAGS : " $CXXFLAGS echo "CPPFLAGS:" $CPPFLAGS echo "-------------------------------------------------------" AC_OUTPUT echo "You may now run make" opendrim-lmp-softwareinventory-1.0.0~ppa/TODO0000644000175000017500000000010111401066502022025 0ustar guillaumeguillaumeTODO for Major.Minor.Revision ========================= // TODO opendrim-lmp-softwareinventory-1.0.0~ppa/INSTALL0000644000175000017500000000670411401066502022405 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### --------------------------------------------------------- BUILD --------------------------------------------------------- ./configure CIMSERVER= // For seeing the possible options: ./configure --help make --------------------------------------------------------- INSTALLATION --------------------------------------------------------- make install // Complile and copy the libraries to the provider library directory make postinstall // Register the providers --------------------------------------------------------- REMOVAL --------------------------------------------------------- make preuninstall // Deregister the providers make uninstall // Delete the libraries from the provider directory --------------------------------------------------------- CLEANUP --------------------------------------------------------- make clean --------------------------------------------------------- DEBUG --------------------------------------------------------- Configure (./configure) the source code with 'CPPFLAGS=-D__DEBUG__'. The debugging information is printed in a file called 'cmpi_prov_debug.txt'. OpenPegasus from source: ----------------------- The file is located in the directory where you executed 'cimserver' (to start the CIM server). OpenPegasus from RPM: -------------------- If Pegasus is installed from RPM the file is located in the '/var/lib/Pegasus/cache' directory. SBLIM sfcb: ---------- The file is located in the directory where you executed 'sfcbd' (to start the CIM server). OpenWBEM: -------- // TODO --------------------------------------------------------- OFFLINE TEST --------------------------------------------------------- make test- If you enabled the debugging information, 'cmpi_prov_debug.txt' is created in the 'test' directory. The test MAY BE impossible to run for associations. If it is the case you have to install the provider package and test the association providers online (CIM server running). opendrim-lmp-softwareinventory-1.0.0~ppa/AUTHORS0000644000175000017500000000012611401066502022414 0ustar guillaumeguillaumeNodir Nazarov Guillaume BOTTEX opendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SAPAvailableForSoftwareInventory/0000755000175000017500000000000011401066502031326 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000020700000000000011564 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SAPAvailableForSoftwareInventory/OpenDRIM_SAPAvailableForSoftwareInventoryAccess.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SAPAvailableForSoftwareInventory/OpenDRIM_SAPAvail0000644000175000017500000002645011401066502034315 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_SAPAvailableForSoftwareInventoryAccess.h" int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareInventory_CIM_ServiceAccessPoint_load(broker, errorMessage)); CF_assert(SoftwareInventory_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareInventory_CIM_ServiceAccessPoint_unload(errorMessage)); CF_assert(SoftwareInventory_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_isAssociated(const Instance& AvailableSAP, const Instance& ManagedElement, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector subjects; // Only get the instance names CF_assert(SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_enumerateAvailableSAPs(broker, ctx, subjects, NULL, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_enumerateAvailableSAPs(broker, ctx, subjects, NULL, false, errorMessage)); vector::iterator c = subjects.begin(); vector::iterator end = subjects.end(); for (; c != end; ++c) { bool leftToRight = true; vector associatedInstances; SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), AvailableSAP_classnames[0], ManagedElement_classnames[0], AvailableSAP_role.c_str(), ManagedElement_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_referenceAvailableSAPToManagedElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_SAPAvailableForSoftwareInventory& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath AvailableSAP_objectpath; instance.getAvailableSAP(AvailableSAP_objectpath); Instance AvailableSAP_instance; CF_assert(SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_getAvailableSAP(broker, ctx, AvailableSAP_objectpath, AvailableSAP_instance, NULL, errorMessage)); Objectpath ManagedElement_objectpath; instance.getManagedElement(ManagedElement_objectpath); Instance ManagedElement_instance; CF_assert(SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_getManagedElement(broker, ctx, ManagedElement_objectpath, ManagedElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_isAssociated(AvailableSAP_instance, ManagedElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SAPAvailableForSoftwareInventory& newInstance, const OpenDRIM_SAPAvailableForSoftwareInventory& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SAPAvailableForSoftwareInventory& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SAPAvailableForSoftwareInventory& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_associatorAvailableSAPToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AvailableSAP_instance, const char** properties, vector& ManagedElement_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector ManagedElement_instances; if (discriminant=="a") CF_assert(SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); } for (size_t i=0; i& AvailableSAP_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector AvailableSAP_instances; if (discriminant=="a") CF_assert(SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_enumerateAvailableSAPs(broker, ctx, AvailableSAP_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_enumerateAvailableSAPs(broker, ctx, AvailableSAP_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_enumerateAvailableSAPs(broker, ctx, AvailableSAP_instances, properties, false, errorMessage)); } for (size_t i=0; i& ManagedElement_instances, vector& OpenDRIM_SAPAvailableForSoftwareInventory_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < ManagedElement_instances.size(); i++) { OpenDRIM_SAPAvailableForSoftwareInventory instance; instance.setAvailableSAP(((Instance) AvailableSAP_instance).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instances[i]).getObjectpath()); OpenDRIM_SAPAvailableForSoftwareInventory_instances.push_back(instance); } _L_; return OK; } int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_referenceManagedElementToAvailableSAP(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& AvailableSAP_instances, vector& OpenDRIM_SAPAvailableForSoftwareInventory_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < AvailableSAP_instances.size(); i++) { OpenDRIM_SAPAvailableForSoftwareInventory instance; instance.setAvailableSAP(((Instance) AvailableSAP_instances[i]).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instance).getObjectpath()); OpenDRIM_SAPAvailableForSoftwareInventory_instances.push_back(instance); } _L_; return OK; } int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_populate(OpenDRIM_SAPAvailableForSoftwareInventory& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SAPAvailableForSoftwareInventory/Makefile.am0000644000175000017500000000533611401066502033371 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProvider.la libcmpiSoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProvider_la_SOURCES = OpenDRIM_SAPAvailableForSoftwareInventoryAccess.cpp OpenDRIM_SAPAvailableForSoftwareInventoryProvider.cpp cmpiOpenDRIM_SAPAvailableForSoftwareInventory.cpp assocOpenDRIM_SAPAvailableForSoftwareInventory.cpp # May have to be adjusted for direct invocation libcmpiSoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProvider_la_CPPFLAGS = -I../CIM_ServiceAccessPoint -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiSoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProvider_la_LIBADD = ../Common/libcmpiSoftwareInventory_Common.la #../CIM_ServiceAccessPoint/libcmpiSoftwareInventory_CIM_ServiceAccessPointProvider.la ../CIM_ManagedElement/libcmpiSoftwareInventory_CIM_ManagedElementProvider.la libcmpiSoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_SAPAvailableForSoftwareInventory.h OpenDRIM_SAPAvailableForSoftwareInventory.h OpenDRIM_SAPAvailableForSoftwareInventoryAccess.h ././@LongLink0000000000000000000000000000020400000000000011561 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SAPAvailableForSoftwareInventory/assocOpenDRIM_SAPAvailableForSoftwareInventory.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SAPAvailableForSoftwareInventory/assocOpenDRIM_SAP0000644000175000017500000000654211401066502034371 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ASSOCOPENDRIM_SAPAVAILABLEFORSOFTWAREINVENTORY_H_ #define ASSOCOPENDRIM_SAPAVAILABLEFORSOFTWAREINVENTORY_H_ #include "OpenDRIM_SAPAvailableForSoftwareInventoryAccess.h" int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage); int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_associator(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties, vector& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant); int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_enumerateAvailableSAPs(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_getAvailableSAP(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_enumerateManagedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_getManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_SAPAVAILABLEFORSOFTWAREINVENTORY_H_*/ ././@LongLink0000000000000000000000000000020300000000000011560 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SAPAvailableForSoftwareInventory/cmpiOpenDRIM_SAPAvailableForSoftwareInventory.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SAPAvailableForSoftwareInventory/cmpiOpenDRIM_SAPA0000644000175000017500000000466611401066502034317 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_SAPAVAILABLEFORSOFTWAREINVENTORY_H_ #define CMPIOPENDRIM_SAPAVAILABLEFORSOFTWAREINVENTORY_H_ #include "OpenDRIM_SAPAvailableForSoftwareInventory.h" CMPIObjectPath* SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_SAPAvailableForSoftwareInventory& instance); CMPIInstance* SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_SAPAvailableForSoftwareInventory& instance); void SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_SAPAvailableForSoftwareInventory& instance); void SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_SAPAvailableForSoftwareInventory& instance); #endif /*CMPIOPENDRIM_SAPAVAILABLEFORSOFTWAREINVENTORY_H_*/ ././@LongLink0000000000000000000000000000020500000000000011562 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SAPAvailableForSoftwareInventory/cmpiOpenDRIM_SAPAvailableForSoftwareInventory.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SAPAvailableForSoftwareInventory/cmpiOpenDRIM_SAPA0000644000175000017500000000652111401066502034307 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SAPAvailableForSoftwareInventory.h" CMPIObjectPath* SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_SAPAvailableForSoftwareInventory& instance) { _E_; Objectpath op(broker, OpenDRIM_SAPAvailableForSoftwareInventory_classnames[0], OpenDRIM_SAPAvailableForSoftwareInventory_NAMESPACE); if (!instance.AvailableSAP_isNULL) op.addKey("AvailableSAP", instance.AvailableSAP); if (!instance.ManagedElement_isNULL) op.addKey("ManagedElement", instance.ManagedElement); _L_; return op.getHdl(); } CMPIInstance* SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_SAPAvailableForSoftwareInventory& instance) { _E_; Objectpath op(broker, SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_SAPAvailableForSoftwareInventory& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("AvailableSAP", instance.AvailableSAP) == OK) instance.AvailableSAP_isNULL = false; if (op.getKey("ManagedElement", instance.ManagedElement) == OK) instance.ManagedElement_isNULL = false; _L_; } void SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_SAPAvailableForSoftwareInventory& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("AvailableSAP", instance.AvailableSAP) == OK) instance.AvailableSAP_isNULL = false; if (inst.getProperty("ManagedElement", instance.ManagedElement) == OK) instance.ManagedElement_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000021100000000000011557 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SAPAvailableForSoftwareInventory/OpenDRIM_SAPAvailableForSoftwareInventoryProvider.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SAPAvailableForSoftwareInventory/OpenDRIM_SAPAvail0000644000175000017500000004545511401066502034323 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SAPAvailableForSoftwareInventory.h" #include "OpenDRIM_SAPAvailableForSoftwareInventoryAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProviderSetInstance SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProviderModifyInstance #endif int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_init(const CMPIBroker* broker); int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SAPAvailableForSoftwareInventory_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProviderEnumInstances(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SAPAvailableForSoftwareInventory_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SAPAvailableForSoftwareInventory instance; SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SAPAvailableForSoftwareInventory_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProviderSetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SAPAvailableForSoftwareInventory newInstance, oldInstance; SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_toCPP(_broker, ci, newInstance); SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SAPAvailableForSoftwareInventory_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SAPAvailableForSoftwareInventory_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SAPAvailableForSoftwareInventory instance; SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_toCPP(_broker, ci, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_SAPAvailableForSoftwareInventory_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SAPAvailableForSoftwareInventory_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SAPAvailableForSoftwareInventory_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SAPAvailableForSoftwareInventory instance; SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SAPAvailableForSoftwareInventory_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SAPAvailableForSoftwareInventory_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProviderExecQuery(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* lang, const char* query) { _E_; CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } /* ---------------------------------------------------------------------------*/ /* End of Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Association Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProviderAssociatorNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SAPAvailableForSoftwareInventory_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnObjectPath(rslt, associatedInstances[i].getObjectpath().getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProviderAssociators(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SAPAvailableForSoftwareInventory_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnInstance(rslt, associatedInstances[i].getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProviderReferenceNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SAPAvailableForSoftwareInventory_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_referenceAvailableSAPToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_referenceManagedElementToAvailableSAP(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SAPAvailableForSoftwareInventory_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProviderReferences(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SAPAvailableForSoftwareInventory_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_referenceAvailableSAPToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_referenceManagedElementToAvailableSAP(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SAPAvailableForSoftwareInventory_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_init FAILED: " + (string) OpenDRIM_SAPAvailableForSoftwareInventory_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_unload(errorMessage); if (errorCode != OK) { errorMessage += "SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_unload FAILED: " + (string) OpenDRIM_SAPAvailableForSoftwareInventory_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_INIT if (SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_init(_broker) < 0) return NULL CMInstanceMIStub(SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProvider, SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProvider, _broker, SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_INIT); CMAssociationMIStub(SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProvider, SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProvider, _broker, SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SAPAvailableForSoftwareInventory/assocOpenDRIM_SAPAvailableForSoftwareInventory.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SAPAvailableForSoftwareInventory/assocOpenDRIM_SAP0000644000175000017500000002212411401066502034363 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "assocOpenDRIM_SAPAvailableForSoftwareInventory.h" int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage) { _E_; string _assocClass, _resultClass, _resultRole, _role; assocClass == NULL ? _assocClass = "null" : _assocClass = assocClass; resultClass == NULL ? _resultClass = "null" : _resultClass = resultClass; resultRole == NULL ? _resultRole = "null" : _resultRole = resultRole; role == NULL ? _role = "null" : _role = role; for (unsigned int i=0; i& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant) { _E_; int errorCode = SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_associatorFilter(broker, ctx, cop, knownInstance, assocClass, resultClass, role, resultRole, leftToRight, errorMessage); if (errorCode == -1) return OK; if (errorCode != OK) return errorCode; if (leftToRight) { if (role != NULL && strcasecmp(role, "AvailableSAP") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "ManagedElement") != 0) return OK; CF_assert(SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_associatorAvailableSAPToManagedElement(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "ManagedElement") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "AvailableSAP") != 0) return OK; CF_assert(SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_associatorManagedElementToAvailableSAP(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_enumerateAvailableSAPs(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, AvailableSAP_NAMESPACE, AvailableSAP_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(SoftwareInventory_CIM_ServiceAccessPoint_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareInventory_CIM_ServiceAccessPoint_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareInventory_CIM_ServiceAccessPoint_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_getAvailableSAP(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), AvailableSAP_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), AvailableSAP_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ServiceAccessPoint _instance; SoftwareInventory_CIM_ServiceAccessPoint_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareInventory_CIM_ServiceAccessPoint_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareInventory_CIM_ServiceAccessPoint_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_enumerateManagedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, ManagedElement_NAMESPACE, ManagedElement_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(SoftwareInventory_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareInventory_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareInventory_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_getManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), ManagedElement_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), ManagedElement_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ManagedElement _instance; SoftwareInventory_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareInventory_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareInventory_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000020500000000000011562 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SAPAvailableForSoftwareInventory/OpenDRIM_SAPAvailableForSoftwareInventoryAccess.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SAPAvailableForSoftwareInventory/OpenDRIM_SAPAvail0000644000175000017500000001152211401066502034307 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SAPAVAILABLEFORSOFTWAREINVENTORYACCESS_H_ #define OPENDRIM_SAPAVAILABLEFORSOFTWAREINVENTORYACCESS_H_ #include "SoftwareInventory_Common.h" #include "OpenDRIM_SAPAvailableForSoftwareInventory.h" #include "assocOpenDRIM_SAPAvailableForSoftwareInventory.h" int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_load(const CMPIBroker* broker, string& errorMessage); int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_unload(string& errorMessage); int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_SAPAvailableForSoftwareInventory& instance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SAPAvailableForSoftwareInventory& newInstance, const OpenDRIM_SAPAvailableForSoftwareInventory& oldInstance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SAPAvailableForSoftwareInventory& instance, string& errorMessage); int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SAPAvailableForSoftwareInventory& instance, string& errorMessage); int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_associatorAvailableSAPToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AvailableSAP_instance, const char** properties, vector& ManagedElement_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_associatorManagedElementToAvailableSAP(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const char** properties, vector& AvailableSAP_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_referenceAvailableSAPToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AvailableSAP_instance, const vector& ManagedElement_instances, vector& OpenDRIM_SAPAvailableForSoftwareInventory_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_referenceManagedElementToAvailableSAP(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& AvailableSAP_instances, vector& OpenDRIM_SAPAvailableForSoftwareInventory_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventory_populate(OpenDRIM_SAPAvailableForSoftwareInventory& instance, string& errorMessage); #endif /*OPENDRIM_SAPAVAILABLEFORSOFTWAREINVENTORYACCESS_H_*/ ././@LongLink0000000000000000000000000000017700000000000011572 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SAPAvailableForSoftwareInventory/OpenDRIM_SAPAvailableForSoftwareInventory.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SAPAvailableForSoftwareInventory/OpenDRIM_SAPAvail0000644000175000017500000000725011401066502034312 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SAPAVAILABLEFORSOFTWAREINVENTORY_H_ #define OPENDRIM_SAPAVAILABLEFORSOFTWAREINVENTORY_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_ServiceAccessPoint.h" #include "CIM_ServiceAccessPointAccess.h" #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" */ const static char* OpenDRIM_SAPAvailableForSoftwareInventory_classnames[] = {"OpenDRIM_SAPAvailableForSoftwareInventory"}; static string OpenDRIM_SAPAvailableForSoftwareInventory_NAMESPACE = _NAMESPACE; const static string AvailableSAP_role = "AvailableSAP"; const static char* AvailableSAP_classnames[] = {"OpenDRIM_SoftwareIdentityResource"}; const static string AvailableSAP_NAMESPACE = _NAMESPACE; const static string ManagedElement_role = "ManagedElement"; const static char* ManagedElement_classnames[] = {"OpenDRIM_SoftwareIdentity"}; const static string ManagedElement_NAMESPACE = _NAMESPACE; class OpenDRIM_SAPAvailableForSoftwareInventory { public: Objectpath AvailableSAP; bool AvailableSAP_isNULL; Objectpath ManagedElement; bool ManagedElement_isNULL; OpenDRIM_SAPAvailableForSoftwareInventory() { AvailableSAP_isNULL = true; ManagedElement_isNULL = true; } ~OpenDRIM_SAPAvailableForSoftwareInventory() {} string getKeys() const { return CF_toLowCase(".AvailableSAP=\"" + CF_quoteString(AvailableSAP.toString()) + "\""".ManagedElement=\"" + CF_quoteString(ManagedElement.toString()) + "\""); } int getAvailableSAP(Objectpath& value) const { if (AvailableSAP_isNULL==true) return NOT_FOUND; value = AvailableSAP; return OK; } int setAvailableSAP(const Objectpath& newValue) { AvailableSAP = newValue; AvailableSAP.setNamespace(AvailableSAP_NAMESPACE); AvailableSAP_isNULL = false; return OK; } int getManagedElement(Objectpath& value) const { if (ManagedElement_isNULL==true) return NOT_FOUND; value = ManagedElement; return OK; } int setManagedElement(const Objectpath& newValue) { ManagedElement = newValue; ManagedElement.setNamespace(ManagedElement_NAMESPACE); ManagedElement_isNULL = false; return OK; } }; #endif /*OPENDRIM_SAPAVAILABLEFORSOFTWAREINVENTORY_H_*/ opendrim-lmp-softwareinventory-1.0.0~ppa/packaging/0000755000175000017500000000000011401066502023271 5ustar guillaumeguillaumeopendrim-lmp-softwareinventory-1.0.0~ppa/packaging/opendrim-lmp-softwareinventory.spec0000644000175000017500000000773711401066502032374 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### %define packageVersion 1 Version: %{version} Release: %{packageVersion}%{?dist} Vendor: OpenDRIM Summary: OpenDRIM SoftwareInventory Provider Name: opendrim-lmp-softwareinventory Group: Systems Management/Base License: GPL BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root URL: http://opendrim.sourceforge.net Source: %{name}-%{version}.tar.gz BuildRequires: autoconf, tog-pegasus-devel, libopendrim >= 1.1.1 Requires: tog-pegasus, libopendrim >= 1.1.1 %description %global PEGASUS_ARCH_LIB %{_lib} %global COMMONLIBDIR /usr/%PEGASUS_ARCH_LIB %global PROVIDERDIR %COMMONLIBDIR/Pegasus/providers %global OPENDRIM_REG_DIR /usr/share/OpenDRIM %global OPENDRIM_MOF_DIR /usr/share/OpenDRIM/%{name}/mof %global PROVIDER_SCRIPT_POST SoftwareInventory %global CIMNAMESPACE %{?CIM_NAMESPACE:%{CIM_NAMESPACE}}%{!?CIM_NAMESPACE:root/cimv2} %global CIMSERVER pegasus %global INTEROPNAMESPACE root/interop %prep %setup -q -n %{name}-%{version} %build autoreconf --install --force ./configure CIMSERVER=%CIMSERVER CIMNAMESPACE=%CIMNAMESPACE INTEROPNAMESPACE=%INTEROPNAMESPACE --prefix=/usr make %pre SERVICE='cimserver' if !(ps ax | grep -v grep | grep $SERVICE > /dev/null) then echo "$SERVICE is not running" exit 1 fi %install make install COMMONLIBDIR=$RPM_BUILD_ROOT%COMMONLIBDIR PROVIDERDIR=$RPM_BUILD_ROOT%PROVIDERDIR %{__install} -d -m 744 $RPM_BUILD_ROOT%OPENDRIM_REG_DIR/%{name}/registration %{__install} -p -m 644 registration/*.sh $RPM_BUILD_ROOT%OPENDRIM_REG_DIR/%{name}/registration %{__install} -d -m 744 $RPM_BUILD_ROOT%OPENDRIM_MOF_DIR/ %{__install} -p -m 644 mof/*.mof $RPM_BUILD_ROOT%OPENDRIM_MOF_DIR/ %post %OPENDRIM_REG_DIR/%{name}-%{version}-script/%PROVIDER_SCRIPT_POST.sh %CIMNAMESPACE %{vendor} %CIMSERVER %INTEROPNAMESPACE %{version} %clean [ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT; [ "${RPM_BUILD_DIR}" != "/" ] && %{__rm} -rf ${RPM_BUILD_DIR}/%{name}-%{version}; %preun SERVICE='cimserver' if !(ps ax | grep -v grep | grep $SERVICE > /dev/null) then echo "$SERVICE is not running" exit 1 fi %OPENDRIM_REG_DIR/%{name}-%{version}-script/%PROVIDER_SCRIPT_POST-remove.sh %CIMNAMESPACE %CIMSERVER %INTEROPNAMESPACE %files %defattr(755, root, root, 755) %dir %COMMONLIBDIR %dir %PROVIDERDIR %COMMONLIBDIR/*.so %PROVIDERDIR/*.so %defattr(744, root, root, 755) %dir %OPENDRIM_REG_DIR %dir %OPENDRIM_MOF_DIR %dir %OPENDRIM_REG_DIR/%{name}-%{version}-script %OPENDRIM_REG_DIR/%{name}-%{version}-script/*.sh %OPENDRIM_MOF_DIR/*.mof opendrim-lmp-softwareinventory-1.0.0~ppa/packaging/debian/0000755000175000017500000000000011404354705024523 5ustar guillaumeguillaumeopendrim-lmp-softwareinventory-1.0.0~ppa/packaging/debian/postrm0000644000175000017500000000372611404354705026002 0ustar guillaumeguillaume#!/bin/sh set -e # summary of how this script can be called: # * `remove' # * `purge' # * `upgrade' # * `failed-upgrade' # * `abort-install' # * `abort-install' # * `abort-upgrade' # * `disappear' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in purge) rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_SystemSpecificSoftwareInventoryCollection rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_SoftwareIdentityResource rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_OrderedSoftwareInventoryComponent rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_InstalledSoftwareIdentity rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_SoftwareIdentityConformsToProfile rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_SoftwareIdentity rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_HostedSoftwareInventoryCollection rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_SAPAvailableForSoftwareInventory rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_SoftwareInventoryIdentity rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_OrderedSoftwareInventoryDependency rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_MemberOfAvailableSoftwareCollection rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_RegisteredSoftwareInventoryProfile ;; remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 opendrim-lmp-softwareinventory-1.0.0~ppa/packaging/debian/source/0000755000175000017500000000000011401066502026013 5ustar guillaumeguillaumeopendrim-lmp-softwareinventory-1.0.0~ppa/packaging/debian/source/format0000644000175000017500000000001411401066502027221 0ustar guillaumeguillaume3.0 (quilt) opendrim-lmp-softwareinventory-1.0.0~ppa/packaging/debian/copyright0000644000175000017500000000276711401066502026462 0ustar guillaumeguillaumeThis package was debianized by Guillaume BOTTEX on Tue, 6 Oct 2009 17:18:07 +0900. It was downloaded from http://opendrim.sourceforge.net/ Upstream Authors: Nodir Nazarov Guillaume BOTTEX Copyright: Copyright (C) 2009 ETRI Nodir Nazarov Copyright (C) 2009 ETRI Guillaume BOTTEX License: Linux Management Providers (LMP), Software Inventory provider package This program is being developed under the "OpenDRIM" project. The "OpenDRIM" project web page: http://opendrim.sourceforge.net The "OpenDRIM" project mailing list: opendrim@googlegroups.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. The Debian packaging is copyright 2009, Guillaume BOTTEX and is licensed under the GPL, see `/usr/share/common-licenses/GPL-2'. opendrim-lmp-softwareinventory-1.0.0~ppa/packaging/debian/control0000644000175000017500000000131511404354677026136 0ustar guillaumeguillaumeSource: opendrim-lmp-softwareinventory Priority: optional Section: libs Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Guillaume BOTTEX Build-Depends: debhelper (>= 5), automake, autoconf, libtool, sfcb, libopendrim0-dev (>= 1.1.3), libxml2-dev Standards-Version: 3.8.4 Homepage: http://opendrim.sourceforge.net/ Package: opendrim-lmp-softwareinventory Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, sfcb, libopendrim0 (>= 1.1.3) Description: OpenDRIM Software Inventory provider Provides information about the computer system software inventory. . Compliant with the DMTF Software Inventory Profile v1.0.1 (DSP1023). opendrim-lmp-softwareinventory-1.0.0~ppa/packaging/debian/prerm0000644000175000017500000000245711401066502025573 0ustar guillaumeguillaume#!/bin/sh -e # prerm script for opendrim-lmp-baseserver # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `remove' # * `upgrade' # * `failed-upgrade' # * `remove' `in-favour' # * `deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in remove|upgrade|deconfigure) CIMNAMESPACE=root/cimv2 CIMSERVER=sfcb INTEROPNAMESPACE=root/interop APP_NAME=opendrim-lmp-softwareinventory VERSION=`cat /usr/share/doc/opendrim-lmp-softwareinventory/VERSION` OPENDRIM_REG_DIR=/usr/share/OpenDRIM PROVIDER_SCRIPT_POST=SoftwareInventory $OPENDRIM_REG_DIR/$APP_NAME/registration/$PROVIDER_SCRIPT_POST-remove.sh $CIMNAMESPACE $CIMSERVER $INTEROPNAMESPACE $OPENDRIM_REG_DIR/$APP_NAME ;; failed-upgrade) ;; *) echo "prerm called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 opendrim-lmp-softwareinventory-1.0.0~ppa/packaging/debian/changelog0000644000175000017500000000025711404354665026406 0ustar guillaumeguillaumeopendrim-lmp-softwareinventory (1.0.0-0ubuntu1) lucid; urgency=low * Initial release -- Guillaume BOTTEX Fri, 11 Jun 2010 15:37:00 +0900 opendrim-lmp-softwareinventory-1.0.0~ppa/packaging/debian/postinst0000644000175000017500000000263411401066502026326 0ustar guillaumeguillaume#!/bin/sh -e # postinst script for opendrim-lmp-baseserver # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-remove' # * `abort-deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in configure) CIMNAMESPACE=root/cimv2 VENDOR=OpenDRIM CIMSERVER=sfcb INTEROPNAMESPACE=root/interop APP_NAME=opendrim-lmp-softwareinventory VERSION=`cat /usr/share/doc/opendrim-lmp-softwareinventory/VERSION` OPENDRIM_REG_DIR=/usr/share/OpenDRIM PROVIDER_SCRIPT_POST=SoftwareInventory $OPENDRIM_REG_DIR/$APP_NAME/registration/$PROVIDER_SCRIPT_POST.sh $CIMNAMESPACE $VENDOR $CIMSERVER $INTEROPNAMESPACE $VERSION $OPENDRIM_REG_DIR/$APP_NAME ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 opendrim-lmp-softwareinventory-1.0.0~ppa/packaging/debian/install0000644000175000017500000000004711401066502026105 0ustar guillaumeguillaumeusr/lib/cmpi/*.so usr/share/OpenDRIM/* opendrim-lmp-softwareinventory-1.0.0~ppa/packaging/debian/rules0000755000175000017500000000360511401066502025577 0ustar guillaumeguillaume#!/usr/bin/make -f INSTALL = /usr/bin/install -c CONFIGURE_OPTIONS := CIMSERVER=sfcb --prefix=/usr INTEROPNAMESPACE=root/interop COMMONLIBDIR=/usr/lib/cmpi DESTDIR = $(CURDIR)/debian/tmp VERSION = $(shell cat ./VERSION) APP_NAME = opendrim-lmp-softwareinventory OPENDRIM_REG_DIR = /usr/share/OpenDRIM OPENDRIM_MOF_DIR = /usr/share/OpenDRIM/$(APP_NAME)/mof configure: configure-stamp configure-stamp: dh_testdir autoreconf -i --force ./configure $(CONFIGURE_OPTIONS) touch configure-stamp build: build-stamp build-stamp: configure-stamp dh_testdir $(MAKE) #docbook-to-man debian/opendrim-lmp-softwareinventory.sgml > opendrim-lmp-softwareinventory.1 touch $@ clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp [ ! -f Makefile ] || $(MAKE) clean dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs $(MAKE) DESTDIR=$(DESTDIR) install $(INSTALL) -d -m 744 $(DESTDIR)$(OPENDRIM_REG_DIR)/$(APP_NAME)/registration $(INSTALL) -p -m 744 registration/*.sh $(DESTDIR)$(OPENDRIM_REG_DIR)/$(APP_NAME)/registration $(INSTALL) -d -m 744 $(DESTDIR)$(OPENDRIM_MOF_DIR) $(INSTALL) -p -m 644 mof/*.mof $(DESTDIR)$(OPENDRIM_MOF_DIR) # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. # Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot dh_installchangelogs dh_installdocs dh_installexamples dh_install --sourcedir=$(DESTDIR) # dh_installmenu # dh_installdebconf # dh_installlogrotate # dh_installemacsen # dh_installpam # dh_installmime # dh_python # dh_installinit # dh_installcron # dh_installinfo dh_installman dh_link dh_strip dh_compress dh_fixperms # dh_perl # dh_makeshlibs dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure opendrim-lmp-softwareinventory-1.0.0~ppa/packaging/debian/docs0000644000175000017500000000003111401066502025360 0ustar guillaumeguillaumeNEWS README TODO VERSION opendrim-lmp-softwareinventory-1.0.0~ppa/packaging/debian/compat0000644000175000017500000000000211401066502025711 0ustar guillaumeguillaume5 ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint/opendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint/0000755000175000017500000000000011401066502035076 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint/Makefile.amopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint/0000644000175000017500000000562211401066502035105 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProvider.la libcmpiSoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProvider_la_SOURCES = OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointAccess.cpp OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProvider.cpp cmpiOpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint.cpp assocOpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint.cpp # May have to be adjusted for direct invocation libcmpiSoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProvider_la_CPPFLAGS = -I../CIM_System -I../CIM_ServiceAccessPoint # Uncomment the end for direct invocation, may have to be adjusted libcmpiSoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProvider_la_LIBADD = ../Common/libcmpiSoftwareInventory_Common.la #../CIM_System/libcmpiSoftwareInventory_CIM_SystemProvider.la ../CIM_ServiceAccessPoint/libcmpiSoftwareInventory_CIM_ServiceAccessPointProvider.la libcmpiSoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint.h OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint.h OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointAccess.h ././@LongLink0000000000000000000000000000025100000000000011563 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointAccess.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint/0000644000175000017500000002737511401066502035116 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointAccess.h" int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareInventory_CIM_System_load(broker, errorMessage)); CF_assert(SoftwareInventory_CIM_ServiceAccessPoint_load(broker, errorMessage)); */ // TODO _L_; return OK; } int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareInventory_CIM_System_unload(errorMessage)); CF_assert(SoftwareInventory_CIM_ServiceAccessPoint_unload(errorMessage)); */ // TODO _L_; return OK; } int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_isAssociated(const Instance& Antecedent, const Instance& Dependent, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector subjects; // Only get the instance names CF_assert(SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_enumerateAntecedents(broker, ctx, subjects, NULL, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_enumerateAntecedents(broker, ctx, subjects, NULL, false, errorMessage)); vector::iterator c = subjects.begin(); vector::iterator end = subjects.end(); for (; c != end; ++c) { bool leftToRight = true; vector associatedInstances; SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), Antecedent_classnames[0], Dependent_classnames[0], Antecedent_role.c_str(), Dependent_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_referenceAntecedentToDependent(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath Antecedent_objectpath; instance.getAntecedent(Antecedent_objectpath); Instance Antecedent_instance; CF_assert(SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_getAntecedent(broker, ctx, Antecedent_objectpath, Antecedent_instance, NULL, errorMessage)); Objectpath Dependent_objectpath; instance.getDependent(Dependent_objectpath); Instance Dependent_instance; CF_assert(SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_getDependent(broker, ctx, Dependent_objectpath, Dependent_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_isAssociated(Antecedent_instance, Dependent_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint& newInstance, const OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_associatorAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const char** properties, vector& Dependent_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector Dependent_instances; if (discriminant=="a") CF_assert(SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_enumerateDependents(broker, ctx, Dependent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_enumerateDependents(broker, ctx, Dependent_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_enumerateDependents(broker, ctx, Dependent_instances, properties, false, errorMessage)); } for (size_t i=0; i& Antecedent_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector Antecedent_instances; if (discriminant=="a") CF_assert(SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); } for (size_t i=0; i& Dependent_instances, vector& OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < Dependent_instances.size(); i++) { OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint instance; instance.setAntecedent(((Instance) Antecedent_instance).getObjectpath()); instance.setDependent(((Instance) Dependent_instances[i]).getObjectpath()); OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_instances.push_back(instance); } _L_; return OK; } int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < Antecedent_instances.size(); i++) { OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint instance; instance.setAntecedent(((Instance) Antecedent_instances[i]).getObjectpath()); instance.setDependent(((Instance) Dependent_instance).getObjectpath()); OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_instances.push_back(instance); } _L_; return OK; } int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_populate(OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000025000000000000011562 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint/assocOpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint/0000644000175000017500000002226411401066502035106 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "assocOpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint.h" int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage) { _E_; string _assocClass, _resultClass, _resultRole, _role; assocClass == NULL ? _assocClass = "null" : _assocClass = assocClass; resultClass == NULL ? _resultClass = "null" : _resultClass = resultClass; resultRole == NULL ? _resultRole = "null" : _resultRole = resultRole; role == NULL ? _role = "null" : _role = role; for (unsigned int i=0; i& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant) { _E_; int errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_associatorFilter(broker, ctx, cop, knownInstance, assocClass, resultClass, role, resultRole, leftToRight, errorMessage); if (errorCode == -1) return OK; if (errorCode != OK) return errorCode; if (leftToRight) { if (role != NULL && strcasecmp(role, "Antecedent") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "Dependent") != 0) return OK; CF_assert(SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_associatorAntecedentToDependent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "Dependent") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "Antecedent") != 0) return OK; CF_assert(SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_associatorDependentToAntecedent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_enumerateAntecedents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, Antecedent_NAMESPACE, Antecedent_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(SoftwareInventory_CIM_System_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareInventory_CIM_System_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareInventory_CIM_System_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_getAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Antecedent_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Antecedent_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_System _instance; SoftwareInventory_CIM_System_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareInventory_CIM_System_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareInventory_CIM_System_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_enumerateDependents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, Dependent_NAMESPACE, Dependent_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(SoftwareInventory_CIM_ServiceAccessPoint_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareInventory_CIM_ServiceAccessPoint_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareInventory_CIM_ServiceAccessPoint_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_getDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Dependent_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Dependent_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ServiceAccessPoint _instance; SoftwareInventory_CIM_ServiceAccessPoint_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareInventory_CIM_ServiceAccessPoint_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareInventory_CIM_ServiceAccessPoint_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000024500000000000011566 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint/cmpiOpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint/0000644000175000017500000000520211401066502035077 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_COMPUTERSYSTEMSOFTWAREIDENTITYRESOURCEACCESSPOINT_H_ #define CMPIOPENDRIM_COMPUTERSYSTEMSOFTWAREIDENTITYRESOURCEACCESSPOINT_H_ #include "OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint.h" CMPIObjectPath* SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint& instance); CMPIInstance* SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint& instance); void SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint& instance); void SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint& instance); #endif /*CMPIOPENDRIM_COMPUTERSYSTEMSOFTWAREIDENTITYRESOURCEACCESSPOINT_H_*/ ././@LongLink0000000000000000000000000000024700000000000011570 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint/cmpiOpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint/0000644000175000017500000000673611401066502035114 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint.h" CMPIObjectPath* SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint& instance) { _E_; Objectpath op(broker, OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_classnames[0], OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_NAMESPACE); if (!instance.Antecedent_isNULL) op.addKey("Antecedent", instance.Antecedent); if (!instance.Dependent_isNULL) op.addKey("Dependent", instance.Dependent); _L_; return op.getHdl(); } CMPIInstance* SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint& instance) { _E_; Objectpath op(broker, SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("Antecedent", instance.Antecedent) == OK) instance.Antecedent_isNULL = false; if (op.getKey("Dependent", instance.Dependent) == OK) instance.Dependent_isNULL = false; _L_; } void SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Antecedent", instance.Antecedent) == OK) instance.Antecedent_isNULL = false; if (inst.getProperty("Dependent", instance.Dependent) == OK) instance.Dependent_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000025300000000000011565 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProvider.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint/0000644000175000017500000005041311401066502035103 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint.h" #include "OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProviderSetInstance SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProviderModifyInstance #endif int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_init(const CMPIBroker* broker); int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProviderEnumInstances(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint instance; SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProviderSetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint newInstance, oldInstance; SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_toCPP(_broker, ci, newInstance); SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint instance; SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_toCPP(_broker, ci, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint instance; SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProviderExecQuery(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* lang, const char* query) { _E_; CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } /* ---------------------------------------------------------------------------*/ /* End of Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Association Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProviderAssociatorNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnObjectPath(rslt, associatedInstances[i].getObjectpath().getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProviderAssociators(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnInstance(rslt, associatedInstances[i].getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProviderReferenceNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProviderReferences(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_init FAILED: " + (string) OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_unload(errorMessage); if (errorCode != OK) { errorMessage += "SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_unload FAILED: " + (string) OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_INIT if (SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_init(_broker) < 0) return NULL CMInstanceMIStub(SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProvider, SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProvider, _broker, SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_INIT); CMAssociationMIStub(SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProvider, SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProvider, _broker, SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000024700000000000011570 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointAccess.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint/0000644000175000017500000001236611401066502035110 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_COMPUTERSYSTEMSOFTWAREIDENTITYRESOURCEACCESSPOINTACCESS_H_ #define OPENDRIM_COMPUTERSYSTEMSOFTWAREIDENTITYRESOURCEACCESSPOINTACCESS_H_ #include "SoftwareInventory_Common.h" #include "OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint.h" #include "assocOpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint.h" int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_load(const CMPIBroker* broker, string& errorMessage); int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_unload(string& errorMessage); int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint& instance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint& newInstance, const OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint& oldInstance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint& instance, string& errorMessage); int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint& instance, string& errorMessage); int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_associatorAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const char** properties, vector& Dependent_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_associatorDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const char** properties, vector& Antecedent_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_referenceAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const vector& Dependent_instances, vector& OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_populate(OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint& instance, string& errorMessage); #endif /*OPENDRIM_COMPUTERSYSTEMSOFTWAREIDENTITYRESOURCEACCESSPOINTACCESS_H_*/ ././@LongLink0000000000000000000000000000024600000000000011567 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint/assocOpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint/0000644000175000017500000000677611401066502035120 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ASSOCOPENDRIM_COMPUTERSYSTEMSOFTWAREIDENTITYRESOURCEACCESSPOINT_H_ #define ASSOCOPENDRIM_COMPUTERSYSTEMSOFTWAREIDENTITYRESOURCEACCESSPOINT_H_ #include "OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointAccess.h" int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage); int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_associator(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties, vector& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant); int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_enumerateAntecedents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_getAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_enumerateDependents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_getDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_COMPUTERSYSTEMSOFTWAREIDENTITYRESOURCEACCESSPOINT_H_*/ ././@LongLink0000000000000000000000000000024100000000000011562 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint/0000644000175000017500000000727011401066502035106 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_COMPUTERSYSTEMSOFTWAREIDENTITYRESOURCEACCESSPOINT_H_ #define OPENDRIM_COMPUTERSYSTEMSOFTWAREIDENTITYRESOURCEACCESSPOINT_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_System.h" #include "CIM_SystemAccess.h" #include "cmpiCIM_ServiceAccessPoint.h" #include "CIM_ServiceAccessPointAccess.h" */ const static char* OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_classnames[] = {"OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint"}; static string OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint_NAMESPACE = _NAMESPACE; const static string Antecedent_role = "Antecedent"; const static char* Antecedent_classnames[] = {"OpenDRIM_ComputerSystem"}; const static string Antecedent_NAMESPACE = _NAMESPACE; const static string Dependent_role = "Dependent"; const static char* Dependent_classnames[] = {"OpenDRIM_SoftwareIdentityResource"}; const static string Dependent_NAMESPACE = _NAMESPACE; class OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint { public: Objectpath Antecedent; bool Antecedent_isNULL; Objectpath Dependent; bool Dependent_isNULL; OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint() { Antecedent_isNULL = true; Dependent_isNULL = true; } ~OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint() {} string getKeys() const { return CF_toLowCase(".Antecedent=\"" + CF_quoteString(Antecedent.toString()) + "\""".Dependent=\"" + CF_quoteString(Dependent.toString()) + "\""); } int getAntecedent(Objectpath& value) const { if (Antecedent_isNULL==true) return NOT_FOUND; value = Antecedent; return OK; } int setAntecedent(const Objectpath& newValue) { Antecedent = newValue; Antecedent.setNamespace(Antecedent_NAMESPACE); Antecedent_isNULL = false; return OK; } int getDependent(Objectpath& value) const { if (Dependent_isNULL==true) return NOT_FOUND; value = Dependent; return OK; } int setDependent(const Objectpath& newValue) { Dependent = newValue; Dependent.setNamespace(Dependent_NAMESPACE); Dependent_isNULL = false; return OK; } }; #endif /*OPENDRIM_COMPUTERSYSTEMSOFTWAREIDENTITYRESOURCEACCESSPOINT_H_*/ opendrim-lmp-softwareinventory-1.0.0~ppa/mof/0000755000175000017500000000000011401066502022126 5ustar guillaumeguillaumeopendrim-lmp-softwareinventory-1.0.0~ppa/mof/OpenDRIM_SoftwareIdentityResource.mof0000644000175000017500000000326611401066502031311 0ustar guillaumeguillaume//############################################################################## // Linux Management Providers (LMP), Software Inventory provider package // Copyright (C) 2009 Nodir Nazarov // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Guillaume BOTTEX, ETRI //############################################################################## [Provider("cmpi:cmpiSoftwareInventory_OpenDRIM_SoftwareIdentityResourceProvider")] class OpenDRIM_SoftwareIdentityResource:CIM_SoftwareIdentityResource { }; opendrim-lmp-softwareinventory-1.0.0~ppa/mof/OpenDRIM_InstalledSoftwareIdentity.mof0000644000175000017500000000330711401066502031435 0ustar guillaumeguillaume//############################################################################## // Linux Management Providers (LMP), Software Inventory provider package // Copyright (C) 2009 Nodir Nazarov // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Guillaume BOTTEX, ETRI //############################################################################## [Association, Provider("cmpi:cmpiSoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProvider")] class OpenDRIM_InstalledSoftwareIdentity:CIM_InstalledSoftwareIdentity { }; opendrim-lmp-softwareinventory-1.0.0~ppa/mof/OpenDRIM_OrderedSoftwareInventoryDependency.mof0000644000175000017500000000332111401066502033301 0ustar guillaumeguillaume//############################################################################## // Linux Management Providers (LMP), Software Inventory provider package // Copyright (C) 2009 Nodir Nazarov // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Guillaume BOTTEX, ETRI //############################################################################## [Association, Provider("cmpi:cmpiSoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProvider")] class OpenDRIM_OrderedSoftwareInventoryDependency:CIM_OrderedDependency { }; opendrim-lmp-softwareinventory-1.0.0~ppa/mof/OpenDRIM_HostedSoftwareInventoryCollection.mof0000644000175000017500000000331611401066502033164 0ustar guillaumeguillaume//############################################################################## // Linux Management Providers (LMP), Software Inventory provider package // Copyright (C) 2009 Nodir Nazarov // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Guillaume BOTTEX, ETRI //############################################################################## [Association, Provider("cmpi:cmpiSoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProvider")] class OpenDRIM_HostedSoftwareInventoryCollection:CIM_HostedCollection { }; opendrim-lmp-softwareinventory-1.0.0~ppa/mof/OpenDRIM_SoftwareIdentityConformsToProfile.mof0000644000175000017500000000331011401066502033122 0ustar guillaumeguillaume//############################################################################## // Linux Management Providers (LMP), Software Inventory provider package // Copyright (C) 2009 Nodir Nazarov // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Guillaume BOTTEX, ETRI //############################################################################## [Provider("cmpi:cmpiSoftwareInventory_OpenDRIM_SoftwareIdentityConformsToProfileProvider")] class OpenDRIM_SoftwareIdentityConformsToProfile:CIM_ElementConformsToProfile { }; opendrim-lmp-softwareinventory-1.0.0~ppa/mof/OpenDRIM_SoftwareInventoryIdentity.mof0000644000175000017500000000330511401066502031511 0ustar guillaumeguillaume//############################################################################## // Linux Management Providers (LMP), Software Inventory provider package // Copyright (C) 2009 Nodir Nazarov // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Guillaume BOTTEX, ETRI //############################################################################## [Association, Provider("cmpi:cmpiSoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProvider")] class OpenDRIM_SoftwareInventoryIdentity:CIM_ElementSoftwareIdentity { }; opendrim-lmp-softwareinventory-1.0.0~ppa/mof/OpenDRIM_SAPAvailableForSoftwareInventory.mof0000644000175000017500000000332211401066502032612 0ustar guillaumeguillaume//############################################################################## // Linux Management Providers (LMP), Software Inventory provider package // Copyright (C) 2009 Nodir Nazarov // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Guillaume BOTTEX, ETRI //############################################################################## [Association, Provider("cmpi:cmpiSoftwareInventory_OpenDRIM_SAPAvailableForSoftwareInventoryProvider")] class OpenDRIM_SAPAvailableForSoftwareInventory:CIM_SAPAvailableForElement { }; opendrim-lmp-softwareinventory-1.0.0~ppa/mof/OpenDRIM_OrderedSoftwareInventoryComponent.mof0000644000175000017500000000331611401066502033171 0ustar guillaumeguillaume//############################################################################## // Linux Management Providers (LMP), Software Inventory provider package // Copyright (C) 2009 Nodir Nazarov // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Guillaume BOTTEX, ETRI //############################################################################## [Association, Provider("cmpi:cmpiSoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProvider")] class OpenDRIM_OrderedSoftwareInventoryComponent:CIM_OrderedComponent { }; opendrim-lmp-softwareinventory-1.0.0~ppa/mof/OpenDRIM_RegisteredSoftwareInventoryProfile.mof0000644000175000017500000000330311401066502033334 0ustar guillaumeguillaume//############################################################################## // Linux Management Providers (LMP), Software Inventory provider package // Copyright (C) 2009 Nodir Nazarov // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Guillaume BOTTEX, ETRI //############################################################################## [Provider("cmpi:cmpiSoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfileProvider")] class OpenDRIM_RegisteredSoftwareInventoryProfile:CIM_RegisteredProfile { }; opendrim-lmp-softwareinventory-1.0.0~ppa/mof/OpenDRIM_MemberOfAvailableSoftwareCollection.mof0000644000175000017500000000332411401066502033314 0ustar guillaumeguillaume//############################################################################## // Linux Management Providers (LMP), Software Inventory provider package // Copyright (C) 2009 Nodir Nazarov // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Guillaume BOTTEX, ETRI //############################################################################## [Association, Provider("cmpi:cmpiSoftwareInventory_OpenDRIM_MemberOfAvailableSoftwareCollectionProvider")] class OpenDRIM_MemberOfAvailableSoftwareCollection:CIM_MemberOfCollection { }; ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/mof/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint.mofopendrim-lmp-softwareinventory-1.0.0~ppa/mof/OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPo0000644000175000017500000000335711401066502035077 0ustar guillaumeguillaume//############################################################################## // Linux Management Providers (LMP), Software Inventory provider package // Copyright (C) 2009 Nodir Nazarov // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Guillaume BOTTEX, ETRI //############################################################################## [Association, Provider("cmpi:cmpiSoftwareInventory_OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPointProvider")] class OpenDRIM_ComputerSystemSoftwareIdentityResourceAccessPoint:CIM_HostedAccessPoint { }; opendrim-lmp-softwareinventory-1.0.0~ppa/mof/OpenDRIM_SoftwareIdentity.mof0000644000175000017500000000323611401066502027576 0ustar guillaumeguillaume//############################################################################## // Linux Management Providers (LMP), Software Inventory provider package // Copyright (C) 2009 Nodir Nazarov // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Guillaume BOTTEX, ETRI //############################################################################## [Provider("cmpi:cmpiSoftwareInventory_OpenDRIM_SoftwareIdentityProvider")] class OpenDRIM_SoftwareIdentity:CIM_SoftwareIdentity { }; opendrim-lmp-softwareinventory-1.0.0~ppa/mof/OpenDRIM_SystemSpecificSoftwareInventoryCollection.mof0000644000175000017500000000333011401066502034664 0ustar guillaumeguillaume//############################################################################## // Linux Management Providers (LMP), Software Inventory provider package // Copyright (C) 2009 Nodir Nazarov // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Guillaume BOTTEX, ETRI //############################################################################## [Provider("cmpi:cmpiSoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollectionProvider")] class OpenDRIM_SystemSpecificSoftwareInventoryCollection:CIM_SystemSpecificCollection { }; opendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryDependency/0000755000175000017500000000000011401066502032016 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000021500000000000011563 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryDependency/OpenDRIM_OrderedSoftwareInventoryDependencyProvider.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryDependency/OpenDRIM_Ordere0000644000175000017500000004570511401066502034631 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_OrderedSoftwareInventoryDependency.h" #include "OpenDRIM_OrderedSoftwareInventoryDependencyAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProviderSetInstance SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProviderModifyInstance #endif int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_init(const CMPIBroker* broker); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProviderEnumInstances(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_OrderedSoftwareInventoryDependency instance; SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProviderSetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_OrderedSoftwareInventoryDependency newInstance, oldInstance; SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_toCPP(_broker, ci, newInstance); SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_OrderedSoftwareInventoryDependency instance; SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_toCPP(_broker, ci, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_OrderedSoftwareInventoryDependency instance; SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProviderExecQuery(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* lang, const char* query) { _E_; CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } /* ---------------------------------------------------------------------------*/ /* End of Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Association Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProviderAssociatorNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnObjectPath(rslt, associatedInstances[i].getObjectpath().getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProviderAssociators(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnInstance(rslt, associatedInstances[i].getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProviderReferenceNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProviderReferences(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_init FAILED: " + (string) OpenDRIM_OrderedSoftwareInventoryDependency_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_unload(errorMessage); if (errorCode != OK) { errorMessage += "SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_unload FAILED: " + (string) OpenDRIM_OrderedSoftwareInventoryDependency_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_INIT if (SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_init(_broker) < 0) return NULL CMInstanceMIStub(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProvider, SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProvider, _broker, SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_INIT); CMAssociationMIStub(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProvider, SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProvider, _broker, SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryDependency/Makefile.am0000644000175000017500000000535211401066502034057 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProvider.la libcmpiSoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProvider_la_SOURCES = OpenDRIM_OrderedSoftwareInventoryDependencyAccess.cpp OpenDRIM_OrderedSoftwareInventoryDependencyProvider.cpp cmpiOpenDRIM_OrderedSoftwareInventoryDependency.cpp assocOpenDRIM_OrderedSoftwareInventoryDependency.cpp # May have to be adjusted for direct invocation libcmpiSoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProvider_la_CPPFLAGS = -I../CIM_ManagedElement -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiSoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProvider_la_LIBADD = ../Common/libcmpiSoftwareInventory_Common.la #../CIM_ManagedElement/libcmpiSoftwareInventory_CIM_ManagedElementProvider.la ../CIM_ManagedElement/libcmpiSoftwareInventory_CIM_ManagedElementProvider.la libcmpiSoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependencyProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_OrderedSoftwareInventoryDependency.h OpenDRIM_OrderedSoftwareInventoryDependency.h OpenDRIM_OrderedSoftwareInventoryDependencyAccess.h ././@LongLink0000000000000000000000000000020300000000000011560 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryDependency/OpenDRIM_OrderedSoftwareInventoryDependency.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryDependency/OpenDRIM_Ordere0000644000175000017500000000772211401066502034626 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_ORDEREDSOFTWAREINVENTORYDEPENDENCY_H_ #define OPENDRIM_ORDEREDSOFTWAREINVENTORYDEPENDENCY_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" */ const static char* OpenDRIM_OrderedSoftwareInventoryDependency_classnames[] = {"OpenDRIM_OrderedSoftwareInventoryDependency"}; static string OpenDRIM_OrderedSoftwareInventoryDependency_NAMESPACE = _NAMESPACE; const static string Antecedent_role = "Antecedent"; const static char* Antecedent_classnames[] = {"OpenDRIM_SoftwareIdentity"}; const static string Antecedent_NAMESPACE = _NAMESPACE; const static string Dependent_role = "Dependent"; const static char* Dependent_classnames[] = {"OpenDRIM_SoftwareIdentity"}; const static string Dependent_NAMESPACE = _NAMESPACE; class OpenDRIM_OrderedSoftwareInventoryDependency { public: Objectpath Antecedent; bool Antecedent_isNULL; Objectpath Dependent; bool Dependent_isNULL; unsigned long long AssignedSequence; bool AssignedSequence_isNULL; OpenDRIM_OrderedSoftwareInventoryDependency() { Antecedent_isNULL = true; Dependent_isNULL = true; AssignedSequence_isNULL = true; } ~OpenDRIM_OrderedSoftwareInventoryDependency() {} string getKeys() const { return CF_toLowCase(".Antecedent=\"" + CF_quoteString(Antecedent.toString()) + "\""".Dependent=\"" + CF_quoteString(Dependent.toString()) + "\""); } int getAntecedent(Objectpath& value) const { if (Antecedent_isNULL==true) return NOT_FOUND; value = Antecedent; return OK; } int setAntecedent(const Objectpath& newValue) { Antecedent = newValue; Antecedent.setNamespace(Antecedent_NAMESPACE); Antecedent_isNULL = false; return OK; } int getDependent(Objectpath& value) const { if (Dependent_isNULL==true) return NOT_FOUND; value = Dependent; return OK; } int setDependent(const Objectpath& newValue) { Dependent = newValue; Dependent.setNamespace(Dependent_NAMESPACE); Dependent_isNULL = false; return OK; } int getAssignedSequence(unsigned long long& value) const { if (AssignedSequence_isNULL==true) return NOT_FOUND; value = AssignedSequence; return OK; } int setAssignedSequence(const unsigned long long& newValue) { AssignedSequence = newValue; AssignedSequence_isNULL = false; return OK; } }; #endif /*OPENDRIM_ORDEREDSOFTWAREINVENTORYDEPENDENCY_H_*/ ././@LongLink0000000000000000000000000000021200000000000011560 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryDependency/assocOpenDRIM_OrderedSoftwareInventoryDependency.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryDependency/assocOpenDRIM_O0000644000175000017500000002174411401066502034635 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "assocOpenDRIM_OrderedSoftwareInventoryDependency.h" int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage) { _E_; string _assocClass, _resultClass, _resultRole, _role; assocClass == NULL ? _assocClass = "null" : _assocClass = assocClass; resultClass == NULL ? _resultClass = "null" : _resultClass = resultClass; resultRole == NULL ? _resultRole = "null" : _resultRole = resultRole; role == NULL ? _role = "null" : _role = role; for (unsigned int i=0; i& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant) { _E_; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_associatorFilter(broker, ctx, cop, knownInstance, assocClass, resultClass, role, resultRole, leftToRight, errorMessage); if (errorCode == -1) return OK; if (errorCode != OK) return errorCode; if (leftToRight) { if (role != NULL && strcasecmp(role, "Antecedent") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "Dependent") != 0) return OK; CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_associatorAntecedentToDependent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "Dependent") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "Antecedent") != 0) return OK; CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_associatorDependentToAntecedent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_enumerateAntecedents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, Antecedent_NAMESPACE, Antecedent_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(SoftwareInventory_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareInventory_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareInventory_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_getAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Antecedent_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Antecedent_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ManagedElement _instance; SoftwareInventory_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareInventory_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareInventory_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_enumerateDependents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, Dependent_NAMESPACE, Dependent_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(SoftwareInventory_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareInventory_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareInventory_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_getDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Dependent_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Dependent_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ManagedElement _instance; SoftwareInventory_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareInventory_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareInventory_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000021000000000000011556 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryDependency/assocOpenDRIM_OrderedSoftwareInventoryDependency.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryDependency/assocOpenDRIM_O0000644000175000017500000000655011401066502034633 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ASSOCOPENDRIM_ORDEREDSOFTWAREINVENTORYDEPENDENCY_H_ #define ASSOCOPENDRIM_ORDEREDSOFTWAREINVENTORYDEPENDENCY_H_ #include "OpenDRIM_OrderedSoftwareInventoryDependencyAccess.h" int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_associator(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties, vector& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_enumerateAntecedents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_getAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_enumerateDependents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_getDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_ORDEREDSOFTWAREINVENTORYDEPENDENCY_H_*/ ././@LongLink0000000000000000000000000000021100000000000011557 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryDependency/OpenDRIM_OrderedSoftwareInventoryDependencyAccess.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryDependency/OpenDRIM_Ordere0000644000175000017500000001152211401066502034617 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_ORDEREDSOFTWAREINVENTORYDEPENDENCYACCESS_H_ #define OPENDRIM_ORDEREDSOFTWAREINVENTORYDEPENDENCYACCESS_H_ #include "SoftwareInventory_Common.h" #include "OpenDRIM_OrderedSoftwareInventoryDependency.h" #include "assocOpenDRIM_OrderedSoftwareInventoryDependency.h" int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_load(const CMPIBroker* broker, string& errorMessage); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_unload(string& errorMessage); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_OrderedSoftwareInventoryDependency& instance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_OrderedSoftwareInventoryDependency& newInstance, const OpenDRIM_OrderedSoftwareInventoryDependency& oldInstance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_OrderedSoftwareInventoryDependency& instance, string& errorMessage); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_OrderedSoftwareInventoryDependency& instance, string& errorMessage); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_associatorAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const char** properties, vector& Dependent_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_associatorDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const char** properties, vector& Antecedent_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_referenceAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const vector& Dependent_instances, vector& OpenDRIM_OrderedSoftwareInventoryDependency_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_OrderedSoftwareInventoryDependency_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_populate(OpenDRIM_OrderedSoftwareInventoryDependency& instance, string& errorMessage); #endif /*OPENDRIM_ORDEREDSOFTWAREINVENTORYDEPENDENCYACCESS_H_*/ ././@LongLink0000000000000000000000000000020700000000000011564 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryDependency/cmpiOpenDRIM_OrderedSoftwareInventoryDependency.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryDependency/cmpiOpenDRIM_Or0000644000175000017500000000471611401066502034637 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_ORDEREDSOFTWAREINVENTORYDEPENDENCY_H_ #define CMPIOPENDRIM_ORDEREDSOFTWAREINVENTORYDEPENDENCY_H_ #include "OpenDRIM_OrderedSoftwareInventoryDependency.h" CMPIObjectPath* SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_OrderedSoftwareInventoryDependency& instance); CMPIInstance* SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_OrderedSoftwareInventoryDependency& instance); void SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_OrderedSoftwareInventoryDependency& instance); void SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_OrderedSoftwareInventoryDependency& instance); #endif /*CMPIOPENDRIM_ORDEREDSOFTWAREINVENTORYDEPENDENCY_H_*/ ././@LongLink0000000000000000000000000000021100000000000011557 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryDependency/cmpiOpenDRIM_OrderedSoftwareInventoryDependency.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryDependency/cmpiOpenDRIM_Or0000644000175000017500000000701511401066502034632 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_OrderedSoftwareInventoryDependency.h" CMPIObjectPath* SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_OrderedSoftwareInventoryDependency& instance) { _E_; Objectpath op(broker, OpenDRIM_OrderedSoftwareInventoryDependency_classnames[0], OpenDRIM_OrderedSoftwareInventoryDependency_NAMESPACE); if (!instance.Antecedent_isNULL) op.addKey("Antecedent", instance.Antecedent); if (!instance.Dependent_isNULL) op.addKey("Dependent", instance.Dependent); _L_; return op.getHdl(); } CMPIInstance* SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_OrderedSoftwareInventoryDependency& instance) { _E_; Objectpath op(broker, SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.AssignedSequence_isNULL) ci.setProperty("AssignedSequence", instance.AssignedSequence); _L_; return ci.getHdl(); } void SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_OrderedSoftwareInventoryDependency& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("Antecedent", instance.Antecedent) == OK) instance.Antecedent_isNULL = false; if (op.getKey("Dependent", instance.Dependent) == OK) instance.Dependent_isNULL = false; _L_; } void SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_OrderedSoftwareInventoryDependency& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Antecedent", instance.Antecedent) == OK) instance.Antecedent_isNULL = false; if (inst.getProperty("Dependent", instance.Dependent) == OK) instance.Dependent_isNULL = false; if (inst.getProperty("AssignedSequence", instance.AssignedSequence) == OK) instance.AssignedSequence_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000021300000000000011561 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryDependency/OpenDRIM_OrderedSoftwareInventoryDependencyAccess.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryDependency/OpenDRIM_Ordere0000644000175000017500000002700311401066502034620 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_OrderedSoftwareInventoryDependencyAccess.h" int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareInventory_CIM_ManagedElement_load(broker, errorMessage)); CF_assert(SoftwareInventory_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareInventory_CIM_ManagedElement_unload(errorMessage)); CF_assert(SoftwareInventory_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_isAssociated(const Instance& Antecedent, const Instance& Dependent, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector subjects; // Only get the instance names CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_enumerateAntecedents(broker, ctx, subjects, NULL, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_enumerateAntecedents(broker, ctx, subjects, NULL, false, errorMessage)); vector::iterator c = subjects.begin(); vector::iterator end = subjects.end(); for (; c != end; ++c) { bool leftToRight = true; vector associatedInstances; SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), Antecedent_classnames[0], Dependent_classnames[0], Antecedent_role.c_str(), Dependent_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_referenceAntecedentToDependent(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_OrderedSoftwareInventoryDependency& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath Antecedent_objectpath; instance.getAntecedent(Antecedent_objectpath); Instance Antecedent_instance; CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_getAntecedent(broker, ctx, Antecedent_objectpath, Antecedent_instance, NULL, errorMessage)); Objectpath Dependent_objectpath; instance.getDependent(Dependent_objectpath); Instance Dependent_instance; CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_getDependent(broker, ctx, Dependent_objectpath, Dependent_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_isAssociated(Antecedent_instance, Dependent_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_populate(instance, errorMessage)); _L_; return OK; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_OrderedSoftwareInventoryDependency& newInstance, const OpenDRIM_OrderedSoftwareInventoryDependency& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_OrderedSoftwareInventoryDependency& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_OrderedSoftwareInventoryDependency& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_associatorAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const char** properties, vector& Dependent_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector Dependent_instances; if (discriminant=="a") CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_enumerateDependents(broker, ctx, Dependent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_enumerateDependents(broker, ctx, Dependent_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_enumerateDependents(broker, ctx, Dependent_instances, properties, false, errorMessage)); } for (size_t i=0; i& Antecedent_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector Antecedent_instances; if (discriminant=="a") CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); } for (size_t i=0; i& Dependent_instances, vector& OpenDRIM_OrderedSoftwareInventoryDependency_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < Dependent_instances.size(); i++) { OpenDRIM_OrderedSoftwareInventoryDependency instance; instance.setAntecedent(((Instance) Antecedent_instance).getObjectpath()); instance.setDependent(((Instance) Dependent_instances[i]).getObjectpath()); if (discriminant == "r") { CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_populate(instance, errorMessage)); } OpenDRIM_OrderedSoftwareInventoryDependency_instances.push_back(instance); } _L_; return OK; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_OrderedSoftwareInventoryDependency_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < Antecedent_instances.size(); i++) { OpenDRIM_OrderedSoftwareInventoryDependency instance; instance.setAntecedent(((Instance) Antecedent_instances[i]).getObjectpath()); instance.setDependent(((Instance) Dependent_instance).getObjectpath()); if (discriminant == "r") { CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_populate(instance, errorMessage)); } OpenDRIM_OrderedSoftwareInventoryDependency_instances.push_back(instance); } _L_; return OK; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryDependency_populate(OpenDRIM_OrderedSoftwareInventoryDependency& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_RegisteredSoftwareInventoryProfile/0000755000175000017500000000000011401066502032051 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000021500000000000011563 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_RegisteredSoftwareInventoryProfile/OpenDRIM_RegisteredSoftwareInventoryProfileProvider.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_RegisteredSoftwareInventoryProfile/OpenDRIM_Regist0000644000175000017500000003047311401066502034675 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_RegisteredSoftwareInventoryProfile.h" #include "OpenDRIM_RegisteredSoftwareInventoryProfileAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfileProviderSetInstance SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfileProviderModifyInstance #endif int SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_init(const CMPIBroker* broker); int SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfileProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfileProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredSoftwareInventoryProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfileProviderEnumInstances(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredSoftwareInventoryProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfileProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RegisteredSoftwareInventoryProfile instance; SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredSoftwareInventoryProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfileProviderSetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RegisteredSoftwareInventoryProfile newInstance, oldInstance; SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_toCPP(_broker, ci, newInstance); SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredSoftwareInventoryProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredSoftwareInventoryProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfileProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RegisteredSoftwareInventoryProfile instance; SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_toCPP(_broker, ci, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_RegisteredSoftwareInventoryProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredSoftwareInventoryProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredSoftwareInventoryProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfileProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RegisteredSoftwareInventoryProfile instance; SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredSoftwareInventoryProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredSoftwareInventoryProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfileProviderExecQuery(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* lang, const char* query) { _E_; CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } /* ---------------------------------------------------------------------------*/ /* End of Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_init FAILED: " + (string) OpenDRIM_RegisteredSoftwareInventoryProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_unload(errorMessage); if (errorCode != OK) { errorMessage += "SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_unload FAILED: " + (string) OpenDRIM_RegisteredSoftwareInventoryProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_INIT if (SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_init(_broker) < 0) return NULL CMInstanceMIStub(SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfileProvider, SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfileProvider, _broker, SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_RegisteredSoftwareInventoryProfile/Makefile.am0000644000175000017500000000443311401066502034111 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfileProvider.la libcmpiSoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfileProvider_la_SOURCES = OpenDRIM_RegisteredSoftwareInventoryProfileAccess.cpp OpenDRIM_RegisteredSoftwareInventoryProfileProvider.cpp cmpiOpenDRIM_RegisteredSoftwareInventoryProfile.cpp libcmpiSoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfileProvider_la_LIBADD = ../Common/libcmpiSoftwareInventory_Common.la libcmpiSoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfileProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_RegisteredSoftwareInventoryProfile.h OpenDRIM_RegisteredSoftwareInventoryProfile.h OpenDRIM_RegisteredSoftwareInventoryProfileAccess.h ././@LongLink0000000000000000000000000000020300000000000011560 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_RegisteredSoftwareInventoryProfile/OpenDRIM_RegisteredSoftwareInventoryProfile.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_RegisteredSoftwareInventoryProfile/OpenDRIM_Regist0000644000175000017500000001372611401066502034677 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_REGISTEREDSOFTWAREINVENTORYPROFILE_H_ #define OPENDRIM_REGISTEREDSOFTWAREINVENTORYPROFILE_H_ #include const static char* OpenDRIM_RegisteredSoftwareInventoryProfile_classnames[] = {"OpenDRIM_RegisteredSoftwareInventoryProfile"}; static string OpenDRIM_RegisteredSoftwareInventoryProfile_NAMESPACE = _INTEROP_NAMESPACE; class OpenDRIM_RegisteredSoftwareInventoryProfile { public: string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string ElementName; bool ElementName_isNULL; string InstanceID; bool InstanceID_isNULL; unsigned short RegisteredOrganization; bool RegisteredOrganization_isNULL; string OtherRegisteredOrganization; bool OtherRegisteredOrganization_isNULL; string RegisteredName; bool RegisteredName_isNULL; string RegisteredVersion; bool RegisteredVersion_isNULL; vector AdvertiseTypes; bool AdvertiseTypes_isNULL; vector AdvertiseTypeDescriptions; bool AdvertiseTypeDescriptions_isNULL; OpenDRIM_RegisteredSoftwareInventoryProfile() { Caption_isNULL = true; Description_isNULL = true; ElementName_isNULL = true; InstanceID_isNULL = true; RegisteredOrganization_isNULL = true; OtherRegisteredOrganization_isNULL = true; RegisteredName_isNULL = true; RegisteredVersion_isNULL = true; AdvertiseTypes_isNULL = true; AdvertiseTypeDescriptions_isNULL = true; } ~OpenDRIM_RegisteredSoftwareInventoryProfile() {} string getKeys() const { return CF_toLowCase(".InstanceID=\"" + CF_quoteString(InstanceID) + "\""); } int getCaption(string& value) const { if (Caption_isNULL==true) return NOT_FOUND; value = Caption; return OK; } int setCaption(const string& newValue) { Caption = newValue; Caption_isNULL = false; return OK; } int getDescription(string& value) const { if (Description_isNULL==true) return NOT_FOUND; value = Description; return OK; } int setDescription(const string& newValue) { Description = newValue; Description_isNULL = false; return OK; } int getElementName(string& value) const { if (ElementName_isNULL==true) return NOT_FOUND; value = ElementName; return OK; } int setElementName(const string& newValue) { ElementName = newValue; ElementName_isNULL = false; return OK; } int getInstanceID(string& value) const { if (InstanceID_isNULL==true) return NOT_FOUND; value = InstanceID; return OK; } int setInstanceID(const string& newValue) { InstanceID = newValue; InstanceID_isNULL = false; return OK; } int getRegisteredOrganization(unsigned short& value) const { if (RegisteredOrganization_isNULL==true) return NOT_FOUND; value = RegisteredOrganization; return OK; } int setRegisteredOrganization(const unsigned short& newValue) { RegisteredOrganization = newValue; RegisteredOrganization_isNULL = false; return OK; } int getOtherRegisteredOrganization(string& value) const { if (OtherRegisteredOrganization_isNULL==true) return NOT_FOUND; value = OtherRegisteredOrganization; return OK; } int setOtherRegisteredOrganization(const string& newValue) { OtherRegisteredOrganization = newValue; OtherRegisteredOrganization_isNULL = false; return OK; } int getRegisteredName(string& value) const { if (RegisteredName_isNULL==true) return NOT_FOUND; value = RegisteredName; return OK; } int setRegisteredName(const string& newValue) { RegisteredName = newValue; RegisteredName_isNULL = false; return OK; } int getRegisteredVersion(string& value) const { if (RegisteredVersion_isNULL==true) return NOT_FOUND; value = RegisteredVersion; return OK; } int setRegisteredVersion(const string& newValue) { RegisteredVersion = newValue; RegisteredVersion_isNULL = false; return OK; } int getAdvertiseTypes(vector& value) const { if (AdvertiseTypes_isNULL==true) return NOT_FOUND; value = AdvertiseTypes; return OK; } int setAdvertiseTypes(const vector& newValue) { AdvertiseTypes = newValue; AdvertiseTypes_isNULL = false; return OK; } int getAdvertiseTypeDescriptions(vector& value) const { if (AdvertiseTypeDescriptions_isNULL==true) return NOT_FOUND; value = AdvertiseTypeDescriptions; return OK; } int setAdvertiseTypeDescriptions(const vector& newValue) { AdvertiseTypeDescriptions = newValue; AdvertiseTypeDescriptions_isNULL = false; return OK; } }; #endif /*OPENDRIM_REGISTEREDSOFTWAREINVENTORYPROFILE_H_*/ ././@LongLink0000000000000000000000000000021300000000000011561 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_RegisteredSoftwareInventoryProfile/OpenDRIM_RegisteredSoftwareInventoryProfileAccess.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_RegisteredSoftwareInventoryProfile/OpenDRIM_Regist0000644000175000017500000001032211401066502034664 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_RegisteredSoftwareInventoryProfileAccess.h" const string instanceID="OpenDRIM:SoftwareInventory:1.0.1"; int SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; OpenDRIM_RegisteredSoftwareInventoryProfile instance; instance.setInstanceID(instanceID); if(discriminant=="ei") CF_assert(SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_populate(instance, errorMessage)); result.push_back(instance); _L_; return OK; } int SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_RegisteredSoftwareInventoryProfile& instance, const char** properties, string& errorMessage) { _E_; if (instance.InstanceID!=instanceID) { errorMessage = "No instance"; return NOT_FOUND; } CF_assert(SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_populate(instance, errorMessage)); _L_; return OK; } int SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredSoftwareInventoryProfile& newInstance, const OpenDRIM_RegisteredSoftwareInventoryProfile& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredSoftwareInventoryProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredSoftwareInventoryProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_populate(OpenDRIM_RegisteredSoftwareInventoryProfile& instance, string& errorMessage) { _E_; vector AdvertiseTypes; instance.setRegisteredName("Software Inventory"); instance.setRegisteredVersion("1.0.1"); instance.setRegisteredOrganization(2); // DMTF AdvertiseTypes.push_back(2); // Not Advertised instance.setAdvertiseTypes(AdvertiseTypes); _L_; return OK; } ././@LongLink0000000000000000000000000000021100000000000011557 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_RegisteredSoftwareInventoryProfile/cmpiOpenDRIM_RegisteredSoftwareInventoryProfile.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_RegisteredSoftwareInventoryProfile/cmpiOpenDRIM_Re0000644000175000017500000001205411401066502034652 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_RegisteredSoftwareInventoryProfile.h" CMPIObjectPath* SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_RegisteredSoftwareInventoryProfile& instance) { _E_; Objectpath op(broker, OpenDRIM_RegisteredSoftwareInventoryProfile_classnames[0], OpenDRIM_RegisteredSoftwareInventoryProfile_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_RegisteredSoftwareInventoryProfile& instance) { _E_; Objectpath op(broker, SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Caption_isNULL) ci.setProperty("Caption", instance.Caption); if (!instance.Description_isNULL) ci.setProperty("Description", instance.Description); if (!instance.ElementName_isNULL) ci.setProperty("ElementName", instance.ElementName); if (!instance.RegisteredOrganization_isNULL) ci.setProperty("RegisteredOrganization", instance.RegisteredOrganization); if (!instance.OtherRegisteredOrganization_isNULL) ci.setProperty("OtherRegisteredOrganization", instance.OtherRegisteredOrganization); if (!instance.RegisteredName_isNULL) ci.setProperty("RegisteredName", instance.RegisteredName); if (!instance.RegisteredVersion_isNULL) ci.setProperty("RegisteredVersion", instance.RegisteredVersion); if (!instance.AdvertiseTypes_isNULL) ci.setProperty("AdvertiseTypes", instance.AdvertiseTypes); if (!instance.AdvertiseTypeDescriptions_isNULL) ci.setProperty("AdvertiseTypeDescriptions", instance.AdvertiseTypeDescriptions); _L_; return ci.getHdl(); } void SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_RegisteredSoftwareInventoryProfile& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_RegisteredSoftwareInventoryProfile& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Caption", instance.Caption) == OK) instance.Caption_isNULL = false; if (inst.getProperty("Description", instance.Description) == OK) instance.Description_isNULL = false; if (inst.getProperty("ElementName", instance.ElementName) == OK) instance.ElementName_isNULL = false; if (inst.getProperty("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; if (inst.getProperty("RegisteredOrganization", instance.RegisteredOrganization) == OK) instance.RegisteredOrganization_isNULL = false; if (inst.getProperty("OtherRegisteredOrganization", instance.OtherRegisteredOrganization) == OK) instance.OtherRegisteredOrganization_isNULL = false; if (inst.getProperty("RegisteredName", instance.RegisteredName) == OK) instance.RegisteredName_isNULL = false; if (inst.getProperty("RegisteredVersion", instance.RegisteredVersion) == OK) instance.RegisteredVersion_isNULL = false; if (inst.getProperty("AdvertiseTypes", instance.AdvertiseTypes) == OK) instance.AdvertiseTypes_isNULL = false; if (inst.getProperty("AdvertiseTypeDescriptions", instance.AdvertiseTypeDescriptions) == OK) instance.AdvertiseTypeDescriptions_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000021100000000000011557 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_RegisteredSoftwareInventoryProfile/OpenDRIM_RegisteredSoftwareInventoryProfileAccess.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_RegisteredSoftwareInventoryProfile/OpenDRIM_Regist0000644000175000017500000000655211401066502034676 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_REGISTEREDSOFTWAREINVENTORYPROFILEACCESS_H_ #define OPENDRIM_REGISTEREDSOFTWAREINVENTORYPROFILEACCESS_H_ #include "SoftwareInventory_Common.h" #include "OpenDRIM_RegisteredSoftwareInventoryProfile.h" int SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_load(const CMPIBroker* broker, string& errorMessage); int SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_unload(string& errorMessage); int SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_RegisteredSoftwareInventoryProfile& instance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredSoftwareInventoryProfile& newInstance, const OpenDRIM_RegisteredSoftwareInventoryProfile& oldInstance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredSoftwareInventoryProfile& instance, string& errorMessage); int SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredSoftwareInventoryProfile& instance, string& errorMessage); int SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_populate(OpenDRIM_RegisteredSoftwareInventoryProfile& instance, string& errorMessage); #endif /*OPENDRIM_REGISTEREDSOFTWAREINVENTORYPROFILEACCESS_H_*/ ././@LongLink0000000000000000000000000000020700000000000011564 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_RegisteredSoftwareInventoryProfile/cmpiOpenDRIM_RegisteredSoftwareInventoryProfile.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_RegisteredSoftwareInventoryProfile/cmpiOpenDRIM_Re0000644000175000017500000000471611401066502034660 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_REGISTEREDSOFTWAREINVENTORYPROFILE_H_ #define CMPIOPENDRIM_REGISTEREDSOFTWAREINVENTORYPROFILE_H_ #include "OpenDRIM_RegisteredSoftwareInventoryProfile.h" CMPIObjectPath* SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_RegisteredSoftwareInventoryProfile& instance); CMPIInstance* SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_RegisteredSoftwareInventoryProfile& instance); void SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_RegisteredSoftwareInventoryProfile& instance); void SoftwareInventory_OpenDRIM_RegisteredSoftwareInventoryProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_RegisteredSoftwareInventoryProfile& instance); #endif /*CMPIOPENDRIM_REGISTEREDSOFTWAREINVENTORYPROFILE_H_*/ opendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareInventoryIdentity/0000755000175000017500000000000011401066502030224 5ustar guillaumeguillaumeopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareInventoryIdentity/Makefile.am0000644000175000017500000000520411401066502032261 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProvider.la libcmpiSoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProvider_la_SOURCES = OpenDRIM_SoftwareInventoryIdentityAccess.cpp OpenDRIM_SoftwareInventoryIdentityProvider.cpp cmpiOpenDRIM_SoftwareInventoryIdentity.cpp assocOpenDRIM_SoftwareInventoryIdentity.cpp # May have to be adjusted for direct invocation libcmpiSoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProvider_la_CPPFLAGS = -I../CIM_SoftwareIdentity -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiSoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProvider_la_LIBADD = ../Common/libcmpiSoftwareInventory_Common.la #../CIM_SoftwareIdentity/libcmpiSoftwareInventory_CIM_SoftwareIdentityProvider.la ../CIM_ManagedElement/libcmpiSoftwareInventory_CIM_ManagedElementProvider.la libcmpiSoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_SoftwareInventoryIdentity.h OpenDRIM_SoftwareInventoryIdentity.h OpenDRIM_SoftwareInventoryIdentityAccess.h ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareInventoryIdentity/assocOpenDRIM_SoftwareInventoryIdentity.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareInventoryIdentity/assocOpenDRIM_SoftwareIn0000644000175000017500000000641611401066502034725 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ASSOCOPENDRIM_SOFTWAREINVENTORYIDENTITY_H_ #define ASSOCOPENDRIM_SOFTWAREINVENTORYIDENTITY_H_ #include "OpenDRIM_SoftwareInventoryIdentityAccess.h" int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_associator(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties, vector& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant); int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_enumerateAntecedents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_getAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_enumerateDependents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_getDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_SOFTWAREINVENTORYIDENTITY_H_*/ ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareInventoryIdentity/cmpiOpenDRIM_SoftwareInventoryIdentity.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareInventoryIdentity/cmpiOpenDRIM_SoftwareInv0000644000175000017500000000764311401066502034736 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SoftwareInventoryIdentity.h" CMPIObjectPath* SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_SoftwareInventoryIdentity& instance) { _E_; Objectpath op(broker, OpenDRIM_SoftwareInventoryIdentity_classnames[0], OpenDRIM_SoftwareInventoryIdentity_NAMESPACE); if (!instance.Antecedent_isNULL) op.addKey("Antecedent", instance.Antecedent); if (!instance.Dependent_isNULL) op.addKey("Dependent", instance.Dependent); _L_; return op.getHdl(); } CMPIInstance* SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_SoftwareInventoryIdentity& instance) { _E_; Objectpath op(broker, SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.UpgradeCondition_isNULL) ci.setProperty("UpgradeCondition", instance.UpgradeCondition); if (!instance.OtherUpgradeCondition_isNULL) ci.setProperty("OtherUpgradeCondition", instance.OtherUpgradeCondition); if (!instance.ElementSoftwareStatus_isNULL) ci.setProperty("ElementSoftwareStatus", instance.ElementSoftwareStatus); _L_; return ci.getHdl(); } void SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_SoftwareInventoryIdentity& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("Antecedent", instance.Antecedent) == OK) instance.Antecedent_isNULL = false; if (op.getKey("Dependent", instance.Dependent) == OK) instance.Dependent_isNULL = false; _L_; } void SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_SoftwareInventoryIdentity& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Antecedent", instance.Antecedent) == OK) instance.Antecedent_isNULL = false; if (inst.getProperty("Dependent", instance.Dependent) == OK) instance.Dependent_isNULL = false; if (inst.getProperty("UpgradeCondition", instance.UpgradeCondition) == OK) instance.UpgradeCondition_isNULL = false; if (inst.getProperty("OtherUpgradeCondition", instance.OtherUpgradeCondition) == OK) instance.OtherUpgradeCondition_isNULL = false; if (inst.getProperty("ElementSoftwareStatus", instance.ElementSoftwareStatus) == OK) instance.ElementSoftwareStatus_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareInventoryIdentity/cmpiOpenDRIM_SoftwareInventoryIdentity.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareInventoryIdentity/cmpiOpenDRIM_SoftwareInv0000644000175000017500000000454211401066502034731 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_SOFTWAREINVENTORYIDENTITY_H_ #define CMPIOPENDRIM_SOFTWAREINVENTORYIDENTITY_H_ #include "OpenDRIM_SoftwareInventoryIdentity.h" CMPIObjectPath* SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_SoftwareInventoryIdentity& instance); CMPIInstance* SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_SoftwareInventoryIdentity& instance); void SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_SoftwareInventoryIdentity& instance); void SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_SoftwareInventoryIdentity& instance); #endif /*CMPIOPENDRIM_SOFTWAREINVENTORYIDENTITY_H_*/ ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareInventoryIdentity/OpenDRIM_SoftwareInventoryIdentityProvider.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareInventoryIdentity/OpenDRIM_SoftwareInvento0000644000175000017500000004423311401066502034747 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SoftwareInventoryIdentity.h" #include "OpenDRIM_SoftwareInventoryIdentityAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define SoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProviderSetInstance SoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProviderModifyInstance #endif int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_init(const CMPIBroker* broker); int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInventoryIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProviderEnumInstances(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInventoryIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareInventoryIdentity instance; SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInventoryIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProviderSetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareInventoryIdentity newInstance, oldInstance; SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_toCPP(_broker, ci, newInstance); SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInventoryIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInventoryIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareInventoryIdentity instance; SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_toCPP(_broker, ci, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_SoftwareInventoryIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInventoryIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInventoryIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareInventoryIdentity instance; SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInventoryIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInventoryIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProviderExecQuery(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* lang, const char* query) { _E_; CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } /* ---------------------------------------------------------------------------*/ /* End of Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Association Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProviderAssociatorNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInventoryIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnObjectPath(rslt, associatedInstances[i].getObjectpath().getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProviderAssociators(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInventoryIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnInstance(rslt, associatedInstances[i].getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProviderReferenceNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInventoryIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInventoryIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProviderReferences(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInventoryIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInventoryIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_init FAILED: " + (string) OpenDRIM_SoftwareInventoryIdentity_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_unload(errorMessage); if (errorCode != OK) { errorMessage += "SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_unload FAILED: " + (string) OpenDRIM_SoftwareInventoryIdentity_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_INIT if (SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_init(_broker) < 0) return NULL CMInstanceMIStub(SoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProvider, SoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProvider, _broker, SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_INIT); CMAssociationMIStub(SoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProvider, SoftwareInventory_OpenDRIM_SoftwareInventoryIdentityProvider, _broker, SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareInventoryIdentity/OpenDRIM_SoftwareInventoryIdentityAccess.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareInventoryIdentity/OpenDRIM_SoftwareInvento0000644000175000017500000002614011401066502034744 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_SoftwareInventoryIdentityAccess.h" int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareInventory_CIM_SoftwareIdentity_load(broker, errorMessage)); CF_assert(SoftwareInventory_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareInventory_CIM_SoftwareIdentity_unload(errorMessage)); CF_assert(SoftwareInventory_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_isAssociated(const Instance& Antecedent, const Instance& Dependent, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector subjects; // Only get the instance names CF_assert(SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_enumerateAntecedents(broker, ctx, subjects, NULL, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_enumerateAntecedents(broker, ctx, subjects, NULL, false, errorMessage)); vector::iterator c = subjects.begin(); vector::iterator end = subjects.end(); for (; c != end; ++c) { bool leftToRight = true; vector associatedInstances; SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), Antecedent_classnames[0], Dependent_classnames[0], Antecedent_role.c_str(), Dependent_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_referenceAntecedentToDependent(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_SoftwareInventoryIdentity& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath Antecedent_objectpath; instance.getAntecedent(Antecedent_objectpath); Instance Antecedent_instance; CF_assert(SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_getAntecedent(broker, ctx, Antecedent_objectpath, Antecedent_instance, NULL, errorMessage)); Objectpath Dependent_objectpath; instance.getDependent(Dependent_objectpath); Instance Dependent_instance; CF_assert(SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_getDependent(broker, ctx, Dependent_objectpath, Dependent_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_isAssociated(Antecedent_instance, Dependent_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } CF_assert(SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_populate(instance, errorMessage)); _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInventoryIdentity& newInstance, const OpenDRIM_SoftwareInventoryIdentity& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInventoryIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInventoryIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_associatorAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const char** properties, vector& Dependent_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector Dependent_instances; if (discriminant=="a") CF_assert(SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_enumerateDependents(broker, ctx, Dependent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_enumerateDependents(broker, ctx, Dependent_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_enumerateDependents(broker, ctx, Dependent_instances, properties, false, errorMessage)); } for (size_t i=0; i& Antecedent_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector Antecedent_instances; if (discriminant=="a") CF_assert(SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); } for (size_t i=0; i& Dependent_instances, vector& OpenDRIM_SoftwareInventoryIdentity_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < Dependent_instances.size(); i++) { OpenDRIM_SoftwareInventoryIdentity instance; instance.setAntecedent(((Instance) Antecedent_instance).getObjectpath()); instance.setDependent(((Instance) Dependent_instances[i]).getObjectpath()); if (discriminant == "r") { CF_assert(SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_populate(instance, errorMessage)); } OpenDRIM_SoftwareInventoryIdentity_instances.push_back(instance); } _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_SoftwareInventoryIdentity_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < Antecedent_instances.size(); i++) { OpenDRIM_SoftwareInventoryIdentity instance; instance.setAntecedent(((Instance) Antecedent_instances[i]).getObjectpath()); instance.setDependent(((Instance) Dependent_instance).getObjectpath()); if (discriminant == "r") { CF_assert(SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_populate(instance, errorMessage)); } OpenDRIM_SoftwareInventoryIdentity_instances.push_back(instance); } _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_populate(OpenDRIM_SoftwareInventoryIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareInventoryIdentity/OpenDRIM_SoftwareInventoryIdentityAccess.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareInventoryIdentity/OpenDRIM_SoftwareInvento0000644000175000017500000001112611401066502034742 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SOFTWAREINVENTORYIDENTITYACCESS_H_ #define OPENDRIM_SOFTWAREINVENTORYIDENTITYACCESS_H_ #include "SoftwareInventory_Common.h" #include "OpenDRIM_SoftwareInventoryIdentity.h" #include "assocOpenDRIM_SoftwareInventoryIdentity.h" int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_load(const CMPIBroker* broker, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_unload(string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_SoftwareInventoryIdentity& instance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInventoryIdentity& newInstance, const OpenDRIM_SoftwareInventoryIdentity& oldInstance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInventoryIdentity& instance, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInventoryIdentity& instance, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_associatorAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const char** properties, vector& Dependent_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_associatorDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const char** properties, vector& Antecedent_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_referenceAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const vector& Dependent_instances, vector& OpenDRIM_SoftwareInventoryIdentity_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_SoftwareInventoryIdentity_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_populate(OpenDRIM_SoftwareInventoryIdentity& instance, string& errorMessage); #endif /*OPENDRIM_SOFTWAREINVENTORYIDENTITYACCESS_H_*/ ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareInventoryIdentity/OpenDRIM_SoftwareInventoryIdentity.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareInventoryIdentity/OpenDRIM_SoftwareInvento0000644000175000017500000001136211401066502034744 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SOFTWAREINVENTORYIDENTITY_H_ #define OPENDRIM_SOFTWAREINVENTORYIDENTITY_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_SoftwareIdentity.h" #include "CIM_SoftwareIdentityAccess.h" #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" */ const static char* OpenDRIM_SoftwareInventoryIdentity_classnames[] = {"OpenDRIM_SoftwareInventoryIdentity"}; static string OpenDRIM_SoftwareInventoryIdentity_NAMESPACE = _NAMESPACE; const static string Antecedent_role = "Antecedent"; const static char* Antecedent_classnames[] = {"OpenDRIM_SoftwareIdentity"}; const static string Antecedent_NAMESPACE = _NAMESPACE; const static string Dependent_role = "Dependent"; const static char* Dependent_classnames[] = {"CIM_ManagedElement"}; const static string Dependent_NAMESPACE = _NAMESPACE; class OpenDRIM_SoftwareInventoryIdentity { public: Objectpath Antecedent; bool Antecedent_isNULL; Objectpath Dependent; bool Dependent_isNULL; unsigned short UpgradeCondition; bool UpgradeCondition_isNULL; string OtherUpgradeCondition; bool OtherUpgradeCondition_isNULL; vector ElementSoftwareStatus; bool ElementSoftwareStatus_isNULL; OpenDRIM_SoftwareInventoryIdentity() { Antecedent_isNULL = true; Dependent_isNULL = true; UpgradeCondition_isNULL = true; OtherUpgradeCondition_isNULL = true; ElementSoftwareStatus_isNULL = true; } ~OpenDRIM_SoftwareInventoryIdentity() {} string getKeys() const { return CF_toLowCase(".Antecedent=\"" + CF_quoteString(Antecedent.toString()) + "\""".Dependent=\"" + CF_quoteString(Dependent.toString()) + "\""); } int getAntecedent(Objectpath& value) const { if (Antecedent_isNULL==true) return NOT_FOUND; value = Antecedent; return OK; } int setAntecedent(const Objectpath& newValue) { Antecedent = newValue; Antecedent.setNamespace(Antecedent_NAMESPACE); Antecedent_isNULL = false; return OK; } int getDependent(Objectpath& value) const { if (Dependent_isNULL==true) return NOT_FOUND; value = Dependent; return OK; } int setDependent(const Objectpath& newValue) { Dependent = newValue; Dependent.setNamespace(Dependent_NAMESPACE); Dependent_isNULL = false; return OK; } int getUpgradeCondition(unsigned short& value) const { if (UpgradeCondition_isNULL==true) return NOT_FOUND; value = UpgradeCondition; return OK; } int setUpgradeCondition(const unsigned short& newValue) { UpgradeCondition = newValue; UpgradeCondition_isNULL = false; return OK; } int getOtherUpgradeCondition(string& value) const { if (OtherUpgradeCondition_isNULL==true) return NOT_FOUND; value = OtherUpgradeCondition; return OK; } int setOtherUpgradeCondition(const string& newValue) { OtherUpgradeCondition = newValue; OtherUpgradeCondition_isNULL = false; return OK; } int getElementSoftwareStatus(vector& value) const { if (ElementSoftwareStatus_isNULL==true) return NOT_FOUND; value = ElementSoftwareStatus; return OK; } int setElementSoftwareStatus(const vector& newValue) { ElementSoftwareStatus = newValue; ElementSoftwareStatus_isNULL = false; return OK; } }; #endif /*OPENDRIM_SOFTWAREINVENTORYIDENTITY_H_*/ ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareInventoryIdentity/assocOpenDRIM_SoftwareInventoryIdentity.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareInventoryIdentity/assocOpenDRIM_SoftwareIn0000644000175000017500000002154411401066502034724 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "assocOpenDRIM_SoftwareInventoryIdentity.h" int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage) { _E_; string _assocClass, _resultClass, _resultRole, _role; assocClass == NULL ? _assocClass = "null" : _assocClass = assocClass; resultClass == NULL ? _resultClass = "null" : _resultClass = resultClass; resultRole == NULL ? _resultRole = "null" : _resultRole = resultRole; role == NULL ? _role = "null" : _role = role; for (unsigned int i=0; i& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant) { _E_; int errorCode = SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_associatorFilter(broker, ctx, cop, knownInstance, assocClass, resultClass, role, resultRole, leftToRight, errorMessage); if (errorCode == -1) return OK; if (errorCode != OK) return errorCode; if (leftToRight) { if (role != NULL && strcasecmp(role, "Antecedent") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "Dependent") != 0) return OK; CF_assert(SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_associatorAntecedentToDependent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "Dependent") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "Antecedent") != 0) return OK; CF_assert(SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_associatorDependentToAntecedent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_enumerateAntecedents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, Antecedent_NAMESPACE, Antecedent_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(SoftwareInventory_CIM_SoftwareIdentity_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareInventory_CIM_SoftwareIdentity_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareInventory_CIM_SoftwareIdentity_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_getAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Antecedent_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Antecedent_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_SoftwareIdentity _instance; SoftwareInventory_CIM_SoftwareIdentity_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareInventory_CIM_SoftwareIdentity_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareInventory_CIM_SoftwareIdentity_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_enumerateDependents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, Dependent_NAMESPACE, Dependent_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(SoftwareInventory_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareInventory_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareInventory_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareInventoryIdentity_getDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Dependent_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Dependent_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ManagedElement _instance; SoftwareInventory_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareInventory_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareInventory_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-softwareinventory-1.0.0~ppa/COPYING0000644000175000017500000004310311401066502022401 0ustar guillaumeguillaume GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. opendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_HostedSoftwareInventoryCollection/0000755000175000017500000000000011401066502031675 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000020700000000000011564 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_HostedSoftwareInventoryCollection/OpenDRIM_HostedSoftwareInventoryCollectionAccess.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_HostedSoftwareInventoryCollection/OpenDRIM_HostedS0000644000175000017500000001146611401066502034636 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_HOSTEDSOFTWAREINVENTORYCOLLECTIONACCESS_H_ #define OPENDRIM_HOSTEDSOFTWAREINVENTORYCOLLECTIONACCESS_H_ #include "SoftwareInventory_Common.h" #include "OpenDRIM_HostedSoftwareInventoryCollection.h" #include "assocOpenDRIM_HostedSoftwareInventoryCollection.h" int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_load(const CMPIBroker* broker, string& errorMessage); int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_unload(string& errorMessage); int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_HostedSoftwareInventoryCollection& instance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_HostedSoftwareInventoryCollection& newInstance, const OpenDRIM_HostedSoftwareInventoryCollection& oldInstance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_HostedSoftwareInventoryCollection& instance, string& errorMessage); int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_HostedSoftwareInventoryCollection& instance, string& errorMessage); int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_associatorAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const char** properties, vector& Dependent_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_associatorDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const char** properties, vector& Antecedent_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_referenceAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const vector& Dependent_instances, vector& OpenDRIM_HostedSoftwareInventoryCollection_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_HostedSoftwareInventoryCollection_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_populate(OpenDRIM_HostedSoftwareInventoryCollection& instance, string& errorMessage); #endif /*OPENDRIM_HOSTEDSOFTWAREINVENTORYCOLLECTIONACCESS_H_*/ opendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_HostedSoftwareInventoryCollection/Makefile.am0000644000175000017500000000534411401066502033737 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProvider.la libcmpiSoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProvider_la_SOURCES = OpenDRIM_HostedSoftwareInventoryCollectionAccess.cpp OpenDRIM_HostedSoftwareInventoryCollectionProvider.cpp cmpiOpenDRIM_HostedSoftwareInventoryCollection.cpp assocOpenDRIM_HostedSoftwareInventoryCollection.cpp # May have to be adjusted for direct invocation libcmpiSoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProvider_la_CPPFLAGS = -I../CIM_System -I../CIM_SystemSpecificCollection # Uncomment the end for direct invocation, may have to be adjusted libcmpiSoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProvider_la_LIBADD = ../Common/libcmpiSoftwareInventory_Common.la #../CIM_System/libcmpiSoftwareInventory_CIM_SystemProvider.la ../CIM_SystemSpecificCollection/libcmpiSoftwareInventory_CIM_SystemSpecificCollectionProvider.la libcmpiSoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_HostedSoftwareInventoryCollection.h OpenDRIM_HostedSoftwareInventoryCollection.h OpenDRIM_HostedSoftwareInventoryCollectionAccess.h ././@LongLink0000000000000000000000000000021300000000000011561 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_HostedSoftwareInventoryCollection/OpenDRIM_HostedSoftwareInventoryCollectionProvider.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_HostedSoftwareInventoryCollection/OpenDRIM_HostedS0000644000175000017500000004555311401066502034642 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_HostedSoftwareInventoryCollection.h" #include "OpenDRIM_HostedSoftwareInventoryCollectionAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProviderSetInstance SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProviderModifyInstance #endif int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_init(const CMPIBroker* broker); int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProviderEnumInstances(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_HostedSoftwareInventoryCollection instance; SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProviderSetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_HostedSoftwareInventoryCollection newInstance, oldInstance; SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_toCPP(_broker, ci, newInstance); SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_HostedSoftwareInventoryCollection instance; SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_toCPP(_broker, ci, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_HostedSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_HostedSoftwareInventoryCollection instance; SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProviderExecQuery(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* lang, const char* query) { _E_; CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } /* ---------------------------------------------------------------------------*/ /* End of Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Association Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProviderAssociatorNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnObjectPath(rslt, associatedInstances[i].getObjectpath().getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProviderAssociators(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnInstance(rslt, associatedInstances[i].getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProviderReferenceNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProviderReferences(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_HostedSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_init FAILED: " + (string) OpenDRIM_HostedSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_unload(errorMessage); if (errorCode != OK) { errorMessage += "SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_unload FAILED: " + (string) OpenDRIM_HostedSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_INIT if (SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_init(_broker) < 0) return NULL CMInstanceMIStub(SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProvider, SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProvider, _broker, SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_INIT); CMAssociationMIStub(SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProvider, SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollectionProvider, _broker, SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000020500000000000011562 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_HostedSoftwareInventoryCollection/cmpiOpenDRIM_HostedSoftwareInventoryCollection.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_HostedSoftwareInventoryCollection/cmpiOpenDRIM_Hos0000644000175000017500000000470211401066502034662 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_HOSTEDSOFTWAREINVENTORYCOLLECTION_H_ #define CMPIOPENDRIM_HOSTEDSOFTWAREINVENTORYCOLLECTION_H_ #include "OpenDRIM_HostedSoftwareInventoryCollection.h" CMPIObjectPath* SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_HostedSoftwareInventoryCollection& instance); CMPIInstance* SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_HostedSoftwareInventoryCollection& instance); void SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_HostedSoftwareInventoryCollection& instance); void SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_HostedSoftwareInventoryCollection& instance); #endif /*CMPIOPENDRIM_HOSTEDSOFTWAREINVENTORYCOLLECTION_H_*/ ././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_HostedSoftwareInventoryCollection/assocOpenDRIM_HostedSoftwareInventoryCollection.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_HostedSoftwareInventoryCollection/assocOpenDRIM_Ho0000644000175000017500000000653611401066502034666 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ASSOCOPENDRIM_HOSTEDSOFTWAREINVENTORYCOLLECTION_H_ #define ASSOCOPENDRIM_HOSTEDSOFTWAREINVENTORYCOLLECTION_H_ #include "OpenDRIM_HostedSoftwareInventoryCollectionAccess.h" int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage); int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_associator(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties, vector& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant); int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_enumerateAntecedents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_getAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_enumerateDependents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_getDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_HOSTEDSOFTWAREINVENTORYCOLLECTION_H_*/ ././@LongLink0000000000000000000000000000020700000000000011564 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_HostedSoftwareInventoryCollection/cmpiOpenDRIM_HostedSoftwareInventoryCollection.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_HostedSoftwareInventoryCollection/cmpiOpenDRIM_Hos0000644000175000017500000000643611401066502034670 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_HostedSoftwareInventoryCollection.h" CMPIObjectPath* SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_HostedSoftwareInventoryCollection& instance) { _E_; Objectpath op(broker, OpenDRIM_HostedSoftwareInventoryCollection_classnames[0], OpenDRIM_HostedSoftwareInventoryCollection_NAMESPACE); if (!instance.Antecedent_isNULL) op.addKey("Antecedent", instance.Antecedent); if (!instance.Dependent_isNULL) op.addKey("Dependent", instance.Dependent); _L_; return op.getHdl(); } CMPIInstance* SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_HostedSoftwareInventoryCollection& instance) { _E_; Objectpath op(broker, SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_HostedSoftwareInventoryCollection& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("Antecedent", instance.Antecedent) == OK) instance.Antecedent_isNULL = false; if (op.getKey("Dependent", instance.Dependent) == OK) instance.Dependent_isNULL = false; _L_; } void SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_HostedSoftwareInventoryCollection& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Antecedent", instance.Antecedent) == OK) instance.Antecedent_isNULL = false; if (inst.getProperty("Dependent", instance.Dependent) == OK) instance.Dependent_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000021000000000000011556 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_HostedSoftwareInventoryCollection/assocOpenDRIM_HostedSoftwareInventoryCollection.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_HostedSoftwareInventoryCollection/assocOpenDRIM_Ho0000644000175000017500000002174411401066502034664 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "assocOpenDRIM_HostedSoftwareInventoryCollection.h" int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage) { _E_; string _assocClass, _resultClass, _resultRole, _role; assocClass == NULL ? _assocClass = "null" : _assocClass = assocClass; resultClass == NULL ? _resultClass = "null" : _resultClass = resultClass; resultRole == NULL ? _resultRole = "null" : _resultRole = resultRole; role == NULL ? _role = "null" : _role = role; for (unsigned int i=0; i& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant) { _E_; int errorCode = SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_associatorFilter(broker, ctx, cop, knownInstance, assocClass, resultClass, role, resultRole, leftToRight, errorMessage); if (errorCode == -1) return OK; if (errorCode != OK) return errorCode; if (leftToRight) { if (role != NULL && strcasecmp(role, "Antecedent") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "Dependent") != 0) return OK; CF_assert(SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_associatorAntecedentToDependent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "Dependent") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "Antecedent") != 0) return OK; CF_assert(SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_associatorDependentToAntecedent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_enumerateAntecedents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, Antecedent_NAMESPACE, Antecedent_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(SoftwareInventory_CIM_System_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareInventory_CIM_System_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareInventory_CIM_System_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_getAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Antecedent_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Antecedent_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_System _instance; SoftwareInventory_CIM_System_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareInventory_CIM_System_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareInventory_CIM_System_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_enumerateDependents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, Dependent_NAMESPACE, Dependent_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(SoftwareInventory_CIM_SystemSpecificCollection_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareInventory_CIM_SystemSpecificCollection_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareInventory_CIM_SystemSpecificCollection_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_getDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Dependent_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Dependent_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_SystemSpecificCollection _instance; SoftwareInventory_CIM_SystemSpecificCollection_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareInventory_CIM_SystemSpecificCollection_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareInventory_CIM_SystemSpecificCollection_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000020100000000000011556 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_HostedSoftwareInventoryCollection/OpenDRIM_HostedSoftwareInventoryCollection.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_HostedSoftwareInventoryCollection/OpenDRIM_HostedS0000644000175000017500000000710511401066502034631 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_HOSTEDSOFTWAREINVENTORYCOLLECTION_H_ #define OPENDRIM_HOSTEDSOFTWAREINVENTORYCOLLECTION_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_System.h" #include "CIM_SystemAccess.h" #include "cmpiCIM_SystemSpecificCollection.h" #include "CIM_SystemSpecificCollectionAccess.h" */ const static char* OpenDRIM_HostedSoftwareInventoryCollection_classnames[] = {"OpenDRIM_HostedSoftwareInventoryCollection"}; static string OpenDRIM_HostedSoftwareInventoryCollection_NAMESPACE = _NAMESPACE; const static string Antecedent_role = "Antecedent"; const static char* Antecedent_classnames[] = {"OpenDRIM_ComputerSystem"}; const static string Antecedent_NAMESPACE = _NAMESPACE; const static string Dependent_role = "Dependent"; const static char* Dependent_classnames[] = {"OpenDRIM_SystemSpecificSoftwareInventoryCollection"}; const static string Dependent_NAMESPACE = _NAMESPACE; class OpenDRIM_HostedSoftwareInventoryCollection { public: Objectpath Antecedent; bool Antecedent_isNULL; Objectpath Dependent; bool Dependent_isNULL; OpenDRIM_HostedSoftwareInventoryCollection() { Antecedent_isNULL = true; Dependent_isNULL = true; } ~OpenDRIM_HostedSoftwareInventoryCollection() {} string getKeys() const { return CF_toLowCase(".Antecedent=\"" + CF_quoteString(Antecedent.toString()) + "\""".Dependent=\"" + CF_quoteString(Dependent.toString()) + "\""); } int getAntecedent(Objectpath& value) const { if (Antecedent_isNULL==true) return NOT_FOUND; value = Antecedent; return OK; } int setAntecedent(const Objectpath& newValue) { Antecedent = newValue; Antecedent.setNamespace(Antecedent_NAMESPACE); Antecedent_isNULL = false; return OK; } int getDependent(Objectpath& value) const { if (Dependent_isNULL==true) return NOT_FOUND; value = Dependent; return OK; } int setDependent(const Objectpath& newValue) { Dependent = newValue; Dependent.setNamespace(Dependent_NAMESPACE); Dependent_isNULL = false; return OK; } }; #endif /*OPENDRIM_HOSTEDSOFTWAREINVENTORYCOLLECTION_H_*/ ././@LongLink0000000000000000000000000000021100000000000011557 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_HostedSoftwareInventoryCollection/OpenDRIM_HostedSoftwareInventoryCollectionAccess.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_HostedSoftwareInventoryCollection/OpenDRIM_HostedS0000644000175000017500000002611111401066502034627 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_HostedSoftwareInventoryCollectionAccess.h" int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareInventory_CIM_System_load(broker, errorMessage)); CF_assert(SoftwareInventory_CIM_SystemSpecificCollection_load(broker, errorMessage)); */ // TODO _L_; return OK; } int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareInventory_CIM_System_unload(errorMessage)); CF_assert(SoftwareInventory_CIM_SystemSpecificCollection_unload(errorMessage)); */ // TODO _L_; return OK; } int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_isAssociated(const Instance& Antecedent, const Instance& Dependent, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector subjects; // Only get the instance names CF_assert(SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_enumerateAntecedents(broker, ctx, subjects, NULL, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_enumerateAntecedents(broker, ctx, subjects, NULL, false, errorMessage)); vector::iterator c = subjects.begin(); vector::iterator end = subjects.end(); for (; c != end; ++c) { bool leftToRight = true; vector associatedInstances; SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), Antecedent_classnames[0], Dependent_classnames[0], Antecedent_role.c_str(), Dependent_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_referenceAntecedentToDependent(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_HostedSoftwareInventoryCollection& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath Antecedent_objectpath; instance.getAntecedent(Antecedent_objectpath); Instance Antecedent_instance; CF_assert(SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_getAntecedent(broker, ctx, Antecedent_objectpath, Antecedent_instance, NULL, errorMessage)); Objectpath Dependent_objectpath; instance.getDependent(Dependent_objectpath); Instance Dependent_instance; CF_assert(SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_getDependent(broker, ctx, Dependent_objectpath, Dependent_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_isAssociated(Antecedent_instance, Dependent_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_HostedSoftwareInventoryCollection& newInstance, const OpenDRIM_HostedSoftwareInventoryCollection& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_HostedSoftwareInventoryCollection& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_HostedSoftwareInventoryCollection& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_associatorAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const char** properties, vector& Dependent_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector Dependent_instances; if (discriminant=="a") CF_assert(SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_enumerateDependents(broker, ctx, Dependent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_enumerateDependents(broker, ctx, Dependent_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_enumerateDependents(broker, ctx, Dependent_instances, properties, false, errorMessage)); } for (size_t i=0; i& Antecedent_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector Antecedent_instances; if (discriminant=="a") CF_assert(SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); } for (size_t i=0; i& Dependent_instances, vector& OpenDRIM_HostedSoftwareInventoryCollection_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < Dependent_instances.size(); i++) { OpenDRIM_HostedSoftwareInventoryCollection instance; instance.setAntecedent(((Instance) Antecedent_instance).getObjectpath()); instance.setDependent(((Instance) Dependent_instances[i]).getObjectpath()); OpenDRIM_HostedSoftwareInventoryCollection_instances.push_back(instance); } _L_; return OK; } int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_HostedSoftwareInventoryCollection_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < Antecedent_instances.size(); i++) { OpenDRIM_HostedSoftwareInventoryCollection instance; instance.setAntecedent(((Instance) Antecedent_instances[i]).getObjectpath()); instance.setDependent(((Instance) Dependent_instance).getObjectpath()); OpenDRIM_HostedSoftwareInventoryCollection_instances.push_back(instance); } _L_; return OK; } int SoftwareInventory_OpenDRIM_HostedSoftwareInventoryCollection_populate(OpenDRIM_HostedSoftwareInventoryCollection& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentity/0000755000175000017500000000000011401066502026306 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentity/OpenDRIM_SoftwareIdentityAccess.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentity/OpenDRIM_SoftwareIdentityAccess.c0000644000175000017500000001503711401066502034543 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_SoftwareIdentityAccess.h" int SoftwareInventory_OpenDRIM_SoftwareIdentity_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareIdentity_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareIdentity_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; string stdOut, stdErr; string line; vector software_info; bool isDebPack; //check if installed packages are deb or rpm if(CF_isExist("/usr/bin/dpkg")) { isDebPack = true; CF_runCommand("dpkg -l", stdOut, stdErr, errorMessage); stringstream ss (stringstream::in | stringstream::out); ss << stdOut; while(getline(ss, line)) { if (! (CF_startsWith(line, "|") or CF_startsWith(line, "+") or CF_startsWith(line, "Desired="))) { OpenDRIM_SoftwareIdentity instance; CF_splitTextBySpace(software_info, line); instance.setInstanceID(software_info[1]); if(discriminant=="ei") CF_assert(SoftwareInventory_OpenDRIM_SoftwareIdentity_populate(instance, isDebPack, line, errorMessage)); result.push_back(instance); } } } else { isDebPack = false; CF_runCommand("rpm -qa", stdOut, stdErr, errorMessage); stringstream ss (stringstream::in | stringstream::out); ss << stdOut; while(getline(ss, line)) { OpenDRIM_SoftwareIdentity instance; CF_splitTextBySpace(software_info, line); instance.setInstanceID(software_info[0]); if (discriminant == "ei") CF_assert(SoftwareInventory_OpenDRIM_SoftwareIdentity_populate(instance, isDebPack, line, errorMessage)); result.push_back(instance); } } _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareIdentity_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_SoftwareIdentity& instance, const char** properties, string& errorMessage) { _E_; string command; vector Software_lines; bool isDebPack; //check if installed packages are deb or rpm if(CF_isExist("/usr/bin/dpkg")) { isDebPack = true; command = "dpkg -l " + instance.InstanceID; CF_assert(CF_runCommandToLines(command, Software_lines, 0, errorMessage)) //if this instance exists this command returns string with 5 rows, //otherwise it's result will be "No packages found matching .. " (1 row) if (Software_lines.size() > 1) { CF_assert(SoftwareInventory_OpenDRIM_SoftwareIdentity_populate(instance, isDebPack, Software_lines[5], errorMessage)); } else { errorMessage = "No instance"; return NOT_FOUND; } } else { isDebPack = false; command = "rpm -qi " + instance.InstanceID; CF_assert(CF_runCommandToLines(command, Software_lines, 0, errorMessage)); //if this instance exists this command returns string with 5 rows, //otherwise it's result will be "Package .. is not installed " (1 row) if (Software_lines.size() > 1) { CF_assert(SoftwareInventory_OpenDRIM_SoftwareIdentity_populate(instance, isDebPack, instance.InstanceID, errorMessage)); } else { errorMessage = "No instance"; return NOT_FOUND; } } _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareIdentity_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareIdentity& newInstance, const OpenDRIM_SoftwareIdentity& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_SoftwareIdentity_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_SoftwareIdentity_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_SoftwareIdentity_populate(OpenDRIM_SoftwareIdentity& instance, bool isDebPackage, string& soft_line, string& errorMessage) { _E_; string elem_name =""; vector software_info; //check if installed packages are deb or rpm if(isDebPackage) { //soft_line returns full information about current software for .deb CF_splitTextBySpace(software_info, soft_line); instance.setVersionString(software_info[2]); elem_name = software_info[3]; if(software_info.size() > 4) { for(size_t i=4; i # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSoftwareInventory_OpenDRIM_SoftwareIdentityProvider.la libcmpiSoftwareInventory_OpenDRIM_SoftwareIdentityProvider_la_SOURCES = OpenDRIM_SoftwareIdentityAccess.cpp OpenDRIM_SoftwareIdentityProvider.cpp cmpiOpenDRIM_SoftwareIdentity.cpp libcmpiSoftwareInventory_OpenDRIM_SoftwareIdentityProvider_la_LIBADD = ../Common/libcmpiSoftwareInventory_Common.la libcmpiSoftwareInventory_OpenDRIM_SoftwareIdentityProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_SoftwareIdentity.h OpenDRIM_SoftwareIdentity.h OpenDRIM_SoftwareIdentityAccess.h ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentity/OpenDRIM_SoftwareIdentityAccess.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentity/OpenDRIM_SoftwareIdentityAccess.h0000644000175000017500000000607211401066502034547 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SOFTWAREIDENTITYACCESS_H_ #define OPENDRIM_SOFTWAREIDENTITYACCESS_H_ #include "SoftwareInventory_Common.h" #include "OpenDRIM_SoftwareIdentity.h" int SoftwareInventory_OpenDRIM_SoftwareIdentity_load(const CMPIBroker* broker, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareIdentity_unload(string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareIdentity_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_SoftwareIdentity_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_SoftwareIdentity& instance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareIdentity_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareIdentity& newInstance, const OpenDRIM_SoftwareIdentity& oldInstance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareIdentity_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareIdentity& instance, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareIdentity_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareIdentity& instance, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareIdentity_populate(OpenDRIM_SoftwareIdentity& instance, bool isDebPackage, string& soft_line, string& errorMessage); #endif /*OPENDRIM_SOFTWAREIDENTITYACCESS_H_*/ opendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentity/cmpiOpenDRIM_SoftwareIdentity.h0000644000175000017500000000436611401066502034302 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_SOFTWAREIDENTITY_H_ #define CMPIOPENDRIM_SOFTWAREIDENTITY_H_ #include "OpenDRIM_SoftwareIdentity.h" CMPIObjectPath* SoftwareInventory_OpenDRIM_SoftwareIdentity_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_SoftwareIdentity& instance); CMPIInstance* SoftwareInventory_OpenDRIM_SoftwareIdentity_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_SoftwareIdentity& instance); void SoftwareInventory_OpenDRIM_SoftwareIdentity_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_SoftwareIdentity& instance); void SoftwareInventory_OpenDRIM_SoftwareIdentity_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_SoftwareIdentity& instance); #endif /*CMPIOPENDRIM_SOFTWAREIDENTITY_H_*/ ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentity/cmpiOpenDRIM_SoftwareIdentity.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentity/cmpiOpenDRIM_SoftwareIdentity.cpp0000644000175000017500000002562511401066502034636 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SoftwareIdentity.h" CMPIObjectPath* SoftwareInventory_OpenDRIM_SoftwareIdentity_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_SoftwareIdentity& instance) { _E_; Objectpath op(broker, OpenDRIM_SoftwareIdentity_classnames[0], OpenDRIM_SoftwareIdentity_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* SoftwareInventory_OpenDRIM_SoftwareIdentity_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_SoftwareIdentity& instance) { _E_; Objectpath op(broker, SoftwareInventory_OpenDRIM_SoftwareIdentity_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Caption_isNULL) ci.setProperty("Caption", instance.Caption); if (!instance.Description_isNULL) ci.setProperty("Description", instance.Description); if (!instance.ElementName_isNULL) ci.setProperty("ElementName", instance.ElementName); if (!instance.InstallDate_isNULL) ci.setPropertyDatetime("InstallDate", instance.InstallDate); if (!instance.Name_isNULL) ci.setProperty("Name", instance.Name); if (!instance.OperationalStatus_isNULL) ci.setProperty("OperationalStatus", instance.OperationalStatus); if (!instance.StatusDescriptions_isNULL) ci.setProperty("StatusDescriptions", instance.StatusDescriptions); if (!instance.Status_isNULL) ci.setProperty("Status", instance.Status); if (!instance.HealthState_isNULL) ci.setProperty("HealthState", instance.HealthState); if (!instance.PrimaryStatus_isNULL) ci.setProperty("PrimaryStatus", instance.PrimaryStatus); if (!instance.DetailedStatus_isNULL) ci.setProperty("DetailedStatus", instance.DetailedStatus); if (!instance.OperatingStatus_isNULL) ci.setProperty("OperatingStatus", instance.OperatingStatus); if (!instance.CommunicationStatus_isNULL) ci.setProperty("CommunicationStatus", instance.CommunicationStatus); if (!instance.MajorVersion_isNULL) ci.setProperty("MajorVersion", instance.MajorVersion); if (!instance.MinorVersion_isNULL) ci.setProperty("MinorVersion", instance.MinorVersion); if (!instance.RevisionNumber_isNULL) ci.setProperty("RevisionNumber", instance.RevisionNumber); if (!instance.BuildNumber_isNULL) ci.setProperty("BuildNumber", instance.BuildNumber); if (!instance.VersionString_isNULL) ci.setProperty("VersionString", instance.VersionString); if (!instance.TargetOperatingSystems_isNULL) ci.setProperty("TargetOperatingSystems", instance.TargetOperatingSystems); if (!instance.Manufacturer_isNULL) ci.setProperty("Manufacturer", instance.Manufacturer); if (!instance.Languages_isNULL) ci.setProperty("Languages", instance.Languages); if (!instance.Classifications_isNULL) ci.setProperty("Classifications", instance.Classifications); if (!instance.ClassificationDescriptions_isNULL) ci.setProperty("ClassificationDescriptions", instance.ClassificationDescriptions); if (!instance.SerialNumber_isNULL) ci.setProperty("SerialNumber", instance.SerialNumber); if (!instance.TargetTypes_isNULL) ci.setProperty("TargetTypes", instance.TargetTypes); if (!instance.IdentityInfoValue_isNULL) ci.setProperty("IdentityInfoValue", instance.IdentityInfoValue); if (!instance.IdentityInfoType_isNULL) ci.setProperty("IdentityInfoType", instance.IdentityInfoType); if (!instance.ReleaseDate_isNULL) ci.setPropertyDatetime("ReleaseDate", instance.ReleaseDate); if (!instance.IsEntity_isNULL) ci.setProperty("IsEntity", instance.IsEntity); if (!instance.ExtendedResourceType_isNULL) ci.setProperty("ExtendedResourceType", instance.ExtendedResourceType); if (!instance.OtherExtendedResourceTypeDescription_isNULL) ci.setProperty("OtherExtendedResourceTypeDescription", instance.OtherExtendedResourceTypeDescription); if (!instance.MinExtendedResourceTypeMajorVersion_isNULL) ci.setProperty("MinExtendedResourceTypeMajorVersion", instance.MinExtendedResourceTypeMajorVersion); if (!instance.MinExtendedResourceTypeMinorVersion_isNULL) ci.setProperty("MinExtendedResourceTypeMinorVersion", instance.MinExtendedResourceTypeMinorVersion); if (!instance.MinExtendedResourceTypeRevisionNumber_isNULL) ci.setProperty("MinExtendedResourceTypeRevisionNumber", instance.MinExtendedResourceTypeRevisionNumber); if (!instance.MinExtendedResourceTypeBuildNumber_isNULL) ci.setProperty("MinExtendedResourceTypeBuildNumber", instance.MinExtendedResourceTypeBuildNumber); if (!instance.TargetOSTypes_isNULL) ci.setProperty("TargetOSTypes", instance.TargetOSTypes); _L_; return ci.getHdl(); } void SoftwareInventory_OpenDRIM_SoftwareIdentity_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_SoftwareIdentity& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void SoftwareInventory_OpenDRIM_SoftwareIdentity_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_SoftwareIdentity& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Caption", instance.Caption) == OK) instance.Caption_isNULL = false; if (inst.getProperty("Description", instance.Description) == OK) instance.Description_isNULL = false; if (inst.getProperty("ElementName", instance.ElementName) == OK) instance.ElementName_isNULL = false; if (inst.getPropertyDatetime("InstallDate", instance.InstallDate) == OK) instance.InstallDate_isNULL = false; if (inst.getProperty("Name", instance.Name) == OK) instance.Name_isNULL = false; if (inst.getProperty("OperationalStatus", instance.OperationalStatus) == OK) instance.OperationalStatus_isNULL = false; if (inst.getProperty("StatusDescriptions", instance.StatusDescriptions) == OK) instance.StatusDescriptions_isNULL = false; if (inst.getProperty("Status", instance.Status) == OK) instance.Status_isNULL = false; if (inst.getProperty("HealthState", instance.HealthState) == OK) instance.HealthState_isNULL = false; if (inst.getProperty("PrimaryStatus", instance.PrimaryStatus) == OK) instance.PrimaryStatus_isNULL = false; if (inst.getProperty("DetailedStatus", instance.DetailedStatus) == OK) instance.DetailedStatus_isNULL = false; if (inst.getProperty("OperatingStatus", instance.OperatingStatus) == OK) instance.OperatingStatus_isNULL = false; if (inst.getProperty("CommunicationStatus", instance.CommunicationStatus) == OK) instance.CommunicationStatus_isNULL = false; if (inst.getProperty("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; if (inst.getProperty("MajorVersion", instance.MajorVersion) == OK) instance.MajorVersion_isNULL = false; if (inst.getProperty("MinorVersion", instance.MinorVersion) == OK) instance.MinorVersion_isNULL = false; if (inst.getProperty("RevisionNumber", instance.RevisionNumber) == OK) instance.RevisionNumber_isNULL = false; if (inst.getProperty("BuildNumber", instance.BuildNumber) == OK) instance.BuildNumber_isNULL = false; if (inst.getProperty("VersionString", instance.VersionString) == OK) instance.VersionString_isNULL = false; if (inst.getProperty("TargetOperatingSystems", instance.TargetOperatingSystems) == OK) instance.TargetOperatingSystems_isNULL = false; if (inst.getProperty("Manufacturer", instance.Manufacturer) == OK) instance.Manufacturer_isNULL = false; if (inst.getProperty("Languages", instance.Languages) == OK) instance.Languages_isNULL = false; if (inst.getProperty("Classifications", instance.Classifications) == OK) instance.Classifications_isNULL = false; if (inst.getProperty("ClassificationDescriptions", instance.ClassificationDescriptions) == OK) instance.ClassificationDescriptions_isNULL = false; if (inst.getProperty("SerialNumber", instance.SerialNumber) == OK) instance.SerialNumber_isNULL = false; if (inst.getProperty("TargetTypes", instance.TargetTypes) == OK) instance.TargetTypes_isNULL = false; if (inst.getProperty("IdentityInfoValue", instance.IdentityInfoValue) == OK) instance.IdentityInfoValue_isNULL = false; if (inst.getProperty("IdentityInfoType", instance.IdentityInfoType) == OK) instance.IdentityInfoType_isNULL = false; if (inst.getPropertyDatetime("ReleaseDate", instance.ReleaseDate) == OK) instance.ReleaseDate_isNULL = false; if (inst.getProperty("IsEntity", instance.IsEntity) == OK) instance.IsEntity_isNULL = false; if (inst.getProperty("ExtendedResourceType", instance.ExtendedResourceType) == OK) instance.ExtendedResourceType_isNULL = false; if (inst.getProperty("OtherExtendedResourceTypeDescription", instance.OtherExtendedResourceTypeDescription) == OK) instance.OtherExtendedResourceTypeDescription_isNULL = false; if (inst.getProperty("MinExtendedResourceTypeMajorVersion", instance.MinExtendedResourceTypeMajorVersion) == OK) instance.MinExtendedResourceTypeMajorVersion_isNULL = false; if (inst.getProperty("MinExtendedResourceTypeMinorVersion", instance.MinExtendedResourceTypeMinorVersion) == OK) instance.MinExtendedResourceTypeMinorVersion_isNULL = false; if (inst.getProperty("MinExtendedResourceTypeRevisionNumber", instance.MinExtendedResourceTypeRevisionNumber) == OK) instance.MinExtendedResourceTypeRevisionNumber_isNULL = false; if (inst.getProperty("MinExtendedResourceTypeBuildNumber", instance.MinExtendedResourceTypeBuildNumber) == OK) instance.MinExtendedResourceTypeBuildNumber_isNULL = false; if (inst.getProperty("TargetOSTypes", instance.TargetOSTypes) == OK) instance.TargetOSTypes_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentity/OpenDRIM_SoftwareIdentityProvider.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentity/OpenDRIM_SoftwareIdentityProvider0000644000175000017500000002631511401066502034714 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SoftwareIdentity.h" #include "OpenDRIM_SoftwareIdentityAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define SoftwareInventory_OpenDRIM_SoftwareIdentityProviderSetInstance SoftwareInventory_OpenDRIM_SoftwareIdentityProviderModifyInstance #endif int SoftwareInventory_OpenDRIM_SoftwareIdentity_init(const CMPIBroker* broker); int SoftwareInventory_OpenDRIM_SoftwareIdentity_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentity_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentity_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = SoftwareInventory_OpenDRIM_SoftwareIdentity_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityProviderEnumInstances(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentity_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = SoftwareInventory_OpenDRIM_SoftwareIdentity_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareIdentity instance; SoftwareInventory_OpenDRIM_SoftwareIdentity_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentity_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = SoftwareInventory_OpenDRIM_SoftwareIdentity_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityProviderSetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareIdentity newInstance, oldInstance; SoftwareInventory_OpenDRIM_SoftwareIdentity_toCPP(_broker, ci, newInstance); SoftwareInventory_OpenDRIM_SoftwareIdentity_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentity_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentity_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareIdentity instance; SoftwareInventory_OpenDRIM_SoftwareIdentity_toCPP(_broker, ci, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_SoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentity_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = SoftwareInventory_OpenDRIM_SoftwareIdentity_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareIdentity instance; SoftwareInventory_OpenDRIM_SoftwareIdentity_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentity_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityProviderExecQuery(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* lang, const char* query) { _E_; CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } /* ---------------------------------------------------------------------------*/ /* End of Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int SoftwareInventory_OpenDRIM_SoftwareIdentity_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentity_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "SoftwareInventory_OpenDRIM_SoftwareIdentity_init FAILED: " + (string) OpenDRIM_SoftwareIdentity_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareIdentity_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentity_unload(errorMessage); if (errorCode != OK) { errorMessage += "SoftwareInventory_OpenDRIM_SoftwareIdentity_unload FAILED: " + (string) OpenDRIM_SoftwareIdentity_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define SoftwareInventory_OpenDRIM_SoftwareIdentity_INIT if (SoftwareInventory_OpenDRIM_SoftwareIdentity_init(_broker) < 0) return NULL CMInstanceMIStub(SoftwareInventory_OpenDRIM_SoftwareIdentityProvider, SoftwareInventory_OpenDRIM_SoftwareIdentityProvider, _broker, SoftwareInventory_OpenDRIM_SoftwareIdentity_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentity/OpenDRIM_SoftwareIdentity.h0000644000175000017500000004061711401066502033430 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SOFTWAREIDENTITY_H_ #define OPENDRIM_SOFTWAREIDENTITY_H_ #include const static char* OpenDRIM_SoftwareIdentity_classnames[] = {"OpenDRIM_SoftwareIdentity"}; static string OpenDRIM_SoftwareIdentity_NAMESPACE = _NAMESPACE; class OpenDRIM_SoftwareIdentity { public: string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string ElementName; bool ElementName_isNULL; string InstallDate; bool InstallDate_isNULL; string Name; bool Name_isNULL; vector OperationalStatus; bool OperationalStatus_isNULL; vector StatusDescriptions; bool StatusDescriptions_isNULL; string Status; bool Status_isNULL; unsigned short HealthState; bool HealthState_isNULL; unsigned short PrimaryStatus; bool PrimaryStatus_isNULL; unsigned short DetailedStatus; bool DetailedStatus_isNULL; unsigned short OperatingStatus; bool OperatingStatus_isNULL; unsigned short CommunicationStatus; bool CommunicationStatus_isNULL; string InstanceID; bool InstanceID_isNULL; unsigned short MajorVersion; bool MajorVersion_isNULL; unsigned short MinorVersion; bool MinorVersion_isNULL; unsigned short RevisionNumber; bool RevisionNumber_isNULL; unsigned short BuildNumber; bool BuildNumber_isNULL; string VersionString; bool VersionString_isNULL; vector TargetOperatingSystems; bool TargetOperatingSystems_isNULL; string Manufacturer; bool Manufacturer_isNULL; vector Languages; bool Languages_isNULL; vector Classifications; bool Classifications_isNULL; vector ClassificationDescriptions; bool ClassificationDescriptions_isNULL; string SerialNumber; bool SerialNumber_isNULL; vector TargetTypes; bool TargetTypes_isNULL; vector IdentityInfoValue; bool IdentityInfoValue_isNULL; vector IdentityInfoType; bool IdentityInfoType_isNULL; string ReleaseDate; bool ReleaseDate_isNULL; bool IsEntity; bool IsEntity_isNULL; unsigned short ExtendedResourceType; bool ExtendedResourceType_isNULL; string OtherExtendedResourceTypeDescription; bool OtherExtendedResourceTypeDescription_isNULL; unsigned short MinExtendedResourceTypeMajorVersion; bool MinExtendedResourceTypeMajorVersion_isNULL; unsigned short MinExtendedResourceTypeMinorVersion; bool MinExtendedResourceTypeMinorVersion_isNULL; unsigned short MinExtendedResourceTypeRevisionNumber; bool MinExtendedResourceTypeRevisionNumber_isNULL; unsigned short MinExtendedResourceTypeBuildNumber; bool MinExtendedResourceTypeBuildNumber_isNULL; vector TargetOSTypes; bool TargetOSTypes_isNULL; OpenDRIM_SoftwareIdentity() { Caption_isNULL = true; Description_isNULL = true; ElementName_isNULL = true; InstallDate_isNULL = true; Name_isNULL = true; OperationalStatus_isNULL = true; StatusDescriptions_isNULL = true; Status_isNULL = true; HealthState_isNULL = true; PrimaryStatus_isNULL = true; DetailedStatus_isNULL = true; OperatingStatus_isNULL = true; CommunicationStatus_isNULL = true; InstanceID_isNULL = true; MajorVersion_isNULL = true; MinorVersion_isNULL = true; RevisionNumber_isNULL = true; BuildNumber_isNULL = true; VersionString_isNULL = true; TargetOperatingSystems_isNULL = true; Manufacturer_isNULL = true; Languages_isNULL = true; Classifications_isNULL = true; ClassificationDescriptions_isNULL = true; SerialNumber_isNULL = true; TargetTypes_isNULL = true; IdentityInfoValue_isNULL = true; IdentityInfoType_isNULL = true; ReleaseDate_isNULL = true; IsEntity_isNULL = true; ExtendedResourceType_isNULL = true; OtherExtendedResourceTypeDescription_isNULL = true; MinExtendedResourceTypeMajorVersion_isNULL = true; MinExtendedResourceTypeMinorVersion_isNULL = true; MinExtendedResourceTypeRevisionNumber_isNULL = true; MinExtendedResourceTypeBuildNumber_isNULL = true; TargetOSTypes_isNULL = true; } ~OpenDRIM_SoftwareIdentity() {} string getKeys() const { return CF_toLowCase(".InstanceID=\"" + CF_quoteString(InstanceID) + "\""); } int getCaption(string& value) const { if (Caption_isNULL==true) return NOT_FOUND; value = Caption; return OK; } int setCaption(const string& newValue) { Caption = newValue; Caption_isNULL = false; return OK; } int getDescription(string& value) const { if (Description_isNULL==true) return NOT_FOUND; value = Description; return OK; } int setDescription(const string& newValue) { Description = newValue; Description_isNULL = false; return OK; } int getElementName(string& value) const { if (ElementName_isNULL==true) return NOT_FOUND; value = ElementName; return OK; } int setElementName(const string& newValue) { ElementName = newValue; ElementName_isNULL = false; return OK; } int getInstallDate(string& value) const { if (InstallDate_isNULL==true) return NOT_FOUND; value = InstallDate; return OK; } int setInstallDate(const string& newValue) { InstallDate = newValue; InstallDate_isNULL = false; return OK; } int getName(string& value) const { if (Name_isNULL==true) return NOT_FOUND; value = Name; return OK; } int setName(const string& newValue) { Name = newValue; Name_isNULL = false; return OK; } int getOperationalStatus(vector& value) const { if (OperationalStatus_isNULL==true) return NOT_FOUND; value = OperationalStatus; return OK; } int setOperationalStatus(const vector& newValue) { OperationalStatus = newValue; OperationalStatus_isNULL = false; return OK; } int getStatusDescriptions(vector& value) const { if (StatusDescriptions_isNULL==true) return NOT_FOUND; value = StatusDescriptions; return OK; } int setStatusDescriptions(const vector& newValue) { StatusDescriptions = newValue; StatusDescriptions_isNULL = false; return OK; } int getStatus(string& value) const { if (Status_isNULL==true) return NOT_FOUND; value = Status; return OK; } int setStatus(const string& newValue) { Status = newValue; Status_isNULL = false; return OK; } int getHealthState(unsigned short& value) const { if (HealthState_isNULL==true) return NOT_FOUND; value = HealthState; return OK; } int setHealthState(const unsigned short& newValue) { HealthState = newValue; HealthState_isNULL = false; return OK; } int getPrimaryStatus(unsigned short& value) const { if (PrimaryStatus_isNULL==true) return NOT_FOUND; value = PrimaryStatus; return OK; } int setPrimaryStatus(const unsigned short& newValue) { PrimaryStatus = newValue; PrimaryStatus_isNULL = false; return OK; } int getDetailedStatus(unsigned short& value) const { if (DetailedStatus_isNULL==true) return NOT_FOUND; value = DetailedStatus; return OK; } int setDetailedStatus(const unsigned short& newValue) { DetailedStatus = newValue; DetailedStatus_isNULL = false; return OK; } int getOperatingStatus(unsigned short& value) const { if (OperatingStatus_isNULL==true) return NOT_FOUND; value = OperatingStatus; return OK; } int setOperatingStatus(const unsigned short& newValue) { OperatingStatus = newValue; OperatingStatus_isNULL = false; return OK; } int getCommunicationStatus(unsigned short& value) const { if (CommunicationStatus_isNULL==true) return NOT_FOUND; value = CommunicationStatus; return OK; } int setCommunicationStatus(const unsigned short& newValue) { CommunicationStatus = newValue; CommunicationStatus_isNULL = false; return OK; } int getInstanceID(string& value) const { if (InstanceID_isNULL==true) return NOT_FOUND; value = InstanceID; return OK; } int setInstanceID(const string& newValue) { InstanceID = newValue; InstanceID_isNULL = false; return OK; } int getMajorVersion(unsigned short& value) const { if (MajorVersion_isNULL==true) return NOT_FOUND; value = MajorVersion; return OK; } int setMajorVersion(const unsigned short& newValue) { MajorVersion = newValue; MajorVersion_isNULL = false; return OK; } int getMinorVersion(unsigned short& value) const { if (MinorVersion_isNULL==true) return NOT_FOUND; value = MinorVersion; return OK; } int setMinorVersion(const unsigned short& newValue) { MinorVersion = newValue; MinorVersion_isNULL = false; return OK; } int getRevisionNumber(unsigned short& value) const { if (RevisionNumber_isNULL==true) return NOT_FOUND; value = RevisionNumber; return OK; } int setRevisionNumber(const unsigned short& newValue) { RevisionNumber = newValue; RevisionNumber_isNULL = false; return OK; } int getBuildNumber(unsigned short& value) const { if (BuildNumber_isNULL==true) return NOT_FOUND; value = BuildNumber; return OK; } int setBuildNumber(const unsigned short& newValue) { BuildNumber = newValue; BuildNumber_isNULL = false; return OK; } int getVersionString(string& value) const { if (VersionString_isNULL==true) return NOT_FOUND; value = VersionString; return OK; } int setVersionString(const string& newValue) { VersionString = newValue; VersionString_isNULL = false; return OK; } int getTargetOperatingSystems(vector& value) const { if (TargetOperatingSystems_isNULL==true) return NOT_FOUND; value = TargetOperatingSystems; return OK; } int setTargetOperatingSystems(const vector& newValue) { TargetOperatingSystems = newValue; TargetOperatingSystems_isNULL = false; return OK; } int getManufacturer(string& value) const { if (Manufacturer_isNULL==true) return NOT_FOUND; value = Manufacturer; return OK; } int setManufacturer(const string& newValue) { Manufacturer = newValue; Manufacturer_isNULL = false; return OK; } int getLanguages(vector& value) const { if (Languages_isNULL==true) return NOT_FOUND; value = Languages; return OK; } int setLanguages(const vector& newValue) { Languages = newValue; Languages_isNULL = false; return OK; } int getClassifications(vector& value) const { if (Classifications_isNULL==true) return NOT_FOUND; value = Classifications; return OK; } int setClassifications(const vector& newValue) { Classifications = newValue; Classifications_isNULL = false; return OK; } int getClassificationDescriptions(vector& value) const { if (ClassificationDescriptions_isNULL==true) return NOT_FOUND; value = ClassificationDescriptions; return OK; } int setClassificationDescriptions(const vector& newValue) { ClassificationDescriptions = newValue; ClassificationDescriptions_isNULL = false; return OK; } int getSerialNumber(string& value) const { if (SerialNumber_isNULL==true) return NOT_FOUND; value = SerialNumber; return OK; } int setSerialNumber(const string& newValue) { SerialNumber = newValue; SerialNumber_isNULL = false; return OK; } int getTargetTypes(vector& value) const { if (TargetTypes_isNULL==true) return NOT_FOUND; value = TargetTypes; return OK; } int setTargetTypes(const vector& newValue) { TargetTypes = newValue; TargetTypes_isNULL = false; return OK; } int getIdentityInfoValue(vector& value) const { if (IdentityInfoValue_isNULL==true) return NOT_FOUND; value = IdentityInfoValue; return OK; } int setIdentityInfoValue(const vector& newValue) { IdentityInfoValue = newValue; IdentityInfoValue_isNULL = false; return OK; } int getIdentityInfoType(vector& value) const { if (IdentityInfoType_isNULL==true) return NOT_FOUND; value = IdentityInfoType; return OK; } int setIdentityInfoType(const vector& newValue) { IdentityInfoType = newValue; IdentityInfoType_isNULL = false; return OK; } int getReleaseDate(string& value) const { if (ReleaseDate_isNULL==true) return NOT_FOUND; value = ReleaseDate; return OK; } int setReleaseDate(const string& newValue) { ReleaseDate = newValue; ReleaseDate_isNULL = false; return OK; } int getIsEntity(bool& value) const { if (IsEntity_isNULL==true) return NOT_FOUND; value = IsEntity; return OK; } int setIsEntity(const bool& newValue) { IsEntity = newValue; IsEntity_isNULL = false; return OK; } int getExtendedResourceType(unsigned short& value) const { if (ExtendedResourceType_isNULL==true) return NOT_FOUND; value = ExtendedResourceType; return OK; } int setExtendedResourceType(const unsigned short& newValue) { ExtendedResourceType = newValue; ExtendedResourceType_isNULL = false; return OK; } int getOtherExtendedResourceTypeDescription(string& value) const { if (OtherExtendedResourceTypeDescription_isNULL==true) return NOT_FOUND; value = OtherExtendedResourceTypeDescription; return OK; } int setOtherExtendedResourceTypeDescription(const string& newValue) { OtherExtendedResourceTypeDescription = newValue; OtherExtendedResourceTypeDescription_isNULL = false; return OK; } int getMinExtendedResourceTypeMajorVersion(unsigned short& value) const { if (MinExtendedResourceTypeMajorVersion_isNULL==true) return NOT_FOUND; value = MinExtendedResourceTypeMajorVersion; return OK; } int setMinExtendedResourceTypeMajorVersion(const unsigned short& newValue) { MinExtendedResourceTypeMajorVersion = newValue; MinExtendedResourceTypeMajorVersion_isNULL = false; return OK; } int getMinExtendedResourceTypeMinorVersion(unsigned short& value) const { if (MinExtendedResourceTypeMinorVersion_isNULL==true) return NOT_FOUND; value = MinExtendedResourceTypeMinorVersion; return OK; } int setMinExtendedResourceTypeMinorVersion(const unsigned short& newValue) { MinExtendedResourceTypeMinorVersion = newValue; MinExtendedResourceTypeMinorVersion_isNULL = false; return OK; } int getMinExtendedResourceTypeRevisionNumber(unsigned short& value) const { if (MinExtendedResourceTypeRevisionNumber_isNULL==true) return NOT_FOUND; value = MinExtendedResourceTypeRevisionNumber; return OK; } int setMinExtendedResourceTypeRevisionNumber(const unsigned short& newValue) { MinExtendedResourceTypeRevisionNumber = newValue; MinExtendedResourceTypeRevisionNumber_isNULL = false; return OK; } int getMinExtendedResourceTypeBuildNumber(unsigned short& value) const { if (MinExtendedResourceTypeBuildNumber_isNULL==true) return NOT_FOUND; value = MinExtendedResourceTypeBuildNumber; return OK; } int setMinExtendedResourceTypeBuildNumber(const unsigned short& newValue) { MinExtendedResourceTypeBuildNumber = newValue; MinExtendedResourceTypeBuildNumber_isNULL = false; return OK; } int getTargetOSTypes(vector& value) const { if (TargetOSTypes_isNULL==true) return NOT_FOUND; value = TargetOSTypes; return OK; } int setTargetOSTypes(const vector& newValue) { TargetOSTypes = newValue; TargetOSTypes_isNULL = false; return OK; } }; #endif /*OPENDRIM_SOFTWAREIDENTITY_H_*/ opendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityResource/0000755000175000017500000000000011401066502030016 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityResource/OpenDRIM_SoftwareIdentityResourceAccess.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityResource/OpenDRIM_SoftwareIdentity0000644000175000017500000000702111401066502034702 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SOFTWAREIDENTITYRESOURCEACCESS_H_ #define OPENDRIM_SOFTWAREIDENTITYRESOURCEACCESS_H_ #include "SoftwareInventory_Common.h" #include "OpenDRIM_SoftwareIdentityResource.h" int SoftwareInventory_OpenDRIM_SoftwareIdentityResource_load(const CMPIBroker* broker, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareIdentityResource_unload(string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareIdentityResource_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_SoftwareIdentityResource_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_SoftwareIdentityResource& instance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareIdentityResource_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareIdentityResource& newInstance, const OpenDRIM_SoftwareIdentityResource& oldInstance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareIdentityResource_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareIdentityResource& instance, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareIdentityResource_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareIdentityResource& instance, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareIdentityResource_RequestStateChange(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareIdentityResource& instance, unsigned int& returnValue, const OpenDRIM_SoftwareIdentityResource_RequestStateChange_In& in, OpenDRIM_SoftwareIdentityResource_RequestStateChange_Out& out, string& errorMessage); int SoftwareInventory_OpenDRIM_SoftwareIdentityResource_populate(OpenDRIM_SoftwareIdentityResource& instance, string& errorMessage); #endif /*OPENDRIM_SOFTWAREIDENTITYRESOURCEACCESS_H_*/ opendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityResource/Makefile.am0000644000175000017500000000426711401066502032063 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSoftwareInventory_OpenDRIM_SoftwareIdentityResourceProvider.la libcmpiSoftwareInventory_OpenDRIM_SoftwareIdentityResourceProvider_la_SOURCES = OpenDRIM_SoftwareIdentityResourceAccess.cpp OpenDRIM_SoftwareIdentityResourceProvider.cpp cmpiOpenDRIM_SoftwareIdentityResource.cpp libcmpiSoftwareInventory_OpenDRIM_SoftwareIdentityResourceProvider_la_LIBADD = ../Common/libcmpiSoftwareInventory_Common.la libcmpiSoftwareInventory_OpenDRIM_SoftwareIdentityResourceProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_SoftwareIdentityResource.h OpenDRIM_SoftwareIdentityResource.h OpenDRIM_SoftwareIdentityResourceAccess.h ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityResource/OpenDRIM_SoftwareIdentityResource.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityResource/OpenDRIM_SoftwareIdentity0000644000175000017500000003673211401066502034715 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SOFTWAREIDENTITYRESOURCE_H_ #define OPENDRIM_SOFTWAREIDENTITYRESOURCE_H_ #include const static char* OpenDRIM_SoftwareIdentityResource_classnames[] = {"OpenDRIM_SoftwareIdentityResource"}; static string OpenDRIM_SoftwareIdentityResource_NAMESPACE = _NAMESPACE; class OpenDRIM_SoftwareIdentityResource { public: string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string ElementName; bool ElementName_isNULL; string InstallDate; bool InstallDate_isNULL; vector OperationalStatus; bool OperationalStatus_isNULL; vector StatusDescriptions; bool StatusDescriptions_isNULL; string Status; bool Status_isNULL; unsigned short HealthState; bool HealthState_isNULL; unsigned short PrimaryStatus; bool PrimaryStatus_isNULL; unsigned short DetailedStatus; bool DetailedStatus_isNULL; unsigned short OperatingStatus; bool OperatingStatus_isNULL; unsigned short CommunicationStatus; bool CommunicationStatus_isNULL; unsigned short EnabledState; bool EnabledState_isNULL; string OtherEnabledState; bool OtherEnabledState_isNULL; unsigned short RequestedState; bool RequestedState_isNULL; unsigned short EnabledDefault; bool EnabledDefault_isNULL; string TimeOfLastStateChange; bool TimeOfLastStateChange_isNULL; vector AvailableRequestedStates; bool AvailableRequestedStates_isNULL; unsigned short TransitioningToState; bool TransitioningToState_isNULL; string SystemCreationClassName; bool SystemCreationClassName_isNULL; string SystemName; bool SystemName_isNULL; string CreationClassName; bool CreationClassName_isNULL; string Name; bool Name_isNULL; string AccessInfo; bool AccessInfo_isNULL; string OtherInfoFormatDescription; bool OtherInfoFormatDescription_isNULL; unsigned short AccessContext; bool AccessContext_isNULL; string OtherAccessContext; bool OtherAccessContext_isNULL; unsigned short InfoFormat; bool InfoFormat_isNULL; unsigned short ResourceType; bool ResourceType_isNULL; unsigned short ExtendedResourceType; bool ExtendedResourceType_isNULL; string OtherResourceType; bool OtherResourceType_isNULL; OpenDRIM_SoftwareIdentityResource() { Caption_isNULL = true; Description_isNULL = true; ElementName_isNULL = true; InstallDate_isNULL = true; OperationalStatus_isNULL = true; StatusDescriptions_isNULL = true; Status_isNULL = true; HealthState_isNULL = true; PrimaryStatus_isNULL = true; DetailedStatus_isNULL = true; OperatingStatus_isNULL = true; CommunicationStatus_isNULL = true; EnabledState_isNULL = true; OtherEnabledState_isNULL = true; RequestedState_isNULL = true; EnabledDefault_isNULL = true; TimeOfLastStateChange_isNULL = true; AvailableRequestedStates_isNULL = true; TransitioningToState_isNULL = true; SystemCreationClassName_isNULL = true; SystemName_isNULL = true; CreationClassName_isNULL = true; Name_isNULL = true; AccessInfo_isNULL = true; OtherInfoFormatDescription_isNULL = true; AccessContext_isNULL = true; OtherAccessContext_isNULL = true; InfoFormat_isNULL = true; ResourceType_isNULL = true; ExtendedResourceType_isNULL = true; OtherResourceType_isNULL = true; } ~OpenDRIM_SoftwareIdentityResource() {} string getKeys() const { return CF_toLowCase(".SystemCreationClassName=\"" + CF_quoteString(SystemCreationClassName) + "\""".SystemName=\"" + CF_quoteString(SystemName) + "\""".CreationClassName=\"" + CF_quoteString(CreationClassName) + "\""".Name=\"" + CF_quoteString(Name) + "\""); } int getCaption(string& value) const { if (Caption_isNULL==true) return NOT_FOUND; value = Caption; return OK; } int setCaption(const string& newValue) { Caption = newValue; Caption_isNULL = false; return OK; } int getDescription(string& value) const { if (Description_isNULL==true) return NOT_FOUND; value = Description; return OK; } int setDescription(const string& newValue) { Description = newValue; Description_isNULL = false; return OK; } int getElementName(string& value) const { if (ElementName_isNULL==true) return NOT_FOUND; value = ElementName; return OK; } int setElementName(const string& newValue) { ElementName = newValue; ElementName_isNULL = false; return OK; } int getInstallDate(string& value) const { if (InstallDate_isNULL==true) return NOT_FOUND; value = InstallDate; return OK; } int setInstallDate(const string& newValue) { InstallDate = newValue; InstallDate_isNULL = false; return OK; } int getOperationalStatus(vector& value) const { if (OperationalStatus_isNULL==true) return NOT_FOUND; value = OperationalStatus; return OK; } int setOperationalStatus(const vector& newValue) { OperationalStatus = newValue; OperationalStatus_isNULL = false; return OK; } int getStatusDescriptions(vector& value) const { if (StatusDescriptions_isNULL==true) return NOT_FOUND; value = StatusDescriptions; return OK; } int setStatusDescriptions(const vector& newValue) { StatusDescriptions = newValue; StatusDescriptions_isNULL = false; return OK; } int getStatus(string& value) const { if (Status_isNULL==true) return NOT_FOUND; value = Status; return OK; } int setStatus(const string& newValue) { Status = newValue; Status_isNULL = false; return OK; } int getHealthState(unsigned short& value) const { if (HealthState_isNULL==true) return NOT_FOUND; value = HealthState; return OK; } int setHealthState(const unsigned short& newValue) { HealthState = newValue; HealthState_isNULL = false; return OK; } int getPrimaryStatus(unsigned short& value) const { if (PrimaryStatus_isNULL==true) return NOT_FOUND; value = PrimaryStatus; return OK; } int setPrimaryStatus(const unsigned short& newValue) { PrimaryStatus = newValue; PrimaryStatus_isNULL = false; return OK; } int getDetailedStatus(unsigned short& value) const { if (DetailedStatus_isNULL==true) return NOT_FOUND; value = DetailedStatus; return OK; } int setDetailedStatus(const unsigned short& newValue) { DetailedStatus = newValue; DetailedStatus_isNULL = false; return OK; } int getOperatingStatus(unsigned short& value) const { if (OperatingStatus_isNULL==true) return NOT_FOUND; value = OperatingStatus; return OK; } int setOperatingStatus(const unsigned short& newValue) { OperatingStatus = newValue; OperatingStatus_isNULL = false; return OK; } int getCommunicationStatus(unsigned short& value) const { if (CommunicationStatus_isNULL==true) return NOT_FOUND; value = CommunicationStatus; return OK; } int setCommunicationStatus(const unsigned short& newValue) { CommunicationStatus = newValue; CommunicationStatus_isNULL = false; return OK; } int getEnabledState(unsigned short& value) const { if (EnabledState_isNULL==true) return NOT_FOUND; value = EnabledState; return OK; } int setEnabledState(const unsigned short& newValue) { EnabledState = newValue; EnabledState_isNULL = false; return OK; } int getOtherEnabledState(string& value) const { if (OtherEnabledState_isNULL==true) return NOT_FOUND; value = OtherEnabledState; return OK; } int setOtherEnabledState(const string& newValue) { OtherEnabledState = newValue; OtherEnabledState_isNULL = false; return OK; } int getRequestedState(unsigned short& value) const { if (RequestedState_isNULL==true) return NOT_FOUND; value = RequestedState; return OK; } int setRequestedState(const unsigned short& newValue) { RequestedState = newValue; RequestedState_isNULL = false; return OK; } int getEnabledDefault(unsigned short& value) const { if (EnabledDefault_isNULL==true) return NOT_FOUND; value = EnabledDefault; return OK; } int setEnabledDefault(const unsigned short& newValue) { EnabledDefault = newValue; EnabledDefault_isNULL = false; return OK; } int getTimeOfLastStateChange(string& value) const { if (TimeOfLastStateChange_isNULL==true) return NOT_FOUND; value = TimeOfLastStateChange; return OK; } int setTimeOfLastStateChange(const string& newValue) { TimeOfLastStateChange = newValue; TimeOfLastStateChange_isNULL = false; return OK; } int getAvailableRequestedStates(vector& value) const { if (AvailableRequestedStates_isNULL==true) return NOT_FOUND; value = AvailableRequestedStates; return OK; } int setAvailableRequestedStates(const vector& newValue) { AvailableRequestedStates = newValue; AvailableRequestedStates_isNULL = false; return OK; } int getTransitioningToState(unsigned short& value) const { if (TransitioningToState_isNULL==true) return NOT_FOUND; value = TransitioningToState; return OK; } int setTransitioningToState(const unsigned short& newValue) { TransitioningToState = newValue; TransitioningToState_isNULL = false; return OK; } int getSystemCreationClassName(string& value) const { if (SystemCreationClassName_isNULL==true) return NOT_FOUND; value = SystemCreationClassName; return OK; } int setSystemCreationClassName(const string& newValue) { SystemCreationClassName = newValue; SystemCreationClassName_isNULL = false; return OK; } int getSystemName(string& value) const { if (SystemName_isNULL==true) return NOT_FOUND; value = SystemName; return OK; } int setSystemName(const string& newValue) { SystemName = newValue; SystemName_isNULL = false; return OK; } int getCreationClassName(string& value) const { if (CreationClassName_isNULL==true) return NOT_FOUND; value = CreationClassName; return OK; } int setCreationClassName(const string& newValue) { CreationClassName = newValue; CreationClassName_isNULL = false; return OK; } int getName(string& value) const { if (Name_isNULL==true) return NOT_FOUND; value = Name; return OK; } int setName(const string& newValue) { Name = newValue; Name_isNULL = false; return OK; } int getAccessInfo(string& value) const { if (AccessInfo_isNULL==true) return NOT_FOUND; value = AccessInfo; return OK; } int setAccessInfo(const string& newValue) { AccessInfo = newValue; AccessInfo_isNULL = false; return OK; } int getOtherInfoFormatDescription(string& value) const { if (OtherInfoFormatDescription_isNULL==true) return NOT_FOUND; value = OtherInfoFormatDescription; return OK; } int setOtherInfoFormatDescription(const string& newValue) { OtherInfoFormatDescription = newValue; OtherInfoFormatDescription_isNULL = false; return OK; } int getAccessContext(unsigned short& value) const { if (AccessContext_isNULL==true) return NOT_FOUND; value = AccessContext; return OK; } int setAccessContext(const unsigned short& newValue) { AccessContext = newValue; AccessContext_isNULL = false; return OK; } int getOtherAccessContext(string& value) const { if (OtherAccessContext_isNULL==true) return NOT_FOUND; value = OtherAccessContext; return OK; } int setOtherAccessContext(const string& newValue) { OtherAccessContext = newValue; OtherAccessContext_isNULL = false; return OK; } int getInfoFormat(unsigned short& value) const { if (InfoFormat_isNULL==true) return NOT_FOUND; value = InfoFormat; return OK; } int setInfoFormat(const unsigned short& newValue) { InfoFormat = newValue; InfoFormat_isNULL = false; return OK; } int getResourceType(unsigned short& value) const { if (ResourceType_isNULL==true) return NOT_FOUND; value = ResourceType; return OK; } int setResourceType(const unsigned short& newValue) { ResourceType = newValue; ResourceType_isNULL = false; return OK; } int getExtendedResourceType(unsigned short& value) const { if (ExtendedResourceType_isNULL==true) return NOT_FOUND; value = ExtendedResourceType; return OK; } int setExtendedResourceType(const unsigned short& newValue) { ExtendedResourceType = newValue; ExtendedResourceType_isNULL = false; return OK; } int getOtherResourceType(string& value) const { if (OtherResourceType_isNULL==true) return NOT_FOUND; value = OtherResourceType; return OK; } int setOtherResourceType(const string& newValue) { OtherResourceType = newValue; OtherResourceType_isNULL = false; return OK; } }; class OpenDRIM_SoftwareIdentityResource_RequestStateChange_In { public: unsigned short RequestedState; bool RequestedState_isNULL; Objectpath Job; bool Job_isNULL; string TimeoutPeriod; bool TimeoutPeriod_isNULL; OpenDRIM_SoftwareIdentityResource_RequestStateChange_In() { RequestedState_isNULL = true; Job_isNULL = true; TimeoutPeriod_isNULL = true; } ~OpenDRIM_SoftwareIdentityResource_RequestStateChange_In() {} int getRequestedState(unsigned short& value) const { if (RequestedState_isNULL == true) return NOT_FOUND; value = RequestedState; return OK; } int setRequestedState(const unsigned short& newValue) { RequestedState = newValue; RequestedState_isNULL = false; return OK; } int getJob(Objectpath& value) const { if (Job_isNULL == true) return NOT_FOUND; value = Job; return OK; } int setJob(const Objectpath& newValue) { Job = newValue; Job_isNULL = false; return OK; } int getTimeoutPeriod(string& value) const { if (TimeoutPeriod_isNULL == true) return NOT_FOUND; value = TimeoutPeriod; return OK; } int setTimeoutPeriod(const string& newValue) { TimeoutPeriod = newValue; TimeoutPeriod_isNULL = false; return OK; } }; class OpenDRIM_SoftwareIdentityResource_RequestStateChange_Out { public: Objectpath Job; bool Job_isNULL; OpenDRIM_SoftwareIdentityResource_RequestStateChange_Out() { Job_isNULL = true; } ~OpenDRIM_SoftwareIdentityResource_RequestStateChange_Out() {} int getJob(Objectpath& value) const { if (Job_isNULL == true) return NOT_FOUND; value = Job; return OK; } int setJob(const Objectpath& newValue) { Job = newValue; Job_isNULL = false; return OK; } }; #endif /*OPENDRIM_SOFTWAREIDENTITYRESOURCE_H_*/ ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityResource/cmpiOpenDRIM_SoftwareIdentityResource.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityResource/cmpiOpenDRIM_SoftwareIden0000644000175000017500000002543211401066502034647 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SoftwareIdentityResource.h" CMPIObjectPath* SoftwareInventory_OpenDRIM_SoftwareIdentityResource_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_SoftwareIdentityResource& instance) { _E_; Objectpath op(broker, OpenDRIM_SoftwareIdentityResource_classnames[0], OpenDRIM_SoftwareIdentityResource_NAMESPACE); if (!instance.SystemCreationClassName_isNULL) op.addKey("SystemCreationClassName", instance.SystemCreationClassName); if (!instance.SystemName_isNULL) op.addKey("SystemName", instance.SystemName); if (!instance.CreationClassName_isNULL) op.addKey("CreationClassName", instance.CreationClassName); if (!instance.Name_isNULL) op.addKey("Name", instance.Name); _L_; return op.getHdl(); } CMPIInstance* SoftwareInventory_OpenDRIM_SoftwareIdentityResource_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_SoftwareIdentityResource& instance) { _E_; Objectpath op(broker, SoftwareInventory_OpenDRIM_SoftwareIdentityResource_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Caption_isNULL) ci.setProperty("Caption", instance.Caption); if (!instance.Description_isNULL) ci.setProperty("Description", instance.Description); if (!instance.ElementName_isNULL) ci.setProperty("ElementName", instance.ElementName); if (!instance.InstallDate_isNULL) ci.setPropertyDatetime("InstallDate", instance.InstallDate); if (!instance.OperationalStatus_isNULL) ci.setProperty("OperationalStatus", instance.OperationalStatus); if (!instance.StatusDescriptions_isNULL) ci.setProperty("StatusDescriptions", instance.StatusDescriptions); if (!instance.Status_isNULL) ci.setProperty("Status", instance.Status); if (!instance.HealthState_isNULL) ci.setProperty("HealthState", instance.HealthState); if (!instance.PrimaryStatus_isNULL) ci.setProperty("PrimaryStatus", instance.PrimaryStatus); if (!instance.DetailedStatus_isNULL) ci.setProperty("DetailedStatus", instance.DetailedStatus); if (!instance.OperatingStatus_isNULL) ci.setProperty("OperatingStatus", instance.OperatingStatus); if (!instance.CommunicationStatus_isNULL) ci.setProperty("CommunicationStatus", instance.CommunicationStatus); if (!instance.EnabledState_isNULL) ci.setProperty("EnabledState", instance.EnabledState); if (!instance.OtherEnabledState_isNULL) ci.setProperty("OtherEnabledState", instance.OtherEnabledState); if (!instance.RequestedState_isNULL) ci.setProperty("RequestedState", instance.RequestedState); if (!instance.EnabledDefault_isNULL) ci.setProperty("EnabledDefault", instance.EnabledDefault); if (!instance.TimeOfLastStateChange_isNULL) ci.setPropertyDatetime("TimeOfLastStateChange", instance.TimeOfLastStateChange); if (!instance.AvailableRequestedStates_isNULL) ci.setProperty("AvailableRequestedStates", instance.AvailableRequestedStates); if (!instance.TransitioningToState_isNULL) ci.setProperty("TransitioningToState", instance.TransitioningToState); if (!instance.AccessInfo_isNULL) ci.setProperty("AccessInfo", instance.AccessInfo); if (!instance.OtherInfoFormatDescription_isNULL) ci.setProperty("OtherInfoFormatDescription", instance.OtherInfoFormatDescription); if (!instance.AccessContext_isNULL) ci.setProperty("AccessContext", instance.AccessContext); if (!instance.OtherAccessContext_isNULL) ci.setProperty("OtherAccessContext", instance.OtherAccessContext); if (!instance.InfoFormat_isNULL) ci.setProperty("InfoFormat", instance.InfoFormat); if (!instance.ResourceType_isNULL) ci.setProperty("ResourceType", instance.ResourceType); if (!instance.ExtendedResourceType_isNULL) ci.setProperty("ExtendedResourceType", instance.ExtendedResourceType); if (!instance.OtherResourceType_isNULL) ci.setProperty("OtherResourceType", instance.OtherResourceType); _L_; return ci.getHdl(); } void SoftwareInventory_OpenDRIM_SoftwareIdentityResource_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_SoftwareIdentityResource& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("SystemCreationClassName", instance.SystemCreationClassName) == OK) instance.SystemCreationClassName_isNULL = false; if (op.getKey("Name", instance.Name) == OK) instance.Name_isNULL = false; if (op.getKey("SystemName", instance.SystemName) == OK) instance.SystemName_isNULL = false; if (op.getKey("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; _L_; } void SoftwareInventory_OpenDRIM_SoftwareIdentityResource_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_SoftwareIdentityResource& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Caption", instance.Caption) == OK) instance.Caption_isNULL = false; if (inst.getProperty("Description", instance.Description) == OK) instance.Description_isNULL = false; if (inst.getProperty("ElementName", instance.ElementName) == OK) instance.ElementName_isNULL = false; if (inst.getPropertyDatetime("InstallDate", instance.InstallDate) == OK) instance.InstallDate_isNULL = false; if (inst.getProperty("OperationalStatus", instance.OperationalStatus) == OK) instance.OperationalStatus_isNULL = false; if (inst.getProperty("StatusDescriptions", instance.StatusDescriptions) == OK) instance.StatusDescriptions_isNULL = false; if (inst.getProperty("Status", instance.Status) == OK) instance.Status_isNULL = false; if (inst.getProperty("HealthState", instance.HealthState) == OK) instance.HealthState_isNULL = false; if (inst.getProperty("PrimaryStatus", instance.PrimaryStatus) == OK) instance.PrimaryStatus_isNULL = false; if (inst.getProperty("DetailedStatus", instance.DetailedStatus) == OK) instance.DetailedStatus_isNULL = false; if (inst.getProperty("OperatingStatus", instance.OperatingStatus) == OK) instance.OperatingStatus_isNULL = false; if (inst.getProperty("CommunicationStatus", instance.CommunicationStatus) == OK) instance.CommunicationStatus_isNULL = false; if (inst.getProperty("EnabledState", instance.EnabledState) == OK) instance.EnabledState_isNULL = false; if (inst.getProperty("OtherEnabledState", instance.OtherEnabledState) == OK) instance.OtherEnabledState_isNULL = false; if (inst.getProperty("RequestedState", instance.RequestedState) == OK) instance.RequestedState_isNULL = false; if (inst.getProperty("EnabledDefault", instance.EnabledDefault) == OK) instance.EnabledDefault_isNULL = false; if (inst.getPropertyDatetime("TimeOfLastStateChange", instance.TimeOfLastStateChange) == OK) instance.TimeOfLastStateChange_isNULL = false; if (inst.getProperty("AvailableRequestedStates", instance.AvailableRequestedStates) == OK) instance.AvailableRequestedStates_isNULL = false; if (inst.getProperty("TransitioningToState", instance.TransitioningToState) == OK) instance.TransitioningToState_isNULL = false; if (inst.getProperty("SystemCreationClassName", instance.SystemCreationClassName) == OK) instance.SystemCreationClassName_isNULL = false; if (inst.getProperty("SystemName", instance.SystemName) == OK) instance.SystemName_isNULL = false; if (inst.getProperty("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; if (inst.getProperty("Name", instance.Name) == OK) instance.Name_isNULL = false; if (inst.getProperty("AccessInfo", instance.AccessInfo) == OK) instance.AccessInfo_isNULL = false; if (inst.getProperty("OtherInfoFormatDescription", instance.OtherInfoFormatDescription) == OK) instance.OtherInfoFormatDescription_isNULL = false; if (inst.getProperty("AccessContext", instance.AccessContext) == OK) instance.AccessContext_isNULL = false; if (inst.getProperty("OtherAccessContext", instance.OtherAccessContext) == OK) instance.OtherAccessContext_isNULL = false; if (inst.getProperty("InfoFormat", instance.InfoFormat) == OK) instance.InfoFormat_isNULL = false; if (inst.getProperty("ResourceType", instance.ResourceType) == OK) instance.ResourceType_isNULL = false; if (inst.getProperty("ExtendedResourceType", instance.ExtendedResourceType) == OK) instance.ExtendedResourceType_isNULL = false; if (inst.getProperty("OtherResourceType", instance.OtherResourceType) == OK) instance.OtherResourceType_isNULL = false; _L_; } void SoftwareInventory_OpenDRIM_SoftwareIdentityResource_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_SoftwareIdentityResource_RequestStateChange_In& args) { _E_; CMPIStatus rc; CMPIData data; unsigned short RequestedState; data = in->ft->getArg(in, "RequestedState", &rc); if (rc.rc == OK) { CT_ToC(data, RequestedState); args.setRequestedState(RequestedState); } Objectpath Job; data = in->ft->getArg(in, "Job", &rc); if (rc.rc == OK) { CT_ToC(broker, data, Job); args.setJob(Job); } string TimeoutPeriod; data = in->ft->getArg(in, "TimeoutPeriod", &rc); if (rc.rc == OK) { CT_ToCDatetime(data, TimeoutPeriod); args.setTimeoutPeriod(TimeoutPeriod); } _L_; } void SoftwareInventory_OpenDRIM_SoftwareIdentityResource_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_SoftwareIdentityResource_RequestStateChange_Out& args) { _E_; CMPIValue value; int errorMessage; Objectpath Job; errorMessage = args.getJob(Job); if (errorMessage == OK) { value = CT_toCMPI(Job); out->ft->addArg(out, "Job", &value, CMPI_ref); } _L_; } ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityResource/OpenDRIM_SoftwareIdentityResourceAccess.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityResource/OpenDRIM_SoftwareIdentity0000644000175000017500000000730411401066502034706 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_SoftwareIdentityResourceAccess.h" int SoftwareInventory_OpenDRIM_SoftwareIdentityResource_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareIdentityResource_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareIdentityResource_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_SoftwareIdentityResource_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_SoftwareIdentityResource& instance, const char** properties, string& errorMessage) { _E_; _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_SoftwareIdentityResource_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareIdentityResource& newInstance, const OpenDRIM_SoftwareIdentityResource& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_SoftwareIdentityResource_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareIdentityResource& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_SoftwareIdentityResource_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareIdentityResource& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_SoftwareIdentityResource_RequestStateChange(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareIdentityResource& instance, unsigned int& returnValue, const OpenDRIM_SoftwareIdentityResource_RequestStateChange_In& in, OpenDRIM_SoftwareIdentityResource_RequestStateChange_Out& out, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_SoftwareIdentityResource_populate(OpenDRIM_SoftwareIdentityResource& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityResource/cmpiOpenDRIM_SoftwareIdentityResource.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityResource/cmpiOpenDRIM_SoftwareIden0000644000175000017500000000527011401066502034645 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_SOFTWAREIDENTITYRESOURCE_H_ #define CMPIOPENDRIM_SOFTWAREIDENTITYRESOURCE_H_ #include "OpenDRIM_SoftwareIdentityResource.h" CMPIObjectPath* SoftwareInventory_OpenDRIM_SoftwareIdentityResource_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_SoftwareIdentityResource& instance); CMPIInstance* SoftwareInventory_OpenDRIM_SoftwareIdentityResource_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_SoftwareIdentityResource& instance); void SoftwareInventory_OpenDRIM_SoftwareIdentityResource_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_SoftwareIdentityResource& instance); void SoftwareInventory_OpenDRIM_SoftwareIdentityResource_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_SoftwareIdentityResource& instance); void SoftwareInventory_OpenDRIM_SoftwareIdentityResource_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_SoftwareIdentityResource_RequestStateChange_In& args); void SoftwareInventory_OpenDRIM_SoftwareIdentityResource_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_SoftwareIdentityResource_RequestStateChange_Out& args); #endif /*CMPIOPENDRIM_SOFTWAREIDENTITYRESOURCE_H_*/ ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityResource/OpenDRIM_SoftwareIdentityResourceProvider.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SoftwareIdentityResource/OpenDRIM_SoftwareIdentity0000644000175000017500000003527611401066502034717 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SoftwareIdentityResource.h" #include "OpenDRIM_SoftwareIdentityResourceAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define SoftwareInventory_OpenDRIM_SoftwareIdentityResourceProviderSetInstance SoftwareInventory_OpenDRIM_SoftwareIdentityResourceProviderModifyInstance #endif int SoftwareInventory_OpenDRIM_SoftwareIdentityResource_init(const CMPIBroker* broker); int SoftwareInventory_OpenDRIM_SoftwareIdentityResource_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityResourceProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityResource_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityResourceProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityResource_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentityResource_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = SoftwareInventory_OpenDRIM_SoftwareIdentityResource_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityResourceProviderEnumInstances(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityResource_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentityResource_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = SoftwareInventory_OpenDRIM_SoftwareIdentityResource_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityResourceProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareIdentityResource instance; SoftwareInventory_OpenDRIM_SoftwareIdentityResource_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityResource_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentityResource_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = SoftwareInventory_OpenDRIM_SoftwareIdentityResource_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityResourceProviderSetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareIdentityResource newInstance, oldInstance; SoftwareInventory_OpenDRIM_SoftwareIdentityResource_toCPP(_broker, ci, newInstance); SoftwareInventory_OpenDRIM_SoftwareIdentityResource_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityResource_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentityResource_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityResource_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentityResource_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityResourceProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareIdentityResource instance; SoftwareInventory_OpenDRIM_SoftwareIdentityResource_toCPP(_broker, ci, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityResource_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_SoftwareIdentityResource_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityResource_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentityResource_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityResource_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentityResource_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = SoftwareInventory_OpenDRIM_SoftwareIdentityResource_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityResourceProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareIdentityResource instance; SoftwareInventory_OpenDRIM_SoftwareIdentityResource_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityResource_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentityResource_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityResource_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentityResource_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityResourceProviderExecQuery(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* lang, const char* query) { _E_; CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } /* ---------------------------------------------------------------------------*/ /* End of Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Method Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityResourceProviderMethodCleanup(CMPIMethodMI * mi, const CMPIContext * ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityResource_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SoftwareIdentityResourceProviderInvokeMethod(CMPIMethodMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* methodName, const CMPIArgs* in, CMPIArgs* out) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareIdentityResource instance; SoftwareInventory_OpenDRIM_SoftwareIdentityResource_toCPP(_broker, ref, instance); string errorMessage; const char* properties[] = {"SystemCreationClassName", "Name", "SystemName", "CreationClassName"}; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityResource_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentityResource_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } if ((string) methodName =="RequestStateChange") { unsigned int returnValue; OpenDRIM_SoftwareIdentityResource_RequestStateChange_In inArgs; SoftwareInventory_OpenDRIM_SoftwareIdentityResource_toCPP(_broker, in, inArgs); OpenDRIM_SoftwareIdentityResource_RequestStateChange_Out outArgs; errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityResource_RequestStateChange(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareIdentityResource_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } SoftwareInventory_OpenDRIM_SoftwareIdentityResource_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else { errorMessage = (string) OpenDRIM_SoftwareIdentityResource_classnames[0] + ": " + "The requested method (" + (string) methodName +") was not found."; CMSetStatusWithChars(_broker, &rc, (CMPIrc) NOT_SUPPORTED, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; CMReturn(CMPI_RC_OK); } /* ---------------------------------------------------------------------------*/ /* End of Method Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int SoftwareInventory_OpenDRIM_SoftwareIdentityResource_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityResource_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "SoftwareInventory_OpenDRIM_SoftwareIdentityResource_init FAILED: " + (string) OpenDRIM_SoftwareIdentityResource_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int SoftwareInventory_OpenDRIM_SoftwareIdentityResource_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SoftwareIdentityResource_unload(errorMessage); if (errorCode != OK) { errorMessage += "SoftwareInventory_OpenDRIM_SoftwareIdentityResource_unload FAILED: " + (string) OpenDRIM_SoftwareIdentityResource_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define SoftwareInventory_OpenDRIM_SoftwareIdentityResource_INIT if (SoftwareInventory_OpenDRIM_SoftwareIdentityResource_init(_broker) < 0) return NULL CMInstanceMIStub(SoftwareInventory_OpenDRIM_SoftwareIdentityResourceProvider, SoftwareInventory_OpenDRIM_SoftwareIdentityResourceProvider, _broker, SoftwareInventory_OpenDRIM_SoftwareIdentityResource_INIT); CMMethodMIStub(SoftwareInventory_OpenDRIM_SoftwareIdentityResourceProvider, SoftwareInventory_OpenDRIM_SoftwareIdentityResourceProvider, _broker, SoftwareInventory_OpenDRIM_SoftwareIdentityResource_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_InstalledSoftwareIdentity/0000755000175000017500000000000011401066502030146 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_InstalledSoftwareIdentity/OpenDRIM_InstalledSoftwareIdentity.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_InstalledSoftwareIdentity/OpenDRIM_InstalledSoftwa0000644000175000017500000000703011401066502034631 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_INSTALLEDSOFTWAREIDENTITY_H_ #define OPENDRIM_INSTALLEDSOFTWAREIDENTITY_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_System.h" #include "CIM_SystemAccess.h" #include "cmpiCIM_SoftwareIdentity.h" #include "CIM_SoftwareIdentityAccess.h" */ const static char* OpenDRIM_InstalledSoftwareIdentity_classnames[] = {"OpenDRIM_InstalledSoftwareIdentity"}; static string OpenDRIM_InstalledSoftwareIdentity_NAMESPACE = _NAMESPACE; const static string System_role = "System"; const static char* System_classnames[] = {"OpenDRIM_ComputerSystem"}; const static string System_NAMESPACE = _NAMESPACE; const static string InstalledSoftware_role = "InstalledSoftware"; const static char* InstalledSoftware_classnames[] = {"OpenDRIM_SoftwareIdentity"}; const static string InstalledSoftware_NAMESPACE = _NAMESPACE; class OpenDRIM_InstalledSoftwareIdentity { public: Objectpath System; bool System_isNULL; Objectpath InstalledSoftware; bool InstalledSoftware_isNULL; OpenDRIM_InstalledSoftwareIdentity() { System_isNULL = true; InstalledSoftware_isNULL = true; } ~OpenDRIM_InstalledSoftwareIdentity() {} string getKeys() const { return CF_toLowCase(".System=\"" + CF_quoteString(System.toString()) + "\""".InstalledSoftware=\"" + CF_quoteString(InstalledSoftware.toString()) + "\""); } int getSystem(Objectpath& value) const { if (System_isNULL==true) return NOT_FOUND; value = System; return OK; } int setSystem(const Objectpath& newValue) { System = newValue; System.setNamespace(System_NAMESPACE); System_isNULL = false; return OK; } int getInstalledSoftware(Objectpath& value) const { if (InstalledSoftware_isNULL==true) return NOT_FOUND; value = InstalledSoftware; return OK; } int setInstalledSoftware(const Objectpath& newValue) { InstalledSoftware = newValue; InstalledSoftware.setNamespace(InstalledSoftware_NAMESPACE); InstalledSoftware_isNULL = false; return OK; } }; #endif /*OPENDRIM_INSTALLEDSOFTWAREIDENTITY_H_*/ ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_InstalledSoftwareIdentity/OpenDRIM_InstalledSoftwareIdentityProvider.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_InstalledSoftwareIdentity/OpenDRIM_InstalledSoftwa0000644000175000017500000004425311401066502034641 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_InstalledSoftwareIdentity.h" #include "OpenDRIM_InstalledSoftwareIdentityAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define SoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProviderSetInstance SoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProviderModifyInstance #endif int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_init(const CMPIBroker* broker); int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_InstalledSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProviderEnumInstances(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_InstalledSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_InstalledSoftwareIdentity instance; SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_InstalledSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProviderSetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_InstalledSoftwareIdentity newInstance, oldInstance; SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_toCPP(_broker, ci, newInstance); SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_InstalledSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_InstalledSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_InstalledSoftwareIdentity instance; SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_toCPP(_broker, ci, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_InstalledSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_InstalledSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_InstalledSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_InstalledSoftwareIdentity instance; SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_InstalledSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_InstalledSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProviderExecQuery(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* lang, const char* query) { _E_; CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } /* ---------------------------------------------------------------------------*/ /* End of Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Association Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProviderAssociatorNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_InstalledSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnObjectPath(rslt, associatedInstances[i].getObjectpath().getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProviderAssociators(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_InstalledSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnInstance(rslt, associatedInstances[i].getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProviderReferenceNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_InstalledSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_referenceSystemToInstalledSoftware(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_referenceInstalledSoftwareToSystem(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_InstalledSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProviderReferences(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_InstalledSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_referenceSystemToInstalledSoftware(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_referenceInstalledSoftwareToSystem(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_InstalledSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_init FAILED: " + (string) OpenDRIM_InstalledSoftwareIdentity_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_unload(errorMessage); if (errorCode != OK) { errorMessage += "SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_unload FAILED: " + (string) OpenDRIM_InstalledSoftwareIdentity_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_INIT if (SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_init(_broker) < 0) return NULL CMInstanceMIStub(SoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProvider, SoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProvider, _broker, SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_INIT); CMAssociationMIStub(SoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProvider, SoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProvider, _broker, SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_InstalledSoftwareIdentity/Makefile.am0000644000175000017500000000515411401066502032207 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProvider.la libcmpiSoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProvider_la_SOURCES = OpenDRIM_InstalledSoftwareIdentityAccess.cpp OpenDRIM_InstalledSoftwareIdentityProvider.cpp cmpiOpenDRIM_InstalledSoftwareIdentity.cpp assocOpenDRIM_InstalledSoftwareIdentity.cpp # May have to be adjusted for direct invocation libcmpiSoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProvider_la_CPPFLAGS = -I../CIM_System -I../CIM_SoftwareIdentity # Uncomment the end for direct invocation, may have to be adjusted libcmpiSoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProvider_la_LIBADD = ../Common/libcmpiSoftwareInventory_Common.la #../CIM_System/libcmpiSoftwareInventory_CIM_SystemProvider.la ../CIM_SoftwareIdentity/libcmpiSoftwareInventory_CIM_SoftwareIdentityProvider.la libcmpiSoftwareInventory_OpenDRIM_InstalledSoftwareIdentityProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_InstalledSoftwareIdentity.h OpenDRIM_InstalledSoftwareIdentity.h OpenDRIM_InstalledSoftwareIdentityAccess.h ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_InstalledSoftwareIdentity/cmpiOpenDRIM_InstalledSoftwareIdentity.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_InstalledSoftwareIdentity/cmpiOpenDRIM_InstalledSo0000644000175000017500000000634211401066502034625 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_InstalledSoftwareIdentity.h" CMPIObjectPath* SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_InstalledSoftwareIdentity& instance) { _E_; Objectpath op(broker, OpenDRIM_InstalledSoftwareIdentity_classnames[0], OpenDRIM_InstalledSoftwareIdentity_NAMESPACE); if (!instance.System_isNULL) op.addKey("System", instance.System); if (!instance.InstalledSoftware_isNULL) op.addKey("InstalledSoftware", instance.InstalledSoftware); _L_; return op.getHdl(); } CMPIInstance* SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_InstalledSoftwareIdentity& instance) { _E_; Objectpath op(broker, SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_InstalledSoftwareIdentity& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("System", instance.System) == OK) instance.System_isNULL = false; if (op.getKey("InstalledSoftware", instance.InstalledSoftware) == OK) instance.InstalledSoftware_isNULL = false; _L_; } void SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_InstalledSoftwareIdentity& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("System", instance.System) == OK) instance.System_isNULL = false; if (inst.getProperty("InstalledSoftware", instance.InstalledSoftware) == OK) instance.InstalledSoftware_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_InstalledSoftwareIdentity/OpenDRIM_InstalledSoftwareIdentityAccess.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_InstalledSoftwareIdentity/OpenDRIM_InstalledSoftwa0000644000175000017500000001116611401066502034636 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_INSTALLEDSOFTWAREIDENTITYACCESS_H_ #define OPENDRIM_INSTALLEDSOFTWAREIDENTITYACCESS_H_ #include "SoftwareInventory_Common.h" #include "OpenDRIM_InstalledSoftwareIdentity.h" #include "assocOpenDRIM_InstalledSoftwareIdentity.h" int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_load(const CMPIBroker* broker, string& errorMessage); int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_unload(string& errorMessage); int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_InstalledSoftwareIdentity& instance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_InstalledSoftwareIdentity& newInstance, const OpenDRIM_InstalledSoftwareIdentity& oldInstance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_InstalledSoftwareIdentity& instance, string& errorMessage); int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_InstalledSoftwareIdentity& instance, string& errorMessage); int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_associatorSystemToInstalledSoftware(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& System_instance, const char** properties, vector& InstalledSoftware_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_associatorInstalledSoftwareToSystem(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& InstalledSoftware_instance, const char** properties, vector& System_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_referenceSystemToInstalledSoftware(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& System_instance, const vector& InstalledSoftware_instances, vector& OpenDRIM_InstalledSoftwareIdentity_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_referenceInstalledSoftwareToSystem(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& InstalledSoftware_instance, const vector& System_instances, vector& OpenDRIM_InstalledSoftwareIdentity_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_populate(OpenDRIM_InstalledSoftwareIdentity& instance, string& errorMessage); #endif /*OPENDRIM_INSTALLEDSOFTWAREIDENTITYACCESS_H_*/ ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_InstalledSoftwareIdentity/assocOpenDRIM_InstalledSoftwareIdentity.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_InstalledSoftwareIdentity/assocOpenDRIM_InstalledS0000644000175000017500000002154411401066502034627 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "assocOpenDRIM_InstalledSoftwareIdentity.h" int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage) { _E_; string _assocClass, _resultClass, _resultRole, _role; assocClass == NULL ? _assocClass = "null" : _assocClass = assocClass; resultClass == NULL ? _resultClass = "null" : _resultClass = resultClass; resultRole == NULL ? _resultRole = "null" : _resultRole = resultRole; role == NULL ? _role = "null" : _role = role; for (unsigned int i=0; i& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant) { _E_; int errorCode = SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_associatorFilter(broker, ctx, cop, knownInstance, assocClass, resultClass, role, resultRole, leftToRight, errorMessage); if (errorCode == -1) return OK; if (errorCode != OK) return errorCode; if (leftToRight) { if (role != NULL && strcasecmp(role, "System") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "InstalledSoftware") != 0) return OK; CF_assert(SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_associatorSystemToInstalledSoftware(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "InstalledSoftware") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "System") != 0) return OK; CF_assert(SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_associatorInstalledSoftwareToSystem(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_enumerateSystems(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, System_NAMESPACE, System_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(SoftwareInventory_CIM_System_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareInventory_CIM_System_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareInventory_CIM_System_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_getSystem(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), System_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), System_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_System _instance; SoftwareInventory_CIM_System_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareInventory_CIM_System_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareInventory_CIM_System_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_enumerateInstalledSoftwares(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, InstalledSoftware_NAMESPACE, InstalledSoftware_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(SoftwareInventory_CIM_SoftwareIdentity_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareInventory_CIM_SoftwareIdentity_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareInventory_CIM_SoftwareIdentity_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_getInstalledSoftware(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), InstalledSoftware_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), InstalledSoftware_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_SoftwareIdentity _instance; SoftwareInventory_CIM_SoftwareIdentity_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareInventory_CIM_SoftwareIdentity_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareInventory_CIM_SoftwareIdentity_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_InstalledSoftwareIdentity/OpenDRIM_InstalledSoftwareIdentityAccess.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_InstalledSoftwareIdentity/OpenDRIM_InstalledSoftwa0000644000175000017500000002554511401066502034644 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_InstalledSoftwareIdentityAccess.h" int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareInventory_CIM_System_load(broker, errorMessage)); CF_assert(SoftwareInventory_CIM_SoftwareIdentity_load(broker, errorMessage)); */ // TODO _L_; return OK; } int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareInventory_CIM_System_unload(errorMessage)); CF_assert(SoftwareInventory_CIM_SoftwareIdentity_unload(errorMessage)); */ // TODO _L_; return OK; } int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_isAssociated(const Instance& System, const Instance& InstalledSoftware, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector subjects; // Only get the instance names CF_assert(SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_enumerateSystems(broker, ctx, subjects, NULL, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_enumerateSystems(broker, ctx, subjects, NULL, false, errorMessage)); vector::iterator c = subjects.begin(); vector::iterator end = subjects.end(); for (; c != end; ++c) { bool leftToRight = true; vector associatedInstances; SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), System_classnames[0], InstalledSoftware_classnames[0], System_role.c_str(), InstalledSoftware_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_referenceSystemToInstalledSoftware(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_InstalledSoftwareIdentity& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath System_objectpath; instance.getSystem(System_objectpath); Instance System_instance; CF_assert(SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_getSystem(broker, ctx, System_objectpath, System_instance, NULL, errorMessage)); Objectpath InstalledSoftware_objectpath; instance.getInstalledSoftware(InstalledSoftware_objectpath); Instance InstalledSoftware_instance; CF_assert(SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_getInstalledSoftware(broker, ctx, InstalledSoftware_objectpath, InstalledSoftware_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_isAssociated(System_instance, InstalledSoftware_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_InstalledSoftwareIdentity& newInstance, const OpenDRIM_InstalledSoftwareIdentity& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_InstalledSoftwareIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_InstalledSoftwareIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_associatorSystemToInstalledSoftware(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& System_instance, const char** properties, vector& InstalledSoftware_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector InstalledSoftware_instances; if (discriminant=="a") CF_assert(SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_enumerateInstalledSoftwares(broker, ctx, InstalledSoftware_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_enumerateInstalledSoftwares(broker, ctx, InstalledSoftware_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_enumerateInstalledSoftwares(broker, ctx, InstalledSoftware_instances, properties, false, errorMessage)); } for (size_t i=0; i& System_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector System_instances; if (discriminant=="a") CF_assert(SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_enumerateSystems(broker, ctx, System_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_enumerateSystems(broker, ctx, System_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_enumerateSystems(broker, ctx, System_instances, properties, false, errorMessage)); } for (size_t i=0; i& InstalledSoftware_instances, vector& OpenDRIM_InstalledSoftwareIdentity_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < InstalledSoftware_instances.size(); i++) { OpenDRIM_InstalledSoftwareIdentity instance; instance.setSystem(((Instance) System_instance).getObjectpath()); instance.setInstalledSoftware(((Instance) InstalledSoftware_instances[i]).getObjectpath()); OpenDRIM_InstalledSoftwareIdentity_instances.push_back(instance); } _L_; return OK; } int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_referenceInstalledSoftwareToSystem(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& InstalledSoftware_instance, const vector& System_instances, vector& OpenDRIM_InstalledSoftwareIdentity_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < System_instances.size(); i++) { OpenDRIM_InstalledSoftwareIdentity instance; instance.setSystem(((Instance) System_instances[i]).getObjectpath()); instance.setInstalledSoftware(((Instance) InstalledSoftware_instance).getObjectpath()); OpenDRIM_InstalledSoftwareIdentity_instances.push_back(instance); } _L_; return OK; } int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_populate(OpenDRIM_InstalledSoftwareIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_InstalledSoftwareIdentity/cmpiOpenDRIM_InstalledSoftwareIdentity.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_InstalledSoftwareIdentity/cmpiOpenDRIM_InstalledSo0000644000175000017500000000454211401066502034625 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_INSTALLEDSOFTWAREIDENTITY_H_ #define CMPIOPENDRIM_INSTALLEDSOFTWAREIDENTITY_H_ #include "OpenDRIM_InstalledSoftwareIdentity.h" CMPIObjectPath* SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_InstalledSoftwareIdentity& instance); CMPIInstance* SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_InstalledSoftwareIdentity& instance); void SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_InstalledSoftwareIdentity& instance); void SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_InstalledSoftwareIdentity& instance); #endif /*CMPIOPENDRIM_INSTALLEDSOFTWAREIDENTITY_H_*/ ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_InstalledSoftwareIdentity/assocOpenDRIM_InstalledSoftwareIdentity.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_InstalledSoftwareIdentity/assocOpenDRIM_InstalledS0000644000175000017500000000642611401066502034631 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ASSOCOPENDRIM_INSTALLEDSOFTWAREIDENTITY_H_ #define ASSOCOPENDRIM_INSTALLEDSOFTWAREIDENTITY_H_ #include "OpenDRIM_InstalledSoftwareIdentityAccess.h" int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage); int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_associator(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties, vector& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant); int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_enumerateSystems(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_getSystem(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_enumerateInstalledSoftwares(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareInventory_OpenDRIM_InstalledSoftwareIdentity_getInstalledSoftware(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_INSTALLEDSOFTWAREIDENTITY_H_*/ opendrim-lmp-softwareinventory-1.0.0~ppa/NEWS0000644000175000017500000000017511401066502022047 0ustar guillaumeguillaumeInitial Release 1.0.0 ========================= // TODO Changes in Major.Minor.Revision ========================= // TODO opendrim-lmp-softwareinventory-1.0.0~ppa/LICENSE0000644000175000017500000000300211401066502022345 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### opendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SystemSpecificSoftwareInventoryCollection/0000755000175000017500000000000011401066502033401 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000023100000000000011561 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SystemSpecificSoftwareInventoryCollection/OpenDRIM_SystemSpecificSoftwareInventoryCollectionAccess.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SystemSpecificSoftwareInventoryCollection/OpenDRIM0000644000175000017500000000705211401066502034705 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_SystemSpecificSoftwareInventoryCollectionAccess.h" int SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; _L_; return OK; } int SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_SystemSpecificSoftwareInventoryCollection& instance, const char** properties, string& errorMessage) { _E_; _L_; return OK; } int SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SystemSpecificSoftwareInventoryCollection& newInstance, const OpenDRIM_SystemSpecificSoftwareInventoryCollection& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SystemSpecificSoftwareInventoryCollection& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SystemSpecificSoftwareInventoryCollection& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_populate(OpenDRIM_SystemSpecificSoftwareInventoryCollection& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SystemSpecificSoftwareInventoryCollection/Makefile.amopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SystemSpecificSoftwareInventoryCollection/Makefile0000644000175000017500000000454111401066502035045 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollectionProvider.la libcmpiSoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollectionProvider_la_SOURCES = OpenDRIM_SystemSpecificSoftwareInventoryCollectionAccess.cpp OpenDRIM_SystemSpecificSoftwareInventoryCollectionProvider.cpp cmpiOpenDRIM_SystemSpecificSoftwareInventoryCollection.cpp libcmpiSoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollectionProvider_la_LIBADD = ../Common/libcmpiSoftwareInventory_Common.la libcmpiSoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollectionProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_SystemSpecificSoftwareInventoryCollection.h OpenDRIM_SystemSpecificSoftwareInventoryCollection.h OpenDRIM_SystemSpecificSoftwareInventoryCollectionAccess.h ././@LongLink0000000000000000000000000000022100000000000011560 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SystemSpecificSoftwareInventoryCollection/OpenDRIM_SystemSpecificSoftwareInventoryCollection.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SystemSpecificSoftwareInventoryCollection/OpenDRIM0000644000175000017500000000677411401066502034717 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SYSTEMSPECIFICSOFTWAREINVENTORYCOLLECTION_H_ #define OPENDRIM_SYSTEMSPECIFICSOFTWAREINVENTORYCOLLECTION_H_ #include const static char* OpenDRIM_SystemSpecificSoftwareInventoryCollection_classnames[] = {"OpenDRIM_SystemSpecificSoftwareInventoryCollection"}; static string OpenDRIM_SystemSpecificSoftwareInventoryCollection_NAMESPACE = _NAMESPACE; class OpenDRIM_SystemSpecificSoftwareInventoryCollection { public: string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string ElementName; bool ElementName_isNULL; string InstanceID; bool InstanceID_isNULL; OpenDRIM_SystemSpecificSoftwareInventoryCollection() { Caption_isNULL = true; Description_isNULL = true; ElementName_isNULL = true; InstanceID_isNULL = true; } ~OpenDRIM_SystemSpecificSoftwareInventoryCollection() {} string getKeys() const { return CF_toLowCase(".InstanceID=\"" + CF_quoteString(InstanceID) + "\""); } int getCaption(string& value) const { if (Caption_isNULL==true) return NOT_FOUND; value = Caption; return OK; } int setCaption(const string& newValue) { Caption = newValue; Caption_isNULL = false; return OK; } int getDescription(string& value) const { if (Description_isNULL==true) return NOT_FOUND; value = Description; return OK; } int setDescription(const string& newValue) { Description = newValue; Description_isNULL = false; return OK; } int getElementName(string& value) const { if (ElementName_isNULL==true) return NOT_FOUND; value = ElementName; return OK; } int setElementName(const string& newValue) { ElementName = newValue; ElementName_isNULL = false; return OK; } int getInstanceID(string& value) const { if (InstanceID_isNULL==true) return NOT_FOUND; value = InstanceID; return OK; } int setInstanceID(const string& newValue) { InstanceID = newValue; InstanceID_isNULL = false; return OK; } }; #endif /*OPENDRIM_SYSTEMSPECIFICSOFTWAREINVENTORYCOLLECTION_H_*/ ././@LongLink0000000000000000000000000000022700000000000011566 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SystemSpecificSoftwareInventoryCollection/cmpiOpenDRIM_SystemSpecificSoftwareInventoryCollection.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SystemSpecificSoftwareInventoryCollection/cmpiOpen0000644000175000017500000000724411401066502035105 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SystemSpecificSoftwareInventoryCollection.h" CMPIObjectPath* SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_SystemSpecificSoftwareInventoryCollection& instance) { _E_; Objectpath op(broker, OpenDRIM_SystemSpecificSoftwareInventoryCollection_classnames[0], OpenDRIM_SystemSpecificSoftwareInventoryCollection_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_SystemSpecificSoftwareInventoryCollection& instance) { _E_; Objectpath op(broker, SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Caption_isNULL) ci.setProperty("Caption", instance.Caption); if (!instance.Description_isNULL) ci.setProperty("Description", instance.Description); if (!instance.ElementName_isNULL) ci.setProperty("ElementName", instance.ElementName); _L_; return ci.getHdl(); } void SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_SystemSpecificSoftwareInventoryCollection& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_SystemSpecificSoftwareInventoryCollection& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Caption", instance.Caption) == OK) instance.Caption_isNULL = false; if (inst.getProperty("Description", instance.Description) == OK) instance.Description_isNULL = false; if (inst.getProperty("ElementName", instance.ElementName) == OK) instance.ElementName_isNULL = false; if (inst.getProperty("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000022500000000000011564 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SystemSpecificSoftwareInventoryCollection/cmpiOpenDRIM_SystemSpecificSoftwareInventoryCollection.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SystemSpecificSoftwareInventoryCollection/cmpiOpen0000644000175000017500000000504211401066502035077 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_SYSTEMSPECIFICSOFTWAREINVENTORYCOLLECTION_H_ #define CMPIOPENDRIM_SYSTEMSPECIFICSOFTWAREINVENTORYCOLLECTION_H_ #include "OpenDRIM_SystemSpecificSoftwareInventoryCollection.h" CMPIObjectPath* SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_SystemSpecificSoftwareInventoryCollection& instance); CMPIInstance* SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_SystemSpecificSoftwareInventoryCollection& instance); void SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_SystemSpecificSoftwareInventoryCollection& instance); void SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_SystemSpecificSoftwareInventoryCollection& instance); #endif /*CMPIOPENDRIM_SYSTEMSPECIFICSOFTWAREINVENTORYCOLLECTION_H_*/ ././@LongLink0000000000000000000000000000023300000000000011563 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SystemSpecificSoftwareInventoryCollection/OpenDRIM_SystemSpecificSoftwareInventoryCollectionProvider.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SystemSpecificSoftwareInventoryCollection/OpenDRIM0000644000175000017500000003136411401066502034710 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SystemSpecificSoftwareInventoryCollection.h" #include "OpenDRIM_SystemSpecificSoftwareInventoryCollectionAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollectionProviderSetInstance SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollectionProviderModifyInstance #endif int SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_init(const CMPIBroker* broker); int SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollectionProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollectionProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemSpecificSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollectionProviderEnumInstances(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemSpecificSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollectionProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SystemSpecificSoftwareInventoryCollection instance; SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemSpecificSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollectionProviderSetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SystemSpecificSoftwareInventoryCollection newInstance, oldInstance; SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_toCPP(_broker, ci, newInstance); SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemSpecificSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemSpecificSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollectionProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SystemSpecificSoftwareInventoryCollection instance; SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_toCPP(_broker, ci, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_SystemSpecificSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemSpecificSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemSpecificSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollectionProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SystemSpecificSoftwareInventoryCollection instance; SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemSpecificSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemSpecificSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollectionProviderExecQuery(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* lang, const char* query) { _E_; CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } /* ---------------------------------------------------------------------------*/ /* End of Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_init FAILED: " + (string) OpenDRIM_SystemSpecificSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_unload(errorMessage); if (errorCode != OK) { errorMessage += "SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_unload FAILED: " + (string) OpenDRIM_SystemSpecificSoftwareInventoryCollection_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_INIT if (SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_init(_broker) < 0) return NULL CMInstanceMIStub(SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollectionProvider, SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollectionProvider, _broker, SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000022700000000000011566 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SystemSpecificSoftwareInventoryCollection/OpenDRIM_SystemSpecificSoftwareInventoryCollectionAccess.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_SystemSpecificSoftwareInventoryCollection/OpenDRIM0000644000175000017500000000675711401066502034720 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SYSTEMSPECIFICSOFTWAREINVENTORYCOLLECTIONACCESS_H_ #define OPENDRIM_SYSTEMSPECIFICSOFTWAREINVENTORYCOLLECTIONACCESS_H_ #include "SoftwareInventory_Common.h" #include "OpenDRIM_SystemSpecificSoftwareInventoryCollection.h" int SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_load(const CMPIBroker* broker, string& errorMessage); int SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_unload(string& errorMessage); int SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_SystemSpecificSoftwareInventoryCollection& instance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SystemSpecificSoftwareInventoryCollection& newInstance, const OpenDRIM_SystemSpecificSoftwareInventoryCollection& oldInstance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SystemSpecificSoftwareInventoryCollection& instance, string& errorMessage); int SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SystemSpecificSoftwareInventoryCollection& instance, string& errorMessage); int SoftwareInventory_OpenDRIM_SystemSpecificSoftwareInventoryCollection_populate(OpenDRIM_SystemSpecificSoftwareInventoryCollection& instance, string& errorMessage); #endif /*OPENDRIM_SYSTEMSPECIFICSOFTWAREINVENTORYCOLLECTIONACCESS_H_*/ opendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryComponent/0000755000175000017500000000000011401066502031702 5ustar guillaumeguillaumeopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryComponent/Makefile.am0000644000175000017500000000533611401066502033745 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProvider.la libcmpiSoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProvider_la_SOURCES = OpenDRIM_OrderedSoftwareInventoryComponentAccess.cpp OpenDRIM_OrderedSoftwareInventoryComponentProvider.cpp cmpiOpenDRIM_OrderedSoftwareInventoryComponent.cpp assocOpenDRIM_OrderedSoftwareInventoryComponent.cpp # May have to be adjusted for direct invocation libcmpiSoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProvider_la_CPPFLAGS = -I../CIM_ManagedElement -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiSoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProvider_la_LIBADD = ../Common/libcmpiSoftwareInventory_Common.la #../CIM_ManagedElement/libcmpiSoftwareInventory_CIM_ManagedElementProvider.la ../CIM_ManagedElement/libcmpiSoftwareInventory_CIM_ManagedElementProvider.la libcmpiSoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_OrderedSoftwareInventoryComponent.h OpenDRIM_OrderedSoftwareInventoryComponent.h OpenDRIM_OrderedSoftwareInventoryComponentAccess.h ././@LongLink0000000000000000000000000000020100000000000011556 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryComponent/OpenDRIM_OrderedSoftwareInventoryComponent.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryComponent/OpenDRIM_Ordered0000644000175000017500000001012111401066502034641 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_ORDEREDSOFTWAREINVENTORYCOMPONENT_H_ #define OPENDRIM_ORDEREDSOFTWAREINVENTORYCOMPONENT_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" */ const static char* OpenDRIM_OrderedSoftwareInventoryComponent_classnames[] = {"OpenDRIM_OrderedSoftwareInventoryComponent"}; static string OpenDRIM_OrderedSoftwareInventoryComponent_NAMESPACE = _NAMESPACE; const static string PartComponent_role = "PartComponent"; const static char* PartComponent_classnames[] = {"OpenDRIM_SoftwareIdentity"}; const static string PartComponent_NAMESPACE = _NAMESPACE; const static string GroupComponent_role = "GroupComponent"; const static char* GroupComponent_classnames[] = {"OpenDRIM_SoftwareIdentity"}; const static string GroupComponent_NAMESPACE = _NAMESPACE; class OpenDRIM_OrderedSoftwareInventoryComponent { public: Objectpath GroupComponent; bool GroupComponent_isNULL; Objectpath PartComponent; bool PartComponent_isNULL; unsigned long long AssignedSequence; bool AssignedSequence_isNULL; OpenDRIM_OrderedSoftwareInventoryComponent() { GroupComponent_isNULL = true; PartComponent_isNULL = true; AssignedSequence_isNULL = true; } ~OpenDRIM_OrderedSoftwareInventoryComponent() {} string getKeys() const { return CF_toLowCase(".GroupComponent=\"" + CF_quoteString(GroupComponent.toString()) + "\""".PartComponent=\"" + CF_quoteString(PartComponent.toString()) + "\""); } int getGroupComponent(Objectpath& value) const { if (GroupComponent_isNULL==true) return NOT_FOUND; value = GroupComponent; return OK; } int setGroupComponent(const Objectpath& newValue) { GroupComponent = newValue; GroupComponent.setNamespace(GroupComponent_NAMESPACE); GroupComponent_isNULL = false; return OK; } int getPartComponent(Objectpath& value) const { if (PartComponent_isNULL==true) return NOT_FOUND; value = PartComponent; return OK; } int setPartComponent(const Objectpath& newValue) { PartComponent = newValue; PartComponent.setNamespace(PartComponent_NAMESPACE); PartComponent_isNULL = false; return OK; } int getAssignedSequence(unsigned long long& value) const { if (AssignedSequence_isNULL==true) return NOT_FOUND; value = AssignedSequence; return OK; } int setAssignedSequence(const unsigned long long& newValue) { AssignedSequence = newValue; AssignedSequence_isNULL = false; return OK; } }; #endif /*OPENDRIM_ORDEREDSOFTWAREINVENTORYCOMPONENT_H_*/ ././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryComponent/assocOpenDRIM_OrderedSoftwareInventoryComponent.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryComponent/assocOpenDRIM_Or0000644000175000017500000000655611401066502034707 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ASSOCOPENDRIM_ORDEREDSOFTWAREINVENTORYCOMPONENT_H_ #define ASSOCOPENDRIM_ORDEREDSOFTWAREINVENTORYCOMPONENT_H_ #include "OpenDRIM_OrderedSoftwareInventoryComponentAccess.h" int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_associator(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties, vector& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_enumeratePartComponents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_getPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_enumerateGroupComponents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_getGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_ORDEREDSOFTWAREINVENTORYCOMPONENT_H_*/ ././@LongLink0000000000000000000000000000020700000000000011564 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryComponent/cmpiOpenDRIM_OrderedSoftwareInventoryComponent.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryComponent/cmpiOpenDRIM_Ord0000644000175000017500000000711111401066502034657 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_OrderedSoftwareInventoryComponent.h" CMPIObjectPath* SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_OrderedSoftwareInventoryComponent& instance) { _E_; Objectpath op(broker, OpenDRIM_OrderedSoftwareInventoryComponent_classnames[0], OpenDRIM_OrderedSoftwareInventoryComponent_NAMESPACE); if (!instance.GroupComponent_isNULL) op.addKey("GroupComponent", instance.GroupComponent); if (!instance.PartComponent_isNULL) op.addKey("PartComponent", instance.PartComponent); _L_; return op.getHdl(); } CMPIInstance* SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_OrderedSoftwareInventoryComponent& instance) { _E_; Objectpath op(broker, SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.AssignedSequence_isNULL) ci.setProperty("AssignedSequence", instance.AssignedSequence); _L_; return ci.getHdl(); } void SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_OrderedSoftwareInventoryComponent& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("PartComponent", instance.PartComponent) == OK) instance.PartComponent_isNULL = false; if (op.getKey("GroupComponent", instance.GroupComponent) == OK) instance.GroupComponent_isNULL = false; _L_; } void SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_OrderedSoftwareInventoryComponent& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("GroupComponent", instance.GroupComponent) == OK) instance.GroupComponent_isNULL = false; if (inst.getProperty("PartComponent", instance.PartComponent) == OK) instance.PartComponent_isNULL = false; if (inst.getProperty("AssignedSequence", instance.AssignedSequence) == OK) instance.AssignedSequence_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000021100000000000011557 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryComponent/OpenDRIM_OrderedSoftwareInventoryComponentAccess.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryComponent/OpenDRIM_Ordered0000644000175000017500000002740211401066502034653 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_OrderedSoftwareInventoryComponentAccess.h" int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareInventory_CIM_ManagedElement_load(broker, errorMessage)); CF_assert(SoftwareInventory_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareInventory_CIM_ManagedElement_unload(errorMessage)); CF_assert(SoftwareInventory_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_isAssociated(const Instance& PartComponent, const Instance& GroupComponent, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector subjects; // Only get the instance names CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_enumeratePartComponents(broker, ctx, subjects, NULL, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_enumeratePartComponents(broker, ctx, subjects, NULL, false, errorMessage)); vector::iterator c = subjects.begin(); vector::iterator end = subjects.end(); for (; c != end; ++c) { bool leftToRight = true; vector associatedInstances; SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), PartComponent_classnames[0], GroupComponent_classnames[0], PartComponent_role.c_str(), GroupComponent_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_referencePartComponentToGroupComponent(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_OrderedSoftwareInventoryComponent& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath PartComponent_objectpath; instance.getPartComponent(PartComponent_objectpath); Instance PartComponent_instance; CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_getPartComponent(broker, ctx, PartComponent_objectpath, PartComponent_instance, NULL, errorMessage)); Objectpath GroupComponent_objectpath; instance.getGroupComponent(GroupComponent_objectpath); Instance GroupComponent_instance; CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_getGroupComponent(broker, ctx, GroupComponent_objectpath, GroupComponent_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_isAssociated(PartComponent_instance, GroupComponent_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_populate(instance, errorMessage)); _L_; return OK; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_OrderedSoftwareInventoryComponent& newInstance, const OpenDRIM_OrderedSoftwareInventoryComponent& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_OrderedSoftwareInventoryComponent& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_OrderedSoftwareInventoryComponent& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_associatorPartComponentToGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& PartComponent_instance, const char** properties, vector& GroupComponent_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector GroupComponent_instances; if (discriminant=="a") CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_enumerateGroupComponents(broker, ctx, GroupComponent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_enumerateGroupComponents(broker, ctx, GroupComponent_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_enumerateGroupComponents(broker, ctx, GroupComponent_instances, properties, false, errorMessage)); } for (size_t i=0; i& PartComponent_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector PartComponent_instances; if (discriminant=="a") CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_enumeratePartComponents(broker, ctx, PartComponent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_enumeratePartComponents(broker, ctx, PartComponent_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_enumeratePartComponents(broker, ctx, PartComponent_instances, properties, false, errorMessage)); } for (size_t i=0; i& GroupComponent_instances, vector& OpenDRIM_OrderedSoftwareInventoryComponent_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < GroupComponent_instances.size(); i++) { OpenDRIM_OrderedSoftwareInventoryComponent instance; instance.setPartComponent(((Instance) PartComponent_instance).getObjectpath()); instance.setGroupComponent(((Instance) GroupComponent_instances[i]).getObjectpath()); if (discriminant == "r") { CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_populate(instance, errorMessage)); } OpenDRIM_OrderedSoftwareInventoryComponent_instances.push_back(instance); } _L_; return OK; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_referenceGroupComponentToPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& GroupComponent_instance, const vector& PartComponent_instances, vector& OpenDRIM_OrderedSoftwareInventoryComponent_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < PartComponent_instances.size(); i++) { OpenDRIM_OrderedSoftwareInventoryComponent instance; instance.setPartComponent(((Instance) PartComponent_instances[i]).getObjectpath()); instance.setGroupComponent(((Instance) GroupComponent_instance).getObjectpath()); if (discriminant == "r") { CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_populate(instance, errorMessage)); } OpenDRIM_OrderedSoftwareInventoryComponent_instances.push_back(instance); } _L_; return OK; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_populate(OpenDRIM_OrderedSoftwareInventoryComponent& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000021300000000000011561 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryComponent/OpenDRIM_OrderedSoftwareInventoryComponentProvider.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryComponent/OpenDRIM_Ordered0000644000175000017500000004561311401066502034657 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_OrderedSoftwareInventoryComponent.h" #include "OpenDRIM_OrderedSoftwareInventoryComponentAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProviderSetInstance SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProviderModifyInstance #endif int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_init(const CMPIBroker* broker); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProviderEnumInstances(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_OrderedSoftwareInventoryComponent instance; SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProviderSetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_OrderedSoftwareInventoryComponent newInstance, oldInstance; SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_toCPP(_broker, ci, newInstance); SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_OrderedSoftwareInventoryComponent instance; SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_toCPP(_broker, ci, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_OrderedSoftwareInventoryComponent instance; SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProviderExecQuery(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* lang, const char* query) { _E_; CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } /* ---------------------------------------------------------------------------*/ /* End of Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Association Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProviderAssociatorNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnObjectPath(rslt, associatedInstances[i].getObjectpath().getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProviderAssociators(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associatedInstances.size(); i++) CMReturnInstance(rslt, associatedInstances[i].getHdl()); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProviderReferenceNames(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_referencePartComponentToGroupComponent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_referenceGroupComponentToPartComponent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProviderReferences(CMPIAssociationMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char* assocClass, const char* role, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; bool leftToRight; vector associatedInstances; Instance known; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_referencePartComponentToGroupComponent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_referenceGroupComponentToPartComponent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedSoftwareInventoryComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_init FAILED: " + (string) OpenDRIM_OrderedSoftwareInventoryComponent_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_unload(errorMessage); if (errorCode != OK) { errorMessage += "SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_unload FAILED: " + (string) OpenDRIM_OrderedSoftwareInventoryComponent_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_INIT if (SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_init(_broker) < 0) return NULL CMInstanceMIStub(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProvider, SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProvider, _broker, SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_INIT); CMAssociationMIStub(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProvider, SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponentProvider, _broker, SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000020700000000000011564 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryComponent/OpenDRIM_OrderedSoftwareInventoryComponentAccess.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryComponent/OpenDRIM_Ordered0000644000175000017500000001156611401066502034657 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_ORDEREDSOFTWAREINVENTORYCOMPONENTACCESS_H_ #define OPENDRIM_ORDEREDSOFTWAREINVENTORYCOMPONENTACCESS_H_ #include "SoftwareInventory_Common.h" #include "OpenDRIM_OrderedSoftwareInventoryComponent.h" #include "assocOpenDRIM_OrderedSoftwareInventoryComponent.h" int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_load(const CMPIBroker* broker, string& errorMessage); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_unload(string& errorMessage); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_OrderedSoftwareInventoryComponent& instance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_OrderedSoftwareInventoryComponent& newInstance, const OpenDRIM_OrderedSoftwareInventoryComponent& oldInstance, const char** properties, string& errorMessage); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_OrderedSoftwareInventoryComponent& instance, string& errorMessage); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_OrderedSoftwareInventoryComponent& instance, string& errorMessage); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_associatorPartComponentToGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& PartComponent_instance, const char** properties, vector& GroupComponent_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_associatorGroupComponentToPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& GroupComponent_instance, const char** properties, vector& PartComponent_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_referencePartComponentToGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& PartComponent_instance, const vector& GroupComponent_instances, vector& OpenDRIM_OrderedSoftwareInventoryComponent_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_referenceGroupComponentToPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& GroupComponent_instance, const vector& PartComponent_instances, vector& OpenDRIM_OrderedSoftwareInventoryComponent_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_populate(OpenDRIM_OrderedSoftwareInventoryComponent& instance, string& errorMessage); #endif /*OPENDRIM_ORDEREDSOFTWAREINVENTORYCOMPONENTACCESS_H_*/ ././@LongLink0000000000000000000000000000021000000000000011556 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryComponent/assocOpenDRIM_OrderedSoftwareInventoryComponent.cppopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryComponent/assocOpenDRIM_Or0000644000175000017500000002212411401066502034674 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "assocOpenDRIM_OrderedSoftwareInventoryComponent.h" int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_associatorFilter(const CMPIBroker* broker, const CMPIContext* ctx, const CMPIObjectPath* cop, Instance& knownInstance, const char* assocClass, const char* resultClass, const char* role, const char* resultRole, bool& leftToRight, string& errorMessage) { _E_; string _assocClass, _resultClass, _resultRole, _role; assocClass == NULL ? _assocClass = "null" : _assocClass = assocClass; resultClass == NULL ? _resultClass = "null" : _resultClass = resultClass; resultRole == NULL ? _resultRole = "null" : _resultRole = resultRole; role == NULL ? _role = "null" : _role = role; for (unsigned int i=0; i& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant) { _E_; int errorCode = SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_associatorFilter(broker, ctx, cop, knownInstance, assocClass, resultClass, role, resultRole, leftToRight, errorMessage); if (errorCode == -1) return OK; if (errorCode != OK) return errorCode; if (leftToRight) { if (role != NULL && strcasecmp(role, "PartComponent") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "GroupComponent") != 0) return OK; CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_associatorPartComponentToGroupComponent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "GroupComponent") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "PartComponent") != 0) return OK; CF_assert(SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_associatorGroupComponentToPartComponent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_enumeratePartComponents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, PartComponent_NAMESPACE, PartComponent_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(SoftwareInventory_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareInventory_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareInventory_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_getPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), PartComponent_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), PartComponent_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ManagedElement _instance; SoftwareInventory_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareInventory_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareInventory_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_enumerateGroupComponents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, GroupComponent_NAMESPACE, GroupComponent_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(SoftwareInventory_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareInventory_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareInventory_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_getGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), GroupComponent_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), GroupComponent_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ManagedElement _instance; SoftwareInventory_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareInventory_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareInventory_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000020500000000000011562 Lustar rootrootopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryComponent/cmpiOpenDRIM_OrderedSoftwareInventoryComponent.hopendrim-lmp-softwareinventory-1.0.0~ppa/OpenDRIM_OrderedSoftwareInventoryComponent/cmpiOpenDRIM_Ord0000644000175000017500000000470211401066502034662 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Inventory provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_ORDEREDSOFTWAREINVENTORYCOMPONENT_H_ #define CMPIOPENDRIM_ORDEREDSOFTWAREINVENTORYCOMPONENT_H_ #include "OpenDRIM_OrderedSoftwareInventoryComponent.h" CMPIObjectPath* SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_OrderedSoftwareInventoryComponent& instance); CMPIInstance* SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_OrderedSoftwareInventoryComponent& instance); void SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_OrderedSoftwareInventoryComponent& instance); void SoftwareInventory_OpenDRIM_OrderedSoftwareInventoryComponent_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_OrderedSoftwareInventoryComponent& instance); #endif /*CMPIOPENDRIM_ORDEREDSOFTWAREINVENTORYCOMPONENT_H_*/ opendrim-lmp-softwareinventory-1.0.0~ppa/README0000644000175000017500000000103311401066502022222 0ustar guillaumeguillaume--------------------------------------------------------- REQUIREMENTS --------------------------------------------------------- For compliling: * gcc >= 3.2.0 * cmpi header files >= ver 86 * autoconf >= 2.57 * automake >= 1.5 * libtool (preferably >= 1.8.5) * OpenDRIM Common Library >= 1.1.1 For running: * OpenPegasus >= 2.5.2 OR SBLIM sfcb >= 1.2.0 OR OpenWBEM >= 3.2.2 * Interop package (for sfcb and OpenPegasus only) * In the case of pegasus installed from sources, the PEGASUS_HOME and PEGASUS_ROOT variable MUST be defined!