opendrim-lmp-recordlog-1.1.2~ppa/0000755000175000017500000000000011404317365017531 5ustar guillaumeguillaumeopendrim-lmp-recordlog-1.1.2~ppa/Makefile.am0000644000175000017500000001007311377667353021604 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ################################################################################ VENDOR = OpenDRIM VERSION = $(shell cat ./VERSION) APP_NAME = opendrim-lmp-recordlog RPM_PACKAGE_DIR = packaging PLATFORM = $(shell rpm --eval %_target_cpu) WORKING_DIR = $(shell pwd) SUBDIRS = Common OpenDRIM_RecordLogCapabilities OpenDRIM_RecordLog OpenDRIM_RecordLogProfile OpenDRIM_LogEntry OpenDRIM_LogManagesRecord OpenDRIM_UseOfLog OpenDRIM_RecordLogConformsToProfile OpenDRIM_RecordLogToCapabilities test postinstall: registration/OpenDRIM_RecordLogPackage.sh @CIMNAMESPACE@ $(VENDOR) @CIMSERVER@ @INTEROPNAMESPACE@ $(VERSION) . preuninstall: registration/OpenDRIM_RecordLogPackage-remove.sh @CIMNAMESPACE@ @CIMSERVER@ @INTEROPNAMESPACE@ . test-OpenDRIM_RecordLogCapabilities: all make -C test test-OpenDRIM_RecordLogCapabilities test-OpenDRIM_RecordLog: all make -C test test-OpenDRIM_RecordLog test-OpenDRIM_LogManagesRecord: all make -C test test-OpenDRIM_LogManagesRecord test-OpenDRIM_UseOfLog: all make -C test test-OpenDRIM_UseOfLog test-OpenDRIM_RecordLogProfile: all make -C test test-OpenDRIM_RecordLogProfile test-OpenDRIM_RecordLogConformsToProfile: all make -C test test-OpenDRIM_RecordLogConformsToProfile test-OpenDRIM_LogEntry: all make -C test test-OpenDRIM_LogEntry test-OpenDRIM_RecordLogToCapabilities: all make -C test test-OpenDRIM_RecordLogToCapabilities 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-recordlog-1.1.2~ppa/registration/0000755000175000017500000000000011377667353022261 5ustar guillaumeguillaumeopendrim-lmp-recordlog-1.1.2~ppa/registration/OpenDRIM_UseOfLog-remove.sh0000755000175000017500000000630211377667353027234 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # 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 , , ################################################################################ if test "$2" = pegasus then cimprovider -d -m OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogModule cimprovider -r -m OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogModule 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_UseOfLog.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-recordlog-1.1.2~ppa/registration/OpenDRIM_RecordLogProfile-remove.sh0000755000175000017500000000644111377667353030756 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfileModule cimprovider -r -m OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfileModule 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_RecordLogProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$3 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-recordlog-1.1.2~ppa/registration/OpenDRIM_RecordLogCapabilities-remove.sh0000755000175000017500000000653211377667353031750 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesModule cimprovider -r -m OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesModule 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_RecordLogCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-recordlog-1.1.2~ppa/registration/OpenDRIM_LogManagesRecord.sh0000755000175000017500000000664411377667353027443 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_LogManagesRecord.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_LogManagesRecord provider module"; Name = "OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordModule"; Location = "cmpiOpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_LogManagesRecord provider"; Name = "OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProvider"; ProviderModuleName = "OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_LogManagesRecord provider capabilities"; ProviderModuleName = "OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordModule"; ProviderName = "OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProvider"; ClassName = "OpenDRIM_LogManagesRecord"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"Log", "Record"}; CapabilityID = "OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_LogManagesRecord.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-recordlog-1.1.2~ppa/registration/OpenDRIM_RecordLogCapabilities.sh0000755000175000017500000000730111377667353030450 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_RecordLogCapabilities.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_RecordLogCapabilities provider module"; Name = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesModule"; Location = "cmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_RecordLogCapabilities provider"; Name = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesProvider"; ProviderModuleName = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_RecordLogCapabilities provider capabilities"; ProviderModuleName = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesModule"; ProviderName = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesProvider"; ClassName = "OpenDRIM_RecordLogCapabilities"; ProviderType = {2, 5}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "Description", "InstanceID", "ElementName", "ElementNameEditSupported", "MaxElementNameLen", "RequestedStatesSupported", "ElementNameMask", "StateAwareness"}; SupportedMethods = {"CreateGoalSettings"}; CapabilityID = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_RecordLogCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-recordlog-1.1.2~ppa/registration/OpenDRIM_RecordLogPackage.sh0000755000175000017500000000465711377667353027425 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 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_RecordLogCapabilities.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_RecordLog.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_LogManagesRecord.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_UseOfLog.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_RecordLogProfile.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_RecordLogConformsToProfile.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_LogEntry.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_RecordLogToCapabilities.sh $1 $2 $3 $4 $5 $6 if test "$3" = sfcb then /etc/init.d/sfcb start fi opendrim-lmp-recordlog-1.1.2~ppa/registration/OpenDRIM_LogEntry-remove.sh0000755000175000017500000000632111377667353027315 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryModule cimprovider -r -m OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryModule 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_LogEntry.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-recordlog-1.1.2~ppa/registration/OpenDRIM_UseOfLog.sh0000755000175000017500000000641311377667353025744 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # 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 , , ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_UseOfLog.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_UseOfLog provider module"; Name = "OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogModule"; Location = "cmpiOpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_UseOfLog provider"; Name = "OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProvider"; ProviderModuleName = "OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_UseOfLog provider capabilities"; ProviderModuleName = "OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogModule"; ProviderName = "OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProvider"; ClassName = "OpenDRIM_UseOfLog"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"Antecedent", "Dependent", "RecordedData"}; CapabilityID = "OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_UseOfLog.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-recordlog-1.1.2~ppa/registration/OpenDRIM_RecordLog.sh0000755000175000017500000000743711377667353026150 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_RecordLog.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_RecordLog provider module"; Name = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogModule"; Location = "cmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_RecordLog provider"; Name = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProvider"; ProviderModuleName = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_RecordLog provider capabilities"; ProviderModuleName = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogModule"; ProviderName = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProvider"; ClassName = "OpenDRIM_RecordLog"; ProviderType = {2, 5, 7}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "Description", "ElementName", "InstallDate", "Name", "OperationalStatus", "StatusDescriptions", "Status", "HealthState", "PrimaryStatus", "DetailedStatus", "OperatingStatus", "CommunicationStatus", "EnabledState", "OtherEnabledState", "RequestedState", "EnabledDefault", "TimeOfLastStateChange", "AvailableRequestedStates", "TransitioningToState", "MaxNumberOfRecords", "CurrentNumberOfRecords", "LogState", "OverwritePolicy", "InstanceID", "Facility", "Severity"}; SupportedMethods = {"RequestStateChange", "ClearLog"}; CapabilityID = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_RecordLog.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-recordlog-1.1.2~ppa/registration/OpenDRIM_LogEntry.sh0000755000175000017500000000661311377667353026026 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_LogEntry.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_LogEntry provider module"; Name = "OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryModule"; Location = "cmpiOpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_LogEntry provider"; Name = "OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProvider"; ProviderModuleName = "OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_LogEntry provider capabilities"; ProviderModuleName = "OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryModule"; ProviderName = "OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProvider"; ClassName = "OpenDRIM_LogEntry"; ProviderType = {2, 7}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "Description", "ElementName", "RecordFormat", "RecordData", "Locale", "InstanceID", "LogInstanceID", "LogName", "RecordID", "CreationTimeStamp"}; CapabilityID = "OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_LogEntry.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-recordlog-1.1.2~ppa/registration/OpenDRIM_RecordLogPackage-remove.sh0000755000175000017500000000466711377667353030721 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 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_RecordLogToCapabilities-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_LogEntry-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_RecordLogConformsToProfile-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_RecordLogProfile-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_UseOfLog-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_LogManagesRecord-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_RecordLog-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_RecordLogCapabilities-remove.sh $1 $2 $3 $4 if test "$2" = sfcb then /etc/init.d/sfcb start fi opendrim-lmp-recordlog-1.1.2~ppa/registration/OpenDRIM_RecordLogProfile.sh0000755000175000017500000000711211377667353027457 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $4 $6/mof/OpenDRIM_RecordLogProfile.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_RecordLogProfile provider module"; Name = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfileModule"; Location = "cmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfileProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_RecordLogProfile provider"; Name = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfileProvider"; ProviderModuleName = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfileModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_RecordLogProfile provider capabilities"; ProviderModuleName = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfileModule"; ProviderName = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfileProvider"; ClassName = "OpenDRIM_RecordLogProfile"; ProviderType = {2}; Namespaces = {"$4"}; SupportedProperties = {"Caption", "Description", "ElementName", "InstanceID", "RegisteredOrganization", "OtherRegisteredOrganization", "RegisteredName", "RegisteredVersion", "AdvertiseTypes", "AdvertiseTypeDescriptions"}; CapabilityID = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_RecordLogProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$4 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-recordlog-1.1.2~ppa/registration/OpenDRIM_RecordLogConformsToProfile.sh0000755000175000017500000000746711377667353031506 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_RecordLogConformsToProfile.mof cimmof -aE -n $4 $6/mof/OpenDRIM_RecordLogConformsToProfile.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_RecordLogConformsToProfile provider module"; Name = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileModule"; Location = "cmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_RecordLogConformsToProfile provider"; Name = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProvider"; ProviderModuleName = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_RecordLogConformsToProfile provider capabilities"; ProviderModuleName = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileModule"; ProviderName = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProvider"; ClassName = "OpenDRIM_RecordLogConformsToProfile"; ProviderType = {2, 3}; Namespaces = {"$1", "$4"}; SupportedProperties = {"ConformantStandard", "ManagedElement"}; CapabilityID = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_RecordLogConformsToProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE owmofc -u http://localhost/$4 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-recordlog-1.1.2~ppa/registration/OpenDRIM_RecordLog-remove.sh0000755000175000017500000000634211377667353027435 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogModule cimprovider -r -m OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogModule 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_RecordLog.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-recordlog-1.1.2~ppa/registration/OpenDRIM_RecordLogToCapabilities.sh0000755000175000017500000000711511377667353030756 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_RecordLogToCapabilities.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_RecordLogToCapabilities provider module"; Name = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesModule"; Location = "cmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_RecordLogToCapabilities provider"; Name = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProvider"; ProviderModuleName = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_RecordLogToCapabilities provider capabilities"; ProviderModuleName = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesModule"; ProviderName = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProvider"; ClassName = "OpenDRIM_RecordLogToCapabilities"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"ManagedElement", "Capabilities", "Characteristics"}; CapabilityID = "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_RecordLogToCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-recordlog-1.1.2~ppa/registration/OpenDRIM_RecordLogToCapabilities-remove.sh0000755000175000017500000000656311377667353032257 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesModule cimprovider -r -m OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesModule 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_RecordLogToCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-recordlog-1.1.2~ppa/registration/OpenDRIM_RecordLogConformsToProfile-remove.sh0000755000175000017500000001054311377667353032766 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileModule cimprovider -r -m OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileModule 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_RecordLogConformsToProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE owmofc -u http://localhost/$3 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-recordlog-1.1.2~ppa/registration/OpenDRIM_LogManagesRecord-remove.sh0000755000175000017500000000645511377667353030736 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordModule cimprovider -r -m OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordModule 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_LogManagesRecord.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_LogEntry/0000755000175000017500000000000011377667353022747 5ustar guillaumeguillaumeopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_LogEntry/Makefile.am0000644000175000017500000000426311377667353025010 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProvider.la libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProvider_la_SOURCES = OpenDRIM_LogEntryAccess.cpp OpenDRIM_LogEntryProvider.cpp cmpiOpenDRIM_LogEntry.cpp libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProvider_la_LIBADD = ../Common/libcmpiOpenDRIM_RecordLogPackage_Common.la ../OpenDRIM_RecordLog/libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProvider.la libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_LogEntry.h OpenDRIM_LogEntry.h OpenDRIM_LogEntryAccess.h opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_LogEntry/cmpiOpenDRIM_LogEntry.cpp0000644000175000017500000001127011377667353027525 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_LogEntry.h" CMPIObjectPath* OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_LogEntry& instance) { _E_; Objectpath op(broker, OpenDRIM_LogEntry_classnames[0], OpenDRIM_LogEntry_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_LogEntry& instance) { _E_; Objectpath op(broker, OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_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.RecordFormat_isNULL) ci.setProperty("RecordFormat", instance.RecordFormat); if (!instance.RecordData_isNULL) ci.setProperty("RecordData", instance.RecordData); if (!instance.Locale_isNULL) ci.setProperty("Locale", instance.Locale); if (!instance.LogInstanceID_isNULL) ci.setProperty("LogInstanceID", instance.LogInstanceID); if (!instance.LogName_isNULL) ci.setProperty("LogName", instance.LogName); if (!instance.RecordID_isNULL) ci.setProperty("RecordID", instance.RecordID); if (!instance.CreationTimeStamp_isNULL) ci.setPropertyDatetime("CreationTimeStamp", instance.CreationTimeStamp); _L_; return ci.getHdl(); } void OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_LogEntry& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_LogEntry& 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("RecordFormat", instance.RecordFormat) == OK) instance.RecordFormat_isNULL = false; if (inst.getProperty("RecordData", instance.RecordData) == OK) instance.RecordData_isNULL = false; if (inst.getProperty("Locale", instance.Locale) == OK) instance.Locale_isNULL = false; if (inst.getProperty("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; if (inst.getProperty("LogInstanceID", instance.LogInstanceID) == OK) instance.LogInstanceID_isNULL = false; if (inst.getProperty("LogName", instance.LogName) == OK) instance.LogName_isNULL = false; if (inst.getProperty("RecordID", instance.RecordID) == OK) instance.RecordID_isNULL = false; if (inst.getPropertyDatetime("CreationTimeStamp", instance.CreationTimeStamp) == OK) instance.CreationTimeStamp_isNULL = false; _L_; } opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_LogEntry/OpenDRIM_LogEntryAccess.h0000644000175000017500000000671411377667353027452 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_LOGENTRYACCESS_H_ #define OPENDRIM_LOGENTRYACCESS_H_ #include "OpenDRIM_RecordLogPackage_Common.h" #include "OpenDRIM_LogEntry.h" int OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_load(const CMPIBroker* broker, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_unload(string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_LogEntry& instance, const char** properties, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LogEntry& newInstance, const OpenDRIM_LogEntry& oldInstance, const char** properties, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LogEntry& instance, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LogEntry& instance, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_populate(OpenDRIM_LogEntry& instance, const string& filename, string& line, struct tm* tp, const string& discriminant, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_makeInstances(const string& filename, vector& result, const string& discriminant, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_retrieveInDatetimeBoundaries(const string& log_file, const string& datetime_lower_limit, const string& datetime_upper_limit, vector& log_entries, string& errorMessage); #endif /*OPENDRIM_LOGENTRYACCESS_H_*/ opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_LogEntry/OpenDRIM_LogEntryProvider.cpp0000644000175000017500000005631611377667353030401 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_LogEntry.h" #include "OpenDRIM_LogEntryAccess.h" #include "../OpenDRIM_RecordLog/OpenDRIM_RecordLogAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProviderSetInstance OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProviderModifyInstance #endif int OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_init(const CMPIBroker* broker); int OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LogEntry_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProviderEnumInstances(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 = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LogEntry_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_LogEntry instance; OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_toCPP(_broker, cop, instance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LogEntry_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProviderSetInstance(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_LogEntry newInstance, oldInstance; OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_toCPP(_broker, ci, newInstance); OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LogEntry_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LogEntry_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_LogEntry instance; OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_toCPP(_broker, ci, instance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_LogEntry_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LogEntry_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LogEntry_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_LogEntry instance; OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_toCPP(_broker, cop, instance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LogEntry_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LogEntry_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } static int checkLogFile(const string& log_file, const string& pattern, const CMPIResult* rslt, string& errorMessage) { _E_; char conf_file[100]; if (tmpnam(conf_file) == NULL) { errorMessage = "Failed to generate a temp file name."; return FAILED; } ofstream os(conf_file); os << "watchfor " << pattern << endl; os << "\techo" << endl; os.close(); string stdout, stderr; string cmd = "swatch -c "+(string) conf_file+" -f "+log_file; CF_assert(CF_runCommand(cmd, stdout, stderr, errorMessage)); _DEBUG("## Command: "+cmd); _DEBUG("###########\n"+stdout); _DEBUG("###########"); // if (unlink(conf_file) != 0) { // errorMessage = "Failed to delete the temp file: "+(string) conf_file; // return FAILED; // } _DEBUG("stdout:\n"+stdout); time_t timep; time(&timep); struct tm *tp = localtime(&timep); string line; istringstream iss(stdout); while (getline(iss, line)) { //Remove an unkown string. It occurs only when swatch is executed. if (CF_startsWith(line, "")) line.erase(0, 4); if (CF_trimText(line).size() == 0 || CF_startsWith(line, "*** swatch")) continue; _DEBUG(line); OpenDRIM_LogEntry instance; CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_populate(instance, log_file, line, tp, "ei", errorMessage)); CMPIInstance* cmpi_instance = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, cmpi_instance); } CMReturnDone(rslt); _L_; return OK; } static string unquote(const string& str) { string target(str); if (target[target.size()-1] == '\"') target.erase(target.size()-1, 1); if (target[0] == '\"') target.erase(0, 1); return target; } // added by Frederic Desmons (2007/11/14) // split a query by space and = and <= and => static int splitQuery(vector& query_elements, const string& myQuery, string& errorMessage) { // split by space but keep the quoted strings in one piece bool quoted = false; query_elements.clear(); string query_element; for (string::size_type i = 0; i < myQuery.size(); i++) { // entering / exiting quotes if (myQuery[i] == '\"' && (i==0 || myQuery[i-1] != '\\')) { if (quoted) quoted = false; else quoted = true; query_element += myQuery[i]; continue; } // we are in quotes, skip if (quoted) { query_element += myQuery[i]; continue; } // look for query operators if (i < myQuery.size()-1 && ( \ (myQuery[i] == '>' && myQuery[i+1] == '=') || \ (myQuery[i] == '<' && myQuery[i+1] == '=') || \ (myQuery[i] == '='))) { // push the current element if (query_element.size() > 0) query_elements.push_back(query_element); // pop the last element of the pile if (query_elements.size() > 0) { query_element = query_elements[query_elements.size()-1]; query_elements.pop_back(); } if (myQuery[i] == '>' && myQuery[i+1] == '=') { // >= i+=2; query_element += ">="; } else if (myQuery[i] == '<' && myQuery[i+1] == '=') { // <= i+=2; query_element += "<="; } else if (myQuery[i] == '=') { // = i++; query_element += "="; } // remove all the spaces after the operator while (i < myQuery.size() && myQuery[i] == ' ') i++; i--; continue; } // we found a space if (myQuery[i] == ' ') { // at the beginning or we don't have anything to push, skip if (query_element.size() == 0) continue; else { // we have something to push query_elements.push_back(query_element); query_element.clear(); continue; } } query_element += myQuery[i]; } // invalid quotation if (quoted) { errorMessage = "Wrong format: unbalanced"; return FAILED; } if (query_element.size() != 0) query_elements.push_back(query_element); return OK; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProviderExecQuery(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* lang, const char* query) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; int errorCode; vector record_log_instances; bool where_start = false; string log_file, pattern; bool has_datetime_lower_limit = false; bool has_datetime_upper_limit = false; string datetime_lower_limit = "19700101000000.000000+000"; string datetime_upper_limit = "20370101000000.000000+000"; vector tokens; vector parsed_where; // CMPISelectExp* selectExp; // CMPISelectCond* cond; // CMPIString* str; // CMPICount cond_count; //OpenPegasus 2.7 doesn't support CMPI_MB_QueryNormalizer //So the query statement is processed manually //selectExp = CMNewSelectExp(_broker, query, lang, NULL, &rc); //if (selectExp == NULL || rc.rc != CMPI_RC_OK) goto EXIT; //Parse the where clause //CF_splitTextBySpace(tokens, query); // added by Frederic Desmons (2007/11/14) splitQuery(tokens, query, errorMessage); if (tokens.size()==0) return rc; for (vector::size_type i = 0; i < tokens.size(); i++) { // skip all the tokens before where if (CF_strCmpNoCase(tokens[i], "where")) { where_start = true; continue; } if (!where_start) continue; // key=value or key>=value or key<=value if (tokens[i].find("=")) { string::size_type idx; if ((idx = tokens[i].find("<=")) != string::npos) { parsed_where.push_back(tokens[i].substr(0, idx)); parsed_where.push_back("<="); parsed_where.push_back(tokens[i].substr(idx+2)); } else if ((idx = tokens[i].find(">=")) != string::npos) { parsed_where.push_back(tokens[i].substr(0, idx)); parsed_where.push_back(">="); parsed_where.push_back(tokens[i].substr(idx+2)); } else if ((idx = tokens[i].find("=")) != string::npos) { parsed_where.push_back(tokens[i].substr(0, idx)); parsed_where.push_back("="); parsed_where.push_back(tokens[i].substr(idx+1)); } } } // end of added /*for (vector::iterator c = tokens.begin();c != tokens.end(); ++c) { string token = (*c); if (strcasecmp(token.c_str(), "where") == 0) { where_start = true; continue; } if (!where_start) continue; string::size_type idx; if ((token != "=") && ((idx = token.find_first_of("=")) != string::npos)) { if (idx == token.size()-1) { DEBUG; //Key= Value parsed_where.push_back(token.substr(0, idx)); parsed_where.push_back("="); ++c; parsed_where.push_back(*c); } else if (idx == 0) { DEBUG; //Key =Value parsed_where.push_back(*(c-1)); parsed_where.push_back("="); parsed_where.push_back(token.substr(idx+1)); } else { DEBUG; //Key=Value parsed_where.push_back(token.substr(0, idx)); parsed_where.push_back("="); parsed_where.push_back(token.substr(idx+1)); } } else if (*(c+1) == "=") { DEBUG; //Key = Value parsed_where.push_back(token); parsed_where.push_back("="); parsed_where.push_back(*(c+2)); c += 2; } if (parsed_where.size() >= 3 && parsed_where.size()%3 == 0) { _DEBUG("***** parsed"); _DEBUG(parsed_where[parsed_where.size()-3]); _DEBUG(parsed_where[parsed_where.size()-2]); _DEBUG(parsed_where[parsed_where.size()-1]); } }*/ // extract values of LogName, RecordData, CreationTimestamp fields. // modified by Frederic Desmons (2007/11/15) for (vector::size_type i = 0; i < parsed_where.size(); ++i) { if (strcasecmp(parsed_where[i].c_str(), "LogName") == 0 && parsed_where[i+1] == "=") { log_file = parsed_where[i+2]; log_file = unquote(log_file); i += 2; } else if (strcasecmp(parsed_where[i].c_str(), "RecordData") == 0 && parsed_where[i+1] == "=") { pattern = parsed_where[i+2]; pattern = unquote(pattern); i += 2; } else if (strcasecmp(parsed_where[i].c_str(), "CreationTimestamp") == 0 && parsed_where[i+1] == ">=") { string datetime = unquote(parsed_where[i+2]); int sign; errorCode = CF_datetimeCmp(sign, datetime, datetime_lower_limit, errorMessage); if (errorCode != OK) { CMSetStatusWithChars(_broker, &rc, CMPI_RC_ERR_FAILED, errorMessage.c_str()); goto EXIT; } has_datetime_lower_limit = true; // datetime is higher than current lower limit if (sign > 0) datetime_lower_limit = datetime; i += 2; } else if (strcasecmp(parsed_where[i].c_str(), "CreationTimestamp") == 0 && parsed_where[i+1] == "<=") { string datetime = unquote(parsed_where[i+2]); int sign; errorCode = CF_datetimeCmp(sign, datetime, datetime_upper_limit, errorMessage); if (errorCode != OK) { CMSetStatusWithChars(_broker, &rc, CMPI_RC_ERR_FAILED, errorMessage.c_str()); goto EXIT; } has_datetime_upper_limit = true; // datetime is lower than current upper limit if (sign < 0) datetime_upper_limit = datetime; i += 2; } } _DEBUG("LOG file: "+log_file); _DEBUG("Pattern: "+pattern); // has not pattern nor date if (pattern.size() == 0 && !has_datetime_upper_limit && !has_datetime_upper_limit) { CMSetStatusWithChars(_broker, &rc, CMPI_RC_ERR_FAILED, "Doesn't support queries without the RecordData property OR CreationTimestamp property"); goto EXIT; } if (pattern.size() != 0 && (has_datetime_upper_limit || has_datetime_upper_limit)) { CMSetStatusWithChars(_broker, &rc, CMPI_RC_ERR_FAILED, "Doesn't support queries with the RecordData property AND CreationTimestamp property"); goto EXIT; } if (log_file.size() > 0) { //If a log file is assigned, only process it // modified by Frederic Desmons (2007/11/15) // file may not exist tho the entry is syslog.conf exists... OpenDRIM_RecordLog log; log.setInstanceID(log_file); errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_getInstance(_broker, ctx, log, NULL, errorMessage); if (errorCode!=OK) { CMSetStatusWithChars(_broker, &rc, CMPI_RC_ERR_FAILED, "No corresponding log file"); goto EXIT; } /*if (!CF_isExist(log_file)) { CMSetStatusWithChars(_broker, &rc, CMPI_RC_ERR_FAILED, "No corresponding log file"); goto EXIT; }*/ if (pattern.size() != 0) { // by pattern checkLogFile(log_file, pattern, rslt, errorMessage); } else { // added by Frederic Desmons (2007/11/15) // by CreationTimestamp vector log_entries; errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_retrieveInDatetimeBoundaries(log_file, datetime_lower_limit, datetime_upper_limit, log_entries, errorMessage); if (errorCode != OK) { CMSetStatusWithChars(_broker, &rc, CMPI_RC_ERR_FAILED, errorMessage.c_str()); goto EXIT; } for (vector::size_type i=0; i < log_entries.size(); i++) { CMPIInstance* ci = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_toCMPIInstance(_broker, log_entries[i]); CMReturnInstance(rslt, ci); } } } else { //If a log file is not assigned, process all log files. DEBUG; // First get the instances of RecordLog errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_retrieve(_broker, ctx, record_log_instances, NULL, errorMessage, "ein"); if (errorCode!=OK) { //errorMessage = (string) OpenDRIM_LogEntry_classnames[0] + ": Record_Log_OpenDRIM_RecordLog_retrieve() failed."; CMSetStatusWithChars(_broker, &rc, CMPI_RC_ERR_FAILED, "Record_Log_OpenDRIM_RecordLog_retrieve() failed."); goto EXIT; } // for each RecordLog instance, gather the instances of LogEntry by pattern for (size_t i=0; i log_entries; errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_retrieveInDatetimeBoundaries(_LogInstanceID, datetime_lower_limit, datetime_upper_limit, log_entries, errorMessage); if (errorCode != OK) { CMSetStatusWithChars(_broker, &rc, CMPI_RC_ERR_FAILED, errorMessage.c_str()); goto EXIT; } for (vector::size_type i=0; i < log_entries.size(); i++) { CMPIInstance* ci = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_toCMPIInstance(_broker, log_entries[i]); CMReturnInstance(rslt, ci); } } } } EXIT: CMReturnDone(rslt); if (rc.rc != CMPI_RC_OK) { errorMessage = (string) OpenDRIM_LogEntry_classnames[0] + ":" + (string) CMGetCharPtr(rc.msg); CMSetStatusWithChars(_broker, &rc, rc.rc, errorMessage.c_str()); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End of Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_init FAILED: " + (string) OpenDRIM_LogEntry_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_unload(errorMessage); if (errorCode != OK) { errorMessage += "OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_unload FAILED: " + (string) OpenDRIM_LogEntry_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_INIT if (OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_init(_broker) < 0) return NULL CMInstanceMIStub(OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProvider, OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProvider, _broker, OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_LogEntry/OpenDRIM_LogEntryAccess.cpp0000644000175000017500000001611211377667353027776 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_LogEntryAccess.h" #include "../OpenDRIM_RecordLog/OpenDRIM_RecordLogAccess.h" #include "CMPIBroking.h" #define LOG_TIME_LIMIT 15 int OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_load(const CMPIBroker* broker, string& errorMessage) { _E_; _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_unload(string& errorMessage) { _E_; _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_makeInstances(const string& filename, vector& result, const string& discriminant, string& errorMessage) { _E_; ifstream ifs(filename.c_str()); if (ifs.bad()) { ifs.close(); errorMessage = "Failed to open the file: "+filename; return FAILED; } time_t timep; time(&timep); struct tm *tp = localtime(&timep); OpenDRIM_LogEntry instance; string line; while (getline(ifs, line)) { if (line.size() < 15) continue; CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_populate(instance, filename, line, tp, discriminant, errorMessage)); result.push_back(instance); } ifs.close(); _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; vector recordLogs; CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_retrieve(broker, ctx, recordLogs, NULL, errorMessage, "ein")); for (size_t i=0; i result; ifstream ifs(filename.c_str()); if (ifs.bad()) { ifs.close(); errorMessage = "Failed to open the file: "+filename; return FAILED; } time_t timep; time(&timep); struct tm *tp = localtime(&timep); string line; while (getline(ifs, line)) { if (line.size() < 15) continue; string timestamp = CF_logTimeFormat(line.substr(0, LOG_TIME_LIMIT), tp); if (subject_timestamp == timestamp) { ifs.close(); CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_populate(instance, filename, line, tp, "ei", errorMessage)); return OK; } } ifs.close(); errorMessage = "No instance"; return NOT_FOUND; } else { errorMessage = "No key property"; return NOT_FOUND; } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LogEntry& newInstance, const OpenDRIM_LogEntry& oldInstance, const char** properties, string& errorMessage) { _E_; _L_; return NOT_SUPPORTED; } int OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LogEntry& instance, string& errorMessage) { _E_; _L_; return NOT_SUPPORTED; } int OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LogEntry& instance, string& errorMessage) { _E_; _L_; return NOT_SUPPORTED; } int OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_populate(OpenDRIM_LogEntry& instance, const string& filename, string& line, struct tm* tp, const string& discriminant, string& errorMessage) { _E_; /* * Properties to fill from profile * + Mandatory: * [X] InstanceID [KEY] * [X] RecordID * [X] CreationTimestamp * [X] ElementName * + Optional: * [X] LogInstanceID * [X] LogName * [X] RecordData * [X] RecordFormat */ string timestamp = CF_logTimeFormat(line.substr(0, LOG_TIME_LIMIT), tp); string id = filename+":"+timestamp; instance.setInstanceID(id); instance.setCreationTimeStamp(timestamp); instance.setRecordData(line); instance.setLogInstanceID(filename); instance.setRecordID(timestamp); instance.setRecordFormat(": string Month uint8 Day uint8 Hour:uint8 Minute:uint8 Second string HostName string Origin: string Message"); instance.setLogName(filename); instance.setElementName(id); _L_; return OK; } // added by Frederic Desmons (2007/11/15) int OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_retrieveInDatetimeBoundaries(const string& log_file, const string& datetime_lower_limit, const string& datetime_upper_limit, vector& log_entries, string& errorMessage) { _E_; ifstream ifs(log_file.c_str()); if (ifs.bad()) { ifs.close(); errorMessage = "Failed to open the file: "+log_file; return FAILED; } time_t timep; time(&timep); struct tm *tp = localtime(&timep); string line; while (getline(ifs, line)) { if (line.size() < 15) continue; string timestamp = CF_logTimeFormat(line.substr(0, LOG_TIME_LIMIT), tp); int upper_sign, lower_sign; CF_assert(CF_datetimeCmp(upper_sign, timestamp, datetime_upper_limit, errorMessage)); CF_assert(CF_datetimeCmp(lower_sign, timestamp, datetime_lower_limit, errorMessage)); if (upper_sign <= 0 && lower_sign >=0) { OpenDRIM_LogEntry instance; CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_populate(instance, log_file, line, tp, "ei", errorMessage)); log_entries.push_back(instance); } } ifs.close(); _L_; return OK; } opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_LogEntry/cmpiOpenDRIM_LogEntry.h0000644000175000017500000000432311377667353027173 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_LOGENTRY_H_ #define CMPIOPENDRIM_LOGENTRY_H_ #include "OpenDRIM_LogEntry.h" CMPIObjectPath* OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_LogEntry& instance); CMPIInstance* OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_LogEntry& instance); void OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_LogEntry& instance); void OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_LogEntry& instance); #endif /*CMPIOPENDRIM_LOGENTRY_H_*/ opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_LogEntry/OpenDRIM_LogEntry.h0000644000175000017500000001275611377667353026333 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_LOGENTRY_H_ #define OPENDRIM_LOGENTRY_H_ #include const static char* OpenDRIM_LogEntry_classnames[] = {"OpenDRIM_LogEntry"}; static string OpenDRIM_LogEntry_NAMESPACE = _NAMESPACE; class OpenDRIM_LogEntry { public: string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string ElementName; bool ElementName_isNULL; string RecordFormat; bool RecordFormat_isNULL; string RecordData; bool RecordData_isNULL; string Locale; bool Locale_isNULL; string InstanceID; bool InstanceID_isNULL; string LogInstanceID; bool LogInstanceID_isNULL; string LogName; bool LogName_isNULL; string RecordID; bool RecordID_isNULL; string CreationTimeStamp; bool CreationTimeStamp_isNULL; OpenDRIM_LogEntry() { Caption_isNULL = true; Description_isNULL = true; ElementName_isNULL = true; RecordFormat_isNULL = true; RecordData_isNULL = true; Locale_isNULL = true; InstanceID_isNULL = true; LogInstanceID_isNULL = true; LogName_isNULL = true; RecordID_isNULL = true; CreationTimeStamp_isNULL = true; } ~OpenDRIM_LogEntry() {} 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 getRecordFormat(string& value) const { if (RecordFormat_isNULL==true) return NOT_FOUND; value = RecordFormat; return OK; } int setRecordFormat(const string& newValue) { RecordFormat = newValue; RecordFormat_isNULL = false; return OK; } int getRecordData(string& value) const { if (RecordData_isNULL==true) return NOT_FOUND; value = RecordData; return OK; } int setRecordData(const string& newValue) { RecordData = newValue; RecordData_isNULL = false; return OK; } int getLocale(string& value) const { if (Locale_isNULL==true) return NOT_FOUND; value = Locale; return OK; } int setLocale(const string& newValue) { Locale = newValue; Locale_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 getLogInstanceID(string& value) const { if (LogInstanceID_isNULL==true) return NOT_FOUND; value = LogInstanceID; return OK; } int setLogInstanceID(const string& newValue) { LogInstanceID = newValue; LogInstanceID_isNULL = false; return OK; } int getLogName(string& value) const { if (LogName_isNULL==true) return NOT_FOUND; value = LogName; return OK; } int setLogName(const string& newValue) { LogName = newValue; LogName_isNULL = false; return OK; } int getRecordID(string& value) const { if (RecordID_isNULL==true) return NOT_FOUND; value = RecordID; return OK; } int setRecordID(const string& newValue) { RecordID = newValue; RecordID_isNULL = false; return OK; } int getCreationTimeStamp(string& value) const { if (CreationTimeStamp_isNULL==true) return NOT_FOUND; value = CreationTimeStamp; return OK; } int setCreationTimeStamp(const string& newValue) { CreationTimeStamp = newValue; CreationTimeStamp_isNULL = false; return OK; } }; #endif /*OPENDRIM_LOGENTRY_H_*/ opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogCapabilities/0000755000175000017500000000000011377667353025376 5ustar guillaumeguillaumeopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogCapabilities/Makefile.am0000644000175000017500000000434011377667353027433 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesProvider.la libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesProvider_la_SOURCES = OpenDRIM_RecordLogCapabilitiesAccess.cpp OpenDRIM_RecordLogCapabilitiesProvider.cpp cmpiOpenDRIM_RecordLogCapabilities.cpp libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesProvider_la_LIBADD = ../Common/libcmpiOpenDRIM_RecordLogPackage_Common.la libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_RecordLogCapabilities.h OpenDRIM_RecordLogCapabilities.h OpenDRIM_RecordLogCapabilitiesAccess.h opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogCapabilities/OpenDRIM_RecordLogCapabilities.h0000644000175000017500000001620211377667353033377 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_RECORDLOGCAPABILITIES_H_ #define OPENDRIM_RECORDLOGCAPABILITIES_H_ #include const static char* OpenDRIM_RecordLogCapabilities_classnames[] = {"OpenDRIM_RecordLogCapabilities"}; static string OpenDRIM_RecordLogCapabilities_NAMESPACE = _NAMESPACE; class OpenDRIM_RecordLogCapabilities { public: string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string InstanceID; bool InstanceID_isNULL; string ElementName; bool ElementName_isNULL; bool ElementNameEditSupported; bool ElementNameEditSupported_isNULL; unsigned short MaxElementNameLen; bool MaxElementNameLen_isNULL; vector RequestedStatesSupported; bool RequestedStatesSupported_isNULL; string ElementNameMask; bool ElementNameMask_isNULL; vector StateAwareness; bool StateAwareness_isNULL; OpenDRIM_RecordLogCapabilities() { Caption_isNULL = true; Description_isNULL = true; InstanceID_isNULL = true; ElementName_isNULL = true; ElementNameEditSupported_isNULL = true; MaxElementNameLen_isNULL = true; RequestedStatesSupported_isNULL = true; ElementNameMask_isNULL = true; StateAwareness_isNULL = true; } ~OpenDRIM_RecordLogCapabilities() {} 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 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 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 getElementNameEditSupported(bool& value) const { if (ElementNameEditSupported_isNULL==true) return NOT_FOUND; value = ElementNameEditSupported; return OK; } int setElementNameEditSupported(const bool& newValue) { ElementNameEditSupported = newValue; ElementNameEditSupported_isNULL = false; return OK; } int getMaxElementNameLen(unsigned short& value) const { if (MaxElementNameLen_isNULL==true) return NOT_FOUND; value = MaxElementNameLen; return OK; } int setMaxElementNameLen(const unsigned short& newValue) { MaxElementNameLen = newValue; MaxElementNameLen_isNULL = false; return OK; } int getRequestedStatesSupported(vector& value) const { if (RequestedStatesSupported_isNULL==true) return NOT_FOUND; value = RequestedStatesSupported; return OK; } int setRequestedStatesSupported(const vector& newValue) { RequestedStatesSupported = newValue; RequestedStatesSupported_isNULL = false; return OK; } int getElementNameMask(string& value) const { if (ElementNameMask_isNULL==true) return NOT_FOUND; value = ElementNameMask; return OK; } int setElementNameMask(const string& newValue) { ElementNameMask = newValue; ElementNameMask_isNULL = false; return OK; } int getStateAwareness(vector& value) const { if (StateAwareness_isNULL==true) return NOT_FOUND; value = StateAwareness; return OK; } int setStateAwareness(const vector& newValue) { StateAwareness = newValue; StateAwareness_isNULL = false; return OK; } }; class OpenDRIM_RecordLogCapabilities_CreateGoalSettings_In { public: vector TemplateGoalSettings; bool TemplateGoalSettings_isNULL; vector SupportedGoalSettings; bool SupportedGoalSettings_isNULL; OpenDRIM_RecordLogCapabilities_CreateGoalSettings_In() { TemplateGoalSettings_isNULL = true; SupportedGoalSettings_isNULL = true; } ~OpenDRIM_RecordLogCapabilities_CreateGoalSettings_In() {} int getTemplateGoalSettings(vector& value) const { if (TemplateGoalSettings_isNULL == true) return NOT_FOUND; value = TemplateGoalSettings; return OK; } int setTemplateGoalSettings(const vector& newValue) { TemplateGoalSettings = newValue; TemplateGoalSettings_isNULL = false; return OK; } int getSupportedGoalSettings(vector& value) const { if (SupportedGoalSettings_isNULL == true) return NOT_FOUND; value = SupportedGoalSettings; return OK; } int setSupportedGoalSettings(const vector& newValue) { SupportedGoalSettings = newValue; SupportedGoalSettings_isNULL = false; return OK; } }; class OpenDRIM_RecordLogCapabilities_CreateGoalSettings_Out { public: vector SupportedGoalSettings; bool SupportedGoalSettings_isNULL; OpenDRIM_RecordLogCapabilities_CreateGoalSettings_Out() { SupportedGoalSettings_isNULL = true; } ~OpenDRIM_RecordLogCapabilities_CreateGoalSettings_Out() {} int getSupportedGoalSettings(vector& value) const { if (SupportedGoalSettings_isNULL == true) return NOT_FOUND; value = SupportedGoalSettings; return OK; } int setSupportedGoalSettings(const vector& newValue) { SupportedGoalSettings = newValue; SupportedGoalSettings_isNULL = false; return OK; } }; #endif /*OPENDRIM_RECORDLOGCAPABILITIES_H_*/ ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogCapabilities/cmpiOpenDRIM_RecordLogCapabilities.cppopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogCapabilities/cmpiOpenDRIM_RecordLogCapabilities.c0000644000175000017500000001350011377667353034241 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_RecordLogCapabilities.h" CMPIObjectPath* OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_RecordLogCapabilities& instance) { _E_; Objectpath op(broker, OpenDRIM_RecordLogCapabilities_classnames[0], OpenDRIM_RecordLogCapabilities_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_RecordLogCapabilities& instance) { _E_; Objectpath op(broker, OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_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.ElementNameEditSupported_isNULL) ci.setProperty("ElementNameEditSupported", instance.ElementNameEditSupported); if (!instance.MaxElementNameLen_isNULL) ci.setProperty("MaxElementNameLen", instance.MaxElementNameLen); if (!instance.RequestedStatesSupported_isNULL) ci.setProperty("RequestedStatesSupported", instance.RequestedStatesSupported); if (!instance.ElementNameMask_isNULL) ci.setProperty("ElementNameMask", instance.ElementNameMask); if (!instance.StateAwareness_isNULL) ci.setProperty("StateAwareness", instance.StateAwareness); _L_; return ci.getHdl(); } void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_RecordLogCapabilities& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_RecordLogCapabilities& 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("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; if (inst.getProperty("ElementName", instance.ElementName) == OK) instance.ElementName_isNULL = false; if (inst.getProperty("ElementNameEditSupported", instance.ElementNameEditSupported) == OK) instance.ElementNameEditSupported_isNULL = false; if (inst.getProperty("MaxElementNameLen", instance.MaxElementNameLen) == OK) instance.MaxElementNameLen_isNULL = false; if (inst.getProperty("RequestedStatesSupported", instance.RequestedStatesSupported) == OK) instance.RequestedStatesSupported_isNULL = false; if (inst.getProperty("ElementNameMask", instance.ElementNameMask) == OK) instance.ElementNameMask_isNULL = false; if (inst.getProperty("StateAwareness", instance.StateAwareness) == OK) instance.StateAwareness_isNULL = false; _L_; } void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_RecordLogCapabilities_CreateGoalSettings_In& args) { _E_; CMPIStatus rc; CMPIData data; vector TemplateGoalSettings; data = in->ft->getArg(in, "TemplateGoalSettings", &rc); if (rc.rc == OK) { CT_ToC(data, TemplateGoalSettings); args.setTemplateGoalSettings(TemplateGoalSettings); } vector SupportedGoalSettings; data = in->ft->getArg(in, "SupportedGoalSettings", &rc); if (rc.rc == OK) { CT_ToC(data, SupportedGoalSettings); args.setSupportedGoalSettings(SupportedGoalSettings); } _L_; } void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_RecordLogCapabilities_CreateGoalSettings_Out& args) { _E_; CMPIValue value; int errorMessage; vector SupportedGoalSettings; errorMessage = args.getSupportedGoalSettings(SupportedGoalSettings); if (errorMessage == OK) { value = CT_toCMPI(broker, SupportedGoalSettings); out->ft->addArg(out, "SupportedGoalSettings", &value, CMPI_stringA); } _L_; } ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogCapabilities/cmpiOpenDRIM_RecordLogCapabilities.hopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogCapabilities/cmpiOpenDRIM_RecordLogCapabilities.h0000644000175000017500000000532511377667353034254 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_RECORDLOGCAPABILITIES_H_ #define CMPIOPENDRIM_RECORDLOGCAPABILITIES_H_ #include "OpenDRIM_RecordLogCapabilities.h" CMPIObjectPath* OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_RecordLogCapabilities& instance); CMPIInstance* OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_RecordLogCapabilities& instance); void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_RecordLogCapabilities& instance); void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_RecordLogCapabilities& instance); void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_RecordLogCapabilities_CreateGoalSettings_In& args); void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_RecordLogCapabilities_CreateGoalSettings_Out& args); #endif /*CMPIOPENDRIM_RECORDLOGCAPABILITIES_H_*/ ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogCapabilities/OpenDRIM_RecordLogCapabilitiesProvider.cppopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogCapabilities/OpenDRIM_RecordLogCapabilitiesProvid0000644000175000017500000003554511377667353034350 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_RecordLogCapabilities.h" #include "OpenDRIM_RecordLogCapabilitiesAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesProviderSetInstance OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesProviderModifyInstance #endif int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_init(const CMPIBroker* broker); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesProviderEnumInstances(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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RecordLogCapabilities instance; OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesProviderSetInstance(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_RecordLogCapabilities newInstance, oldInstance; OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCPP(_broker, ci, newInstance); OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RecordLogCapabilities instance; OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCPP(_broker, ci, instance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_RecordLogCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RecordLogCapabilities instance; OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesProviderExecQuery(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 OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesProviderMethodCleanup(CMPIMethodMI * mi, const CMPIContext * ctx, CMPIBoolean terminate) { _E_; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesProviderInvokeMethod(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_RecordLogCapabilities instance; OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCPP(_broker, ref, instance); string errorMessage; const char* properties[] = {"InstanceID"}; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } if ((string) methodName =="CreateGoalSettings") { unsigned short returnValue; OpenDRIM_RecordLogCapabilities_CreateGoalSettings_In inArgs; OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCPP(_broker, in, inArgs); OpenDRIM_RecordLogCapabilities_CreateGoalSettings_Out outArgs; errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_CreateGoalSettings(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint16, CMPI_uint16); } else { errorMessage = (string) OpenDRIM_RecordLogCapabilities_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 OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_init FAILED: " + (string) OpenDRIM_RecordLogCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_unload(errorMessage); if (errorCode != OK) { errorMessage += "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_unload FAILED: " + (string) OpenDRIM_RecordLogCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_INIT if (OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_init(_broker) < 0) return NULL CMInstanceMIStub(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesProvider, OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesProvider, _broker, OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_INIT); CMMethodMIStub(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesProvider, OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesProvider, _broker, OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogCapabilities/OpenDRIM_RecordLogCapabilitiesAccess.hopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogCapabilities/OpenDRIM_RecordLogCapabilitiesAccess0000644000175000017500000000707311377667353034301 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_RECORDLOGCAPABILITIESACCESS_H_ #define OPENDRIM_RECORDLOGCAPABILITIESACCESS_H_ #include "OpenDRIM_RecordLogPackage_Common.h" #include "OpenDRIM_RecordLogCapabilities.h" int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_load(const CMPIBroker* broker, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_unload(string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_RecordLogCapabilities& instance, const char** properties, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLogCapabilities& newInstance, const OpenDRIM_RecordLogCapabilities& oldInstance, const char** properties, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLogCapabilities& instance, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLogCapabilities& instance, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_CreateGoalSettings(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLogCapabilities& instance, unsigned short& returnValue, const OpenDRIM_RecordLogCapabilities_CreateGoalSettings_In& in, OpenDRIM_RecordLogCapabilities_CreateGoalSettings_Out& out, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_populate(OpenDRIM_RecordLogCapabilities& instance, string& errorMessage); #endif /*OPENDRIM_RECORDLOGCAPABILITIESACCESS_H_*/ ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogCapabilities/OpenDRIM_RecordLogCapabilitiesAccess.cppopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogCapabilities/OpenDRIM_RecordLogCapabilitiesAccess0000644000175000017500000001116011377667353034271 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_RecordLogCapabilitiesAccess.h" const string InstanceID="OpenDRIM:OpenDRIM_RecordLogCapabilities:1.0.1"; int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_load(const CMPIBroker* broker, string& errorMessage) { _E_; _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_unload(string& errorMessage) { _E_; _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; OpenDRIM_RecordLogCapabilities instance; instance.setInstanceID(InstanceID); if (discriminant == "ei") { CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_populate(instance,errorMessage)); } result.push_back(instance); _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_RecordLogCapabilities& instance, const char** properties, string& errorMessage) { _E_; if (instance.InstanceID != InstanceID) { errorMessage = "No instance"; return NOT_FOUND; } CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_populate(instance,errorMessage)); _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLogCapabilities& newInstance, const OpenDRIM_RecordLogCapabilities& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLogCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLogCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_CreateGoalSettings(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLogCapabilities& instance, unsigned short& returnValue, const OpenDRIM_RecordLogCapabilities_CreateGoalSettings_In& in, OpenDRIM_RecordLogCapabilities_CreateGoalSettings_Out& out, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_populate(OpenDRIM_RecordLogCapabilities& instance, string& errorMessage) { _E_; /* * Properties to fill from profile * + Mandatory: * [X] InstanceID [KEY] * [X] RequestedStatesSupported * [X] ElementNameEditSupported * + Conditional: * [-] MaxElementNameLen */ vector requestedStatesSupported; instance.setElementNameEditSupported(false); // Empty array as RequestStateChange is not (yet) supported instance.setRequestedStatesSupported(requestedStatesSupported); _L_; return OK; } opendrim-lmp-recordlog-1.1.2~ppa/VERSION0000644000175000017500000000000611377667353020613 0ustar guillaumeguillaume1.1.2 opendrim-lmp-recordlog-1.1.2~ppa/test/0000755000175000017500000000000011377667353020526 5ustar guillaumeguillaumeopendrim-lmp-recordlog-1.1.2~ppa/test/testOpenDRIM_LogManagesRecord.cpp0000644000175000017500000001131411377667353026743 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_LogManagesRecord.h" #include "OpenDRIM_LogManagesRecordAccess.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_LogManagesRecord& instance) { os << " [OpenDRIM_LogManagesRecord]" << endl; ToStringRef("Log", Log, Log_isNULL); ToStringRef("Record", Record, Record_isNULL); os << " [\\OpenDRIM_LogManagesRecord]" << endl; return os; } int main() { string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_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 = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_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 = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_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 = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-recordlog-1.1.2~ppa/test/testOpenDRIM_LogEntry.cpp0000644000175000017500000002423711377667353025342 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_LogEntry.h" #include "OpenDRIM_LogEntryAccess.h" #include // TO REMOVE CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProviderExecQuery(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* lang, const char* query); #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_LogEntry& instance) { os << " [OpenDRIM_LogEntry]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("RecordFormat", RecordFormat, RecordFormat_isNULL); ToString("RecordData", RecordData, RecordData_isNULL); ToString("Locale", Locale, Locale_isNULL); ToString("InstanceID", InstanceID, InstanceID_isNULL); ToString("LogInstanceID", LogInstanceID, LogInstanceID_isNULL); ToString("LogName", LogName, LogName_isNULL); ToString("RecordID", RecordID, RecordID_isNULL); ToString("CreationTimeStamp", CreationTimeStamp, CreationTimeStamp_isNULL); os << " [\\OpenDRIM_LogEntry]" << endl; return os; } int main() { // testing datetimeToBinary /*string errorMessage; unsigned long long binaryDatetime; int errorCode = CF_datetimeToBinary(binaryDatetime, "20071114090000.000000+000", errorMessage); cout << "errorCode: " << errorCode << endl; cout << "binaryDatetime: " << binaryDatetime << endl; errorCode = CF_datetimeToBinary(binaryDatetime, "20071114100000.000000+060", errorMessage); cout << "errorCode: " << errorCode << endl; cout << "binaryDatetime: " << binaryDatetime << endl; errorCode = CF_datetimeToBinary(binaryDatetime, "20071114090000/000000+000", errorMessage); cout << "errorCode: " << errorCode << endl; cout << "binaryDatetime: " << binaryDatetime << endl; errorCode = CF_datetimeToBinary(binaryDatetime, "20071114090000.00000+000", errorMessage); cout << "errorCode: " << errorCode << endl; cout << "binaryDatetime: " << binaryDatetime << endl; errorCode = CF_datetimeToBinary(binaryDatetime, "20071A14090000.000000+000", errorMessage); cout << "errorCode: " << errorCode << endl; cout << "binaryDatetime: " << binaryDatetime << endl; errorCode = CF_datetimeToBinary(binaryDatetime, "10071114090000.000000+000", errorMessage); cout << "errorCode: " << errorCode << endl; cout << "binaryDatetime: " << binaryDatetime << endl; errorCode = CF_datetimeToBinary(binaryDatetime, "19700101000000.000000+000", errorMessage); cout << "errorCode: " << errorCode << endl; cout << "binaryDatetime: " << binaryDatetime << endl; errorCode = CF_datetimeToBinary(binaryDatetime, "19690101000000.000000+000", errorMessage); cout << "errorCode: " << errorCode << endl; cout << "binaryDatetime: " << binaryDatetime << endl; errorCode = CF_datetimeToBinary(binaryDatetime, "20071314090000.000000+000", errorMessage); cout << "errorCode: " << errorCode << endl; cout << "binaryDatetime: " << binaryDatetime << endl; errorCode = CF_datetimeToBinary(binaryDatetime, "20071131090000.000000+000", errorMessage); cout << "errorCode: " << errorCode << endl; cout << "binaryDatetime: " << binaryDatetime << endl; errorCode = CF_datetimeToBinary(binaryDatetime, "20070229090000.000000+000", errorMessage); cout << "errorCode: " << errorCode << endl; cout << "binaryDatetime: " << binaryDatetime << endl; errorCode = CF_datetimeToBinary(binaryDatetime, "20080229090000.000000+000", errorMessage); cout << "errorCode: " << errorCode << endl; cout << "binaryDatetime: " << binaryDatetime << endl;*/ // testing datetimeCm /*string errorMessage; int sign; int errorCode = CF_datetimeCmp(sign, "20071114090000.000000+000", "20071114100000.000000+060", errorMessage); cout << "errorCode: " << errorCode << endl; cout << "sign: " << sign << endl; errorCode = CF_datetimeCmp(sign, "19700101000000.000000+000", "20071114090000.000000+000", errorMessage); cout << "errorCode: " << errorCode << endl; cout << "sign: " << sign << endl; errorCode = CF_datetimeCmp(sign, "20071114090000.000000+000", "19700101000000.000000+000", errorMessage); cout << "errorCode: " << errorCode << endl; cout << "sign: " << sign << endl;*/ // testing execQuery /*//OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProviderExecQuery(NULL, NULL, NULL, NULL, NULL, "select * from OpenDRIM_RecordLog where LogName=/var/log/messages"); OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProviderExecQuery(NULL, NULL, NULL, NULL, NULL, "select * from OpenDRIM_RecordLog where CreationTimestamp>=\"20071114090000.000000+000\" AND CreationTimestamp<=\"20071115090000.000000+000\""); OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProviderExecQuery(NULL, NULL, NULL, NULL, NULL, "select * from OpenDRIM_RecordLog where LogName=\"/var/log/cron\" CreationTimestamp>=\"20071114090000.000000+000\" AND CreationTimestamp<=\"20071115090000.000000+000\""); OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProviderExecQuery(NULL, NULL, NULL, NULL, NULL, " select * from OpenDRIM_RecordLog where CreationTimestamp>=\"20071114090000.000000+000\" AND CreationTimestamp<=\"20071115090000.000000+000\""); OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProviderExecQuery(NULL, NULL, NULL, NULL, NULL, "select * from OpenDRIM_RecordLog where CreationTimestamp>=\"\\\"200711 14090000.000000+000\" AND CreationTimestamp<=\"20071115090000.000000+000\""); OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProviderExecQuery(NULL, NULL, NULL, NULL, NULL, "select * from OpenDRIM_RecordLog where CreationTimestamp>=\"20071114090000.000000+000\" AND CreationTimestamp<= 20071115090000.000000+000\""); OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProviderExecQuery(NULL, NULL, NULL, NULL, NULL, "select * from OpenDRIM_RecordLog where CreationTimestamp >=\"20071114090000.000000+000\" AND CreationTimestamp<=20071115090000.000000+000\""); OpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProviderExecQuery(NULL, NULL, NULL, NULL, NULL, "select * from OpenDRIM_RecordLog where CreationTimestamp >= \"20071114090000.000000+000\" AND CreationTimestamp <= 20071115090000.000000+000\"");*/ string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_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 = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_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 = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_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 = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-recordlog-1.1.2~ppa/test/Makefile.am0000644000175000017500000001205111377667353022561 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ################################################################################ noinst_PROGRAMS = testOpenDRIM_RecordLogCapabilities testOpenDRIM_RecordLog testOpenDRIM_LogManagesRecord testOpenDRIM_UseOfLog testOpenDRIM_RecordLogProfile testOpenDRIM_RecordLogConformsToProfile testOpenDRIM_LogEntry testOpenDRIM_RecordLogToCapabilities testOpenDRIM_RecordLogCapabilities_CPPFLAGS = -I../OpenDRIM_RecordLogCapabilities/ testOpenDRIM_RecordLogCapabilities_SOURCES = testOpenDRIM_RecordLogCapabilities.cpp testOpenDRIM_RecordLogCapabilities_LDADD = ../OpenDRIM_RecordLogCapabilities/libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesProvider.la test-OpenDRIM_RecordLogCapabilities: testOpenDRIM_RecordLogCapabilities ./testOpenDRIM_RecordLogCapabilities testOpenDRIM_RecordLog_CPPFLAGS = -I../OpenDRIM_RecordLog/ testOpenDRIM_RecordLog_SOURCES = testOpenDRIM_RecordLog.cpp testOpenDRIM_RecordLog_LDADD = ../OpenDRIM_RecordLog/libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProvider.la test-OpenDRIM_RecordLog: testOpenDRIM_RecordLog ./testOpenDRIM_RecordLog # May have to be adjusted for direct invocation testOpenDRIM_LogManagesRecord_CPPFLAGS = -I../OpenDRIM_LogManagesRecord/ -I../null/ -I../null/ testOpenDRIM_LogManagesRecord_SOURCES = testOpenDRIM_LogManagesRecord.cpp testOpenDRIM_LogManagesRecord_LDADD = ../OpenDRIM_LogManagesRecord/libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProvider.la test-OpenDRIM_LogManagesRecord: testOpenDRIM_LogManagesRecord ./testOpenDRIM_LogManagesRecord # May have to be adjusted for direct invocation testOpenDRIM_UseOfLog_CPPFLAGS = -I../OpenDRIM_UseOfLog/ -I../null/ -I../null/ testOpenDRIM_UseOfLog_SOURCES = testOpenDRIM_UseOfLog.cpp testOpenDRIM_UseOfLog_LDADD = ../OpenDRIM_UseOfLog/libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProvider.la test-OpenDRIM_UseOfLog: testOpenDRIM_UseOfLog ./testOpenDRIM_UseOfLog testOpenDRIM_RecordLogProfile_CPPFLAGS = -I../OpenDRIM_RecordLogProfile/ testOpenDRIM_RecordLogProfile_SOURCES = testOpenDRIM_RecordLogProfile.cpp testOpenDRIM_RecordLogProfile_LDADD = ../OpenDRIM_RecordLogProfile/libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfileProvider.la test-OpenDRIM_RecordLogProfile: testOpenDRIM_RecordLogProfile ./testOpenDRIM_RecordLogProfile # May have to be adjusted for direct invocation testOpenDRIM_RecordLogConformsToProfile_CPPFLAGS = -I../OpenDRIM_RecordLogConformsToProfile/ -I../null/ -I../null/ testOpenDRIM_RecordLogConformsToProfile_SOURCES = testOpenDRIM_RecordLogConformsToProfile.cpp testOpenDRIM_RecordLogConformsToProfile_LDADD = ../OpenDRIM_RecordLogConformsToProfile/libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProvider.la test-OpenDRIM_RecordLogConformsToProfile: testOpenDRIM_RecordLogConformsToProfile ./testOpenDRIM_RecordLogConformsToProfile testOpenDRIM_LogEntry_CPPFLAGS = -I../OpenDRIM_LogEntry/ testOpenDRIM_LogEntry_SOURCES = testOpenDRIM_LogEntry.cpp testOpenDRIM_LogEntry_LDADD = ../OpenDRIM_LogEntry/libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProvider.la test-OpenDRIM_LogEntry: testOpenDRIM_LogEntry ./testOpenDRIM_LogEntry # May have to be adjusted for direct invocation testOpenDRIM_RecordLogToCapabilities_CPPFLAGS = -I../OpenDRIM_RecordLogToCapabilities/ -I../null/ -I../null/ testOpenDRIM_RecordLogToCapabilities_SOURCES = testOpenDRIM_RecordLogToCapabilities.cpp testOpenDRIM_RecordLogToCapabilities_LDADD = ../OpenDRIM_RecordLogToCapabilities/libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProvider.la test-OpenDRIM_RecordLogToCapabilities: testOpenDRIM_RecordLogToCapabilities ./testOpenDRIM_RecordLogToCapabilities opendrim-lmp-recordlog-1.1.2~ppa/test/testOpenDRIM_RecordLogProfile.cpp0000644000175000017500000001254511377667353026777 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_RecordLogProfile.h" #include "OpenDRIM_RecordLogProfileAccess.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_RecordLogProfile& instance) { os << " [OpenDRIM_RecordLogProfile]" << 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_RecordLogProfile]" << endl; return os; } int main() { string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-recordlog-1.1.2~ppa/test/testOpenDRIM_RecordLogToCapabilities.cpp0000644000175000017500000001164211377667353030270 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_RecordLogToCapabilities.h" #include "OpenDRIM_RecordLogToCapabilitiesAccess.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_RecordLogToCapabilities& instance) { os << " [OpenDRIM_RecordLogToCapabilities]" << endl; ToStringRef("ManagedElement", ManagedElement, ManagedElement_isNULL); ToStringRef("Capabilities", Capabilities, Capabilities_isNULL); ToStringArrayInt("Characteristics", Characteristics, Characteristics_isNULL); os << " [\\OpenDRIM_RecordLogToCapabilities]" << endl; return os; } int main() { string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-recordlog-1.1.2~ppa/test/testOpenDRIM_RecordLogCapabilities.cpp0000644000175000017500000001247711377667353027774 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_RecordLogCapabilities.h" #include "OpenDRIM_RecordLogCapabilitiesAccess.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_RecordLogCapabilities& instance) { os << " [OpenDRIM_RecordLogCapabilities]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("InstanceID", InstanceID, InstanceID_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("ElementNameEditSupported", ElementNameEditSupported, ElementNameEditSupported_isNULL); ToStringInt("MaxElementNameLen", MaxElementNameLen, MaxElementNameLen_isNULL); ToStringArrayInt("RequestedStatesSupported", RequestedStatesSupported, RequestedStatesSupported_isNULL); ToString("ElementNameMask", ElementNameMask, ElementNameMask_isNULL); ToStringArrayInt("StateAwareness", StateAwareness, StateAwareness_isNULL); os << " [\\OpenDRIM_RecordLogCapabilities]" << endl; return os; } int main() { string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-recordlog-1.1.2~ppa/test/testOpenDRIM_RecordLog.cpp0000644000175000017500000001456711377667353025464 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_RecordLog.h" #include "OpenDRIM_RecordLogAccess.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_RecordLog& instance) { os << " [OpenDRIM_RecordLog]" << 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); 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("MaxNumberOfRecords", MaxNumberOfRecords, MaxNumberOfRecords_isNULL); ToString("CurrentNumberOfRecords", CurrentNumberOfRecords, CurrentNumberOfRecords_isNULL); ToStringInt("LogState", LogState, LogState_isNULL); ToStringInt("OverwritePolicy", OverwritePolicy, OverwritePolicy_isNULL); ToString("InstanceID", InstanceID, InstanceID_isNULL); ToStringArrayInt("Facility", Facility, Facility_isNULL); ToStringArrayInt("Severity", Severity, Severity_isNULL); os << " [\\OpenDRIM_RecordLog]" << endl; return os; } int main() { string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-recordlog-1.1.2~ppa/test/testOpenDRIM_RecordLogConformsToProfile.cpp0000644000175000017500000001161111377667353031002 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_RecordLogConformsToProfile.h" #include "OpenDRIM_RecordLogConformsToProfileAccess.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_RecordLogConformsToProfile& instance) { os << " [OpenDRIM_RecordLogConformsToProfile]" << endl; ToStringRef("ConformantStandard", ConformantStandard, ConformantStandard_isNULL); ToStringRef("ManagedElement", ManagedElement, ManagedElement_isNULL); os << " [\\OpenDRIM_RecordLogConformsToProfile]" << endl; return os; } int main() { string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-recordlog-1.1.2~ppa/test/testOpenDRIM_UseOfLog.cpp0000644000175000017500000001125511377667353025256 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # 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 , , ###############################################################################*/ #include "cmpiOpenDRIM_UseOfLog.h" #include "OpenDRIM_UseOfLogAccess.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_UseOfLog& instance) { os << " [OpenDRIM_UseOfLog]" << endl; ToStringRef("Antecedent", Antecedent, Antecedent_isNULL); ToStringRef("Dependent", Dependent, Dependent_isNULL); ToString("RecordedData", RecordedData, RecordedData_isNULL); os << " [\\OpenDRIM_UseOfLog]" << endl; return os; } int main() { string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_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 = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_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 = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_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 = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_LogManagesRecord/0000755000175000017500000000000011377667353024360 5ustar guillaumeguillaumeopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_LogManagesRecord/cmpiOpenDRIM_LogManagesRecord.cpp0000644000175000017500000000607511377667353032556 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_LogManagesRecord.h" CMPIObjectPath* OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_LogManagesRecord& instance) { _E_; Objectpath op(broker, OpenDRIM_LogManagesRecord_classnames[0], OpenDRIM_LogManagesRecord_NAMESPACE); if (!instance.Log_isNULL) op.addKey("Log", instance.Log); if (!instance.Record_isNULL) op.addKey("Record", instance.Record); _L_; return op.getHdl(); } CMPIInstance* OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_LogManagesRecord& instance) { _E_; Objectpath op(broker, OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_LogManagesRecord& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("Record", instance.Record) == OK) instance.Record_isNULL = false; if (op.getKey("Log", instance.Log) == OK) instance.Log_isNULL = false; _L_; } void OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_LogManagesRecord& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Log", instance.Log) == OK) instance.Log_isNULL = false; if (inst.getProperty("Record", instance.Record) == OK) instance.Record_isNULL = false; _L_; } opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_LogManagesRecord/Makefile.am0000644000175000017500000000523511377667353026421 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProvider.la libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProvider_la_SOURCES = OpenDRIM_LogManagesRecordAccess.cpp OpenDRIM_LogManagesRecordProvider.cpp cmpiOpenDRIM_LogManagesRecord.cpp assocOpenDRIM_LogManagesRecord.cpp # May have to be adjusted for direct invocation libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProvider_la_CPPFLAGS = -I../CIM_RecordForLog -I../CIM_Log # Uncomment the end for direct invocation, may have to be adjusted libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProvider_la_LIBADD = ../Common/libcmpiOpenDRIM_RecordLogPackage_Common.la ../OpenDRIM_LogEntry/libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProvider.la #../CIM_RecordForLog/libcmpiOpenDRIM_RecordLogPackage_CIM_RecordForLogProvider.la ../CIM_Log/libcmpiOpenDRIM_RecordLogPackage_CIM_LogProvider.la libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_LogManagesRecord.h OpenDRIM_LogManagesRecord.h OpenDRIM_LogManagesRecordAccess.h opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_LogManagesRecord/OpenDRIM_LogManagesRecordAccess.h0000644000175000017500000001061711377667353032471 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_LOGMANAGESRECORDACCESS_H_ #define OPENDRIM_LOGMANAGESRECORDACCESS_H_ #include "OpenDRIM_RecordLogPackage_Common.h" #include "OpenDRIM_LogManagesRecord.h" #include "assocOpenDRIM_LogManagesRecord.h" int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_load(const CMPIBroker* broker, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_unload(string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_LogManagesRecord& instance, const char** properties, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LogManagesRecord& newInstance, const OpenDRIM_LogManagesRecord& oldInstance, const char** properties, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LogManagesRecord& instance, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LogManagesRecord& instance, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_associatorRecordToLog(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Record_instance, const char** properties, vector& Log_associatedInstances, string& errorMessage, const string& discriminant); int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_associatorLogToRecord(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Log_instance, const char** properties, vector& Record_associatedInstances, string& errorMessage, const string& discriminant); int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_referenceRecordToLog(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Record_instance, const vector& Log_instances, vector& OpenDRIM_LogManagesRecord_instances, const char** properties, string& errorMessage, const string& discriminant); int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_referenceLogToRecord(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Log_instance, const vector& Record_instances, vector& OpenDRIM_LogManagesRecord_instances, const char** properties, string& errorMessage, const string& discriminant); int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_populate(OpenDRIM_LogManagesRecord& instance, string& errorMessage); #endif /*OPENDRIM_LOGMANAGESRECORDACCESS_H_*/ opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_LogManagesRecord/cmpiOpenDRIM_LogManagesRecord.h0000644000175000017500000000446311377667353032222 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_LOGMANAGESRECORD_H_ #define CMPIOPENDRIM_LOGMANAGESRECORD_H_ #include "OpenDRIM_LogManagesRecord.h" CMPIObjectPath* OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_LogManagesRecord& instance); CMPIInstance* OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_LogManagesRecord& instance); void OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_LogManagesRecord& instance); void OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_LogManagesRecord& instance); #endif /*CMPIOPENDRIM_LOGMANAGESRECORD_H_*/ opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_LogManagesRecord/OpenDRIM_LogManagesRecord.h0000644000175000017500000000641711377667353031352 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_LOGMANAGESRECORD_H_ #define OPENDRIM_LOGMANAGESRECORD_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_RecordForLog.h" #include "CIM_RecordForLogAccess.h" #include "cmpiCIM_Log.h" #include "CIM_LogAccess.h" */ const static char* OpenDRIM_LogManagesRecord_classnames[] = {"OpenDRIM_LogManagesRecord"}; // CIM_LogManagesRecord static string OpenDRIM_LogManagesRecord_NAMESPACE = _NAMESPACE; const static string Record_role = "Record"; const static char* Record_classnames[] = {"OpenDRIM_LogEntry"}; // CIM_LogEntry const static string Record_NAMESPACE = _NAMESPACE; const static string Log_role = "Log"; const static char* Log_classnames[] = {"OpenDRIM_RecordLog"}; // CIM_RecordLog const static string Log_NAMESPACE = _NAMESPACE; class OpenDRIM_LogManagesRecord { public: Objectpath Log; bool Log_isNULL; Objectpath Record; bool Record_isNULL; OpenDRIM_LogManagesRecord() { Log_isNULL = true; Record_isNULL = true; } ~OpenDRIM_LogManagesRecord() {} string getKeys() const { return CF_toLowCase(".Log=\"" + CF_quoteString(Log.toString()) + "\""".Record=\"" + CF_quoteString(Record.toString()) + "\""); } int getLog(Objectpath& value) const { if (Log_isNULL==true) return NOT_FOUND; value = Log; return OK; } int setLog(const Objectpath& newValue) { Log = newValue; Log.setNamespace(Log_NAMESPACE); Log_isNULL = false; return OK; } int getRecord(Objectpath& value) const { if (Record_isNULL==true) return NOT_FOUND; value = Record; return OK; } int setRecord(const Objectpath& newValue) { Record = newValue; Record.setNamespace(Record_NAMESPACE); Record_isNULL = false; return OK; } }; #endif /*OPENDRIM_LOGMANAGESRECORD_H_*/ opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_LogManagesRecord/assocOpenDRIM_LogManagesRecord.cpp0000644000175000017500000002134311377667353032731 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "assocOpenDRIM_LogManagesRecord.h" int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_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; _DEBUG(CF_intToStr(sizeof(OpenDRIM_LogManagesRecord_classnames)/sizeof(char*))); for (unsigned int i=0; i& associatedInstances, bool& leftToRight, string& errorMessage, const string& dicriminant) { _E_; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_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, "Record") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "Log") != 0) return OK; CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_associatorRecordToLog(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "Log") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "Record") != 0) return OK; CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_associatorLogToRecord(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_enumerateRecords(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, Record_NAMESPACE, Record_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(OpenDRIM_RecordLogPackage_CIM_RecordForLog_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(OpenDRIM_RecordLogPackage_CIM_RecordForLog_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, OpenDRIM_RecordLogPackage_CIM_RecordForLog_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_getRecord(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Record_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Record_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_RecordForLog _instance; OpenDRIM_RecordLogPackage_CIM_RecordForLog_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(OpenDRIM_RecordLogPackage_CIM_RecordForLog_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, OpenDRIM_RecordLogPackage_CIM_RecordForLog_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_enumerateLogs(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, Log_NAMESPACE, Log_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(OpenDRIM_RecordLogPackage_CIM_Log_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(OpenDRIM_RecordLogPackage_CIM_Log_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, OpenDRIM_RecordLogPackage_CIM_Log_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_getLog(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Log_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Log_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_Log _instance; OpenDRIM_RecordLogPackage_CIM_Log_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(OpenDRIM_RecordLogPackage_CIM_Log_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, OpenDRIM_RecordLogPackage_CIM_Log_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_LogManagesRecord/OpenDRIM_LogManagesRecordProvider.cpp0000644000175000017500000004352611377667353033422 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_LogManagesRecord.h" #include "OpenDRIM_LogManagesRecordAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProviderSetInstance OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProviderModifyInstance #endif int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_init(const CMPIBroker* broker); int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LogManagesRecord_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProviderEnumInstances(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 = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LogManagesRecord_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_LogManagesRecord instance; OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_toCPP(_broker, cop, instance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LogManagesRecord_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProviderSetInstance(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_LogManagesRecord newInstance, oldInstance; OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_toCPP(_broker, ci, newInstance); OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LogManagesRecord_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LogManagesRecord_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_LogManagesRecord instance; OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_toCPP(_broker, ci, instance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_LogManagesRecord_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LogManagesRecord_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LogManagesRecord_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_LogManagesRecord instance; OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_toCPP(_broker, cop, instance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LogManagesRecord_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LogManagesRecord_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProviderExecQuery(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 OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProviderAssociatorNames(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 = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LogManagesRecord_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 OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProviderAssociators(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 = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LogManagesRecord_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 OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProviderReferenceNames(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 = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LogManagesRecord_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_referenceRecordToLog(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_referenceLogToRecord(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LogManagesRecord_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProviderReferences(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 = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LogManagesRecord_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_referenceRecordToLog(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_referenceLogToRecord(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_LogManagesRecord_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_init FAILED: " + (string) OpenDRIM_LogManagesRecord_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_unload(errorMessage); if (errorCode != OK) { errorMessage += "OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_unload FAILED: " + (string) OpenDRIM_LogManagesRecord_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_INIT if (OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_init(_broker) < 0) return NULL CMInstanceMIStub(OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProvider, OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProvider, _broker, OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_INIT); CMAssociationMIStub(OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProvider, OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProvider, _broker, OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_LogManagesRecord/assocOpenDRIM_LogManagesRecord.h0000644000175000017500000000635511377667353032404 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ASSOCOPENDRIM_LOGMANAGESRECORD_H_ #define ASSOCOPENDRIM_LOGMANAGESRECORD_H_ #include "OpenDRIM_LogManagesRecordAccess.h" int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_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 OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_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 OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_enumerateRecords(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_getRecord(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_enumerateLogs(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_getLog(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_LOGMANAGESRECORD_H_*/ opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_LogManagesRecord/OpenDRIM_LogManagesRecordAccess.cpp0000644000175000017500000002701711377667353033026 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_LogManagesRecordAccess.h" #include "../OpenDRIM_LogEntry/OpenDRIM_LogEntryAccess.h" #include "../OpenDRIM_LogEntry/cmpiOpenDRIM_LogEntry.h" int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(OpenDRIM_RecordLogPackage_CIM_RecordForLog_load(broker, errorMessage)); CF_assert(OpenDRIM_RecordLogPackage_CIM_Log_load(broker, errorMessage)); */ // TODO _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(OpenDRIM_RecordLogPackage_CIM_RecordForLog_unload(errorMessage)); CF_assert(OpenDRIM_RecordLogPackage_CIM_Log_unload(errorMessage)); */ // TODO _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_isAssociated(const Instance& Record, const Instance& Log, bool& isAssociated, string& errorMessage) { _E_; string record_id; CF_assert(Record.getProperty("InstanceID", record_id)); string log_id; CF_assert(Log.getProperty("InstanceID", log_id)); if (CF_startsWith(record_id, log_id)) isAssociated=true; else isAssociated=false; _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_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(OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_enumerateRecords(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(OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_enumerateRecords(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; OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), Record_classnames[0], Log_classnames[0], Record_role.c_str(), Log_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_referenceRecordToLog(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_LogManagesRecord& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath Record_objectpath; instance.getRecord(Record_objectpath); Instance Record_instance; CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_getRecord(broker, ctx, Record_objectpath, Record_instance, NULL, errorMessage)); Objectpath Log_objectpath; instance.getLog(Log_objectpath); Instance Log_instance; CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_getLog(broker, ctx, Log_objectpath, Log_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_isAssociated(Record_instance, Log_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LogManagesRecord& newInstance, const OpenDRIM_LogManagesRecord& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LogManagesRecord& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_LogManagesRecord& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_associatorRecordToLog(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Record_instance, const char** properties, vector& Log_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ /*vector Log_instances; if (discriminant=="a") CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_enumerateLogs(broker, ctx, Log_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_enumerateLogs(broker, ctx, Log_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(OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_enumerateLogs(broker, ctx, Log_instances, properties, false, errorMessage)); } for (size_t i=0; i& Record_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ /*vector Record_instances; if (discriminant=="a") CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_enumerateRecords(broker, ctx, Record_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_enumerateRecords(broker, ctx, Record_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(OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_enumerateRecords(broker, ctx, Record_instances, properties, false, errorMessage)); } for (size_t i=0; i result; string ei_discriminant = discriminant == "an" ? "ein" : "ei"; CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_makeInstances(filename, result, ei_discriminant, errorMessage)); for (vector::size_type i = 0; i < result.size(); ++i) { CMPIInstance* record_cmpi_inst = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_toCMPIInstance(broker, result[i]); Instance record_inst(broker, record_cmpi_inst); Record_associatedInstances.push_back(record_inst); } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_referenceRecordToLog(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Record_instance, const vector& Log_instances, vector& OpenDRIM_LogManagesRecord_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 < Log_instances.size(); i++) { OpenDRIM_LogManagesRecord instance; instance.setRecord(((Instance) Record_instance).getObjectpath()); instance.setLog(((Instance) Log_instances[i]).getObjectpath()); OpenDRIM_LogManagesRecord_instances.push_back(instance); } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_referenceLogToRecord(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Log_instance, const vector& Record_instances, vector& OpenDRIM_LogManagesRecord_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 < Record_instances.size(); i++) { OpenDRIM_LogManagesRecord instance; instance.setRecord(((Instance) Record_instances[i]).getObjectpath()); instance.setLog(((Instance) Log_instance).getObjectpath()); OpenDRIM_LogManagesRecord_instances.push_back(instance); } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_populate(OpenDRIM_LogManagesRecord& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-recordlog-1.1.2~ppa/acinclude.m40000644000175000017500000002115211377667353021741 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ################################################################################ AC_DEFUN([SHOW_COPYRIGHT], [ echo "################################################################################# # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun # # 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-recordlog-1.1.2~ppa/Common/0000755000175000017500000000000011377667353020777 5ustar guillaumeguillaumeopendrim-lmp-recordlog-1.1.2~ppa/Common/Makefile.am0000644000175000017500000000363111377667353023036 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ################################################################################ commonlibdir = @COMMONLIBDIR@ commonlib_LTLIBRARIES = libcmpiOpenDRIM_RecordLogPackage_Common.la libcmpiOpenDRIM_RecordLogPackage_Common_la_SOURCES = OpenDRIM_RecordLogPackage_Common.cpp libcmpiOpenDRIM_RecordLogPackage_Common_la_LDFLAGS = -avoid-version libcmpiOpenDRIM_RecordLogPackage_Common_la_LIBADD = -lopendrim noinst_HEADERS = OpenDRIM_RecordLogPackage_Common.h opendrim-lmp-recordlog-1.1.2~ppa/Common/OpenDRIM_RecordLogPackage_Common.cpp0000644000175000017500000000761011377667353027610 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "Common.h" #include "OpenDRIM_RecordLogPackage_Common.h" struct monst { char name[4]; int num; }; static struct monst months[12] = {{"Jan",1},{"Feb",2},{"Mar",3}, {"Apr",4},{"May",5},{"Jun",6}, {"Jul",7},{"Aug",8},{"Sep",9}, {"Oct",10},{"Nov",11},{"Dec",12}}; static bool before(int time_arr[5], struct tm* tp) { if (time_arr[0] > tp->tm_mon) { return true; } else if (time_arr[0] == tp->tm_mon && time_arr[1] > tp->tm_mday) return true; else if (time_arr[0] == tp->tm_mon && time_arr[1] == tp->tm_mday && time_arr[2] > tp->tm_hour) return true; else if (time_arr[0] == tp->tm_mon && time_arr[1] == tp->tm_mday && time_arr[2] == tp->tm_hour && time_arr[3] > tp->tm_min) return true; //Because of the execution time, it can be miscalculated. /* else if (time_arr[0] == tp->tm_mon && time_arr[1] == tp->tm_mday && time_arr[2] == tp->tm_hour && time_arr[3] == tp->tm_min && time_arr[5] > tp->tm_sec) return true;*/ return false; } string CF_logTimeFormat(const string& ptime, struct tm* tp) { _E_; int year = tp->tm_year + 1900; vector token; CF_splitTextBySpace(token, ptime); int month; for( unsigned int i=0; i<12; i++ ) { if( strcmp(months[i].name, token[0].c_str()) == 0 ) { month = months[i].num; break; } } int day = atoi(token[1].c_str()); //hour:min:sec int hour, min, sec; vector timetoken; CF_splitText(timetoken, token[2], ':'); if (timetoken.size() != 3) { //TODO //Wrong format } hour = atoi(timetoken[0].c_str()); min = atoi(timetoken[1].c_str()); sec = atoi(timetoken[2].c_str()); //In log message, there is no year of log. //To determine the year, it gets the local time. //And if the local time's date is smaller than the input time, //The year of input time is regarded as the last year. //In the oppoisite case, the current year will be used. int time_arr[] = {month-1, day, hour, min, sec}; if (before(time_arr, tp)) --year; const int DT_LENGTH = 26; char resultDateTime[DT_LENGTH]; short timezone = CF_getCurrentTimeZone(); snprintf(resultDateTime, DT_LENGTH, "%04d%02d%02d%02d%02d%02d.000000%s%03d", year, month, day, hour, min, sec, (timezone >= 0 ? "+":"-"), timezone); string result(resultDateTime); _L_; return result; } opendrim-lmp-recordlog-1.1.2~ppa/Common/OpenDRIM_RecordLogPackage_Common.h0000644000175000017500000000366311377667353027261 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_RECORDLOGPACKAGE_COMMON_H_ #define OPENDRIM_RECORDLOGPACKAGE_COMMON_H_ #include // Define LogState Constants #define LS_NOT_APPLICABLE 4 // Define EnabledState Constants #define ES_NOT_APPLICABLE 5 // Define RequestedState Constants #define RS_NOT_APPLICABLE 12 string CF_logTimeFormat(const string& ptime, struct tm* tp); #endif /*OPENDRIM_RECORDLOGPACKAGE_COMMON_H_*/ opendrim-lmp-recordlog-1.1.2~ppa/configure.ac0000644000175000017500000001256611377667353022047 0ustar guillaumeguillaume# Process this file with autoconf to produce a configure script. ################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 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), OpenDRIM_RecordLogPackage provider package Copyright (C) 2007 Ilsoo Byun 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(OpenDRIM_RecordLogPackage 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_RecordLogCapabilities/Makefile OpenDRIM_RecordLog/Makefile OpenDRIM_LogManagesRecord/Makefile OpenDRIM_UseOfLog/Makefile OpenDRIM_RecordLogProfile/Makefile OpenDRIM_RecordLogConformsToProfile/Makefile OpenDRIM_LogEntry/Makefile OpenDRIM_RecordLogToCapabilities/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-recordlog-1.1.2~ppa/OpenDRIM_UseOfLog/0000755000175000017500000000000011377667353022667 5ustar guillaumeguillaumeopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_UseOfLog/assocOpenDRIM_UseOfLog.cpp0000644000175000017500000002132611377667353027550 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # 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 , , ###############################################################################*/ #include "assocOpenDRIM_UseOfLog.h" int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_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 = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_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(OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_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(OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_associatorDependentToAntecedent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_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(OpenDRIM_RecordLogPackage_CIM_Log_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(OpenDRIM_RecordLogPackage_CIM_Log_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, OpenDRIM_RecordLogPackage_CIM_Log_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_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_Log _instance; OpenDRIM_RecordLogPackage_CIM_Log_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(OpenDRIM_RecordLogPackage_CIM_Log_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, OpenDRIM_RecordLogPackage_CIM_Log_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_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(OpenDRIM_RecordLogPackage_CIM_ManagedSystemElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(OpenDRIM_RecordLogPackage_CIM_ManagedSystemElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, OpenDRIM_RecordLogPackage_CIM_ManagedSystemElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_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_ManagedSystemElement _instance; OpenDRIM_RecordLogPackage_CIM_ManagedSystemElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(OpenDRIM_RecordLogPackage_CIM_ManagedSystemElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, OpenDRIM_RecordLogPackage_CIM_ManagedSystemElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_UseOfLog/Makefile.am0000644000175000017500000000474711377667353024737 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # 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 , , ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProvider.la libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProvider_la_SOURCES = OpenDRIM_UseOfLogAccess.cpp OpenDRIM_UseOfLogProvider.cpp cmpiOpenDRIM_UseOfLog.cpp assocOpenDRIM_UseOfLog.cpp # May have to be adjusted for direct invocation libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProvider_la_CPPFLAGS = -I../CIM_Log -I../CIM_ManagedSystemElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProvider_la_LIBADD = ../Common/libcmpiOpenDRIM_RecordLogPackage_Common.la #../CIM_Log/libcmpiOpenDRIM_RecordLogPackage_CIM_LogProvider.la ../CIM_ManagedSystemElement/libcmpiOpenDRIM_RecordLogPackage_CIM_ManagedSystemElementProvider.la libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_UseOfLog.h OpenDRIM_UseOfLog.h OpenDRIM_UseOfLogAccess.h opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_UseOfLog/cmpiOpenDRIM_UseOfLog.cpp0000644000175000017500000000634711377667353027376 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # 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 , , ###############################################################################*/ #include "cmpiOpenDRIM_UseOfLog.h" CMPIObjectPath* OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_UseOfLog& instance) { _E_; Objectpath op(broker, OpenDRIM_UseOfLog_classnames[0], OpenDRIM_UseOfLog_NAMESPACE); if (!instance.Antecedent_isNULL) op.addKey("Antecedent", instance.Antecedent); if (!instance.Dependent_isNULL) op.addKey("Dependent", instance.Dependent); _L_; return op.getHdl(); } CMPIInstance* OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_UseOfLog& instance) { _E_; Objectpath op(broker, OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.RecordedData_isNULL) ci.setProperty("RecordedData", instance.RecordedData); _L_; return ci.getHdl(); } void OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_UseOfLog& 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 OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_UseOfLog& 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("RecordedData", instance.RecordedData) == OK) instance.RecordedData_isNULL = false; _L_; } opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_UseOfLog/OpenDRIM_UseOfLog.h0000644000175000017500000000727411377667353026172 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # 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 , , ###############################################################################*/ #ifndef OPENDRIM_USEOFLOG_H_ #define OPENDRIM_USEOFLOG_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_Log.h" #include "CIM_LogAccess.h" #include "cmpiCIM_ManagedSystemElement.h" #include "CIM_ManagedSystemElementAccess.h" */ const static char* OpenDRIM_UseOfLog_classnames[] = {"OpenDRIM_UseOfLog"}; static string OpenDRIM_UseOfLog_NAMESPACE = _NAMESPACE; const static string Antecedent_role = "Antecedent"; const static char* Antecedent_classnames[] = {"OpenDRIM_RecordLog"}; // CIM_RecordLog const static string Antecedent_NAMESPACE = _NAMESPACE; const static string Dependent_role = "Dependent"; const static char* Dependent_classnames[] = {"OpenDRIM_ComputerSystem"}; // CIM_ManagedSystemElement const static string Dependent_NAMESPACE = _NAMESPACE; class OpenDRIM_UseOfLog { public: Objectpath Antecedent; bool Antecedent_isNULL; Objectpath Dependent; bool Dependent_isNULL; string RecordedData; bool RecordedData_isNULL; OpenDRIM_UseOfLog() { Antecedent_isNULL = true; Dependent_isNULL = true; RecordedData_isNULL = true; } ~OpenDRIM_UseOfLog() {} 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 getRecordedData(string& value) const { if (RecordedData_isNULL==true) return NOT_FOUND; value = RecordedData; return OK; } int setRecordedData(const string& newValue) { RecordedData = newValue; RecordedData_isNULL = false; return OK; } }; #endif /*OPENDRIM_USEOFLOG_H_*/ opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_UseOfLog/OpenDRIM_UseOfLogAccess.cpp0000644000175000017500000002511011377667353027634 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # 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 , , ###############################################################################*/ #include "OpenDRIM_UseOfLogAccess.h" int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(OpenDRIM_RecordLogPackage_CIM_Log_load(broker, errorMessage)); CF_assert(OpenDRIM_RecordLogPackage_CIM_ManagedSystemElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(OpenDRIM_RecordLogPackage_CIM_Log_unload(errorMessage)); CF_assert(OpenDRIM_RecordLogPackage_CIM_ManagedSystemElement_unload(errorMessage)); */ // TODO _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_isAssociated(const Instance& Antecedent, const Instance& Dependent, bool& isAssociated, string& errorMessage) { _E_; // Determine if the association can be established or not isAssociated=true; _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_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(OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_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(OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_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; OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_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(OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_referenceAntecedentToDependent(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_UseOfLog& 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(OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_getAntecedent(broker, ctx, Antecedent_objectpath, Antecedent_instance, NULL, errorMessage)); Objectpath Dependent_objectpath; instance.getDependent(Dependent_objectpath); Instance Dependent_instance; CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_getDependent(broker, ctx, Dependent_objectpath, Dependent_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_isAssociated(Antecedent_instance, Dependent_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_populate(instance, errorMessage)); _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_UseOfLog& newInstance, const OpenDRIM_UseOfLog& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_UseOfLog& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_UseOfLog& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_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(OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_enumerateDependents(broker, ctx, Dependent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_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(OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_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(OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_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(OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); } for (size_t i=0; i& Dependent_instances, vector& OpenDRIM_UseOfLog_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_UseOfLog instance; instance.setAntecedent(((Instance) Antecedent_instance).getObjectpath()); instance.setDependent(((Instance) Dependent_instances[i]).getObjectpath()); if (discriminant == "r") { CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_populate(instance, errorMessage)); } OpenDRIM_UseOfLog_instances.push_back(instance); } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_UseOfLog_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_UseOfLog instance; instance.setAntecedent(((Instance) Antecedent_instances[i]).getObjectpath()); instance.setDependent(((Instance) Dependent_instance).getObjectpath()); if (discriminant == "r") { CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_populate(instance, errorMessage)); } OpenDRIM_UseOfLog_instances.push_back(instance); } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_populate(OpenDRIM_UseOfLog& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_UseOfLog/OpenDRIM_UseOfLogAccess.h0000644000175000017500000001034411377667353027304 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # 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 , , ###############################################################################*/ #ifndef OPENDRIM_USEOFLOGACCESS_H_ #define OPENDRIM_USEOFLOGACCESS_H_ #include "OpenDRIM_RecordLogPackage_Common.h" #include "OpenDRIM_UseOfLog.h" #include "assocOpenDRIM_UseOfLog.h" int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_load(const CMPIBroker* broker, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_unload(string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_UseOfLog& instance, const char** properties, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_UseOfLog& newInstance, const OpenDRIM_UseOfLog& oldInstance, const char** properties, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_UseOfLog& instance, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_UseOfLog& instance, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_associatorAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const char** properties, vector& Dependent_associatedInstances, string& errorMessage, const string& discriminant); int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_associatorDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const char** properties, vector& Antecedent_associatedInstances, string& errorMessage, const string& discriminant); int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_referenceAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const vector& Dependent_instances, vector& OpenDRIM_UseOfLog_instances, const char** properties, string& errorMessage, const string& discriminant); int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_UseOfLog_instances, const char** properties, string& errorMessage, const string& discriminant); int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_populate(OpenDRIM_UseOfLog& instance, string& errorMessage); #endif /*OPENDRIM_USEOFLOGACCESS_H_*/ opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_UseOfLog/cmpiOpenDRIM_UseOfLog.h0000644000175000017500000000427011377667353027034 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # 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 , , ###############################################################################*/ #ifndef CMPIOPENDRIM_USEOFLOG_H_ #define CMPIOPENDRIM_USEOFLOG_H_ #include "OpenDRIM_UseOfLog.h" CMPIObjectPath* OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_UseOfLog& instance); CMPIInstance* OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_UseOfLog& instance); void OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_UseOfLog& instance); void OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_UseOfLog& instance); #endif /*CMPIOPENDRIM_USEOFLOG_H_*/ opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_UseOfLog/OpenDRIM_UseOfLogProvider.cpp0000644000175000017500000004222311377667353030231 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # 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 , , ###############################################################################*/ #include "cmpiOpenDRIM_UseOfLog.h" #include "OpenDRIM_UseOfLogAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProviderSetInstance OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProviderModifyInstance #endif int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_init(const CMPIBroker* broker); int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_UseOfLog_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProviderEnumInstances(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 = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_UseOfLog_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_UseOfLog instance; OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_toCPP(_broker, cop, instance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_UseOfLog_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProviderSetInstance(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_UseOfLog newInstance, oldInstance; OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_toCPP(_broker, ci, newInstance); OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_UseOfLog_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_UseOfLog_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_UseOfLog instance; OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_toCPP(_broker, ci, instance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_UseOfLog_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_UseOfLog_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_UseOfLog_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_UseOfLog instance; OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_toCPP(_broker, cop, instance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_UseOfLog_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_UseOfLog_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProviderExecQuery(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 OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProviderAssociatorNames(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 = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_UseOfLog_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 OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProviderAssociators(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 = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_UseOfLog_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 OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProviderReferenceNames(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 = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_UseOfLog_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_UseOfLog_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProviderReferences(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 = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_UseOfLog_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_UseOfLog_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_init FAILED: " + (string) OpenDRIM_UseOfLog_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_unload(errorMessage); if (errorCode != OK) { errorMessage += "OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_unload FAILED: " + (string) OpenDRIM_UseOfLog_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_INIT if (OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_init(_broker) < 0) return NULL CMInstanceMIStub(OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProvider, OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProvider, _broker, OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_INIT); CMAssociationMIStub(OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProvider, OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProvider, _broker, OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_UseOfLog/assocOpenDRIM_UseOfLog.h0000644000175000017500000000622611377667353027217 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # 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 , , ###############################################################################*/ #ifndef ASSOCOPENDRIM_USEOFLOG_H_ #define ASSOCOPENDRIM_USEOFLOG_H_ #include "OpenDRIM_UseOfLogAccess.h" int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_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 OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_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 OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_enumerateAntecedents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_getAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_enumerateDependents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_UseOfLog_getDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_USEOFLOG_H_*/ opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogProfile/0000755000175000017500000000000011377667353024405 5ustar guillaumeguillaumeopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogProfile/Makefile.am0000644000175000017500000000425611377667353026450 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfileProvider.la libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfileProvider_la_SOURCES = OpenDRIM_RecordLogProfileAccess.cpp OpenDRIM_RecordLogProfileProvider.cpp cmpiOpenDRIM_RecordLogProfile.cpp libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfileProvider_la_LIBADD = ../Common/libcmpiOpenDRIM_RecordLogPackage_Common.la libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfileProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_RecordLogProfile.h OpenDRIM_RecordLogProfile.h OpenDRIM_RecordLogProfileAccess.h opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogProfile/OpenDRIM_RecordLogProfileAccess.h0000644000175000017500000000617111377667353032543 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_RECORDLOGPROFILEACCESS_H_ #define OPENDRIM_RECORDLOGPROFILEACCESS_H_ #include "OpenDRIM_RecordLogPackage_Common.h" #include "OpenDRIM_RecordLogProfile.h" int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_load(const CMPIBroker* broker, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_unload(string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_RecordLogProfile& instance, const char** properties, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLogProfile& newInstance, const OpenDRIM_RecordLogProfile& oldInstance, const char** properties, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLogProfile& instance, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLogProfile& instance, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_populate(OpenDRIM_RecordLogProfile& instance, string& errorMessage); #endif /*OPENDRIM_RECORDLOGPROFILEACCESS_H_*/ opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogProfile/OpenDRIM_RecordLogProfileProvider.cpp0000644000175000017500000002710211377667353033464 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_RecordLogProfile.h" #include "OpenDRIM_RecordLogProfileAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfileProviderSetInstance OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfileProviderModifyInstance #endif int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_init(const CMPIBroker* broker); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfileProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfileProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfileProviderEnumInstances(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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfileProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RecordLogProfile instance; OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfileProviderSetInstance(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_RecordLogProfile newInstance, oldInstance; OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_toCPP(_broker, ci, newInstance); OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfileProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RecordLogProfile instance; OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_toCPP(_broker, ci, instance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_RecordLogProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfileProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RecordLogProfile instance; OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfileProviderExecQuery(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 OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_init FAILED: " + (string) OpenDRIM_RecordLogProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_unload(errorMessage); if (errorCode != OK) { errorMessage += "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_unload FAILED: " + (string) OpenDRIM_RecordLogProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_INIT if (OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_init(_broker) < 0) return NULL CMInstanceMIStub(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfileProvider, OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfileProvider, _broker, OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogProfile/cmpiOpenDRIM_RecordLogProfile.cpp0000644000175000017500000001163111377667353032622 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_RecordLogProfile.h" CMPIObjectPath* OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_RecordLogProfile& instance) { _E_; Objectpath op(broker, OpenDRIM_RecordLogProfile_classnames[0], OpenDRIM_RecordLogProfile_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_RecordLogProfile& instance) { _E_; Objectpath op(broker, OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_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 OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_RecordLogProfile& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_RecordLogProfile& 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_; } opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogProfile/OpenDRIM_RecordLogProfileAccess.cpp0000644000175000017500000000765711377667353033110 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_RecordLogProfileAccess.h" const string InstanceID="OpenDRIM:RecordLog:1.0.1"; int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_load(const CMPIBroker* broker, string& errorMessage) { _E_; _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_unload(string& errorMessage) { _E_; _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; OpenDRIM_RecordLogProfile instance; instance.setInstanceID(InstanceID); if (discriminant == "ei") { CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_populate(instance, errorMessage)); } result.push_back(instance); _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_RecordLogProfile& instance, const char** properties, string& errorMessage) { _E_; if (instance.InstanceID!=InstanceID) { errorMessage = "No instance"; return NOT_FOUND; } CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_populate(instance, errorMessage)); _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLogProfile& newInstance, const OpenDRIM_RecordLogProfile& oldInstance, const char** properties, string& errorMessage) { _E_; _L_; return NOT_SUPPORTED; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLogProfile& instance, string& errorMessage) { _E_; _L_; return NOT_SUPPORTED; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLogProfile& instance, string& errorMessage) { _E_; _L_; return NOT_SUPPORTED; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_populate(OpenDRIM_RecordLogProfile& instance, string& errorMessage) { _E_; vector AdvertiseTypes; instance.setRegisteredName("Record Log"); instance.setRegisteredVersion("1.0.1"); instance.setRegisteredOrganization(2); // DMTF AdvertiseTypes.push_back(2); // Not Advertised instance.setAdvertiseTypes(AdvertiseTypes); _L_; return OK; } opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogProfile/OpenDRIM_RecordLogProfile.h0000644000175000017500000001352111377667353031416 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_RECORDLOGPROFILE_H_ #define OPENDRIM_RECORDLOGPROFILE_H_ #include const static char* OpenDRIM_RecordLogProfile_classnames[] = {"OpenDRIM_RecordLogProfile"}; static string OpenDRIM_RecordLogProfile_NAMESPACE = _INTEROP_NAMESPACE; class OpenDRIM_RecordLogProfile { 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_RecordLogProfile() { 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_RecordLogProfile() {} 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_RECORDLOGPROFILE_H_*/ opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogProfile/cmpiOpenDRIM_RecordLogProfile.h0000644000175000017500000000446311377667353032274 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_RECORDLOGPROFILE_H_ #define CMPIOPENDRIM_RECORDLOGPROFILE_H_ #include "OpenDRIM_RecordLogProfile.h" CMPIObjectPath* OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_RecordLogProfile& instance); CMPIInstance* OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_RecordLogProfile& instance); void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_RecordLogProfile& instance); void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_RecordLogProfile& instance); #endif /*CMPIOPENDRIM_RECORDLOGPROFILE_H_*/ opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLog/0000755000175000017500000000000011377667353023064 5ustar guillaumeguillaumeopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLog/cmpiOpenDRIM_RecordLog.cpp0000644000175000017500000002245611377667353027767 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_RecordLog.h" CMPIObjectPath* OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_RecordLog& instance) { _E_; Objectpath op(broker, OpenDRIM_RecordLog_classnames[0], OpenDRIM_RecordLog_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_RecordLog& instance) { _E_; Objectpath op(broker, OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_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.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.MaxNumberOfRecords_isNULL) ci.setProperty("MaxNumberOfRecords", instance.MaxNumberOfRecords); if (!instance.CurrentNumberOfRecords_isNULL) ci.setProperty("CurrentNumberOfRecords", instance.CurrentNumberOfRecords); if (!instance.LogState_isNULL) ci.setProperty("LogState", instance.LogState); if (!instance.OverwritePolicy_isNULL) ci.setProperty("OverwritePolicy", instance.OverwritePolicy); if (!instance.Facility_isNULL) ci.setProperty("Facility", instance.Facility); if (!instance.Severity_isNULL) ci.setProperty("Severity", instance.Severity); _L_; return ci.getHdl(); } void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_RecordLog& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_RecordLog& 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("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("MaxNumberOfRecords", instance.MaxNumberOfRecords) == OK) instance.MaxNumberOfRecords_isNULL = false; if (inst.getProperty("CurrentNumberOfRecords", instance.CurrentNumberOfRecords) == OK) instance.CurrentNumberOfRecords_isNULL = false; if (inst.getProperty("LogState", instance.LogState) == OK) instance.LogState_isNULL = false; if (inst.getProperty("OverwritePolicy", instance.OverwritePolicy) == OK) instance.OverwritePolicy_isNULL = false; if (inst.getProperty("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; if (inst.getProperty("Facility", instance.Facility) == OK) instance.Facility_isNULL = false; if (inst.getProperty("Severity", instance.Severity) == OK) instance.Severity_isNULL = false; _L_; } void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_RecordLog_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 OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_RecordLog_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_; } opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLog/Makefile.am0000644000175000017500000000415011377667353025120 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProvider.la libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProvider_la_SOURCES = OpenDRIM_RecordLogAccess.cpp OpenDRIM_RecordLogProvider.cpp cmpiOpenDRIM_RecordLog.cpp libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProvider_la_LIBADD = ../Common/libcmpiOpenDRIM_RecordLogPackage_Common.la libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_RecordLog.h OpenDRIM_RecordLog.h OpenDRIM_RecordLogAccess.h opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLog/OpenDRIM_RecordLogAccess.cpp0000644000175000017500000003677311377667353030247 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_RecordLogAccess.h" #define SYSLOG_CONFIG_FILE "/etc/syslog.conf" static char* OpenDRIM_RecordLog_Severity_mapping[] = {"emerg", "alert", "crit", "err", \ "warning", "notice", "info", "debug", "*", "none"}; static char* OpenDRIM_RecordLog_Facility_mapping[] = {"kern", "user", "mail", "daemon", \ "auth", "syslog", "lpr", "news", "uucp", "cron", "authpriv", "INVALID", \ "INVALID", "INVALID", "INVALID", "cron", "local0", "local1", "local2", \ "local3", "local4", "local5", "local6", "local7", "*"}; static unsigned short facilityToRFC3164(const string& syslog_conf_facility); static unsigned char severityToCIM(vector& Severities, const unsigned short& RFC3164_severity, const unsigned char& severity_selection); static unsigned short severityToRFC3164(const string& syslog_conf_severity); static int convertLogInstanceToString(const OpenDRIM_RecordLog& log, string& output, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_load(const CMPIBroker* broker, string& errorMessage) { _E_; _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_unload(string& errorMessage) { _E_; _L_; return OK; } static bool isAvailableLine(string& line, vector& tokens) { _E_; if (line.size() == 0 || CF_startsWith(line, "\\") || line[0] == '#') return false; CF_splitTextBySpace(tokens, line); // If the line contains less than 2 elements, skip and go to the next line if (tokens.size() != 2) return false; //If the first character is '-', remove it if (CF_startsWith(tokens[1], "-")) tokens[1].erase(0,1); vector filepath_elements; CF_splitText(filepath_elements, tokens[1], '/'); string file_container; for (vector::size_type i = 0; i < filepath_elements.size()-1; i++) { if (i > 0) file_container += "/"; file_container += filepath_elements[i]; } if (CF_startsWith(tokens[1], "/dev/") || !CF_isExist(file_container)) return false; _L_; return true; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; // Read content from /etc/syslog.conf int line_num = 0; string line; ifstream ifs(SYSLOG_CONFIG_FILE); OpenDRIM_RecordLog instance; while (getline(ifs, line)) { ++line_num; vector tokens; if (!isAvailableLine(line, tokens)) continue; instance.setInstanceID(tokens[1]); if (discriminant=="ei") { if (OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_populate( instance, tokens, errorMessage) != OK) { errorMessage="Wrong format (arround line "+CF_intToStr((unsigned long) line_num)+"): /etc/syslog.conf"; ifs.close(); return FAILED; } } result.push_back(instance); } ifs.close(); _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_RecordLog& instance, const char** properties, string& errorMessage) { _E_; int line_num = 0; string line; ifstream ifs(SYSLOG_CONFIG_FILE); while (getline(ifs, line)) { ++line_num; vector tokens; if (!isAvailableLine(line, tokens)) continue; if (!instance.InstanceID_isNULL && instance.InstanceID == tokens[1]) { if (OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_populate( instance, tokens, errorMessage) != OK) { errorMessage="Wrong format (arround line "+CF_intToStr((unsigned long) line_num)+"): /etc/syslog.conf"; ifs.close(); return FAILED; } return OK; } } ifs.close(); if(errorMessage.empty()) errorMessage = "No instance"; _L_; return NOT_FOUND; } //For writing an OpenDRIM_RecordLog instance. static unsigned short max(vector& severity) { _E_; unsigned short max_num = 0; for (vector::iterator c = severity.begin(); c != severity.end(); ++c) { if ((*c) > max_num) max_num = *c; } _L_; return max_num; } //For writing an OpenDRIM_RecordLog instance. static string writeFacilitySeverity(unsigned short facility, unsigned short severity) { string result(OpenDRIM_RecordLog_Facility_mapping[facility]); // modified by Frederic Desmons (2007/11/13) result += ".="; //if (severity == 7) severity = 8; result += OpenDRIM_RecordLog_Severity_mapping[severity]; return result; } //For writing an OpenDRIM_RecordLog instance. static int convertLogInstanceToString(const OpenDRIM_RecordLog& log, string& output, string& errorMessage) { _E_; output.clear(); // added by Frederic Desmons (2007/11/13) for (vector::size_type i = 0; i < log.Facility.size(); i++) { if (log.Facility[i] > 24) { errorMessage = "Facility values must be lower than 25"; return FAILED; } if (log.Facility[i] >= 11 && log.Facility[i] <= 14) { errorMessage = "Facility values cannot be 11, 12, 13, 14 (INVALID)"; return FAILED; } if (log.Severity[i] > 9) { errorMessage = "Severity values must be lower than 10"; return FAILED; } output += writeFacilitySeverity(log.Facility[i], log.Severity[i]); if (i < log.Facility.size() - 1) output += ";"; } // end of added /* vector::size_type facility_count = 0; do { unsigned short facility = log.Facility[facility_count]; for (; facility_count < log.Facility.size(); ++facility_count) { if (facility != log.Facility[facility_count]) break; } vector severities; for (vector::size_type i = 0; i < facility_count; ++i) { severities.push_back(log.Severity[i]); } output += writeFacilitySeverity(facility, max(severities)); if (facility_count < log.Facility.size()) output += ";"; } while (facility_count < log.Facility.size()); */ output += "\t\t\t\t\t\t"; output += log.InstanceID; _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLog& newInstance, const OpenDRIM_RecordLog& oldInstance, const char** properties, string& errorMessage) { _E_; // added by Frederic Desmons (2007/11/13) vector Facility, Severity; if (newInstance.getFacility(Facility) != OK) { if (newInstance.getSeverity(Severity) != OK) { // nothing to do return OK; } else { errorMessage = "Facility and Severity must BOTH be defined"; return FAILED; } } else { if (newInstance.getSeverity(Severity) != OK) { errorMessage = "Facility and Severity must BOTH be defined"; return FAILED; } } if (Facility.size() != Severity.size()) { errorMessage = "Facility and Severity must have the same size"; return FAILED; } // end of added string line; ifstream ifs(SYSLOG_CONFIG_FILE); vector lines; while (getline(ifs, line)) { vector tokens; //Modify the corresponding line. if (isAvailableLine(line, tokens) && tokens[1] == newInstance.InstanceID) { line.clear(); CF_assert(convertLogInstanceToString(newInstance, line, errorMessage)); } lines.push_back(line); } ifs.close(); // rewriting the syslog configuation file. ofstream ofs(SYSLOG_CONFIG_FILE, ios::trunc); for (vector::size_type i = 0; lines.size() > i; ++i) { ofs << lines[i] << endl; } ofs.close(); _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLog& instance, string& errorMessage) { _E_; // added by Frederic Desmons (2007/11/13) vector Facility, Severity; if (instance.getFacility(Facility) != OK) { if (instance.getSeverity(Severity) != OK) { // nothing to do return OK; } else { errorMessage = "Facility and Severity must BOTH be defined"; return FAILED; } } else { if (instance.getSeverity(Severity) != OK) { errorMessage = "Facility and Severity must BOTH be defined"; return FAILED; } } if (Facility.size() != Severity.size()) { errorMessage = "Facility and Severity must have the same size"; return FAILED; } // end of added string line; CF_assert(convertLogInstanceToString(instance, line, errorMessage)); //Append a line. ofstream ofs(SYSLOG_CONFIG_FILE, ios::app); ofs << line << endl; ofs.close(); _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLog& instance, string& errorMessage) { _E_; string line; ifstream ifs(SYSLOG_CONFIG_FILE); vector lines; while (getline(ifs, line)) { vector tokens; //Don't write if (isAvailableLine(line, tokens) && tokens[1] == instance.InstanceID) continue; lines.push_back(line); } ifs.close(); //Rewrinting the syslog configuation file. ofstream ofs(SYSLOG_CONFIG_FILE, ios::trunc); for (vector::size_type i = 0; lines.size() > i; ++i) { ofs << lines[i] << endl; } ofs.close(); _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_RequestStateChange(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLog& instance, unsigned int& returnValue, const OpenDRIM_RecordLog_RequestStateChange_In& in, OpenDRIM_RecordLog_RequestStateChange_Out& out, string& errorMessage) { _E_; _L_; return NOT_SUPPORTED; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_ClearLog(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLog& instance, unsigned int& returnValue, string& errorMessage) { _E_; string logfile; instance.getInstanceID(logfile); if (!CF_isExist(logfile)) { returnValue = 0; return OK; } string stdOut; int errorCode = CF_runCommandFL("/bin/echo > " + logfile, stdOut, errorMessage); if (errorCode != OK) { returnValue = 4; return OK; } returnValue = 0; _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_populate(OpenDRIM_RecordLog& instance, vector& tokens, string& errorMessage) { _E_; /* * Properties to fill from profile * + Mandatory: * [X] InstanceID [KEY] * [X] MaxNumberOfRecords * [X] LogState * [X] OverwritePolicy * [X] RequestedState * [X] EnabledState * [X] OperationalStatus * [X] HealthState * [X] ElementName * + Others: * [-] AvailableRequestedStates * [X] CurrentNumberOfRecords * [-] StatusDescriptions * [X] TimeOfLastStateChange */ instance.setElementName(tokens[1]); // Extract the facilities and the severities vector Facilities; vector Severities; // Split into substrings using ';' as a delimiter vector facility_severity; CF_splitText(facility_severity, tokens[0], ';'); for (size_t j=0; j facility_severity_element; CF_splitText(facility_severity_element, facility_severity[j], '.'); if (facility_severity_element.size()!=2 || facility_severity_element[1].size()<1) { return FAILED; } // 0: This severity and higher severities // 1: Only this severity // 2: All but this severity unsigned char severity_selection=0; if (facility_severity_element[1][0]=='=') { severity_selection=1; facility_severity_element[1].erase(0,1); } else if (facility_severity_element[1][0]=='!') { severity_selection=2; facility_severity_element[1].erase(0,1); } vector facility_elements; CF_splitText(facility_elements, facility_severity_element[0], ','); // Add the Severity/Facility couples for (size_t k=0; k status; status.push_back(2); instance.setOperationalStatus(status); instance.setLogState(LS_NOT_APPLICABLE); instance.setEnabledState(ES_NOT_APPLICABLE); instance.setRequestedState(RS_NOT_APPLICABLE); _L_; return OK; } // Convert facility from syslog.conf format to RFC3164 format unsigned short facilityToRFC3164(const string& syslog_conf_facility) { _E_; string low_case_facility=CF_toLowCase(syslog_conf_facility); unsigned short facility=25; for (unsigned int i=0; i& Severities, const unsigned short& RFC3164_severity, const unsigned char& severity_selection) { _E_; if (RFC3164_severity==10) { Severities.push_back(10); return 1; } if (RFC3164_severity==9) { Severities.push_back(9); return 1; } if (RFC3164_severity==8) { for (unsigned char i=0; 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_RecordLog.h" #include "OpenDRIM_RecordLogAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProviderSetInstance OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProviderModifyInstance #endif int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_init(const CMPIBroker* broker); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLog_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProviderEnumInstances(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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLog_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RecordLog instance; OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_toCPP(_broker, cop, instance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLog_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProviderSetInstance(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_RecordLog newInstance, oldInstance; OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_toCPP(_broker, ci, newInstance); OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLog_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLog_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RecordLog instance; OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_toCPP(_broker, ci, instance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_RecordLog_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLog_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLog_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RecordLog instance; OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_toCPP(_broker, cop, instance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLog_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLog_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } //CMPIAcessor - example implementation static CMPIData accessor(const char* propertyName, void* param) { CMPIInstance* inst = (CMPIInstance*) param; return CMGetProperty(inst, propertyName, NULL); } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProviderExecQuery(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref, const char* lang, const char* query) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; string errorMessage; CMPISelectExp* selectExp; CMPISelectCond* cond; CMPIString* str; int errorCode; CMPICount cond_count; vector instances; selectExp = CMNewSelectExp(_broker, query, lang, NULL, &rc); if (selectExp == NULL || rc.rc != CMPI_RC_OK) goto EXIT; errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_retrieve(_broker, ctx, instances, NULL, errorMessage, "ei"); if (errorCode != OK) { CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); goto EXIT; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_toCMPIInstance(_broker, instances[i]); //if you want to use a CMPIAccessor, modify here. if (selectExp->ft->evaluate(selectExp, ci, &rc)) //if (selectExp->ft->evaluateUsingAccessor(selectExp, accessor, (void*)ci, &rc)) CMReturnInstance(rslt, ci); } CMReturnDone(rslt); EXIT: if (rc.rc != CMPI_RC_OK) { errorMessage = (string) OpenDRIM_RecordLog_classnames[0] + ":" + (string) CMGetCharPtr(rc.msg); CMSetStatusWithChars(_broker, &rc, rc.rc, errorMessage.c_str()); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End of Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Method Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProviderMethodCleanup(CMPIMethodMI * mi, const CMPIContext * ctx, CMPIBoolean terminate) { _E_; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProviderInvokeMethod(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_RecordLog instance; OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_toCPP(_broker, ref, instance); string errorMessage; const char* properties[] = {"InstanceID"}; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLog_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } if ((string) methodName =="RequestStateChange") { unsigned int returnValue; OpenDRIM_RecordLog_RequestStateChange_In inArgs; OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_toCPP(_broker, in, inArgs); OpenDRIM_RecordLog_RequestStateChange_Out outArgs; errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_RequestStateChange(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLog_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else if ((string) methodName =="ClearLog") { unsigned int returnValue; errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_ClearLog(_broker, ctx, instance, returnValue, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLog_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else { errorMessage = (string) OpenDRIM_RecordLog_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 OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_init FAILED: " + (string) OpenDRIM_RecordLog_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_unload(errorMessage); if (errorCode != OK) { errorMessage += "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_unload FAILED: " + (string) OpenDRIM_RecordLog_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_INIT if (OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_init(_broker) < 0) return NULL CMInstanceMIStub(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProvider, OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProvider, _broker, OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_INIT); CMMethodMIStub(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProvider, OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProvider, _broker, OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLog/cmpiOpenDRIM_RecordLog.h0000644000175000017500000000502511377667353027425 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_RECORDLOG_H_ #define CMPIOPENDRIM_RECORDLOG_H_ #include "OpenDRIM_RecordLog.h" CMPIObjectPath* OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_RecordLog& instance); CMPIInstance* OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_RecordLog& instance); void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_RecordLog& instance); void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_RecordLog& instance); void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_RecordLog_RequestStateChange_In& args); void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_RecordLog_RequestStateChange_Out& args); #endif /*CMPIOPENDRIM_RECORDLOG_H_*/ opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLog/OpenDRIM_RecordLogAccess.h0000644000175000017500000000677711377667353027715 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_RECORDLOGACCESS_H_ #define OPENDRIM_RECORDLOGACCESS_H_ #include "OpenDRIM_RecordLogPackage_Common.h" #include "OpenDRIM_RecordLog.h" int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_load(const CMPIBroker* broker, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_unload(string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_RecordLog& instance, const char** properties, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLog& newInstance, const OpenDRIM_RecordLog& oldInstance, const char** properties, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLog& instance, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLog& instance, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_RequestStateChange(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLog& instance, unsigned int& returnValue, const OpenDRIM_RecordLog_RequestStateChange_In& in, OpenDRIM_RecordLog_RequestStateChange_Out& out, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_ClearLog(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLog& instance, unsigned int& returnValue, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_populate(OpenDRIM_RecordLog& instance, vector& lines, string& errorMessage); #endif /*OPENDRIM_RECORDLOGACCESS_H_*/ opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLog/OpenDRIM_RecordLog.h0000644000175000017500000003303311377667353026554 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_RECORDLOG_H_ #define OPENDRIM_RECORDLOG_H_ #include const static char* OpenDRIM_RecordLog_classnames[] = {"OpenDRIM_RecordLog"}; static string OpenDRIM_RecordLog_NAMESPACE = _NAMESPACE; class OpenDRIM_RecordLog { 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; 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; unsigned long long MaxNumberOfRecords; bool MaxNumberOfRecords_isNULL; unsigned long long CurrentNumberOfRecords; bool CurrentNumberOfRecords_isNULL; unsigned short LogState; bool LogState_isNULL; unsigned short OverwritePolicy; bool OverwritePolicy_isNULL; string InstanceID; bool InstanceID_isNULL; vector Facility; bool Facility_isNULL; vector Severity; bool Severity_isNULL; OpenDRIM_RecordLog() { 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; EnabledState_isNULL = true; OtherEnabledState_isNULL = true; RequestedState_isNULL = true; EnabledDefault_isNULL = true; TimeOfLastStateChange_isNULL = true; AvailableRequestedStates_isNULL = true; TransitioningToState_isNULL = true; MaxNumberOfRecords_isNULL = true; CurrentNumberOfRecords_isNULL = true; LogState_isNULL = true; OverwritePolicy_isNULL = true; InstanceID_isNULL = true; Facility_isNULL = true; Severity_isNULL = true; } ~OpenDRIM_RecordLog() {} 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 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 getMaxNumberOfRecords(unsigned long long& value) const { if (MaxNumberOfRecords_isNULL==true) return NOT_FOUND; value = MaxNumberOfRecords; return OK; } int setMaxNumberOfRecords(const unsigned long long& newValue) { MaxNumberOfRecords = newValue; MaxNumberOfRecords_isNULL = false; return OK; } int getCurrentNumberOfRecords(unsigned long long& value) const { if (CurrentNumberOfRecords_isNULL==true) return NOT_FOUND; value = CurrentNumberOfRecords; return OK; } int setCurrentNumberOfRecords(const unsigned long long& newValue) { CurrentNumberOfRecords = newValue; CurrentNumberOfRecords_isNULL = false; return OK; } int getLogState(unsigned short& value) const { if (LogState_isNULL==true) return NOT_FOUND; value = LogState; return OK; } int setLogState(const unsigned short& newValue) { LogState = newValue; LogState_isNULL = false; return OK; } int getOverwritePolicy(unsigned short& value) const { if (OverwritePolicy_isNULL==true) return NOT_FOUND; value = OverwritePolicy; return OK; } int setOverwritePolicy(const unsigned short& newValue) { OverwritePolicy = newValue; OverwritePolicy_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 getFacility(vector& value) const { if (Facility_isNULL==true) return NOT_FOUND; value = Facility; return OK; } int setFacility(const vector& newValue) { Facility = newValue; Facility_isNULL = false; return OK; } int getSeverity(vector& value) const { if (Severity_isNULL==true) return NOT_FOUND; value = Severity; return OK; } int setSeverity(const vector& newValue) { Severity = newValue; Severity_isNULL = false; return OK; } }; class OpenDRIM_RecordLog_RequestStateChange_In { public: unsigned short RequestedState; bool RequestedState_isNULL; Objectpath Job; bool Job_isNULL; string TimeoutPeriod; bool TimeoutPeriod_isNULL; OpenDRIM_RecordLog_RequestStateChange_In() { RequestedState_isNULL = true; Job_isNULL = true; TimeoutPeriod_isNULL = true; } ~OpenDRIM_RecordLog_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_RecordLog_RequestStateChange_Out { public: Objectpath Job; bool Job_isNULL; OpenDRIM_RecordLog_RequestStateChange_Out() { Job_isNULL = true; } ~OpenDRIM_RecordLog_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_RECORDLOG_H_*/ opendrim-lmp-recordlog-1.1.2~ppa/TODO0000644000175000017500000000010111377667353020227 0ustar guillaumeguillaumeTODO for Major.Minor.Revision ========================= // TODO opendrim-lmp-recordlog-1.1.2~ppa/INSTALL0000644000175000017500000000674311377667353020612 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 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-recordlog-1.1.2~ppa/AUTHORS0000644000175000017500000000017411377667353020621 0ustar guillaumeguillaumeIlsoo Byun Guillaume BOTTEX opendrim-lmp-recordlog-1.1.2~ppa/packaging/0000755000175000017500000000000011377667353021473 5ustar guillaumeguillaumeopendrim-lmp-recordlog-1.1.2~ppa/packaging/debian/0000755000175000017500000000000011404317641022674 5ustar guillaumeguillaumeopendrim-lmp-recordlog-1.1.2~ppa/packaging/debian/postrm0000644000175000017500000000265111404317641024147 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_RecordLogCapabilities rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_RecordLog rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_LogManagesRecord rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_UseOfLog rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_RecordLogProfile rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_RecordLogConformsToProfile rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_LogEntry rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_RecordLogToCapabilities ;; 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-recordlog-1.1.2~ppa/packaging/debian/source/0000755000175000017500000000000011400644641024173 5ustar guillaumeguillaumeopendrim-lmp-recordlog-1.1.2~ppa/packaging/debian/source/format0000644000175000017500000000001411377670647025423 0ustar guillaumeguillaume3.0 (quilt) opendrim-lmp-recordlog-1.1.2~ppa/packaging/debian/copyright0000644000175000017500000000302311377667353024646 0ustar guillaumeguillaumeThis package was debianized by Guillaume BOTTEX on Wed, 19 Aug 2009 17:08:36 +0900. It was downloaded from http://opendrim.sourceforge.net/ Upstream Authors: Ilsoo Byun Guillaume BOTTEX Copyright: Copyright (C) 2007 ETRI Ilsoo Byun Copyright (C) 2009 ETRI Guillaume BOTTEX License: Linux Management Providers (LMP), Record Log 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-recordlog-1.1.2~ppa/packaging/debian/control0000644000175000017500000000130211404317620024270 0ustar guillaumeguillaumeSource: opendrim-lmp-recordlog 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-recordlog Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, sfcb, libopendrim0 (>= 1.1.3), swatch Description: OpenDRIM Record Log provider Provides information about the computer system's logs capabilities and entries. . Compliant with the DMTF Record Log Profile v1.0.1 (DSP1010). opendrim-lmp-recordlog-1.1.2~ppa/packaging/debian/prerm0000644000175000017500000000244711377667353023774 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-recordlog VERSION=`cat /usr/share/doc/opendrim-lmp-recordlog/VERSION` OPENDRIM_REG_DIR=/usr/share/OpenDRIM PROVIDER_SCRIPT_POST=OpenDRIM_RecordLogPackage $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-recordlog-1.1.2~ppa/packaging/debian/changelog0000644000175000017500000000052211404317426024546 0ustar guillaumeguillaumeopendrim-lmp-recordlog (1.1.2-0ubuntu1) lucid; urgency=low * New upstream version -- Guillaume BOTTEX Fri, 11 Jun 2010 11:27:00 +0900 opendrim-lmp-recordlog (1.1.1-0ubuntu1) karmic; urgency=low * Initial release -- Guillaume BOTTEX Wed, 19 Aug 2009 17:08:36 +0900 opendrim-lmp-recordlog-1.1.2~ppa/packaging/debian/postinst0000644000175000017500000000262411377667353024527 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-recordlog VERSION=`cat /usr/share/doc/opendrim-lmp-recordlog/VERSION` OPENDRIM_REG_DIR=/usr/share/OpenDRIM PROVIDER_SCRIPT_POST=OpenDRIM_RecordLogPackage $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-recordlog-1.1.2~ppa/packaging/debian/install0000644000175000017500000000004711377667353024307 0ustar guillaumeguillaumeusr/lib/cmpi/*.so usr/share/OpenDRIM/* opendrim-lmp-recordlog-1.1.2~ppa/packaging/debian/rules0000755000175000017500000000355511377667353024005 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-recordlog 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-recordlog.sgml > opendrim-lmp-recordlog.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-recordlog-1.1.2~ppa/packaging/debian/docs0000644000175000017500000000003111377667353023562 0ustar guillaumeguillaumeNEWS README TODO VERSION opendrim-lmp-recordlog-1.1.2~ppa/packaging/debian/compat0000644000175000017500000000000211377667353024113 0ustar guillaumeguillaume5 opendrim-lmp-recordlog-1.1.2~ppa/packaging/opendrim-lmp-recordlog.spec0000644000175000017500000001000311377667353026722 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2008 Guillaume BOTTEX, ETRI # # 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 , , ################################################################################ %define packageVersion 1 Version: %{version} Release: %{packageVersion}%{?dist} Vendor: OpenDRIM Summary: OpenDRIM OpenDRIM_RecordLogPackage Provider Name: opendrim-lmp-recordlog 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, swatch, coreutils, cat %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 OpenDRIM_RecordLogPackage %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-recordlog-1.1.2~ppa/OpenDRIM_RecordLogToCapabilities/0000755000175000017500000000000011377667353025701 5ustar guillaumeguillaumeopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogToCapabilities/Makefile.am0000644000175000017500000000527711377667353027750 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProvider.la libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProvider_la_SOURCES = OpenDRIM_RecordLogToCapabilitiesAccess.cpp OpenDRIM_RecordLogToCapabilitiesProvider.cpp cmpiOpenDRIM_RecordLogToCapabilities.cpp assocOpenDRIM_RecordLogToCapabilities.cpp # May have to be adjusted for direct invocation libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProvider_la_CPPFLAGS = -I../CIM_Capabilities -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProvider_la_LIBADD = ../Common/libcmpiOpenDRIM_RecordLogPackage_Common.la #../CIM_Capabilities/libcmpiOpenDRIM_RecordLogPackage_CIM_CapabilitiesProvider.la ../CIM_ManagedElement/libcmpiOpenDRIM_RecordLogPackage_CIM_ManagedElementProvider.la libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_RecordLogToCapabilities.h OpenDRIM_RecordLogToCapabilities.h OpenDRIM_RecordLogToCapabilitiesAccess.h ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogToCapabilities/cmpiOpenDRIM_RecordLogToCapabilities.hopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogToCapabilities/cmpiOpenDRIM_RecordLogToCapabiliti0000644000175000017500000000460711377667353034306 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_RECORDLOGTOCAPABILITIES_H_ #define CMPIOPENDRIM_RECORDLOGTOCAPABILITIES_H_ #include "OpenDRIM_RecordLogToCapabilities.h" CMPIObjectPath* OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_RecordLogToCapabilities& instance); CMPIInstance* OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_RecordLogToCapabilities& instance); void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_RecordLogToCapabilities& instance); void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_RecordLogToCapabilities& instance); #endif /*CMPIOPENDRIM_RECORDLOGTOCAPABILITIES_H_*/ ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogToCapabilities/assocOpenDRIM_RecordLogToCapabilities.hopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogToCapabilities/assocOpenDRIM_RecordLogToCapabilit0000644000175000017500000000652511377667353034316 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ASSOCOPENDRIM_RECORDLOGTOCAPABILITIES_H_ #define ASSOCOPENDRIM_RECORDLOGTOCAPABILITIES_H_ #include "OpenDRIM_RecordLogToCapabilitiesAccess.h" int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_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 OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_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 OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_enumerateCapabilitiess(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_getCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_enumerateManagedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_getManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_RECORDLOGTOCAPABILITIES_H_*/ ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogToCapabilities/cmpiOpenDRIM_RecordLogToCapabilities.cppopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogToCapabilities/cmpiOpenDRIM_RecordLogToCapabiliti0000644000175000017500000000700711377667353034303 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_RecordLogToCapabilities.h" CMPIObjectPath* OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_RecordLogToCapabilities& instance) { _E_; Objectpath op(broker, OpenDRIM_RecordLogToCapabilities_classnames[0], OpenDRIM_RecordLogToCapabilities_NAMESPACE); if (!instance.ManagedElement_isNULL) op.addKey("ManagedElement", instance.ManagedElement); if (!instance.Capabilities_isNULL) op.addKey("Capabilities", instance.Capabilities); _L_; return op.getHdl(); } CMPIInstance* OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_RecordLogToCapabilities& instance) { _E_; Objectpath op(broker, OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Characteristics_isNULL) ci.setProperty("Characteristics", instance.Characteristics); _L_; return ci.getHdl(); } void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_RecordLogToCapabilities& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("Capabilities", instance.Capabilities) == OK) instance.Capabilities_isNULL = false; if (op.getKey("ManagedElement", instance.ManagedElement) == OK) instance.ManagedElement_isNULL = false; _L_; } void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_RecordLogToCapabilities& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("ManagedElement", instance.ManagedElement) == OK) instance.ManagedElement_isNULL = false; if (inst.getProperty("Capabilities", instance.Capabilities) == OK) instance.Capabilities_isNULL = false; if (inst.getProperty("Characteristics", instance.Characteristics) == OK) instance.Characteristics_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogToCapabilities/OpenDRIM_RecordLogToCapabilitiesAccess.cppopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogToCapabilities/OpenDRIM_RecordLogToCapabilitiesAc0000644000175000017500000002706611377667353034235 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_RecordLogToCapabilitiesAccess.h" int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(OpenDRIM_RecordLogPackage_CIM_Capabilities_load(broker, errorMessage)); CF_assert(OpenDRIM_RecordLogPackage_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(OpenDRIM_RecordLogPackage_CIM_Capabilities_unload(errorMessage)); CF_assert(OpenDRIM_RecordLogPackage_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_isAssociated(const Instance& Capabilities, const Instance& ManagedElement, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_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(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_enumerateCapabilitiess(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(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_enumerateCapabilitiess(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; OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), Capabilities_classnames[0], ManagedElement_classnames[0], Capabilities_role.c_str(), ManagedElement_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_referenceCapabilitiesToManagedElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_RecordLogToCapabilities& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath Capabilities_objectpath; instance.getCapabilities(Capabilities_objectpath); Instance Capabilities_instance; CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_getCapabilities(broker, ctx, Capabilities_objectpath, Capabilities_instance, NULL, errorMessage)); Objectpath ManagedElement_objectpath; instance.getManagedElement(ManagedElement_objectpath); Instance ManagedElement_instance; CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_getManagedElement(broker, ctx, ManagedElement_objectpath, ManagedElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_isAssociated(Capabilities_instance, ManagedElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_populate(instance, errorMessage)); _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLogToCapabilities& newInstance, const OpenDRIM_RecordLogToCapabilities& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLogToCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLogToCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_associatorCapabilitiesToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Capabilities_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(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_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(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); } for (size_t i=0; i& Capabilities_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector Capabilities_instances; if (discriminant=="a") CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_enumerateCapabilitiess(broker, ctx, Capabilities_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_enumerateCapabilitiess(broker, ctx, Capabilities_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(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_enumerateCapabilitiess(broker, ctx, Capabilities_instances, properties, false, errorMessage)); } for (size_t i=0; i& ManagedElement_instances, vector& OpenDRIM_RecordLogToCapabilities_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_RecordLogToCapabilities instance; instance.setCapabilities(((Instance) Capabilities_instance).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instances[i]).getObjectpath()); if (discriminant == "r") { CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_populate(instance, errorMessage)); } OpenDRIM_RecordLogToCapabilities_instances.push_back(instance); } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_referenceManagedElementToCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& Capabilities_instances, vector& OpenDRIM_RecordLogToCapabilities_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 < Capabilities_instances.size(); i++) { OpenDRIM_RecordLogToCapabilities instance; instance.setCapabilities(((Instance) Capabilities_instances[i]).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instance).getObjectpath()); if (discriminant == "r") { CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_populate(instance, errorMessage)); } OpenDRIM_RecordLogToCapabilities_instances.push_back(instance); } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_populate(OpenDRIM_RecordLogToCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogToCapabilities/OpenDRIM_RecordLogToCapabilitiesProvider.cppopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogToCapabilities/OpenDRIM_RecordLogToCapabilitiesPr0000644000175000017500000004502011377667353034261 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_RecordLogToCapabilities.h" #include "OpenDRIM_RecordLogToCapabilitiesAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProviderSetInstance OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProviderModifyInstance #endif int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_init(const CMPIBroker* broker); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogToCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProviderEnumInstances(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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogToCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RecordLogToCapabilities instance; OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogToCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProviderSetInstance(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_RecordLogToCapabilities newInstance, oldInstance; OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_toCPP(_broker, ci, newInstance); OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogToCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogToCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RecordLogToCapabilities instance; OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_toCPP(_broker, ci, instance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_RecordLogToCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogToCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogToCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RecordLogToCapabilities instance; OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogToCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogToCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProviderExecQuery(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 OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProviderAssociatorNames(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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogToCapabilities_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 OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProviderAssociators(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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogToCapabilities_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 OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProviderReferenceNames(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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogToCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_referenceCapabilitiesToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_referenceManagedElementToCapabilities(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogToCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProviderReferences(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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogToCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_referenceCapabilitiesToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_referenceManagedElementToCapabilities(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogToCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_init FAILED: " + (string) OpenDRIM_RecordLogToCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_unload(errorMessage); if (errorCode != OK) { errorMessage += "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_unload FAILED: " + (string) OpenDRIM_RecordLogToCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_INIT if (OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_init(_broker) < 0) return NULL CMInstanceMIStub(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProvider, OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProvider, _broker, OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_INIT); CMAssociationMIStub(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProvider, OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProvider, _broker, OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogToCapabilities/assocOpenDRIM_RecordLogToCapabilities.cppopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogToCapabilities/assocOpenDRIM_RecordLogToCapabilit0000644000175000017500000002215111377667353034307 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "assocOpenDRIM_RecordLogToCapabilities.h" int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_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, "Capabilities") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "ManagedElement") != 0) return OK; CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_associatorCapabilitiesToManagedElement(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "ManagedElement") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "Capabilities") != 0) return OK; CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_associatorManagedElementToCapabilities(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_enumerateCapabilitiess(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, Capabilities_NAMESPACE, Capabilities_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(OpenDRIM_RecordLogPackage_CIM_Capabilities_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(OpenDRIM_RecordLogPackage_CIM_Capabilities_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, OpenDRIM_RecordLogPackage_CIM_Capabilities_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_getCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Capabilities_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Capabilities_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_Capabilities _instance; OpenDRIM_RecordLogPackage_CIM_Capabilities_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(OpenDRIM_RecordLogPackage_CIM_Capabilities_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, OpenDRIM_RecordLogPackage_CIM_Capabilities_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_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(OpenDRIM_RecordLogPackage_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(OpenDRIM_RecordLogPackage_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, OpenDRIM_RecordLogPackage_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_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; OpenDRIM_RecordLogPackage_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(OpenDRIM_RecordLogPackage_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, OpenDRIM_RecordLogPackage_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogToCapabilities/OpenDRIM_RecordLogToCapabilitiesAccess.hopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogToCapabilities/OpenDRIM_RecordLogToCapabilitiesAc0000644000175000017500000001133311377667353034223 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_RECORDLOGTOCAPABILITIESACCESS_H_ #define OPENDRIM_RECORDLOGTOCAPABILITIESACCESS_H_ #include "OpenDRIM_RecordLogPackage_Common.h" #include "OpenDRIM_RecordLogToCapabilities.h" #include "assocOpenDRIM_RecordLogToCapabilities.h" int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_load(const CMPIBroker* broker, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_unload(string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_RecordLogToCapabilities& instance, const char** properties, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLogToCapabilities& newInstance, const OpenDRIM_RecordLogToCapabilities& oldInstance, const char** properties, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLogToCapabilities& instance, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLogToCapabilities& instance, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_associatorCapabilitiesToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Capabilities_instance, const char** properties, vector& ManagedElement_associatedInstances, string& errorMessage, const string& discriminant); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_associatorManagedElementToCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const char** properties, vector& Capabilities_associatedInstances, string& errorMessage, const string& discriminant); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_referenceCapabilitiesToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Capabilities_instance, const vector& ManagedElement_instances, vector& OpenDRIM_RecordLogToCapabilities_instances, const char** properties, string& errorMessage, const string& discriminant); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_referenceManagedElementToCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& Capabilities_instances, vector& OpenDRIM_RecordLogToCapabilities_instances, const char** properties, string& errorMessage, const string& discriminant); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilities_populate(OpenDRIM_RecordLogToCapabilities& instance, string& errorMessage); #endif /*OPENDRIM_RECORDLOGTOCAPABILITIESACCESS_H_*/ ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogToCapabilities/OpenDRIM_RecordLogToCapabilities.hopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogToCapabilities/OpenDRIM_RecordLogToCapabilities.h0000644000175000017500000001006511377667353034206 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_RECORDLOGTOCAPABILITIES_H_ #define OPENDRIM_RECORDLOGTOCAPABILITIES_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_Capabilities.h" #include "CIM_CapabilitiesAccess.h" #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" */ const static char* OpenDRIM_RecordLogToCapabilities_classnames[] = {"OpenDRIM_RecordLogToCapabilities"}; static string OpenDRIM_RecordLogToCapabilities_NAMESPACE = _NAMESPACE; const static string Capabilities_role = "Capabilities"; const static char* Capabilities_classnames[] = {"OpenDRIM_RecordLogCapabilities"}; // CIM_EnabledLogicalElementCapabilities const static string Capabilities_NAMESPACE = _NAMESPACE; const static string ManagedElement_role = "ManagedElement"; const static char* ManagedElement_classnames[] = {"OpenDRIM_RecordLog"}; // CIM_RecordLog const static string ManagedElement_NAMESPACE = _NAMESPACE; class OpenDRIM_RecordLogToCapabilities { public: Objectpath ManagedElement; bool ManagedElement_isNULL; Objectpath Capabilities; bool Capabilities_isNULL; vector Characteristics; bool Characteristics_isNULL; OpenDRIM_RecordLogToCapabilities() { ManagedElement_isNULL = true; Capabilities_isNULL = true; Characteristics_isNULL = true; } ~OpenDRIM_RecordLogToCapabilities() {} string getKeys() const { return CF_toLowCase(".ManagedElement=\"" + CF_quoteString(ManagedElement.toString()) + "\""".Capabilities=\"" + CF_quoteString(Capabilities.toString()) + "\""); } 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; } int getCapabilities(Objectpath& value) const { if (Capabilities_isNULL==true) return NOT_FOUND; value = Capabilities; return OK; } int setCapabilities(const Objectpath& newValue) { Capabilities = newValue; Capabilities.setNamespace(Capabilities_NAMESPACE); Capabilities_isNULL = false; return OK; } int getCharacteristics(vector& value) const { if (Characteristics_isNULL==true) return NOT_FOUND; value = Characteristics; return OK; } int setCharacteristics(const vector& newValue) { Characteristics = newValue; Characteristics_isNULL = false; return OK; } }; #endif /*OPENDRIM_RECORDLOGTOCAPABILITIES_H_*/ opendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogConformsToProfile/0000755000175000017500000000000011377667353026417 5ustar guillaumeguillaumeopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogConformsToProfile/Makefile.am0000644000175000017500000000536211377667353030461 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ################################################################################ providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProvider.la libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProvider_la_SOURCES = OpenDRIM_RecordLogConformsToProfileAccess.cpp OpenDRIM_RecordLogConformsToProfileProvider.cpp cmpiOpenDRIM_RecordLogConformsToProfile.cpp assocOpenDRIM_RecordLogConformsToProfile.cpp # May have to be adjusted for direct invocation libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProvider_la_CPPFLAGS = -I../CIM_RegisteredProfile -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProvider_la_LIBADD = ../Common/libcmpiOpenDRIM_RecordLogPackage_Common.la #../CIM_RegisteredProfile/libcmpiOpenDRIM_RecordLogPackage_CIM_RegisteredProfileProvider.la ../CIM_ManagedElement/libcmpiOpenDRIM_RecordLogPackage_CIM_ManagedElementProvider.la libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_RecordLogConformsToProfile.h OpenDRIM_RecordLogConformsToProfile.h OpenDRIM_RecordLogConformsToProfileAccess.h ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogConformsToProfile/OpenDRIM_RecordLogConformsToProfileAccess.cppopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogConformsToProfile/OpenDRIM_RecordLogConformsToPro0000644000175000017500000002704511377667353034362 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_RecordLogConformsToProfileAccess.h" int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(OpenDRIM_RecordLogPackage_CIM_RegisteredProfile_load(broker, errorMessage)); CF_assert(OpenDRIM_RecordLogPackage_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(OpenDRIM_RecordLogPackage_CIM_RegisteredProfile_unload(errorMessage)); CF_assert(OpenDRIM_RecordLogPackage_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_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 OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_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(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_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(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_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; OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_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(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_referenceConformantStandardToManagedElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_RecordLogConformsToProfile& 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(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_getConformantStandard(broker, ctx, ConformantStandard_objectpath, ConformantStandard_instance, NULL, errorMessage)); Objectpath ManagedElement_objectpath; instance.getManagedElement(ManagedElement_objectpath); Instance ManagedElement_instance; CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_getManagedElement(broker, ctx, ManagedElement_objectpath, ManagedElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_isAssociated(ConformantStandard_instance, ManagedElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLogConformsToProfile& newInstance, const OpenDRIM_RecordLogConformsToProfile& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLogConformsToProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLogConformsToProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_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(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_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(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_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(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_enumerateConformantStandards(broker, ctx, ConformantStandard_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_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(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_enumerateConformantStandards(broker, ctx, ConformantStandard_instances, properties, false, errorMessage)); } for (size_t i=0; i& ManagedElement_instances, vector& OpenDRIM_RecordLogConformsToProfile_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_RecordLogConformsToProfile instance; instance.setConformantStandard(((Instance) ConformantStandard_instance).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instances[i]).getObjectpath()); OpenDRIM_RecordLogConformsToProfile_instances.push_back(instance); } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_referenceManagedElementToConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& ConformantStandard_instances, vector& OpenDRIM_RecordLogConformsToProfile_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_RecordLogConformsToProfile instance; instance.setConformantStandard(((Instance) ConformantStandard_instances[i]).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instance).getObjectpath()); OpenDRIM_RecordLogConformsToProfile_instances.push_back(instance); } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_populate(OpenDRIM_RecordLogConformsToProfile& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogConformsToProfile/assocOpenDRIM_RecordLogConformsToProfile.hopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogConformsToProfile/assocOpenDRIM_RecordLogConforms0000644000175000017500000000657711377667353034436 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ASSOCOPENDRIM_RECORDLOGCONFORMSTOPROFILE_H_ #define ASSOCOPENDRIM_RECORDLOGCONFORMSTOPROFILE_H_ #include "OpenDRIM_RecordLogConformsToProfileAccess.h" int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_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 OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_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 OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_enumerateConformantStandards(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_getConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_enumerateManagedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_getManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_RECORDLOGCONFORMSTOPROFILE_H_*/ ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogConformsToProfile/OpenDRIM_RecordLogConformsToProfile.hopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogConformsToProfile/OpenDRIM_RecordLogConformsToPro0000644000175000017500000000746011377667353034361 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_RECORDLOGCONFORMSTOPROFILE_H_ #define OPENDRIM_RECORDLOGCONFORMSTOPROFILE_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_RecordLogConformsToProfile_classnames[] = {"OpenDRIM_RecordLogConformsToProfile"}; static string OpenDRIM_RecordLogConformsToProfile_NAMESPACE = _INTEROP_NAMESPACE; const static string ConformantStandard_role = "ConformantStandard"; const static char* ConformantStandard_classnames[] = {"OpenDRIM_RecordLogProfile"}; //CIM_RegisteredProfile const static string ConformantStandard_NAMESPACE = _INTEROP_NAMESPACE; const static string ManagedElement_role = "ManagedElement"; const static char* ManagedElement_classnames[] = {"OpenDRIM_RecordLog"}; //CIM_RecordLog, CIM_ManagedElement const static string ManagedElement_NAMESPACE = _NAMESPACE; class OpenDRIM_RecordLogConformsToProfile { public: Objectpath ConformantStandard; bool ConformantStandard_isNULL; Objectpath ManagedElement; bool ManagedElement_isNULL; OpenDRIM_RecordLogConformsToProfile() { ConformantStandard_isNULL = true; ManagedElement_isNULL = true; } ~OpenDRIM_RecordLogConformsToProfile() {} 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_RECORDLOGCONFORMSTOPROFILE_H_*/ ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogConformsToProfile/cmpiOpenDRIM_RecordLogConformsToProfile.hopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogConformsToProfile/cmpiOpenDRIM_RecordLogConformsT0000644000175000017500000000465311377667353034373 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_RECORDLOGCONFORMSTOPROFILE_H_ #define CMPIOPENDRIM_RECORDLOGCONFORMSTOPROFILE_H_ #include "OpenDRIM_RecordLogConformsToProfile.h" CMPIObjectPath* OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_RecordLogConformsToProfile& instance); CMPIInstance* OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_RecordLogConformsToProfile& instance); void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_RecordLogConformsToProfile& instance); void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_RecordLogConformsToProfile& instance); #endif /*CMPIOPENDRIM_RECORDLOGCONFORMSTOPROFILE_H_*/ ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogConformsToProfile/OpenDRIM_RecordLogConformsToProfileProvider.cppopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogConformsToProfile/OpenDRIM_RecordLogConformsToPro0000644000175000017500000004546611377667353034371 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_RecordLogConformsToProfile.h" #include "OpenDRIM_RecordLogConformsToProfileAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProviderSetInstance OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProviderModifyInstance #endif int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_init(const CMPIBroker* broker); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProviderEnumInstances(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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RecordLogConformsToProfile instance; OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProviderSetInstance(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_RecordLogConformsToProfile newInstance, oldInstance; OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_toCPP(_broker, ci, newInstance); OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RecordLogConformsToProfile instance; OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_toCPP(_broker, ci, instance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_RecordLogConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RecordLogConformsToProfile instance; OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProviderExecQuery(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 OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProviderAssociatorNames(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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogConformsToProfile_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 OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProviderAssociators(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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogConformsToProfile_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 OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProviderReferenceNames(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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_referenceConformantStandardToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_referenceManagedElementToConformantStandard(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProviderReferences(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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_referenceConformantStandardToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_referenceManagedElementToConformantStandard(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RecordLogConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_init FAILED: " + (string) OpenDRIM_RecordLogConformsToProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_unload(errorMessage); if (errorCode != OK) { errorMessage += "OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_unload FAILED: " + (string) OpenDRIM_RecordLogConformsToProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_INIT if (OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_init(_broker) < 0) return NULL CMInstanceMIStub(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProvider, OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProvider, _broker, OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_INIT); CMAssociationMIStub(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProvider, OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProvider, _broker, OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogConformsToProfile/OpenDRIM_RecordLogConformsToProfileAccess.hopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogConformsToProfile/OpenDRIM_RecordLogConformsToPro0000644000175000017500000001153711377667353034361 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_RECORDLOGCONFORMSTOPROFILEACCESS_H_ #define OPENDRIM_RECORDLOGCONFORMSTOPROFILEACCESS_H_ #include "OpenDRIM_RecordLogPackage_Common.h" #include "OpenDRIM_RecordLogConformsToProfile.h" #include "assocOpenDRIM_RecordLogConformsToProfile.h" int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_load(const CMPIBroker* broker, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_unload(string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_RecordLogConformsToProfile& instance, const char** properties, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLogConformsToProfile& newInstance, const OpenDRIM_RecordLogConformsToProfile& oldInstance, const char** properties, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLogConformsToProfile& instance, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RecordLogConformsToProfile& instance, string& errorMessage); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_associatorConformantStandardToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ConformantStandard_instance, const char** properties, vector& ManagedElement_associatedInstances, string& errorMessage, const string& discriminant); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_associatorManagedElementToConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const char** properties, vector& ConformantStandard_associatedInstances, string& errorMessage, const string& discriminant); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_referenceConformantStandardToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ConformantStandard_instance, const vector& ManagedElement_instances, vector& OpenDRIM_RecordLogConformsToProfile_instances, const char** properties, string& errorMessage, const string& discriminant); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_referenceManagedElementToConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& ConformantStandard_instances, vector& OpenDRIM_RecordLogConformsToProfile_instances, const char** properties, string& errorMessage, const string& discriminant); int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_populate(OpenDRIM_RecordLogConformsToProfile& instance, string& errorMessage); #endif /*OPENDRIM_RECORDLOGCONFORMSTOPROFILEACCESS_H_*/ ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogConformsToProfile/cmpiOpenDRIM_RecordLogConformsToProfile.cppopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogConformsToProfile/cmpiOpenDRIM_RecordLogConformsT0000644000175000017500000000660411377667353034371 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_RecordLogConformsToProfile.h" CMPIObjectPath* OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_RecordLogConformsToProfile& instance) { _E_; Objectpath op(broker, OpenDRIM_RecordLogConformsToProfile_classnames[0], OpenDRIM_RecordLogConformsToProfile_NAMESPACE); if (!instance.ConformantStandard_isNULL) op.addKey("ConformantStandard", instance.ConformantStandard); if (!instance.ManagedElement_isNULL) op.addKey("ManagedElement", instance.ManagedElement); _L_; return op.getHdl(); } CMPIInstance* OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_RecordLogConformsToProfile& instance) { _E_; Objectpath op(broker, OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_RecordLogConformsToProfile& 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 OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_RecordLogConformsToProfile& 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_; } ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogConformsToProfile/assocOpenDRIM_RecordLogConformsToProfile.cppopendrim-lmp-recordlog-1.1.2~ppa/OpenDRIM_RecordLogConformsToProfile/assocOpenDRIM_RecordLogConforms0000644000175000017500000002244111377667353034422 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "assocOpenDRIM_RecordLogConformsToProfile.h" int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_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 = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_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(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_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(OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_associatorManagedElementToConformantStandard(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_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(OpenDRIM_RecordLogPackage_CIM_RegisteredProfile_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(OpenDRIM_RecordLogPackage_CIM_RegisteredProfile_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, OpenDRIM_RecordLogPackage_CIM_RegisteredProfile_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_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; OpenDRIM_RecordLogPackage_CIM_RegisteredProfile_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(OpenDRIM_RecordLogPackage_CIM_RegisteredProfile_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, OpenDRIM_RecordLogPackage_CIM_RegisteredProfile_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_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(OpenDRIM_RecordLogPackage_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(OpenDRIM_RecordLogPackage_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, OpenDRIM_RecordLogPackage_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfile_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; OpenDRIM_RecordLogPackage_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(OpenDRIM_RecordLogPackage_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, OpenDRIM_RecordLogPackage_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-recordlog-1.1.2~ppa/mof/0000755000175000017500000000000011377667353020330 5ustar guillaumeguillaumeopendrim-lmp-recordlog-1.1.2~ppa/mof/OpenDRIM_LogEntry.mof0000644000175000017500000000326511377667353024241 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package // Copyright (C) 2007 Ilsoo Byun, ETRI // // 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 2008 Guillaume BOTTEX, ETRI //################################################################################ [Provider("cmpi:cmpiOpenDRIM_RecordLogPackage_OpenDRIM_LogEntryProvider")] class OpenDRIM_LogEntry:CIM_LogEntry { }; opendrim-lmp-recordlog-1.1.2~ppa/mof/OpenDRIM_RecordLogProfile.mof0000644000175000017500000000331611377667353025674 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package // Copyright (C) 2007 Ilsoo Byun, ETRI // // 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 2008 Guillaume BOTTEX, ETRI //################################################################################ [Provider("cmpi:cmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProfileProvider")] class OpenDRIM_RecordLogProfile:CIM_RegisteredProfile { }; opendrim-lmp-recordlog-1.1.2~ppa/mof/OpenDRIM_LogManagesRecord.mof0000644000175000017500000000333311377667353025646 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package // Copyright (C) 2007 Ilsoo Byun, ETRI // // 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 2008 Guillaume BOTTEX, ETRI //################################################################################ [Association, Provider("cmpi:cmpiOpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProvider")] class OpenDRIM_LogManagesRecord:CIM_LogManagesRecord { }; opendrim-lmp-recordlog-1.1.2~ppa/mof/OpenDRIM_RecordLogConformsToProfile.mof0000644000175000017500000000336711377667353027714 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package // Copyright (C) 2007 Ilsoo Byun, ETRI // // 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 2008 Guillaume BOTTEX, ETRI //################################################################################ [Association, Provider("cmpi:cmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogConformsToProfileProvider")] class OpenDRIM_RecordLogConformsToProfile:CIM_ElementConformsToProfile { }; opendrim-lmp-recordlog-1.1.2~ppa/mof/OpenDRIM_RecordLogToCapabilities.mof0000644000175000017500000000335411377667353027172 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package // Copyright (C) 2007 Ilsoo Byun, ETRI // // 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 2008 Guillaume BOTTEX, ETRI //################################################################################ [Association, Provider("cmpi:cmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogToCapabilitiesProvider")] class OpenDRIM_RecordLogToCapabilities:CIM_ElementCapabilities { }; opendrim-lmp-recordlog-1.1.2~ppa/mof/OpenDRIM_UseOfLog.mof0000644000175000017500000000325011377667353024153 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package // Copyright (C) 2008 Guillaume BOTTEX, ETRI // // 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 , , //################################################################################ [Association, Provider("cmpi:cmpiOpenDRIM_RecordLogPackage_OpenDRIM_UseOfLogProvider")] class OpenDRIM_UseOfLog:CIM_UseOfLog { }; opendrim-lmp-recordlog-1.1.2~ppa/mof/OpenDRIM_RecordLog.mof0000644000175000017500000000610511377667353024352 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package // Copyright (C) 2007 Ilsoo Byun, ETRI // // 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 2008 Guillaume BOTTEX, ETRI //################################################################################ [Provider("cmpi:cmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogProvider")] class OpenDRIM_RecordLog:CIM_RecordLog { [Description("The facility is the origin of the record log. It corresponds to the entity which is responsible for the generation of the entries within this record log."), ValueMap{"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "22", "23", "24", "25"}, Values{"Kernel messages", "User-level messages", "Mail system", "System daemons", "Security/authorization messages", "Messages generated internally by syslogd", "Line printer subsystem", "Network news subsystem", "UUCP subsystem", "Clock daemon", "Security/authorization messages", "FTP daemon", "NTP subsystem", "Log audit", "Log alert", "Clock daemon", "Local use 0", "Local use 1", "Local use 2", "Local use 3", "Local use 4", "Local use 5", "Local use 6", "Local use 7", "Any", "Other"}] uint16 Facility[]; [Description("The severity describes the priority level with which the entrie of this record log should be treated"), ValueMap{"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}, Values{"Emergency: system is unusable", "Alert: action must be taken immediately", "Critical: critical conditions", "Error: error conditions", "Warning: warning conditions", "Notice: normal but significant condition", "Informational: informational messages", "Debug: debug-level messages", "Any: all possible severities", "None: no severity", "Other: unknown severity"}] uint16 Severity[]; }; opendrim-lmp-recordlog-1.1.2~ppa/mof/OpenDRIM_RecordLogCapabilities.mof0000644000175000017500000000335011377667353026663 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package // Copyright (C) 2007 Ilsoo Byun, ETRI // // 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 2008 Guillaume BOTTEX, ETRI //################################################################################ [Provider("cmpi:cmpiOpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilitiesProvider")] class OpenDRIM_RecordLogCapabilities:CIM_EnabledLogicalElementCapabilities { }; opendrim-lmp-recordlog-1.1.2~ppa/COPYING0000644000175000017500000004310311377667353020603 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-recordlog-1.1.2~ppa/NEWS0000644000175000017500000000072711404317365020236 0ustar guillaumeguillaumeChanges in 1.1.2 ========================= - Code adjustement Changes in 1.1.0 ========================= Provider conformed to DMTF Record Log Profile 1.0.1 + Code update and fixes added + RPM spec file added + make pkg-src and pkg-rpm commands added Changes in 1.0.0 ========================= // TODO Changes in 0.5.0 ========================= // TODO Changes in 0.4.0 ========================= // TODO Initial Release 0.1.0 ========================= // TODO opendrim-lmp-recordlog-1.1.2~ppa/LICENSE0000644000175000017500000000304111377667353020552 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package # Copyright (C) 2007 Ilsoo Byun, ETRI # # 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 2008 Guillaume BOTTEX, ETRI ################################################################################ opendrim-lmp-recordlog-1.1.2~ppa/README0000644000175000017500000000103311377667353020424 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!