opendrim-lmp-bios-1.0.0~ppa/0000755000175000017500000000000011400645636016503 5ustar guillaumeguillaumeopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConformsToProfile/0000755000175000017500000000000011400645636024227 5ustar guillaumeguillaumeopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConformsToProfile/cmpiOpenDRIM_BIOSConformsToProfile.cpp0000644000175000017500000000621711400645636033336 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSConformsToProfile.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSConformsToProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSConformsToProfile& instance) { _E_; Objectpath op(broker, OpenDRIM_BIOSConformsToProfile_classnames[0], OpenDRIM_BIOSConformsToProfile_NAMESPACE); if (!instance.ConformantStandard_isNULL) op.addKey("ConformantStandard", instance.ConformantStandard); if (!instance.ManagedElement_isNULL) op.addKey("ManagedElement", instance.ManagedElement); _L_; return op.getHdl(); } CMPIInstance* BIOS_OpenDRIM_BIOSConformsToProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSConformsToProfile& instance) { _E_; Objectpath op(broker, BIOS_OpenDRIM_BIOSConformsToProfile_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void BIOS_OpenDRIM_BIOSConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSConformsToProfile& 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 BIOS_OpenDRIM_BIOSConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSConformsToProfile& 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_; } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConformsToProfile/OpenDRIM_BIOSConformsToProfileProvider.cppopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConformsToProfile/OpenDRIM_BIOSConformsToProfileProvider.cp0000644000175000017500000004201611400645636034015 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSConformsToProfile.h" #include "OpenDRIM_BIOSConformsToProfileAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define BIOS_OpenDRIM_BIOSConformsToProfileProviderSetInstance BIOS_OpenDRIM_BIOSConformsToProfileProviderModifyInstance #endif int BIOS_OpenDRIM_BIOSConformsToProfile_init(const CMPIBroker* broker); int BIOS_OpenDRIM_BIOSConformsToProfile_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus BIOS_OpenDRIM_BIOSConformsToProfileProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_BIOSConformsToProfile_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConformsToProfileProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConformsToProfile_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_BIOSConformsToProfile_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConformsToProfileProviderEnumInstances(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 = BIOS_OpenDRIM_BIOSConformsToProfile_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = BIOS_OpenDRIM_BIOSConformsToProfile_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConformsToProfileProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSConformsToProfile instance; BIOS_OpenDRIM_BIOSConformsToProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConformsToProfile_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = BIOS_OpenDRIM_BIOSConformsToProfile_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConformsToProfileProviderSetInstance(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_BIOSConformsToProfile newInstance, oldInstance; BIOS_OpenDRIM_BIOSConformsToProfile_toCPP(_broker, ci, newInstance); BIOS_OpenDRIM_BIOSConformsToProfile_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConformsToProfile_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSConformsToProfile_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConformsToProfileProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSConformsToProfile instance; BIOS_OpenDRIM_BIOSConformsToProfile_toCPP(_broker, ci, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConformsToProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_BIOSConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSConformsToProfile_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSConformsToProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = BIOS_OpenDRIM_BIOSConformsToProfile_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConformsToProfileProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSConformsToProfile instance; BIOS_OpenDRIM_BIOSConformsToProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConformsToProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSConformsToProfile_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConformsToProfileProviderExecQuery(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 BIOS_OpenDRIM_BIOSConformsToProfileProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_BIOSConformsToProfile_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConformsToProfileProviderAssociatorNames(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 = BIOS_OpenDRIM_BIOSConformsToProfile_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConformsToProfile_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 BIOS_OpenDRIM_BIOSConformsToProfileProviderAssociators(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 = BIOS_OpenDRIM_BIOSConformsToProfile_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConformsToProfile_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 BIOS_OpenDRIM_BIOSConformsToProfileProviderReferenceNames(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 = BIOS_OpenDRIM_BIOSConformsToProfile_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = BIOS_OpenDRIM_BIOSConformsToProfile_referenceConformantStandardToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = BIOS_OpenDRIM_BIOSConformsToProfile_referenceManagedElementToConformantStandard(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_BIOSConformsToProfile_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConformsToProfileProviderReferences(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 = BIOS_OpenDRIM_BIOSConformsToProfile_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = BIOS_OpenDRIM_BIOSConformsToProfile_referenceConformantStandardToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = BIOS_OpenDRIM_BIOSConformsToProfile_referenceManagedElementToConformantStandard(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = BIOS_OpenDRIM_BIOSConformsToProfile_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int BIOS_OpenDRIM_BIOSConformsToProfile_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConformsToProfile_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSConformsToProfile_init FAILED: " + (string) OpenDRIM_BIOSConformsToProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int BIOS_OpenDRIM_BIOSConformsToProfile_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConformsToProfile_unload(errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSConformsToProfile_unload FAILED: " + (string) OpenDRIM_BIOSConformsToProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define BIOS_OpenDRIM_BIOSConformsToProfile_INIT if (BIOS_OpenDRIM_BIOSConformsToProfile_init(_broker) < 0) return NULL CMInstanceMIStub(BIOS_OpenDRIM_BIOSConformsToProfileProvider, BIOS_OpenDRIM_BIOSConformsToProfileProvider, _broker, BIOS_OpenDRIM_BIOSConformsToProfile_INIT); CMAssociationMIStub(BIOS_OpenDRIM_BIOSConformsToProfileProvider, BIOS_OpenDRIM_BIOSConformsToProfileProvider, _broker, BIOS_OpenDRIM_BIOSConformsToProfile_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConformsToProfile/Makefile.am0000644000175000017500000000470311400645636026267 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 = libcmpiBIOS_OpenDRIM_BIOSConformsToProfileProvider.la libcmpiBIOS_OpenDRIM_BIOSConformsToProfileProvider_la_SOURCES = OpenDRIM_BIOSConformsToProfileAccess.cpp OpenDRIM_BIOSConformsToProfileProvider.cpp cmpiOpenDRIM_BIOSConformsToProfile.cpp assocOpenDRIM_BIOSConformsToProfile.cpp # May have to be adjusted for direct invocation libcmpiBIOS_OpenDRIM_BIOSConformsToProfileProvider_la_CPPFLAGS = -I../CIM_RegisteredProfile -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiBIOS_OpenDRIM_BIOSConformsToProfileProvider_la_LIBADD = ../Common/libcmpiBIOS_Common.la #../CIM_RegisteredProfile/libcmpiBIOS_CIM_RegisteredProfileProvider.la ../CIM_ManagedElement/libcmpiBIOS_CIM_ManagedElementProvider.la libcmpiBIOS_OpenDRIM_BIOSConformsToProfileProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_BIOSConformsToProfile.h OpenDRIM_BIOSConformsToProfile.h OpenDRIM_BIOSConformsToProfileAccess.h opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConformsToProfile/assocOpenDRIM_BIOSConformsToProfile.cpp0000644000175000017500000002123611400645636033514 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSConformsToProfile.h" int BIOS_OpenDRIM_BIOSConformsToProfile_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 = BIOS_OpenDRIM_BIOSConformsToProfile_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(BIOS_OpenDRIM_BIOSConformsToProfile_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(BIOS_OpenDRIM_BIOSConformsToProfile_associatorManagedElementToConformantStandard(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int BIOS_OpenDRIM_BIOSConformsToProfile_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(BIOS_CIM_RegisteredProfile_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(BIOS_CIM_RegisteredProfile_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, BIOS_CIM_RegisteredProfile_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int BIOS_OpenDRIM_BIOSConformsToProfile_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; BIOS_CIM_RegisteredProfile_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(BIOS_CIM_RegisteredProfile_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, BIOS_CIM_RegisteredProfile_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int BIOS_OpenDRIM_BIOSConformsToProfile_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(BIOS_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(BIOS_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, BIOS_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int BIOS_OpenDRIM_BIOSConformsToProfile_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; BIOS_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(BIOS_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, BIOS_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConformsToProfile/OpenDRIM_BIOSConformsToProfile.h0000644000175000017500000000717611400645636032137 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSCONFORMSTOPROFILE_H_ #define OPENDRIM_BIOSCONFORMSTOPROFILE_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_BIOSConformsToProfile_classnames[] = {"OpenDRIM_BIOSConformsToProfile"}; static string OpenDRIM_BIOSConformsToProfile_NAMESPACE = _INTEROP_NAMESPACE; const static string ConformantStandard_role = "ConformantStandard"; const static char* ConformantStandard_classnames[] = {"OpenDRIM_BIOSRegisteredProfile"}; const static string ConformantStandard_NAMESPACE = _INTEROP_NAMESPACE; const static string ManagedElement_role = "ManagedElement"; const static char* ManagedElement_classnames[] = {"OpenDRIM_BIOSElement"}; const static string ManagedElement_NAMESPACE = _NAMESPACE; class OpenDRIM_BIOSConformsToProfile { public: Objectpath ConformantStandard; bool ConformantStandard_isNULL; Objectpath ManagedElement; bool ManagedElement_isNULL; OpenDRIM_BIOSConformsToProfile() { ConformantStandard_isNULL = true; ManagedElement_isNULL = true; } ~OpenDRIM_BIOSConformsToProfile() {} 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_BIOSCONFORMSTOPROFILE_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConformsToProfile/cmpiOpenDRIM_BIOSConformsToProfile.h0000644000175000017500000000431311400645636032776 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSCONFORMSTOPROFILE_H_ #define CMPIOPENDRIM_BIOSCONFORMSTOPROFILE_H_ #include "OpenDRIM_BIOSConformsToProfile.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSConformsToProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSConformsToProfile& instance); CMPIInstance* BIOS_OpenDRIM_BIOSConformsToProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSConformsToProfile& instance); void BIOS_OpenDRIM_BIOSConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSConformsToProfile& instance); void BIOS_OpenDRIM_BIOSConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSConformsToProfile& instance); #endif /*CMPIOPENDRIM_BIOSCONFORMSTOPROFILE_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConformsToProfile/assocOpenDRIM_BIOSConformsToProfile.h0000644000175000017500000000617711400645636033170 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSCONFORMSTOPROFILE_H_ #define ASSOCOPENDRIM_BIOSCONFORMSTOPROFILE_H_ #include "OpenDRIM_BIOSConformsToProfileAccess.h" int BIOS_OpenDRIM_BIOSConformsToProfile_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 BIOS_OpenDRIM_BIOSConformsToProfile_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 BIOS_OpenDRIM_BIOSConformsToProfile_enumerateConformantStandards(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int BIOS_OpenDRIM_BIOSConformsToProfile_getConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSConformsToProfile_enumerateManagedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int BIOS_OpenDRIM_BIOSConformsToProfile_getManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_BIOSCONFORMSTOPROFILE_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConformsToProfile/OpenDRIM_BIOSConformsToProfileAccess.h0000644000175000017500000001056211400645636033252 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSCONFORMSTOPROFILEACCESS_H_ #define OPENDRIM_BIOSCONFORMSTOPROFILEACCESS_H_ #include "BIOS_Common.h" #include "OpenDRIM_BIOSConformsToProfile.h" #include "assocOpenDRIM_BIOSConformsToProfile.h" int BIOS_OpenDRIM_BIOSConformsToProfile_load(const CMPIBroker* broker, string& errorMessage); int BIOS_OpenDRIM_BIOSConformsToProfile_unload(string& errorMessage); int BIOS_OpenDRIM_BIOSConformsToProfile_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSConformsToProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BIOSConformsToProfile& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSConformsToProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSConformsToProfile& newInstance, const OpenDRIM_BIOSConformsToProfile& oldInstance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSConformsToProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSConformsToProfile& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSConformsToProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSConformsToProfile& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSConformsToProfile_associatorConformantStandardToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ConformantStandard_instance, const char** properties, vector& ManagedElement_associatedInstances, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSConformsToProfile_associatorManagedElementToConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const char** properties, vector& ConformantStandard_associatedInstances, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSConformsToProfile_referenceConformantStandardToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ConformantStandard_instance, const vector& ManagedElement_instances, vector& OpenDRIM_BIOSConformsToProfile_instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSConformsToProfile_referenceManagedElementToConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& ConformantStandard_instances, vector& OpenDRIM_BIOSConformsToProfile_instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSConformsToProfile_populate(OpenDRIM_BIOSConformsToProfile& instance, string& errorMessage); #endif /*OPENDRIM_BIOSCONFORMSTOPROFILEACCESS_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConformsToProfile/OpenDRIM_BIOSConformsToProfileAccess.cpp0000644000175000017500000002513111400645636033603 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSConformsToProfileAccess.h" int BIOS_OpenDRIM_BIOSConformsToProfile_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(BIOS_CIM_RegisteredProfile_load(broker, errorMessage)); CF_assert(BIOS_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int BIOS_OpenDRIM_BIOSConformsToProfile_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(BIOS_CIM_RegisteredProfile_unload(errorMessage)); CF_assert(BIOS_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int BIOS_OpenDRIM_BIOSConformsToProfile_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 BIOS_OpenDRIM_BIOSConformsToProfile_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(BIOS_OpenDRIM_BIOSConformsToProfile_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(BIOS_OpenDRIM_BIOSConformsToProfile_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; BIOS_OpenDRIM_BIOSConformsToProfile_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(BIOS_OpenDRIM_BIOSConformsToProfile_referenceConformantStandardToManagedElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int BIOS_OpenDRIM_BIOSConformsToProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BIOSConformsToProfile& 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(BIOS_OpenDRIM_BIOSConformsToProfile_getConformantStandard(broker, ctx, ConformantStandard_objectpath, ConformantStandard_instance, NULL, errorMessage)); Objectpath ManagedElement_objectpath; instance.getManagedElement(ManagedElement_objectpath); Instance ManagedElement_instance; CF_assert(BIOS_OpenDRIM_BIOSConformsToProfile_getManagedElement(broker, ctx, ManagedElement_objectpath, ManagedElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(BIOS_OpenDRIM_BIOSConformsToProfile_isAssociated(ConformantStandard_instance, ManagedElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int BIOS_OpenDRIM_BIOSConformsToProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSConformsToProfile& newInstance, const OpenDRIM_BIOSConformsToProfile& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSConformsToProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSConformsToProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSConformsToProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSConformsToProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSConformsToProfile_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(BIOS_OpenDRIM_BIOSConformsToProfile_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(BIOS_OpenDRIM_BIOSConformsToProfile_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(BIOS_OpenDRIM_BIOSConformsToProfile_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(BIOS_OpenDRIM_BIOSConformsToProfile_enumerateConformantStandards(broker, ctx, ConformantStandard_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(BIOS_OpenDRIM_BIOSConformsToProfile_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(BIOS_OpenDRIM_BIOSConformsToProfile_enumerateConformantStandards(broker, ctx, ConformantStandard_instances, properties, false, errorMessage)); } for (size_t i=0; i& ManagedElement_instances, vector& OpenDRIM_BIOSConformsToProfile_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_BIOSConformsToProfile instance; instance.setConformantStandard(((Instance) ConformantStandard_instance).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instances[i]).getObjectpath()); OpenDRIM_BIOSConformsToProfile_instances.push_back(instance); } _L_; return OK; } int BIOS_OpenDRIM_BIOSConformsToProfile_referenceManagedElementToConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& ConformantStandard_instances, vector& OpenDRIM_BIOSConformsToProfile_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_BIOSConformsToProfile instance; instance.setConformantStandard(((Instance) ConformantStandard_instances[i]).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instance).getObjectpath()); OpenDRIM_BIOSConformsToProfile_instances.push_back(instance); } _L_; return OK; } int BIOS_OpenDRIM_BIOSConformsToProfile_populate(OpenDRIM_BIOSConformsToProfile& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsBIOSAttribute/0000755000175000017500000000000011400645636025375 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsBIOSAttribute/cmpiOpenDRIM_ServiceAffectsBIOSAttribute.cppopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsBIOSAttribute/cmpiOpenDRIM_ServiceAffectsBIOSAttr0000644000175000017500000000734211400645636034040 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_ServiceAffectsBIOSAttribute.h" CMPIObjectPath* BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_ServiceAffectsBIOSAttribute& instance) { _E_; Objectpath op(broker, OpenDRIM_ServiceAffectsBIOSAttribute_classnames[0], OpenDRIM_ServiceAffectsBIOSAttribute_NAMESPACE); if (!instance.AffectedElement_isNULL) op.addKey("AffectedElement", instance.AffectedElement); if (!instance.AffectingElement_isNULL) op.addKey("AffectingElement", instance.AffectingElement); _L_; return op.getHdl(); } CMPIInstance* BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_ServiceAffectsBIOSAttribute& instance) { _E_; Objectpath op(broker, BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.ElementEffects_isNULL) ci.setProperty("ElementEffects", instance.ElementEffects); if (!instance.OtherElementEffectsDescriptions_isNULL) ci.setProperty("OtherElementEffectsDescriptions", instance.OtherElementEffectsDescriptions); _L_; return ci.getHdl(); } void BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_ServiceAffectsBIOSAttribute& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("AffectedElement", instance.AffectedElement) == OK) instance.AffectedElement_isNULL = false; if (op.getKey("AffectingElement", instance.AffectingElement) == OK) instance.AffectingElement_isNULL = false; _L_; } void BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_ServiceAffectsBIOSAttribute& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("AffectedElement", instance.AffectedElement) == OK) instance.AffectedElement_isNULL = false; if (inst.getProperty("AffectingElement", instance.AffectingElement) == OK) instance.AffectingElement_isNULL = false; if (inst.getProperty("ElementEffects", instance.ElementEffects) == OK) instance.ElementEffects_isNULL = false; if (inst.getProperty("OtherElementEffectsDescriptions", instance.OtherElementEffectsDescriptions) == OK) instance.OtherElementEffectsDescriptions_isNULL = false; _L_; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsBIOSAttribute/Makefile.am0000644000175000017500000000475511400645636027444 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 = libcmpiBIOS_OpenDRIM_ServiceAffectsBIOSAttributeProvider.la libcmpiBIOS_OpenDRIM_ServiceAffectsBIOSAttributeProvider_la_SOURCES = OpenDRIM_ServiceAffectsBIOSAttributeAccess.cpp OpenDRIM_ServiceAffectsBIOSAttributeProvider.cpp cmpiOpenDRIM_ServiceAffectsBIOSAttribute.cpp assocOpenDRIM_ServiceAffectsBIOSAttribute.cpp # May have to be adjusted for direct invocation libcmpiBIOS_OpenDRIM_ServiceAffectsBIOSAttributeProvider_la_CPPFLAGS = -I../CIM_ManagedElement -I../CIM_Service # Uncomment the end for direct invocation, may have to be adjusted libcmpiBIOS_OpenDRIM_ServiceAffectsBIOSAttributeProvider_la_LIBADD = ../Common/libcmpiBIOS_Common.la #../CIM_ManagedElement/libcmpiBIOS_CIM_ManagedElementProvider.la ../CIM_Service/libcmpiBIOS_CIM_ServiceProvider.la libcmpiBIOS_OpenDRIM_ServiceAffectsBIOSAttributeProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_ServiceAffectsBIOSAttribute.h OpenDRIM_ServiceAffectsBIOSAttribute.h OpenDRIM_ServiceAffectsBIOSAttributeAccess.h ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsBIOSAttribute/OpenDRIM_ServiceAffectsBIOSAttributeAccess.cppopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsBIOSAttribute/OpenDRIM_ServiceAffectsBIOSAttribut0000644000175000017500000002630111400645636034047 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_ServiceAffectsBIOSAttributeAccess.h" int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(BIOS_CIM_ManagedElement_load(broker, errorMessage)); CF_assert(BIOS_CIM_Service_load(broker, errorMessage)); */ // TODO _L_; return OK; } int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(BIOS_CIM_ManagedElement_unload(errorMessage)); CF_assert(BIOS_CIM_Service_unload(errorMessage)); */ // TODO _L_; return OK; } int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_isAssociated(const Instance& AffectedElement, const Instance& AffectingElement, bool& isAssociated, string& errorMessage) { _E_; // Determine if the association can be established or not isAssociated=false; if(AffectedElement.getClassname().find("OpenDRIM")==0) isAssociated=true; _L_; return OK; } int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_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(BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_enumerateAffectedElements(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(BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_enumerateAffectedElements(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; BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), AffectedElement_classnames[0], AffectingElement_classnames[0], AffectedElement_role.c_str(), AffectingElement_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_referenceAffectedElementToAffectingElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_ServiceAffectsBIOSAttribute& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath AffectedElement_objectpath; instance.getAffectedElement(AffectedElement_objectpath); Instance AffectedElement_instance; CF_assert(BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_getAffectedElement(broker, ctx, AffectedElement_objectpath, AffectedElement_instance, NULL, errorMessage)); Objectpath AffectingElement_objectpath; instance.getAffectingElement(AffectingElement_objectpath); Instance AffectingElement_instance; CF_assert(BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_getAffectingElement(broker, ctx, AffectingElement_objectpath, AffectingElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_isAssociated(AffectedElement_instance, AffectingElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } CF_assert(BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_populate(instance, errorMessage)); _L_; return OK; } int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsBIOSAttribute& newInstance, const OpenDRIM_ServiceAffectsBIOSAttribute& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsBIOSAttribute& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsBIOSAttribute& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_associatorAffectedElementToAffectingElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectedElement_instance, const char** properties, vector& AffectingElement_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector AffectingElement_instances; if (discriminant=="a") CF_assert(BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_enumerateAffectingElements(broker, ctx, AffectingElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_enumerateAffectingElements(broker, ctx, AffectingElement_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(BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_enumerateAffectingElements(broker, ctx, AffectingElement_instances, properties, false, errorMessage)); } for (size_t i=0; i& AffectedElement_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector AffectedElement_instances; if (discriminant=="a") CF_assert(BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_enumerateAffectedElements(broker, ctx, AffectedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_enumerateAffectedElements(broker, ctx, AffectedElement_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(BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_enumerateAffectedElements(broker, ctx, AffectedElement_instances, properties, false, errorMessage)); } for (size_t i=0; i& AffectingElement_instances, vector& OpenDRIM_ServiceAffectsBIOSAttribute_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 < AffectingElement_instances.size(); i++) { OpenDRIM_ServiceAffectsBIOSAttribute instance; instance.setAffectedElement(((Instance) AffectedElement_instance).getObjectpath()); instance.setAffectingElement(((Instance) AffectingElement_instances[i]).getObjectpath()); if (discriminant == "r") { CF_assert(BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_populate(instance, errorMessage)); } OpenDRIM_ServiceAffectsBIOSAttribute_instances.push_back(instance); } _L_; return OK; } int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_referenceAffectingElementToAffectedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectingElement_instance, const vector& AffectedElement_instances, vector& OpenDRIM_ServiceAffectsBIOSAttribute_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 < AffectedElement_instances.size(); i++) { OpenDRIM_ServiceAffectsBIOSAttribute instance; instance.setAffectedElement(((Instance) AffectedElement_instances[i]).getObjectpath()); instance.setAffectingElement(((Instance) AffectingElement_instance).getObjectpath()); if (discriminant == "r") { CF_assert(BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_populate(instance, errorMessage)); } OpenDRIM_ServiceAffectsBIOSAttribute_instances.push_back(instance); } _L_; return OK; } int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_populate(OpenDRIM_ServiceAffectsBIOSAttribute& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsBIOSAttribute/cmpiOpenDRIM_ServiceAffectsBIOSAttribute.hopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsBIOSAttribute/cmpiOpenDRIM_ServiceAffectsBIOSAttr0000644000175000017500000000442311400645636034035 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_SERVICEAFFECTSBIOSATTRIBUTE_H_ #define CMPIOPENDRIM_SERVICEAFFECTSBIOSATTRIBUTE_H_ #include "OpenDRIM_ServiceAffectsBIOSAttribute.h" CMPIObjectPath* BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_ServiceAffectsBIOSAttribute& instance); CMPIInstance* BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_ServiceAffectsBIOSAttribute& instance); void BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_ServiceAffectsBIOSAttribute& instance); void BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_ServiceAffectsBIOSAttribute& instance); #endif /*CMPIOPENDRIM_SERVICEAFFECTSBIOSATTRIBUTE_H_*/ ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsBIOSAttribute/OpenDRIM_ServiceAffectsBIOSAttributeAccess.hopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsBIOSAttribute/OpenDRIM_ServiceAffectsBIOSAttribut0000644000175000017500000001102211400645636034041 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_SERVICEAFFECTSBIOSATTRIBUTEACCESS_H_ #define OPENDRIM_SERVICEAFFECTSBIOSATTRIBUTEACCESS_H_ #include "BIOS_Common.h" #include "OpenDRIM_ServiceAffectsBIOSAttribute.h" #include "assocOpenDRIM_ServiceAffectsBIOSAttribute.h" int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_load(const CMPIBroker* broker, string& errorMessage); int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_unload(string& errorMessage); int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_ServiceAffectsBIOSAttribute& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsBIOSAttribute& newInstance, const OpenDRIM_ServiceAffectsBIOSAttribute& oldInstance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsBIOSAttribute& instance, string& errorMessage); int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsBIOSAttribute& instance, string& errorMessage); int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_associatorAffectedElementToAffectingElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectedElement_instance, const char** properties, vector& AffectingElement_associatedInstances, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_associatorAffectingElementToAffectedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectingElement_instance, const char** properties, vector& AffectedElement_associatedInstances, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_referenceAffectedElementToAffectingElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectedElement_instance, const vector& AffectingElement_instances, vector& OpenDRIM_ServiceAffectsBIOSAttribute_instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_referenceAffectingElementToAffectedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectingElement_instance, const vector& AffectedElement_instances, vector& OpenDRIM_ServiceAffectsBIOSAttribute_instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_populate(OpenDRIM_ServiceAffectsBIOSAttribute& instance, string& errorMessage); #endif /*OPENDRIM_SERVICEAFFECTSBIOSATTRIBUTEACCESS_H_*/ ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsBIOSAttribute/OpenDRIM_ServiceAffectsBIOSAttributeProvider.cppopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsBIOSAttribute/OpenDRIM_ServiceAffectsBIOSAttribut0000644000175000017500000004304611400645636034054 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_ServiceAffectsBIOSAttribute.h" #include "OpenDRIM_ServiceAffectsBIOSAttributeAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define BIOS_OpenDRIM_ServiceAffectsBIOSAttributeProviderSetInstance BIOS_OpenDRIM_ServiceAffectsBIOSAttributeProviderModifyInstance #endif int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_init(const CMPIBroker* broker); int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus BIOS_OpenDRIM_ServiceAffectsBIOSAttributeProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_ServiceAffectsBIOSAttributeProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBIOSAttribute_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_ServiceAffectsBIOSAttributeProviderEnumInstances(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 = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBIOSAttribute_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_ServiceAffectsBIOSAttributeProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ServiceAffectsBIOSAttribute instance; BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBIOSAttribute_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_ServiceAffectsBIOSAttributeProviderSetInstance(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_ServiceAffectsBIOSAttribute newInstance, oldInstance; BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_toCPP(_broker, ci, newInstance); BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBIOSAttribute_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBIOSAttribute_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_ServiceAffectsBIOSAttributeProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ServiceAffectsBIOSAttribute instance; BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_toCPP(_broker, ci, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_ServiceAffectsBIOSAttribute_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBIOSAttribute_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBIOSAttribute_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_ServiceAffectsBIOSAttributeProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ServiceAffectsBIOSAttribute instance; BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBIOSAttribute_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBIOSAttribute_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_ServiceAffectsBIOSAttributeProviderExecQuery(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 BIOS_OpenDRIM_ServiceAffectsBIOSAttributeProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_ServiceAffectsBIOSAttributeProviderAssociatorNames(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 = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBIOSAttribute_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 BIOS_OpenDRIM_ServiceAffectsBIOSAttributeProviderAssociators(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 = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBIOSAttribute_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 BIOS_OpenDRIM_ServiceAffectsBIOSAttributeProviderReferenceNames(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 = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBIOSAttribute_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_referenceAffectedElementToAffectingElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_referenceAffectingElementToAffectedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBIOSAttribute_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus BIOS_OpenDRIM_ServiceAffectsBIOSAttributeProviderReferences(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 = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBIOSAttribute_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_referenceAffectedElementToAffectingElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_referenceAffectingElementToAffectedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsBIOSAttribute_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_init FAILED: " + (string) OpenDRIM_ServiceAffectsBIOSAttribute_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_unload(errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_unload FAILED: " + (string) OpenDRIM_ServiceAffectsBIOSAttribute_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_INIT if (BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_init(_broker) < 0) return NULL CMInstanceMIStub(BIOS_OpenDRIM_ServiceAffectsBIOSAttributeProvider, BIOS_OpenDRIM_ServiceAffectsBIOSAttributeProvider, _broker, BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_INIT); CMAssociationMIStub(BIOS_OpenDRIM_ServiceAffectsBIOSAttributeProvider, BIOS_OpenDRIM_ServiceAffectsBIOSAttributeProvider, _broker, BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsBIOSAttribute/assocOpenDRIM_ServiceAffectsBIOSAttribute.cppopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsBIOSAttribute/assocOpenDRIM_ServiceAffectsBIOSAtt0000644000175000017500000002123611400645636034034 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_ServiceAffectsBIOSAttribute.h" int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_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 = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_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, "AffectedElement") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "AffectingElement") != 0) return OK; CF_assert(BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_associatorAffectedElementToAffectingElement(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "AffectingElement") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "AffectedElement") != 0) return OK; CF_assert(BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_associatorAffectingElementToAffectedElement(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_enumerateAffectedElements(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, AffectedElement_NAMESPACE, AffectedElement_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(BIOS_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(BIOS_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, BIOS_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_getAffectedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), AffectedElement_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), AffectedElement_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ManagedElement _instance; BIOS_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(BIOS_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, BIOS_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_enumerateAffectingElements(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, AffectingElement_NAMESPACE, AffectingElement_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(BIOS_CIM_Service_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(BIOS_CIM_Service_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, BIOS_CIM_Service_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_getAffectingElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), AffectingElement_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), AffectingElement_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_Service _instance; BIOS_CIM_Service_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(BIOS_CIM_Service_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, BIOS_CIM_Service_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsBIOSAttribute/assocOpenDRIM_ServiceAffectsBIOSAttribute.hopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsBIOSAttribute/assocOpenDRIM_ServiceAffectsBIOSAtt0000644000175000017500000000627111400645636034036 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_SERVICEAFFECTSBIOSATTRIBUTE_H_ #define ASSOCOPENDRIM_SERVICEAFFECTSBIOSATTRIBUTE_H_ #include "OpenDRIM_ServiceAffectsBIOSAttributeAccess.h" int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_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 BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_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 BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_enumerateAffectedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_getAffectedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_enumerateAffectingElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_getAffectingElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_SERVICEAFFECTSBIOSATTRIBUTE_H_*/ ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsBIOSAttribute/OpenDRIM_ServiceAffectsBIOSAttribute.hopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsBIOSAttribute/OpenDRIM_ServiceAffectsBIOSAttribut0000644000175000017500000001104511400645636034046 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_SERVICEAFFECTSBIOSATTRIBUTE_H_ #define OPENDRIM_SERVICEAFFECTSBIOSATTRIBUTE_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" #include "cmpiCIM_Service.h" #include "CIM_ServiceAccess.h" */ const static char* OpenDRIM_ServiceAffectsBIOSAttribute_classnames[] = {"OpenDRIM_ServiceAffectsBIOSAttribute"}; static string OpenDRIM_ServiceAffectsBIOSAttribute_NAMESPACE = _NAMESPACE; const static string AffectedElement_role = "AffectedElement"; const static char* AffectedElement_classnames[] = {"CIM_BIOSAttribute"}; const static string AffectedElement_NAMESPACE = _NAMESPACE; const static string AffectingElement_role = "AffectingElement"; const static char* AffectingElement_classnames[] = {"OpenDRIM_BIOSService"}; const static string AffectingElement_NAMESPACE = _NAMESPACE; class OpenDRIM_ServiceAffectsBIOSAttribute { public: Objectpath AffectedElement; bool AffectedElement_isNULL; Objectpath AffectingElement; bool AffectingElement_isNULL; vector ElementEffects; bool ElementEffects_isNULL; vector OtherElementEffectsDescriptions; bool OtherElementEffectsDescriptions_isNULL; OpenDRIM_ServiceAffectsBIOSAttribute() { AffectedElement_isNULL = true; AffectingElement_isNULL = true; ElementEffects_isNULL = true; OtherElementEffectsDescriptions_isNULL = true; } ~OpenDRIM_ServiceAffectsBIOSAttribute() {} string getKeys() const { return CF_toLowCase(".AffectedElement=\"" + CF_quoteString(AffectedElement.toString()) + "\""".AffectingElement=\"" + CF_quoteString(AffectingElement.toString()) + "\""); } int getAffectedElement(Objectpath& value) const { if (AffectedElement_isNULL==true) return NOT_FOUND; value = AffectedElement; return OK; } int setAffectedElement(const Objectpath& newValue) { AffectedElement = newValue; AffectedElement.setNamespace(AffectedElement_NAMESPACE); AffectedElement_isNULL = false; return OK; } int getAffectingElement(Objectpath& value) const { if (AffectingElement_isNULL==true) return NOT_FOUND; value = AffectingElement; return OK; } int setAffectingElement(const Objectpath& newValue) { AffectingElement = newValue; AffectingElement.setNamespace(AffectingElement_NAMESPACE); AffectingElement_isNULL = false; return OK; } int getElementEffects(vector& value) const { if (ElementEffects_isNULL==true) return NOT_FOUND; value = ElementEffects; return OK; } int setElementEffects(const vector& newValue) { ElementEffects = newValue; ElementEffects_isNULL = false; return OK; } int getOtherElementEffectsDescriptions(vector& value) const { if (OtherElementEffectsDescriptions_isNULL==true) return NOT_FOUND; value = OtherElementEffectsDescriptions; return OK; } int setOtherElementEffectsDescriptions(const vector& newValue) { OtherElementEffectsDescriptions = newValue; OtherElementEffectsDescriptions_isNULL = false; return OK; } }; #endif /*OPENDRIM_SERVICEAFFECTSBIOSATTRIBUTE_H_*/ opendrim-lmp-bios-1.0.0~ppa/Makefile.am0000644000175000017500000001241711400645636020544 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 , , ################################################################################ VENDOR = OpenDRIM VERSION = $(shell cat ./VERSION) APP_NAME = opendrim-lmp-bios RPM_PACKAGE_DIR = packaging PLATFORM = $(shell rpm --eval %_target_cpu) WORKING_DIR = $(shell pwd) SUBDIRS = Common OpenDRIM_BIOSConcreteDependency OpenDRIM_BIOSPassword OpenDRIM_OrderedMemberOfBIOSCollection OpenDRIM_BIOSRegisteredProfile OpenDRIM_BIOSService OpenDRIM_BIOSConformsToProfile OpenDRIM_BIOSServiceCapabilities OpenDRIM_BIOSInteger OpenDRIM_BIOSString OpenDRIM_BIOSElement OpenDRIM_BIOSEnumeration OpenDRIM_BIOSConcreteCollection OpenDRIM_SystemBIOS OpenDRIM_ServiceAffectsComputerSystem OpenDRIM_BIOSCapabilities OpenDRIM_OwningCollectionBIOS OpenDRIM_BIOSHostedService OpenDRIM_BIOSConcreteComponent OpenDRIM_ServiceAffectsBIOSAttribute test postinstall: registration/BIOS.sh @CIMNAMESPACE@ $(VENDOR) @CIMSERVER@ @INTEROPNAMESPACE@ $(VERSION) . preuninstall: registration/BIOS-remove.sh @CIMNAMESPACE@ @CIMSERVER@ @INTEROPNAMESPACE@ . test-OpenDRIM_SystemBIOS: all make -C test test-OpenDRIM_SystemBIOS test-OpenDRIM_BIOSConcreteDependency: all make -C test test-OpenDRIM_BIOSConcreteDependency test-OpenDRIM_BIOSPassword: all make -C test test-OpenDRIM_BIOSPassword test-OpenDRIM_ServiceAffectsComputerSystem: all make -C test test-OpenDRIM_ServiceAffectsComputerSystem test-OpenDRIM_BIOSCapabilities: all make -C test test-OpenDRIM_BIOSCapabilities test-OpenDRIM_OwningCollectionBIOS: all make -C test test-OpenDRIM_OwningCollectionBIOS test-OpenDRIM_BIOSHostedService: all make -C test test-OpenDRIM_BIOSHostedService test-OpenDRIM_BIOSConcreteComponent: all make -C test test-OpenDRIM_BIOSConcreteComponent test-OpenDRIM_OrderedMemberOfBIOSCollection: all make -C test test-OpenDRIM_OrderedMemberOfBIOSCollection test-OpenDRIM_BIOSRegisteredProfile: all make -C test test-OpenDRIM_BIOSRegisteredProfile test-OpenDRIM_BIOSService: all make -C test test-OpenDRIM_BIOSService test-OpenDRIM_BIOSConformsToProfile: all make -C test test-OpenDRIM_BIOSConformsToProfile test-OpenDRIM_BIOSServiceCapabilities: all make -C test test-OpenDRIM_BIOSServiceCapabilities test-OpenDRIM_BIOSInteger: all make -C test test-OpenDRIM_BIOSInteger test-OpenDRIM_ServiceAffectsBIOSAttribute: all make -C test test-OpenDRIM_ServiceAffectsBIOSAttribute test-OpenDRIM_BIOSString: all make -C test test-OpenDRIM_BIOSString test-OpenDRIM_BIOSElement: all make -C test test-OpenDRIM_BIOSElement test-OpenDRIM_BIOSEnumeration: all make -C test test-OpenDRIM_BIOSEnumeration test-OpenDRIM_BIOSConcreteCollection: all make -C test test-OpenDRIM_BIOSConcreteCollection 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-bios-1.0.0~ppa/registration/0000755000175000017500000000000011400645636021215 5ustar guillaumeguillaumeopendrim-lmp-bios-1.0.0~ppa/registration/BIOS.sh0000755000175000017500000000610511400645636022312 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 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_SystemBIOS.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_BIOSConcreteDependency.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_BIOSPassword.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_ServiceAffectsComputerSystem.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_BIOSCapabilities.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_OwningCollectionBIOS.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_BIOSHostedService.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_BIOSConcreteComponent.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_OrderedMemberOfBIOSCollection.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_BIOSRegisteredProfile.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_BIOSService.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_BIOSConformsToProfile.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_BIOSServiceCapabilities.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_BIOSInteger.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_ServiceAffectsBIOSAttribute.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_BIOSString.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_BIOSElement.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_BIOSEnumeration.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_BIOSConcreteCollection.sh $1 $2 $3 $4 $5 $6 if test "$3" = sfcb then /etc/init.d/sfcb start fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSConformsToProfile.sh0000755000175000017500000000670611400645636027311 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSConformsToProfile.mof cimmof -aE -n $4 $6/mof/OpenDRIM_BIOSConformsToProfile.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_BIOSConformsToProfile provider module"; Name = "BIOS_OpenDRIM_BIOSConformsToProfileModule"; Location = "cmpiBIOS_OpenDRIM_BIOSConformsToProfileProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_BIOSConformsToProfile provider"; Name = "BIOS_OpenDRIM_BIOSConformsToProfileProvider"; ProviderModuleName = "BIOS_OpenDRIM_BIOSConformsToProfileModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_BIOSConformsToProfile provider capabilities"; ProviderModuleName = "BIOS_OpenDRIM_BIOSConformsToProfileModule"; ProviderName = "BIOS_OpenDRIM_BIOSConformsToProfileProvider"; ClassName = "OpenDRIM_BIOSConformsToProfile"; ProviderType = {2, 3}; Namespaces = {"$1", "$4"}; SupportedProperties = {"ConformantStandard", "ManagedElement"}; CapabilityID = "BIOS_OpenDRIM_BIOSConformsToProfile"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_BIOSConformsToProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE owmofc -u http://localhost/$4 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSConcreteComponent-remove.sh0000755000175000017500000000630211400645636030607 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 BIOS_OpenDRIM_BIOSConcreteComponentModule cimprovider -r -m BIOS_OpenDRIM_BIOSConcreteComponentModule 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_BIOSConcreteComponent.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSHostedService-remove.sh0000755000175000017500000000623211400645636027733 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 BIOS_OpenDRIM_BIOSHostedServiceModule cimprovider -r -m BIOS_OpenDRIM_BIOSHostedServiceModule 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_BIOSHostedService.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSConcreteDependency-remove.sh0000755000175000017500000000631411400645636030726 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 BIOS_OpenDRIM_BIOSConcreteDependencyModule cimprovider -r -m BIOS_OpenDRIM_BIOSConcreteDependencyModule 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_BIOSConcreteDependency.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSString-remove.sh0000755000175000017500000000611011400645636026425 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 BIOS_OpenDRIM_BIOSStringModule cimprovider -r -m BIOS_OpenDRIM_BIOSStringModule 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_BIOSString.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSConcreteDependency.sh0000755000175000017500000000643011400645636027432 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSConcreteDependency.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_BIOSConcreteDependency provider module"; Name = "BIOS_OpenDRIM_BIOSConcreteDependencyModule"; Location = "cmpiBIOS_OpenDRIM_BIOSConcreteDependencyProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_BIOSConcreteDependency provider"; Name = "BIOS_OpenDRIM_BIOSConcreteDependencyProvider"; ProviderModuleName = "BIOS_OpenDRIM_BIOSConcreteDependencyModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_BIOSConcreteDependency provider capabilities"; ProviderModuleName = "BIOS_OpenDRIM_BIOSConcreteDependencyModule"; ProviderName = "BIOS_OpenDRIM_BIOSConcreteDependencyProvider"; ClassName = "OpenDRIM_BIOSConcreteDependency"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"Antecedent", "Dependent"}; CapabilityID = "BIOS_OpenDRIM_BIOSConcreteDependency"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_BIOSConcreteDependency.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSRegisteredProfile.sh0000755000175000017500000000664111400645636027313 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 $4 $6/mof/OpenDRIM_BIOSRegisteredProfile.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_BIOSRegisteredProfile provider module"; Name = "BIOS_OpenDRIM_BIOSRegisteredProfileModule"; Location = "cmpiBIOS_OpenDRIM_BIOSRegisteredProfileProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_BIOSRegisteredProfile provider"; Name = "BIOS_OpenDRIM_BIOSRegisteredProfileProvider"; ProviderModuleName = "BIOS_OpenDRIM_BIOSRegisteredProfileModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_BIOSRegisteredProfile provider capabilities"; ProviderModuleName = "BIOS_OpenDRIM_BIOSRegisteredProfileModule"; ProviderName = "BIOS_OpenDRIM_BIOSRegisteredProfileProvider"; ClassName = "OpenDRIM_BIOSRegisteredProfile"; ProviderType = {2}; Namespaces = {"$4"}; SupportedProperties = {"Caption", "Description", "ElementName", "InstanceID", "RegisteredOrganization", "OtherRegisteredOrganization", "RegisteredName", "RegisteredVersion", "AdvertiseTypes", "AdvertiseTypeDescriptions"}; CapabilityID = "BIOS_OpenDRIM_BIOSRegisteredProfile"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_BIOSRegisteredProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$4 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_ServiceAffectsComputerSystem-remove.sh0000755000175000017500000000641011400645636032325 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 BIOS_OpenDRIM_ServiceAffectsComputerSystemModule cimprovider -r -m BIOS_OpenDRIM_ServiceAffectsComputerSystemModule 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_ServiceAffectsComputerSystem.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSCapabilities.sh0000755000175000017500000000630011400645636026256 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSCapabilities.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_BIOSCapabilities provider module"; Name = "BIOS_OpenDRIM_BIOSCapabilitiesModule"; Location = "cmpiBIOS_OpenDRIM_BIOSCapabilitiesProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_BIOSCapabilities provider"; Name = "BIOS_OpenDRIM_BIOSCapabilitiesProvider"; ProviderModuleName = "BIOS_OpenDRIM_BIOSCapabilitiesModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_BIOSCapabilities provider capabilities"; ProviderModuleName = "BIOS_OpenDRIM_BIOSCapabilitiesModule"; ProviderName = "BIOS_OpenDRIM_BIOSCapabilitiesProvider"; ClassName = "OpenDRIM_BIOSCapabilities"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"ManagedElement", "Capabilities", "Characteristics"}; CapabilityID = "BIOS_OpenDRIM_BIOSCapabilities"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_BIOSCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_ServiceAffectsBIOSAttribute-remove.sh0000755000175000017500000000637611400645636031755 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 BIOS_OpenDRIM_ServiceAffectsBIOSAttributeModule cimprovider -r -m BIOS_OpenDRIM_ServiceAffectsBIOSAttributeModule 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_ServiceAffectsBIOSAttribute.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_ServiceAffectsComputerSystem.sh0000755000175000017500000000671311400645636031040 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_ServiceAffectsComputerSystem.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_ServiceAffectsComputerSystem provider module"; Name = "BIOS_OpenDRIM_ServiceAffectsComputerSystemModule"; Location = "cmpiBIOS_OpenDRIM_ServiceAffectsComputerSystemProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_ServiceAffectsComputerSystem provider"; Name = "BIOS_OpenDRIM_ServiceAffectsComputerSystemProvider"; ProviderModuleName = "BIOS_OpenDRIM_ServiceAffectsComputerSystemModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_ServiceAffectsComputerSystem provider capabilities"; ProviderModuleName = "BIOS_OpenDRIM_ServiceAffectsComputerSystemModule"; ProviderName = "BIOS_OpenDRIM_ServiceAffectsComputerSystemProvider"; ClassName = "OpenDRIM_ServiceAffectsComputerSystem"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"AffectedElement", "AffectingElement", "ElementEffects", "OtherElementEffectsDescriptions"}; CapabilityID = "BIOS_OpenDRIM_ServiceAffectsComputerSystem"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_ServiceAffectsComputerSystem.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSServiceCapabilities.sh0000755000175000017500000000661111400645636027604 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSServiceCapabilities.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_BIOSServiceCapabilities provider module"; Name = "BIOS_OpenDRIM_BIOSServiceCapabilitiesModule"; Location = "cmpiBIOS_OpenDRIM_BIOSServiceCapabilitiesProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_BIOSServiceCapabilities provider"; Name = "BIOS_OpenDRIM_BIOSServiceCapabilitiesProvider"; ProviderModuleName = "BIOS_OpenDRIM_BIOSServiceCapabilitiesModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_BIOSServiceCapabilities provider capabilities"; ProviderModuleName = "BIOS_OpenDRIM_BIOSServiceCapabilitiesModule"; ProviderName = "BIOS_OpenDRIM_BIOSServiceCapabilitiesProvider"; ClassName = "OpenDRIM_BIOSServiceCapabilities"; ProviderType = {2}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "Description", "InstanceID", "ElementName", "MethodsSupported", "SupportedPasswordAlgorithms", "SupportedPasswordEncodings"}; CapabilityID = "BIOS_OpenDRIM_BIOSServiceCapabilities"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_BIOSServiceCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_SystemBIOS-remove.sh0000755000175000017500000000612411400645636026450 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 BIOS_OpenDRIM_SystemBIOSModule cimprovider -r -m BIOS_OpenDRIM_SystemBIOSModule 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_SystemBIOS.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSPassword.sh0000755000175000017500000000637611400645636025504 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSPassword.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_BIOSPassword provider module"; Name = "BIOS_OpenDRIM_BIOSPasswordModule"; Location = "cmpiBIOS_OpenDRIM_BIOSPasswordProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_BIOSPassword provider"; Name = "BIOS_OpenDRIM_BIOSPasswordProvider"; ProviderModuleName = "BIOS_OpenDRIM_BIOSPasswordModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_BIOSPassword provider capabilities"; ProviderModuleName = "BIOS_OpenDRIM_BIOSPasswordModule"; ProviderName = "BIOS_OpenDRIM_BIOSPasswordProvider"; ClassName = "OpenDRIM_BIOSPassword"; ProviderType = {2}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "Description", "ElementName", "InstanceID", "AttributeName", "DefaultValue", "IsOrderedList", "IsReadOnly", "MinLength", "MaxLength", "CurrentValue", "PendingValue", "PasswordEncoding", "IsSet"}; CapabilityID = "BIOS_OpenDRIM_BIOSPassword"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_BIOSPassword.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSEnumeration-remove.sh0000755000175000017500000000617211400645636027455 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 BIOS_OpenDRIM_BIOSEnumerationModule cimprovider -r -m BIOS_OpenDRIM_BIOSEnumerationModule 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_BIOSEnumeration.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSPassword-remove.sh0000755000175000017500000000613411400645636026767 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 BIOS_OpenDRIM_BIOSPasswordModule cimprovider -r -m BIOS_OpenDRIM_BIOSPasswordModule 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_BIOSPassword.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSEnumeration.sh0000755000175000017500000000645711400645636026170 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSEnumeration.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_BIOSEnumeration provider module"; Name = "BIOS_OpenDRIM_BIOSEnumerationModule"; Location = "cmpiBIOS_OpenDRIM_BIOSEnumerationProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_BIOSEnumeration provider"; Name = "BIOS_OpenDRIM_BIOSEnumerationProvider"; ProviderModuleName = "BIOS_OpenDRIM_BIOSEnumerationModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_BIOSEnumeration provider capabilities"; ProviderModuleName = "BIOS_OpenDRIM_BIOSEnumerationModule"; ProviderName = "BIOS_OpenDRIM_BIOSEnumerationProvider"; ClassName = "OpenDRIM_BIOSEnumeration"; ProviderType = {2}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "Description", "ElementName", "InstanceID", "AttributeName", "CurrentValue", "DefaultValue", "PendingValue", "IsOrderedList", "IsReadOnly", "PossibleValues", "PossibleValuesDescription"}; CapabilityID = "BIOS_OpenDRIM_BIOSEnumeration"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_BIOSEnumeration.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSCapabilities-remove.sh0000755000175000017500000000622011400645636027552 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 BIOS_OpenDRIM_BIOSCapabilitiesModule cimprovider -r -m BIOS_OpenDRIM_BIOSCapabilitiesModule 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_BIOSCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSConcreteCollection.sh0000755000175000017500000000644511400645636027455 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSConcreteCollection.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_BIOSConcreteCollection provider module"; Name = "BIOS_OpenDRIM_BIOSConcreteCollectionModule"; Location = "cmpiBIOS_OpenDRIM_BIOSConcreteCollectionProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_BIOSConcreteCollection provider"; Name = "BIOS_OpenDRIM_BIOSConcreteCollectionProvider"; ProviderModuleName = "BIOS_OpenDRIM_BIOSConcreteCollectionModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_BIOSConcreteCollection provider capabilities"; ProviderModuleName = "BIOS_OpenDRIM_BIOSConcreteCollectionModule"; ProviderName = "BIOS_OpenDRIM_BIOSConcreteCollectionProvider"; ClassName = "OpenDRIM_BIOSConcreteCollection"; ProviderType = {2}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "Description", "ElementName", "InstanceID"}; CapabilityID = "BIOS_OpenDRIM_BIOSConcreteCollection"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_BIOSConcreteCollection.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_OwningCollectionBIOS.sh0000755000175000017500000000637011400645636027151 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_OwningCollectionBIOS.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_OwningCollectionBIOS provider module"; Name = "BIOS_OpenDRIM_OwningCollectionBIOSModule"; Location = "cmpiBIOS_OpenDRIM_OwningCollectionBIOSProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_OwningCollectionBIOS provider"; Name = "BIOS_OpenDRIM_OwningCollectionBIOSProvider"; ProviderModuleName = "BIOS_OpenDRIM_OwningCollectionBIOSModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_OwningCollectionBIOS provider capabilities"; ProviderModuleName = "BIOS_OpenDRIM_OwningCollectionBIOSModule"; ProviderName = "BIOS_OpenDRIM_OwningCollectionBIOSProvider"; ClassName = "OpenDRIM_OwningCollectionBIOS"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"OwningElement", "OwnedElement"}; CapabilityID = "BIOS_OpenDRIM_OwningCollectionBIOS"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_OwningCollectionBIOS.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_OrderedMemberOfBIOSCollection.sh0000755000175000017500000000665611400645636030720 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_OrderedMemberOfBIOSCollection.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_OrderedMemberOfBIOSCollection provider module"; Name = "BIOS_OpenDRIM_OrderedMemberOfBIOSCollectionModule"; Location = "cmpiBIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_OrderedMemberOfBIOSCollection provider"; Name = "BIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProvider"; ProviderModuleName = "BIOS_OpenDRIM_OrderedMemberOfBIOSCollectionModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_OrderedMemberOfBIOSCollection provider capabilities"; ProviderModuleName = "BIOS_OpenDRIM_OrderedMemberOfBIOSCollectionModule"; ProviderName = "BIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProvider"; ClassName = "OpenDRIM_OrderedMemberOfBIOSCollection"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"Collection", "Member", "AssignedSequence"}; CapabilityID = "BIOS_OpenDRIM_OrderedMemberOfBIOSCollection"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_OrderedMemberOfBIOSCollection.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/BIOS-remove.sh0000755000175000017500000000613011400645636023603 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 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_BIOSConcreteCollection-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_BIOSEnumeration-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_BIOSElement-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_BIOSString-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_ServiceAffectsBIOSAttribute-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_BIOSInteger-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_BIOSServiceCapabilities-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_BIOSConformsToProfile-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_BIOSService-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_BIOSRegisteredProfile-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_OrderedMemberOfBIOSCollection-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_BIOSConcreteComponent-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_BIOSHostedService-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_OwningCollectionBIOS-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_BIOSCapabilities-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_ServiceAffectsComputerSystem-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_BIOSPassword-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_BIOSConcreteDependency-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_SystemBIOS-remove.sh $1 $2 $3 $4 if test "$2" = sfcb then /etc/init.d/sfcb start fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSElement.sh0000755000175000017500000000713711400645636025267 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSElement.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_BIOSElement provider module"; Name = "BIOS_OpenDRIM_BIOSElementModule"; Location = "cmpiBIOS_OpenDRIM_BIOSElementProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_BIOSElement provider"; Name = "BIOS_OpenDRIM_BIOSElementProvider"; ProviderModuleName = "BIOS_OpenDRIM_BIOSElementModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_BIOSElement provider capabilities"; ProviderModuleName = "BIOS_OpenDRIM_BIOSElementModule"; ProviderName = "BIOS_OpenDRIM_BIOSElementProvider"; ClassName = "OpenDRIM_BIOSElement"; ProviderType = {2}; Namespaces = {"$1"}; SupportedProperties = {"InstanceID", "Caption", "Description", "ElementName", "InstallDate", "OperationalStatus", "StatusDescriptions", "Status", "HealthState", "CommunicationStatus", "DetailedStatus", "OperatingStatus", "PrimaryStatus", "Name", "Version", "SoftwareElementState", "SoftwareElementID", "TargetOperatingSystem", "OtherTargetOS", "BuildNumber", "SerialNumber", "CodeSet", "IdentificationCode", "LanguageEdition", "Manufacturer", "PrimaryBIOS", "ListOfLanguages", "CurrentLanguage", "LoadedStartingAddress", "LoadedEndingAddress", "LoadUtilityInformation", "ReleaseDate", "RegistryURIs"}; CapabilityID = "BIOS_OpenDRIM_BIOSElement"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_BIOSElement.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_OrderedMemberOfBIOSCollection-remove.sh0000755000175000017500000000642211400645636032202 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 BIOS_OpenDRIM_OrderedMemberOfBIOSCollectionModule cimprovider -r -m BIOS_OpenDRIM_OrderedMemberOfBIOSCollectionModule 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_OrderedMemberOfBIOSCollection.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSConcreteComponent.sh0000755000175000017500000000641511400645636027321 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSConcreteComponent.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_BIOSConcreteComponent provider module"; Name = "BIOS_OpenDRIM_BIOSConcreteComponentModule"; Location = "cmpiBIOS_OpenDRIM_BIOSConcreteComponentProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_BIOSConcreteComponent provider"; Name = "BIOS_OpenDRIM_BIOSConcreteComponentProvider"; ProviderModuleName = "BIOS_OpenDRIM_BIOSConcreteComponentModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_BIOSConcreteComponent provider capabilities"; ProviderModuleName = "BIOS_OpenDRIM_BIOSConcreteComponentModule"; ProviderName = "BIOS_OpenDRIM_BIOSConcreteComponentProvider"; ClassName = "OpenDRIM_BIOSConcreteComponent"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"GroupComponent", "PartComponent"}; CapabilityID = "BIOS_OpenDRIM_BIOSConcreteComponent"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_BIOSConcreteComponent.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSService-remove.sh0000755000175000017500000000613111400645636026562 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 BIOS_OpenDRIM_BIOSServiceModule cimprovider -r -m BIOS_OpenDRIM_BIOSServiceModule 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_BIOSService.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSElement-remove.sh0000755000175000017500000000612211400645636026553 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 BIOS_OpenDRIM_BIOSElementModule cimprovider -r -m BIOS_OpenDRIM_BIOSElementModule 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_BIOSElement.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSConformsToProfile-remove.sh0000755000175000017500000001021211400645636030567 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 BIOS_OpenDRIM_BIOSConformsToProfileModule cimprovider -r -m BIOS_OpenDRIM_BIOSConformsToProfileModule 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_BIOSConformsToProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE owmofc -u http://localhost/$3 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSHostedService.sh0000755000175000017500000000627111400645636026443 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSHostedService.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_BIOSHostedService provider module"; Name = "BIOS_OpenDRIM_BIOSHostedServiceModule"; Location = "cmpiBIOS_OpenDRIM_BIOSHostedServiceProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_BIOSHostedService provider"; Name = "BIOS_OpenDRIM_BIOSHostedServiceProvider"; ProviderModuleName = "BIOS_OpenDRIM_BIOSHostedServiceModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_BIOSHostedService provider capabilities"; ProviderModuleName = "BIOS_OpenDRIM_BIOSHostedServiceModule"; ProviderName = "BIOS_OpenDRIM_BIOSHostedServiceProvider"; ClassName = "OpenDRIM_BIOSHostedService"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"Antecedent", "Dependent"}; CapabilityID = "BIOS_OpenDRIM_BIOSHostedService"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_BIOSHostedService.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_OwningCollectionBIOS-remove.sh0000755000175000017500000000627011400645636030443 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 BIOS_OpenDRIM_OwningCollectionBIOSModule cimprovider -r -m BIOS_OpenDRIM_OwningCollectionBIOSModule 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_OwningCollectionBIOS.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSServiceCapabilities-remove.sh0000755000175000017500000000631211400645636031075 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 BIOS_OpenDRIM_BIOSServiceCapabilitiesModule cimprovider -r -m BIOS_OpenDRIM_BIOSServiceCapabilitiesModule 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_BIOSServiceCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSRegisteredProfile-remove.sh0000755000175000017500000000626611400645636030611 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 BIOS_OpenDRIM_BIOSRegisteredProfileModule cimprovider -r -m BIOS_OpenDRIM_BIOSRegisteredProfileModule 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_BIOSRegisteredProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$3 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSConcreteCollection-remove.sh0000755000175000017500000000630011400645636030736 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 BIOS_OpenDRIM_BIOSConcreteCollectionModule cimprovider -r -m BIOS_OpenDRIM_BIOSConcreteCollectionModule 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_BIOSConcreteCollection.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_ServiceAffectsBIOSAttribute.sh0000755000175000017500000000667011400645636030457 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_ServiceAffectsBIOSAttribute.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_ServiceAffectsBIOSAttribute provider module"; Name = "BIOS_OpenDRIM_ServiceAffectsBIOSAttributeModule"; Location = "cmpiBIOS_OpenDRIM_ServiceAffectsBIOSAttributeProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_ServiceAffectsBIOSAttribute provider"; Name = "BIOS_OpenDRIM_ServiceAffectsBIOSAttributeProvider"; ProviderModuleName = "BIOS_OpenDRIM_ServiceAffectsBIOSAttributeModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_ServiceAffectsBIOSAttribute provider capabilities"; ProviderModuleName = "BIOS_OpenDRIM_ServiceAffectsBIOSAttributeModule"; ProviderName = "BIOS_OpenDRIM_ServiceAffectsBIOSAttributeProvider"; ClassName = "OpenDRIM_ServiceAffectsBIOSAttribute"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"AffectedElement", "AffectingElement", "ElementEffects", "OtherElementEffectsDescriptions"}; CapabilityID = "BIOS_OpenDRIM_ServiceAffectsBIOSAttribute"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_ServiceAffectsBIOSAttribute.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_SystemBIOS.sh0000755000175000017500000000607411400645636025161 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_SystemBIOS.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_SystemBIOS provider module"; Name = "BIOS_OpenDRIM_SystemBIOSModule"; Location = "cmpiBIOS_OpenDRIM_SystemBIOSProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_SystemBIOS provider"; Name = "BIOS_OpenDRIM_SystemBIOSProvider"; ProviderModuleName = "BIOS_OpenDRIM_SystemBIOSModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_SystemBIOS provider capabilities"; ProviderModuleName = "BIOS_OpenDRIM_SystemBIOSModule"; ProviderName = "BIOS_OpenDRIM_SystemBIOSProvider"; ClassName = "OpenDRIM_SystemBIOS"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"GroupComponent", "PartComponent"}; CapabilityID = "BIOS_OpenDRIM_SystemBIOS"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_SystemBIOS.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSService.sh0000755000175000017500000000733311400645636025274 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSService.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_BIOSService provider module"; Name = "BIOS_OpenDRIM_BIOSServiceModule"; Location = "cmpiBIOS_OpenDRIM_BIOSServiceProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_BIOSService provider"; Name = "BIOS_OpenDRIM_BIOSServiceProvider"; ProviderModuleName = "BIOS_OpenDRIM_BIOSServiceModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_BIOSService provider capabilities"; ProviderModuleName = "BIOS_OpenDRIM_BIOSServiceModule"; ProviderName = "BIOS_OpenDRIM_BIOSServiceProvider"; ClassName = "OpenDRIM_BIOSService"; ProviderType = {2, 5}; Namespaces = {"$1"}; SupportedProperties = {"InstanceID", "Caption", "Description", "ElementName", "InstallDate", "OperationalStatus", "StatusDescriptions", "Status", "HealthState", "CommunicationStatus", "DetailedStatus", "OperatingStatus", "PrimaryStatus", "EnabledState", "OtherEnabledState", "RequestedState", "EnabledDefault", "TimeOfLastStateChange", "AvailableRequestedStates", "TransitioningToState", "SystemCreationClassName", "SystemName", "CreationClassName", "Name", "PrimaryOwnerName", "PrimaryOwnerContact", "StartMode", "Started"}; SupportedMethods = {"RequestStateChange", "StartService", "StopService", "SetBIOSAttribute", "SetBIOSAttributeEmbeddedInstance", "ReadRawBIOSData", "WriteRawBIOSData", "SetBIOSAttributes"}; CapabilityID = "BIOS_OpenDRIM_BIOSService"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_BIOSService.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSInteger.sh0000755000175000017500000000636711400645636025277 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSInteger.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_BIOSInteger provider module"; Name = "BIOS_OpenDRIM_BIOSIntegerModule"; Location = "cmpiBIOS_OpenDRIM_BIOSIntegerProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_BIOSInteger provider"; Name = "BIOS_OpenDRIM_BIOSIntegerProvider"; ProviderModuleName = "BIOS_OpenDRIM_BIOSIntegerModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_BIOSInteger provider capabilities"; ProviderModuleName = "BIOS_OpenDRIM_BIOSIntegerModule"; ProviderName = "BIOS_OpenDRIM_BIOSIntegerProvider"; ClassName = "OpenDRIM_BIOSInteger"; ProviderType = {2}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "Description", "ElementName", "InstanceID", "AttributeName", "CurrentValue", "DefaultValue", "PendingValue", "IsOrderedList", "IsReadOnly", "LowerBound", "UpperBound", "ProgrammaticUnit", "ScalarIncrement"}; CapabilityID = "BIOS_OpenDRIM_BIOSInteger"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_BIOSInteger.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSString.sh0000755000175000017500000000633411400645636025142 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSString.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_BIOSString provider module"; Name = "BIOS_OpenDRIM_BIOSStringModule"; Location = "cmpiBIOS_OpenDRIM_BIOSStringProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_BIOSString provider"; Name = "BIOS_OpenDRIM_BIOSStringProvider"; ProviderModuleName = "BIOS_OpenDRIM_BIOSStringModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_BIOSString provider capabilities"; ProviderModuleName = "BIOS_OpenDRIM_BIOSStringModule"; ProviderName = "BIOS_OpenDRIM_BIOSStringProvider"; ClassName = "OpenDRIM_BIOSString"; ProviderType = {2}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "Description", "ElementName", "InstanceID", "AttributeName", "CurrentValue", "DefaultValue", "PendingValue", "IsOrderedList", "IsReadOnly", "StringType", "MinLength", "MaxLength", "ValueExpression"}; CapabilityID = "BIOS_OpenDRIM_BIOSString"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_BIOSString.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/registration/OpenDRIM_BIOSInteger-remove.sh0000755000175000017500000000612211400645636026557 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 BIOS_OpenDRIM_BIOSIntegerModule cimprovider -r -m BIOS_OpenDRIM_BIOSIntegerModule 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_BIOSInteger.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSPassword/0000755000175000017500000000000011400645636022417 5ustar guillaumeguillaumeopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSPassword/OpenDRIM_BIOSPasswordAccess.h0000644000175000017500000000546211400645636027635 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSPASSWORDACCESS_H_ #define OPENDRIM_BIOSPASSWORDACCESS_H_ #include "BIOS_Common.h" #include "OpenDRIM_BIOSPassword.h" int BIOS_OpenDRIM_BIOSPassword_load(const CMPIBroker* broker, string& errorMessage); int BIOS_OpenDRIM_BIOSPassword_unload(string& errorMessage); int BIOS_OpenDRIM_BIOSPassword_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSPassword_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BIOSPassword& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSPassword_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSPassword& newInstance, const OpenDRIM_BIOSPassword& oldInstance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSPassword_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSPassword& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSPassword_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSPassword& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSPassword_populate(OpenDRIM_BIOSPassword& instance, unsigned int num, string& errorMessage); #endif /*OPENDRIM_BIOSPASSWORDACCESS_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSPassword/Makefile.am0000644000175000017500000000372211400645636024457 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 = libcmpiBIOS_OpenDRIM_BIOSPasswordProvider.la libcmpiBIOS_OpenDRIM_BIOSPasswordProvider_la_SOURCES = OpenDRIM_BIOSPasswordAccess.cpp OpenDRIM_BIOSPasswordProvider.cpp cmpiOpenDRIM_BIOSPassword.cpp libcmpiBIOS_OpenDRIM_BIOSPasswordProvider_la_LIBADD = ../Common/libcmpiBIOS_Common.la libcmpiBIOS_OpenDRIM_BIOSPasswordProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_BIOSPassword.h OpenDRIM_BIOSPassword.h OpenDRIM_BIOSPasswordAccess.h opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSPassword/OpenDRIM_BIOSPasswordProvider.cpp0000644000175000017500000002455711400645636030567 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSPassword.h" #include "OpenDRIM_BIOSPasswordAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define BIOS_OpenDRIM_BIOSPasswordProviderSetInstance BIOS_OpenDRIM_BIOSPasswordProviderModifyInstance #endif int BIOS_OpenDRIM_BIOSPassword_init(const CMPIBroker* broker); int BIOS_OpenDRIM_BIOSPassword_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus BIOS_OpenDRIM_BIOSPasswordProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_BIOSPassword_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSPasswordProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSPassword_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSPassword_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_BIOSPassword_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSPasswordProviderEnumInstances(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 = BIOS_OpenDRIM_BIOSPassword_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSPassword_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = BIOS_OpenDRIM_BIOSPassword_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSPasswordProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSPassword instance; BIOS_OpenDRIM_BIOSPassword_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSPassword_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSPassword_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = BIOS_OpenDRIM_BIOSPassword_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSPasswordProviderSetInstance(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_BIOSPassword newInstance, oldInstance; BIOS_OpenDRIM_BIOSPassword_toCPP(_broker, ci, newInstance); BIOS_OpenDRIM_BIOSPassword_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSPassword_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSPassword_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSPassword_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSPassword_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSPasswordProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSPassword instance; BIOS_OpenDRIM_BIOSPassword_toCPP(_broker, ci, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSPassword_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_BIOSPassword_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSPassword_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSPassword_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSPassword_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSPassword_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = BIOS_OpenDRIM_BIOSPassword_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSPasswordProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSPassword instance; BIOS_OpenDRIM_BIOSPassword_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSPassword_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSPassword_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSPassword_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSPassword_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSPasswordProviderExecQuery(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 BIOS_OpenDRIM_BIOSPassword_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSPassword_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSPassword_init FAILED: " + (string) OpenDRIM_BIOSPassword_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int BIOS_OpenDRIM_BIOSPassword_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSPassword_unload(errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSPassword_unload FAILED: " + (string) OpenDRIM_BIOSPassword_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define BIOS_OpenDRIM_BIOSPassword_INIT if (BIOS_OpenDRIM_BIOSPassword_init(_broker) < 0) return NULL CMInstanceMIStub(BIOS_OpenDRIM_BIOSPasswordProvider, BIOS_OpenDRIM_BIOSPasswordProvider, _broker, BIOS_OpenDRIM_BIOSPassword_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSPassword/cmpiOpenDRIM_BIOSPassword.h0000644000175000017500000000413711400645636027362 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSPASSWORD_H_ #define CMPIOPENDRIM_BIOSPASSWORD_H_ #include "OpenDRIM_BIOSPassword.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSPassword_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSPassword& instance); CMPIInstance* BIOS_OpenDRIM_BIOSPassword_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSPassword& instance); void BIOS_OpenDRIM_BIOSPassword_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSPassword& instance); void BIOS_OpenDRIM_BIOSPassword_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSPassword& instance); #endif /*CMPIOPENDRIM_BIOSPASSWORD_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSPassword/cmpiOpenDRIM_BIOSPassword.cpp0000644000175000017500000001221411400645636027710 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSPassword.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSPassword_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSPassword& instance) { _E_; Objectpath op(broker, OpenDRIM_BIOSPassword_classnames[0], OpenDRIM_BIOSPassword_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* BIOS_OpenDRIM_BIOSPassword_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSPassword& instance) { _E_; Objectpath op(broker, BIOS_OpenDRIM_BIOSPassword_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.AttributeName_isNULL) ci.setProperty("AttributeName", instance.AttributeName); if (!instance.DefaultValue_isNULL) ci.setProperty("DefaultValue", instance.DefaultValue); if (!instance.IsOrderedList_isNULL) ci.setProperty("IsOrderedList", instance.IsOrderedList); if (!instance.IsReadOnly_isNULL) ci.setProperty("IsReadOnly", instance.IsReadOnly); if (!instance.MinLength_isNULL) ci.setProperty("MinLength", instance.MinLength); if (!instance.MaxLength_isNULL) ci.setProperty("MaxLength", instance.MaxLength); if (!instance.CurrentValue_isNULL) ci.setProperty("CurrentValue", instance.CurrentValue); if (!instance.PendingValue_isNULL) ci.setProperty("PendingValue", instance.PendingValue); if (!instance.PasswordEncoding_isNULL) ci.setProperty("PasswordEncoding", instance.PasswordEncoding); if (!instance.IsSet_isNULL) ci.setProperty("IsSet", instance.IsSet); _L_; return ci.getHdl(); } void BIOS_OpenDRIM_BIOSPassword_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSPassword& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void BIOS_OpenDRIM_BIOSPassword_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSPassword& 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("AttributeName", instance.AttributeName) == OK) instance.AttributeName_isNULL = false; if (inst.getProperty("DefaultValue", instance.DefaultValue) == OK) instance.DefaultValue_isNULL = false; if (inst.getProperty("IsOrderedList", instance.IsOrderedList) == OK) instance.IsOrderedList_isNULL = false; if (inst.getProperty("IsReadOnly", instance.IsReadOnly) == OK) instance.IsReadOnly_isNULL = false; if (inst.getProperty("MinLength", instance.MinLength) == OK) instance.MinLength_isNULL = false; if (inst.getProperty("MaxLength", instance.MaxLength) == OK) instance.MaxLength_isNULL = false; if (inst.getProperty("CurrentValue", instance.CurrentValue) == OK) instance.CurrentValue_isNULL = false; if (inst.getProperty("PendingValue", instance.PendingValue) == OK) instance.PendingValue_isNULL = false; if (inst.getProperty("PasswordEncoding", instance.PasswordEncoding) == OK) instance.PasswordEncoding_isNULL = false; if (inst.getProperty("IsSet", instance.IsSet) == OK) instance.IsSet_isNULL = false; _L_; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSPassword/OpenDRIM_BIOSPasswordAccess.cpp0000644000175000017500000001174211400645636030166 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSPasswordAccess.h" const string instanceID = "OpenDRIM:BIOSPassword:BIOS"; vector bios; vector< vector > dmi_strings; int BIOS_OpenDRIM_BIOSPassword_load(const CMPIBroker* broker, string& errorMessage) { _E_; SMBIOS_getBIOSInformation(bios,dmi_strings,errorMessage); _L_; return OK; } int BIOS_OpenDRIM_BIOSPassword_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int BIOS_OpenDRIM_BIOSPassword_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; for(unsigned int i=0;i= bios.size() || instance.InstanceID.substr(0,26) != instanceID) { errorMessage = "No instance"; return NOT_FOUND; } CF_assert(BIOS_OpenDRIM_BIOSPassword_populate(instance,num,errorMessage)); _L_; return OK; } int BIOS_OpenDRIM_BIOSPassword_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSPassword& newInstance, const OpenDRIM_BIOSPassword& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSPassword_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSPassword& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSPassword_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSPassword& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSPassword_populate(OpenDRIM_BIOSPassword& instance, unsigned int num, string& errorMessage) { _E_; /* * Properties to fill from profile + Mandatory inherited from BIOSAttribute: * [X] InstanceID [KEY] * [X] AttributeName * [X] IsReadOnly * + Mandatory: * [X] IsSet * [X] MinLength * [X] MaxLength * [X] CurrentValue * [X] PendingValue */ uint8_t cmos[CMOS_MAX_SIZE]; memset(cmos, 0, sizeof(cmos)); CF_assert(CF_loadCMOS(cmos,CMOS_SIZE,errorMessage)); // FIXME: Need to be improved switch(CF_getBIOSManufacturer(dmi_strings[num][bios[num].vendor])) { case PHOENIX: case AWARD: if(atof(dmi_strings[num][bios[num].bios_version].c_str())==4.50f) instance.setIsSet(cmos[0x5E]&1); else if(atof(dmi_strings[num][bios[num].bios_version].c_str())==4.51f) instance.setIsSet(cmos[0x62]&1); else instance.setIsSet((cmos[0x11]&2)>>1); instance.setMinLength(1); instance.setMaxLength(8); break; case ACER: case COMPAQ: case DTK: case IBM: case PACKARD_BELL: case GATEWAY_PHOENIX: case SAMSUNG: case SONY: case TOSHIBA: case ZENITH_AMI: case AMI: default: instance.setIsSet((cmos[0x34]&64)>>6); instance.setMinLength(1); instance.setMaxLength(0x3D-0x38); break; } instance.setIsReadOnly(true); instance.setAttributeName("DMTF:BIOS Password"); _L_; return OK; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSPassword/OpenDRIM_BIOSPassword.h0000644000175000017500000001515111400645636026507 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSPASSWORD_H_ #define OPENDRIM_BIOSPASSWORD_H_ #include const static char* OpenDRIM_BIOSPassword_classnames[] = {"OpenDRIM_BIOSPassword"}; static string OpenDRIM_BIOSPassword_NAMESPACE = _NAMESPACE; class OpenDRIM_BIOSPassword { public: string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string ElementName; bool ElementName_isNULL; string InstanceID; bool InstanceID_isNULL; string AttributeName; bool AttributeName_isNULL; vector DefaultValue; bool DefaultValue_isNULL; bool IsOrderedList; bool IsOrderedList_isNULL; bool IsReadOnly; bool IsReadOnly_isNULL; unsigned long long MinLength; bool MinLength_isNULL; unsigned long long MaxLength; bool MaxLength_isNULL; vector CurrentValue; bool CurrentValue_isNULL; vector PendingValue; bool PendingValue_isNULL; unsigned int PasswordEncoding; bool PasswordEncoding_isNULL; bool IsSet; bool IsSet_isNULL; OpenDRIM_BIOSPassword() { Caption_isNULL = true; Description_isNULL = true; ElementName_isNULL = true; InstanceID_isNULL = true; AttributeName_isNULL = true; DefaultValue_isNULL = true; IsOrderedList_isNULL = true; IsReadOnly_isNULL = true; MinLength_isNULL = true; MaxLength_isNULL = true; CurrentValue_isNULL = true; PendingValue_isNULL = true; PasswordEncoding_isNULL = true; IsSet_isNULL = true; } ~OpenDRIM_BIOSPassword() {} 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 getAttributeName(string& value) const { if (AttributeName_isNULL==true) return NOT_FOUND; value = AttributeName; return OK; } int setAttributeName(const string& newValue) { AttributeName = newValue; AttributeName_isNULL = false; return OK; } int getDefaultValue(vector& value) const { if (DefaultValue_isNULL==true) return NOT_FOUND; value = DefaultValue; return OK; } int setDefaultValue(const vector& newValue) { DefaultValue = newValue; DefaultValue_isNULL = false; return OK; } int getIsOrderedList(bool& value) const { if (IsOrderedList_isNULL==true) return NOT_FOUND; value = IsOrderedList; return OK; } int setIsOrderedList(const bool& newValue) { IsOrderedList = newValue; IsOrderedList_isNULL = false; return OK; } int getIsReadOnly(bool& value) const { if (IsReadOnly_isNULL==true) return NOT_FOUND; value = IsReadOnly; return OK; } int setIsReadOnly(const bool& newValue) { IsReadOnly = newValue; IsReadOnly_isNULL = false; return OK; } int getMinLength(unsigned long long& value) const { if (MinLength_isNULL==true) return NOT_FOUND; value = MinLength; return OK; } int setMinLength(const unsigned long long& newValue) { MinLength = newValue; MinLength_isNULL = false; return OK; } int getMaxLength(unsigned long long& value) const { if (MaxLength_isNULL==true) return NOT_FOUND; value = MaxLength; return OK; } int setMaxLength(const unsigned long long& newValue) { MaxLength = newValue; MaxLength_isNULL = false; return OK; } int getCurrentValue(vector& value) const { if (CurrentValue_isNULL==true) return NOT_FOUND; value = CurrentValue; return OK; } int setCurrentValue(const vector& newValue) { CurrentValue = newValue; CurrentValue_isNULL = false; return OK; } int getPendingValue(vector& value) const { if (PendingValue_isNULL==true) return NOT_FOUND; value = PendingValue; return OK; } int setPendingValue(const vector& newValue) { PendingValue = newValue; PendingValue_isNULL = false; return OK; } int getPasswordEncoding(unsigned int& value) const { if (PasswordEncoding_isNULL==true) return NOT_FOUND; value = PasswordEncoding; return OK; } int setPasswordEncoding(const unsigned int& newValue) { PasswordEncoding = newValue; PasswordEncoding_isNULL = false; return OK; } int getIsSet(bool& value) const { if (IsSet_isNULL==true) return NOT_FOUND; value = IsSet; return OK; } int setIsSet(const bool& newValue) { IsSet = newValue; IsSet_isNULL = false; return OK; } }; #endif /*OPENDRIM_BIOSPASSWORD_H_*/ opendrim-lmp-bios-1.0.0~ppa/VERSION0000644000175000017500000000000611400645636017547 0ustar guillaumeguillaume1.0.0 opendrim-lmp-bios-1.0.0~ppa/test/0000755000175000017500000000000011400645636017462 5ustar guillaumeguillaumeopendrim-lmp-bios-1.0.0~ppa/test/testOpenDRIM_BIOSConcreteComponent.cpp0000644000175000017500000001120511400645636026624 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSConcreteComponent.h" #include "OpenDRIM_BIOSConcreteComponentAccess.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_BIOSConcreteComponent& instance) { os << " [OpenDRIM_BIOSConcreteComponent]" << endl; ToStringRef("GroupComponent", GroupComponent, GroupComponent_isNULL); ToStringRef("PartComponent", PartComponent, PartComponent_isNULL); os << " [\\OpenDRIM_BIOSConcreteComponent]" << endl; return os; } int main() { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConcreteComponent_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = BIOS_OpenDRIM_BIOSConcreteComponent_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 = BIOS_OpenDRIM_BIOSConcreteComponent_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 = BIOS_OpenDRIM_BIOSConcreteComponent_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 = BIOS_OpenDRIM_BIOSConcreteComponent_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-bios-1.0.0~ppa/test/testOpenDRIM_BIOSConformsToProfile.cpp0000644000175000017500000001122411400645636026612 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSConformsToProfile.h" #include "OpenDRIM_BIOSConformsToProfileAccess.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_BIOSConformsToProfile& instance) { os << " [OpenDRIM_BIOSConformsToProfile]" << endl; ToStringRef("ConformantStandard", ConformantStandard, ConformantStandard_isNULL); ToStringRef("ManagedElement", ManagedElement, ManagedElement_isNULL); os << " [\\OpenDRIM_BIOSConformsToProfile]" << endl; return os; } int main() { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConformsToProfile_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = BIOS_OpenDRIM_BIOSConformsToProfile_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 = BIOS_OpenDRIM_BIOSConformsToProfile_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 = BIOS_OpenDRIM_BIOSConformsToProfile_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 = BIOS_OpenDRIM_BIOSConformsToProfile_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-bios-1.0.0~ppa/test/Makefile.am0000644000175000017500000002330411400645636021520 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 , , ################################################################################ noinst_PROGRAMS = testOpenDRIM_SystemBIOS testOpenDRIM_BIOSConcreteDependency testOpenDRIM_BIOSPassword testOpenDRIM_ServiceAffectsComputerSystem testOpenDRIM_BIOSCapabilities testOpenDRIM_OwningCollectionBIOS testOpenDRIM_BIOSHostedService testOpenDRIM_BIOSConcreteComponent testOpenDRIM_OrderedMemberOfBIOSCollection testOpenDRIM_BIOSRegisteredProfile testOpenDRIM_BIOSService testOpenDRIM_BIOSConformsToProfile testOpenDRIM_BIOSServiceCapabilities testOpenDRIM_BIOSInteger testOpenDRIM_ServiceAffectsBIOSAttribute testOpenDRIM_BIOSString testOpenDRIM_BIOSElement testOpenDRIM_BIOSEnumeration testOpenDRIM_BIOSConcreteCollection # May have to be adjusted for direct invocation testOpenDRIM_SystemBIOS_CPPFLAGS = -I../OpenDRIM_SystemBIOS/ -I../null/ -I../null/ testOpenDRIM_SystemBIOS_SOURCES = testOpenDRIM_SystemBIOS.cpp testOpenDRIM_SystemBIOS_LDADD = ../OpenDRIM_SystemBIOS/libcmpiBIOS_OpenDRIM_SystemBIOSProvider.la test-OpenDRIM_SystemBIOS: testOpenDRIM_SystemBIOS ./testOpenDRIM_SystemBIOS testOpenDRIM_BIOSConcreteDependency_CPPFLAGS = -I../OpenDRIM_BIOSConcreteDependency/ testOpenDRIM_BIOSConcreteDependency_SOURCES = testOpenDRIM_BIOSConcreteDependency.cpp testOpenDRIM_BIOSConcreteDependency_LDADD = ../OpenDRIM_BIOSConcreteDependency/libcmpiBIOS_OpenDRIM_BIOSConcreteDependencyProvider.la test-OpenDRIM_BIOSConcreteDependency: testOpenDRIM_BIOSConcreteDependency ./testOpenDRIM_BIOSConcreteDependency testOpenDRIM_BIOSPassword_CPPFLAGS = -I../OpenDRIM_BIOSPassword/ testOpenDRIM_BIOSPassword_SOURCES = testOpenDRIM_BIOSPassword.cpp testOpenDRIM_BIOSPassword_LDADD = ../OpenDRIM_BIOSPassword/libcmpiBIOS_OpenDRIM_BIOSPasswordProvider.la test-OpenDRIM_BIOSPassword: testOpenDRIM_BIOSPassword ./testOpenDRIM_BIOSPassword # May have to be adjusted for direct invocation testOpenDRIM_ServiceAffectsComputerSystem_CPPFLAGS = -I../OpenDRIM_ServiceAffectsComputerSystem/ -I../null/ -I../null/ testOpenDRIM_ServiceAffectsComputerSystem_SOURCES = testOpenDRIM_ServiceAffectsComputerSystem.cpp testOpenDRIM_ServiceAffectsComputerSystem_LDADD = ../OpenDRIM_ServiceAffectsComputerSystem/libcmpiBIOS_OpenDRIM_ServiceAffectsComputerSystemProvider.la test-OpenDRIM_ServiceAffectsComputerSystem: testOpenDRIM_ServiceAffectsComputerSystem ./testOpenDRIM_ServiceAffectsComputerSystem # May have to be adjusted for direct invocation testOpenDRIM_BIOSCapabilities_CPPFLAGS = -I../OpenDRIM_BIOSCapabilities/ -I../null/ -I../null/ testOpenDRIM_BIOSCapabilities_SOURCES = testOpenDRIM_BIOSCapabilities.cpp testOpenDRIM_BIOSCapabilities_LDADD = ../OpenDRIM_BIOSCapabilities/libcmpiBIOS_OpenDRIM_BIOSCapabilitiesProvider.la test-OpenDRIM_BIOSCapabilities: testOpenDRIM_BIOSCapabilities ./testOpenDRIM_BIOSCapabilities # May have to be adjusted for direct invocation testOpenDRIM_OwningCollectionBIOS_CPPFLAGS = -I../OpenDRIM_OwningCollectionBIOS/ -I../null/ -I../null/ testOpenDRIM_OwningCollectionBIOS_SOURCES = testOpenDRIM_OwningCollectionBIOS.cpp testOpenDRIM_OwningCollectionBIOS_LDADD = ../OpenDRIM_OwningCollectionBIOS/libcmpiBIOS_OpenDRIM_OwningCollectionBIOSProvider.la test-OpenDRIM_OwningCollectionBIOS: testOpenDRIM_OwningCollectionBIOS ./testOpenDRIM_OwningCollectionBIOS # May have to be adjusted for direct invocation testOpenDRIM_BIOSHostedService_CPPFLAGS = -I../OpenDRIM_BIOSHostedService/ -I../null/ -I../null/ testOpenDRIM_BIOSHostedService_SOURCES = testOpenDRIM_BIOSHostedService.cpp testOpenDRIM_BIOSHostedService_LDADD = ../OpenDRIM_BIOSHostedService/libcmpiBIOS_OpenDRIM_BIOSHostedServiceProvider.la test-OpenDRIM_BIOSHostedService: testOpenDRIM_BIOSHostedService ./testOpenDRIM_BIOSHostedService # May have to be adjusted for direct invocation testOpenDRIM_BIOSConcreteComponent_CPPFLAGS = -I../OpenDRIM_BIOSConcreteComponent/ -I../null/ -I../null/ testOpenDRIM_BIOSConcreteComponent_SOURCES = testOpenDRIM_BIOSConcreteComponent.cpp testOpenDRIM_BIOSConcreteComponent_LDADD = ../OpenDRIM_BIOSConcreteComponent/libcmpiBIOS_OpenDRIM_BIOSConcreteComponentProvider.la test-OpenDRIM_BIOSConcreteComponent: testOpenDRIM_BIOSConcreteComponent ./testOpenDRIM_BIOSConcreteComponent testOpenDRIM_OrderedMemberOfBIOSCollection_CPPFLAGS = -I../OpenDRIM_OrderedMemberOfBIOSCollection/ testOpenDRIM_OrderedMemberOfBIOSCollection_SOURCES = testOpenDRIM_OrderedMemberOfBIOSCollection.cpp testOpenDRIM_OrderedMemberOfBIOSCollection_LDADD = ../OpenDRIM_OrderedMemberOfBIOSCollection/libcmpiBIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProvider.la test-OpenDRIM_OrderedMemberOfBIOSCollection: testOpenDRIM_OrderedMemberOfBIOSCollection ./testOpenDRIM_OrderedMemberOfBIOSCollection testOpenDRIM_BIOSRegisteredProfile_CPPFLAGS = -I../OpenDRIM_BIOSRegisteredProfile/ testOpenDRIM_BIOSRegisteredProfile_SOURCES = testOpenDRIM_BIOSRegisteredProfile.cpp testOpenDRIM_BIOSRegisteredProfile_LDADD = ../OpenDRIM_BIOSRegisteredProfile/libcmpiBIOS_OpenDRIM_BIOSRegisteredProfileProvider.la test-OpenDRIM_BIOSRegisteredProfile: testOpenDRIM_BIOSRegisteredProfile ./testOpenDRIM_BIOSRegisteredProfile testOpenDRIM_BIOSService_CPPFLAGS = -I../OpenDRIM_BIOSService/ testOpenDRIM_BIOSService_SOURCES = testOpenDRIM_BIOSService.cpp testOpenDRIM_BIOSService_LDADD = ../OpenDRIM_BIOSService/libcmpiBIOS_OpenDRIM_BIOSServiceProvider.la test-OpenDRIM_BIOSService: testOpenDRIM_BIOSService ./testOpenDRIM_BIOSService testOpenDRIM_BIOSConformsToProfile_CPPFLAGS = -I../OpenDRIM_BIOSConformsToProfile/ testOpenDRIM_BIOSConformsToProfile_SOURCES = testOpenDRIM_BIOSConformsToProfile.cpp testOpenDRIM_BIOSConformsToProfile_LDADD = ../OpenDRIM_BIOSConformsToProfile/libcmpiBIOS_OpenDRIM_BIOSConformsToProfileProvider.la test-OpenDRIM_BIOSConformsToProfile: testOpenDRIM_BIOSConformsToProfile ./testOpenDRIM_BIOSConformsToProfile testOpenDRIM_BIOSServiceCapabilities_CPPFLAGS = -I../OpenDRIM_BIOSServiceCapabilities/ testOpenDRIM_BIOSServiceCapabilities_SOURCES = testOpenDRIM_BIOSServiceCapabilities.cpp testOpenDRIM_BIOSServiceCapabilities_LDADD = ../OpenDRIM_BIOSServiceCapabilities/libcmpiBIOS_OpenDRIM_BIOSServiceCapabilitiesProvider.la test-OpenDRIM_BIOSServiceCapabilities: testOpenDRIM_BIOSServiceCapabilities ./testOpenDRIM_BIOSServiceCapabilities testOpenDRIM_BIOSInteger_CPPFLAGS = -I../OpenDRIM_BIOSInteger/ testOpenDRIM_BIOSInteger_SOURCES = testOpenDRIM_BIOSInteger.cpp testOpenDRIM_BIOSInteger_LDADD = ../OpenDRIM_BIOSInteger/libcmpiBIOS_OpenDRIM_BIOSIntegerProvider.la test-OpenDRIM_BIOSInteger: testOpenDRIM_BIOSInteger ./testOpenDRIM_BIOSInteger # May have to be adjusted for direct invocation testOpenDRIM_ServiceAffectsBIOSAttribute_CPPFLAGS = -I../OpenDRIM_ServiceAffectsBIOSAttribute/ -I../null/ -I../null/ testOpenDRIM_ServiceAffectsBIOSAttribute_SOURCES = testOpenDRIM_ServiceAffectsBIOSAttribute.cpp testOpenDRIM_ServiceAffectsBIOSAttribute_LDADD = ../OpenDRIM_ServiceAffectsBIOSAttribute/libcmpiBIOS_OpenDRIM_ServiceAffectsBIOSAttributeProvider.la test-OpenDRIM_ServiceAffectsBIOSAttribute: testOpenDRIM_ServiceAffectsBIOSAttribute ./testOpenDRIM_ServiceAffectsBIOSAttribute testOpenDRIM_BIOSString_CPPFLAGS = -I../OpenDRIM_BIOSString/ testOpenDRIM_BIOSString_SOURCES = testOpenDRIM_BIOSString.cpp testOpenDRIM_BIOSString_LDADD = ../OpenDRIM_BIOSString/libcmpiBIOS_OpenDRIM_BIOSStringProvider.la test-OpenDRIM_BIOSString: testOpenDRIM_BIOSString ./testOpenDRIM_BIOSString testOpenDRIM_BIOSElement_CPPFLAGS = -I../OpenDRIM_BIOSElement/ testOpenDRIM_BIOSElement_SOURCES = testOpenDRIM_BIOSElement.cpp testOpenDRIM_BIOSElement_LDADD = ../OpenDRIM_BIOSElement/libcmpiBIOS_OpenDRIM_BIOSElementProvider.la test-OpenDRIM_BIOSElement: testOpenDRIM_BIOSElement ./testOpenDRIM_BIOSElement testOpenDRIM_BIOSEnumeration_CPPFLAGS = -I../OpenDRIM_BIOSEnumeration/ testOpenDRIM_BIOSEnumeration_SOURCES = testOpenDRIM_BIOSEnumeration.cpp testOpenDRIM_BIOSEnumeration_LDADD = ../OpenDRIM_BIOSEnumeration/libcmpiBIOS_OpenDRIM_BIOSEnumerationProvider.la test-OpenDRIM_BIOSEnumeration: testOpenDRIM_BIOSEnumeration ./testOpenDRIM_BIOSEnumeration testOpenDRIM_BIOSConcreteCollection_CPPFLAGS = -I../OpenDRIM_BIOSConcreteCollection/ testOpenDRIM_BIOSConcreteCollection_SOURCES = testOpenDRIM_BIOSConcreteCollection.cpp testOpenDRIM_BIOSConcreteCollection_LDADD = ../OpenDRIM_BIOSConcreteCollection/libcmpiBIOS_OpenDRIM_BIOSConcreteCollectionProvider.la test-OpenDRIM_BIOSConcreteCollection: testOpenDRIM_BIOSConcreteCollection ./testOpenDRIM_BIOSConcreteCollection opendrim-lmp-bios-1.0.0~ppa/test/testOpenDRIM_BIOSService.cpp0000644000175000017500000001443411400645636024606 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSService.h" #include "OpenDRIM_BIOSServiceAccess.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_BIOSService& instance) { os << " [OpenDRIM_BIOSService]" << endl; ToString("InstanceID", InstanceID, InstanceID_isNULL); ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("InstallDate", InstallDate, InstallDate_isNULL); ToStringArrayInt("OperationalStatus", OperationalStatus, OperationalStatus_isNULL); ToStringArray("StatusDescriptions", StatusDescriptions, StatusDescriptions_isNULL); ToString("Status", Status, Status_isNULL); ToStringInt("HealthState", HealthState, HealthState_isNULL); ToStringInt("CommunicationStatus", CommunicationStatus, CommunicationStatus_isNULL); ToStringInt("DetailedStatus", DetailedStatus, DetailedStatus_isNULL); ToStringInt("OperatingStatus", OperatingStatus, OperatingStatus_isNULL); ToStringInt("PrimaryStatus", PrimaryStatus, PrimaryStatus_isNULL); ToStringInt("EnabledState", EnabledState, EnabledState_isNULL); ToString("OtherEnabledState", OtherEnabledState, OtherEnabledState_isNULL); ToStringInt("RequestedState", RequestedState, RequestedState_isNULL); ToStringInt("EnabledDefault", EnabledDefault, EnabledDefault_isNULL); ToString("TimeOfLastStateChange", TimeOfLastStateChange, TimeOfLastStateChange_isNULL); ToStringArrayInt("AvailableRequestedStates", AvailableRequestedStates, AvailableRequestedStates_isNULL); ToStringInt("TransitioningToState", TransitioningToState, TransitioningToState_isNULL); ToString("SystemCreationClassName", SystemCreationClassName, SystemCreationClassName_isNULL); ToString("SystemName", SystemName, SystemName_isNULL); ToString("CreationClassName", CreationClassName, CreationClassName_isNULL); ToString("Name", Name, Name_isNULL); ToString("PrimaryOwnerName", PrimaryOwnerName, PrimaryOwnerName_isNULL); ToString("PrimaryOwnerContact", PrimaryOwnerContact, PrimaryOwnerContact_isNULL); ToString("StartMode", StartMode, StartMode_isNULL); ToString("Started", Started, Started_isNULL); os << " [\\OpenDRIM_BIOSService]" << endl; return os; } int main() { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSService_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = BIOS_OpenDRIM_BIOSService_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 = BIOS_OpenDRIM_BIOSService_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 = BIOS_OpenDRIM_BIOSService_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 = BIOS_OpenDRIM_BIOSService_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-bios-1.0.0~ppa/test/testOpenDRIM_BIOSElement.cpp0000644000175000017500000001510211400645636024570 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSElement.h" #include "OpenDRIM_BIOSElementAccess.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_BIOSElement& instance) { os << " [OpenDRIM_BIOSElement]" << endl; ToString("InstanceID", InstanceID, InstanceID_isNULL); ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("InstallDate", InstallDate, InstallDate_isNULL); ToStringArrayInt("OperationalStatus", OperationalStatus, OperationalStatus_isNULL); ToStringArray("StatusDescriptions", StatusDescriptions, StatusDescriptions_isNULL); ToString("Status", Status, Status_isNULL); ToStringInt("HealthState", HealthState, HealthState_isNULL); ToStringInt("CommunicationStatus", CommunicationStatus, CommunicationStatus_isNULL); ToStringInt("DetailedStatus", DetailedStatus, DetailedStatus_isNULL); ToStringInt("OperatingStatus", OperatingStatus, OperatingStatus_isNULL); ToStringInt("PrimaryStatus", PrimaryStatus, PrimaryStatus_isNULL); ToString("Name", Name, Name_isNULL); ToString("Version", Version, Version_isNULL); ToStringInt("SoftwareElementState", SoftwareElementState, SoftwareElementState_isNULL); ToString("SoftwareElementID", SoftwareElementID, SoftwareElementID_isNULL); ToStringInt("TargetOperatingSystem", TargetOperatingSystem, TargetOperatingSystem_isNULL); ToString("OtherTargetOS", OtherTargetOS, OtherTargetOS_isNULL); ToString("BuildNumber", BuildNumber, BuildNumber_isNULL); ToString("SerialNumber", SerialNumber, SerialNumber_isNULL); ToString("CodeSet", CodeSet, CodeSet_isNULL); ToString("IdentificationCode", IdentificationCode, IdentificationCode_isNULL); ToString("LanguageEdition", LanguageEdition, LanguageEdition_isNULL); ToString("Manufacturer", Manufacturer, Manufacturer_isNULL); ToString("PrimaryBIOS", PrimaryBIOS, PrimaryBIOS_isNULL); ToStringArray("ListOfLanguages", ListOfLanguages, ListOfLanguages_isNULL); ToString("CurrentLanguage", CurrentLanguage, CurrentLanguage_isNULL); ToString("LoadedStartingAddress", LoadedStartingAddress, LoadedStartingAddress_isNULL); ToString("LoadedEndingAddress", LoadedEndingAddress, LoadedEndingAddress_isNULL); ToString("LoadUtilityInformation", LoadUtilityInformation, LoadUtilityInformation_isNULL); ToString("ReleaseDate", ReleaseDate, ReleaseDate_isNULL); ToStringArray("RegistryURIs", RegistryURIs, RegistryURIs_isNULL); os << " [\\OpenDRIM_BIOSElement]" << endl; return os; } int main() { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSElement_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = BIOS_OpenDRIM_BIOSElement_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 = BIOS_OpenDRIM_BIOSElement_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 = BIOS_OpenDRIM_BIOSElement_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 = BIOS_OpenDRIM_BIOSElement_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-bios-1.0.0~ppa/test/testOpenDRIM_BIOSServiceCapabilities.cpp0000644000175000017500000001203311400645636027111 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSServiceCapabilities.h" #include "OpenDRIM_BIOSServiceCapabilitiesAccess.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_BIOSServiceCapabilities& instance) { os << " [OpenDRIM_BIOSServiceCapabilities]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("InstanceID", InstanceID, InstanceID_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToStringArray("MethodsSupported", MethodsSupported, MethodsSupported_isNULL); ToStringArray("SupportedPasswordAlgorithms", SupportedPasswordAlgorithms, SupportedPasswordAlgorithms_isNULL); ToStringArray("SupportedPasswordEncodings", SupportedPasswordEncodings, SupportedPasswordEncodings_isNULL); os << " [\\OpenDRIM_BIOSServiceCapabilities]" << endl; return os; } int main() { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSServiceCapabilities_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = BIOS_OpenDRIM_BIOSServiceCapabilities_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 = BIOS_OpenDRIM_BIOSServiceCapabilities_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 = BIOS_OpenDRIM_BIOSServiceCapabilities_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 = BIOS_OpenDRIM_BIOSServiceCapabilities_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-bios-1.0.0~ppa/test/testOpenDRIM_OrderedMemberOfBIOSCollection.cpp0000644000175000017500000001141611400645636030220 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_OrderedMemberOfBIOSCollection.h" #include "OpenDRIM_OrderedMemberOfBIOSCollectionAccess.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_OrderedMemberOfBIOSCollection& instance) { os << " [OpenDRIM_OrderedMemberOfBIOSCollection]" << endl; ToStringRef("Collection", Collection, Collection_isNULL); ToStringRef("Member", Member, Member_isNULL); ToString("AssignedSequence", AssignedSequence, AssignedSequence_isNULL); os << " [\\OpenDRIM_OrderedMemberOfBIOSCollection]" << endl; return os; } int main() { string errorMessage; int errorCode = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_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 = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_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 = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_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 = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-bios-1.0.0~ppa/test/testOpenDRIM_BIOSConcreteCollection.cpp0000644000175000017500000001134311400645636026760 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSConcreteCollection.h" #include "OpenDRIM_BIOSConcreteCollectionAccess.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_BIOSConcreteCollection& instance) { os << " [OpenDRIM_BIOSConcreteCollection]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("InstanceID", InstanceID, InstanceID_isNULL); os << " [\\OpenDRIM_BIOSConcreteCollection]" << endl; return os; } int main() { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConcreteCollection_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = BIOS_OpenDRIM_BIOSConcreteCollection_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 = BIOS_OpenDRIM_BIOSConcreteCollection_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 = BIOS_OpenDRIM_BIOSConcreteCollection_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 = BIOS_OpenDRIM_BIOSConcreteCollection_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-bios-1.0.0~ppa/test/testOpenDRIM_BIOSInteger.cpp0000644000175000017500000001234311400645636024600 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSInteger.h" #include "OpenDRIM_BIOSIntegerAccess.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_BIOSInteger& instance) { os << " [OpenDRIM_BIOSInteger]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("InstanceID", InstanceID, InstanceID_isNULL); ToString("AttributeName", AttributeName, AttributeName_isNULL); ToStringArray("CurrentValue", CurrentValue, CurrentValue_isNULL); ToStringArray("DefaultValue", DefaultValue, DefaultValue_isNULL); ToStringArray("PendingValue", PendingValue, PendingValue_isNULL); ToString("IsOrderedList", IsOrderedList, IsOrderedList_isNULL); ToString("IsReadOnly", IsReadOnly, IsReadOnly_isNULL); ToString("LowerBound", LowerBound, LowerBound_isNULL); ToString("UpperBound", UpperBound, UpperBound_isNULL); ToString("ProgrammaticUnit", ProgrammaticUnit, ProgrammaticUnit_isNULL); ToString("ScalarIncrement", ScalarIncrement, ScalarIncrement_isNULL); os << " [\\OpenDRIM_BIOSInteger]" << endl; return os; } int main() { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSInteger_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = BIOS_OpenDRIM_BIOSInteger_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 = BIOS_OpenDRIM_BIOSInteger_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 = BIOS_OpenDRIM_BIOSInteger_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 = BIOS_OpenDRIM_BIOSInteger_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-bios-1.0.0~ppa/test/testOpenDRIM_BIOSString.cpp0000644000175000017500000001227711400645636024457 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSString.h" #include "OpenDRIM_BIOSStringAccess.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_BIOSString& instance) { os << " [OpenDRIM_BIOSString]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("InstanceID", InstanceID, InstanceID_isNULL); ToString("AttributeName", AttributeName, AttributeName_isNULL); ToStringArray("CurrentValue", CurrentValue, CurrentValue_isNULL); ToStringArray("DefaultValue", DefaultValue, DefaultValue_isNULL); ToStringArray("PendingValue", PendingValue, PendingValue_isNULL); ToString("IsOrderedList", IsOrderedList, IsOrderedList_isNULL); ToString("IsReadOnly", IsReadOnly, IsReadOnly_isNULL); ToString("StringType", StringType, StringType_isNULL); ToString("MinLength", MinLength, MinLength_isNULL); ToString("MaxLength", MaxLength, MaxLength_isNULL); ToString("ValueExpression", ValueExpression, ValueExpression_isNULL); os << " [\\OpenDRIM_BIOSString]" << endl; return os; } int main() { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSString_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = BIOS_OpenDRIM_BIOSString_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 = BIOS_OpenDRIM_BIOSString_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 = BIOS_OpenDRIM_BIOSString_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 = BIOS_OpenDRIM_BIOSString_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-bios-1.0.0~ppa/test/testOpenDRIM_BIOSEnumeration.cpp0000644000175000017500000001230511400645636025467 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSEnumeration.h" #include "OpenDRIM_BIOSEnumerationAccess.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_BIOSEnumeration& instance) { os << " [OpenDRIM_BIOSEnumeration]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("InstanceID", InstanceID, InstanceID_isNULL); ToString("AttributeName", AttributeName, AttributeName_isNULL); ToStringArray("CurrentValue", CurrentValue, CurrentValue_isNULL); ToStringArray("DefaultValue", DefaultValue, DefaultValue_isNULL); ToStringArray("PendingValue", PendingValue, PendingValue_isNULL); ToString("IsOrderedList", IsOrderedList, IsOrderedList_isNULL); ToString("IsReadOnly", IsReadOnly, IsReadOnly_isNULL); ToStringArray("PossibleValues", PossibleValues, PossibleValues_isNULL); ToStringArray("PossibleValuesDescription", PossibleValuesDescription, PossibleValuesDescription_isNULL); os << " [\\OpenDRIM_BIOSEnumeration]" << endl; return os; } int main() { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSEnumeration_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = BIOS_OpenDRIM_BIOSEnumeration_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 = BIOS_OpenDRIM_BIOSEnumeration_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 = BIOS_OpenDRIM_BIOSEnumeration_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 = BIOS_OpenDRIM_BIOSEnumeration_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-bios-1.0.0~ppa/test/testOpenDRIM_ServiceAffectsComputerSystem.cpp0000644000175000017500000001165511400645636030353 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_ServiceAffectsComputerSystem.h" #include "OpenDRIM_ServiceAffectsComputerSystemAccess.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_ServiceAffectsComputerSystem& instance) { os << " [OpenDRIM_ServiceAffectsComputerSystem]" << endl; ToStringRef("AffectedElement", AffectedElement, AffectedElement_isNULL); ToStringRef("AffectingElement", AffectingElement, AffectingElement_isNULL); ToStringArrayInt("ElementEffects", ElementEffects, ElementEffects_isNULL); ToStringArray("OtherElementEffectsDescriptions", OtherElementEffectsDescriptions, OtherElementEffectsDescriptions_isNULL); os << " [\\OpenDRIM_ServiceAffectsComputerSystem]" << endl; return os; } int main() { string errorMessage; int errorCode = BIOS_OpenDRIM_ServiceAffectsComputerSystem_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = BIOS_OpenDRIM_ServiceAffectsComputerSystem_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 = BIOS_OpenDRIM_ServiceAffectsComputerSystem_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 = BIOS_OpenDRIM_ServiceAffectsComputerSystem_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 = BIOS_OpenDRIM_ServiceAffectsComputerSystem_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-bios-1.0.0~ppa/test/testOpenDRIM_BIOSHostedService.cpp0000644000175000017500000001107511400645636025753 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSHostedService.h" #include "OpenDRIM_BIOSHostedServiceAccess.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_BIOSHostedService& instance) { os << " [OpenDRIM_BIOSHostedService]" << endl; ToStringRef("Antecedent", Antecedent, Antecedent_isNULL); ToStringRef("Dependent", Dependent, Dependent_isNULL); os << " [\\OpenDRIM_BIOSHostedService]" << endl; return os; } int main() { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSHostedService_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = BIOS_OpenDRIM_BIOSHostedService_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 = BIOS_OpenDRIM_BIOSHostedService_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 = BIOS_OpenDRIM_BIOSHostedService_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 = BIOS_OpenDRIM_BIOSHostedService_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-bios-1.0.0~ppa/test/testOpenDRIM_BIOSRegisteredProfile.cpp0000644000175000017500000001235011400645636026617 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSRegisteredProfile.h" #include "OpenDRIM_BIOSRegisteredProfileAccess.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_BIOSRegisteredProfile& instance) { os << " [OpenDRIM_BIOSRegisteredProfile]" << 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_BIOSRegisteredProfile]" << endl; return os; } int main() { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSRegisteredProfile_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = BIOS_OpenDRIM_BIOSRegisteredProfile_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 = BIOS_OpenDRIM_BIOSRegisteredProfile_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 = BIOS_OpenDRIM_BIOSRegisteredProfile_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 = BIOS_OpenDRIM_BIOSRegisteredProfile_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-bios-1.0.0~ppa/test/testOpenDRIM_BIOSConcreteDependency.cpp0000644000175000017500000001117111400645636026742 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSConcreteDependency.h" #include "OpenDRIM_BIOSConcreteDependencyAccess.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_BIOSConcreteDependency& instance) { os << " [OpenDRIM_BIOSConcreteDependency]" << endl; ToStringRef("Antecedent", Antecedent, Antecedent_isNULL); ToStringRef("Dependent", Dependent, Dependent_isNULL); os << " [\\OpenDRIM_BIOSConcreteDependency]" << endl; return os; } int main() { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConcreteDependency_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = BIOS_OpenDRIM_BIOSConcreteDependency_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 = BIOS_OpenDRIM_BIOSConcreteDependency_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 = BIOS_OpenDRIM_BIOSConcreteDependency_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 = BIOS_OpenDRIM_BIOSConcreteDependency_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-bios-1.0.0~ppa/test/testOpenDRIM_SystemBIOS.cpp0000644000175000017500000001100111400645636024455 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_SystemBIOS.h" #include "OpenDRIM_SystemBIOSAccess.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_SystemBIOS& instance) { os << " [OpenDRIM_SystemBIOS]" << endl; ToStringRef("GroupComponent", GroupComponent, GroupComponent_isNULL); ToStringRef("PartComponent", PartComponent, PartComponent_isNULL); os << " [\\OpenDRIM_SystemBIOS]" << endl; return os; } int main() { string errorMessage; int errorCode = BIOS_OpenDRIM_SystemBIOS_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = BIOS_OpenDRIM_SystemBIOS_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 = BIOS_OpenDRIM_SystemBIOS_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 = BIOS_OpenDRIM_SystemBIOS_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 = BIOS_OpenDRIM_SystemBIOS_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-bios-1.0.0~ppa/test/testOpenDRIM_BIOSCapabilities.cpp0000644000175000017500000001122511400645636025572 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSCapabilities.h" #include "OpenDRIM_BIOSCapabilitiesAccess.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_BIOSCapabilities& instance) { os << " [OpenDRIM_BIOSCapabilities]" << endl; ToStringRef("ManagedElement", ManagedElement, ManagedElement_isNULL); ToStringRef("Capabilities", Capabilities, Capabilities_isNULL); ToStringArrayInt("Characteristics", Characteristics, Characteristics_isNULL); os << " [\\OpenDRIM_BIOSCapabilities]" << endl; return os; } int main() { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSCapabilities_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = BIOS_OpenDRIM_BIOSCapabilities_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 = BIOS_OpenDRIM_BIOSCapabilities_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 = BIOS_OpenDRIM_BIOSCapabilities_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 = BIOS_OpenDRIM_BIOSCapabilities_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-bios-1.0.0~ppa/test/testOpenDRIM_BIOSPassword.cpp0000644000175000017500000001231311400645636025002 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSPassword.h" #include "OpenDRIM_BIOSPasswordAccess.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_BIOSPassword& instance) { os << " [OpenDRIM_BIOSPassword]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToString("InstanceID", InstanceID, InstanceID_isNULL); ToString("AttributeName", AttributeName, AttributeName_isNULL); ToStringArray("DefaultValue", DefaultValue, DefaultValue_isNULL); ToString("IsOrderedList", IsOrderedList, IsOrderedList_isNULL); ToString("IsReadOnly", IsReadOnly, IsReadOnly_isNULL); ToString("MinLength", MinLength, MinLength_isNULL); ToString("MaxLength", MaxLength, MaxLength_isNULL); ToStringArray("CurrentValue", CurrentValue, CurrentValue_isNULL); ToStringArray("PendingValue", PendingValue, PendingValue_isNULL); ToString("PasswordEncoding", PasswordEncoding, PasswordEncoding_isNULL); ToString("IsSet", IsSet, IsSet_isNULL); os << " [\\OpenDRIM_BIOSPassword]" << endl; return os; } int main() { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSPassword_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = BIOS_OpenDRIM_BIOSPassword_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 = BIOS_OpenDRIM_BIOSPassword_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 = BIOS_OpenDRIM_BIOSPassword_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 = BIOS_OpenDRIM_BIOSPassword_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-bios-1.0.0~ppa/test/testOpenDRIM_OwningCollectionBIOS.cpp0000644000175000017500000001116311400645636026457 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_OwningCollectionBIOS.h" #include "OpenDRIM_OwningCollectionBIOSAccess.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_OwningCollectionBIOS& instance) { os << " [OpenDRIM_OwningCollectionBIOS]" << endl; ToStringRef("OwningElement", OwningElement, OwningElement_isNULL); ToStringRef("OwnedElement", OwnedElement, OwnedElement_isNULL); os << " [\\OpenDRIM_OwningCollectionBIOS]" << endl; return os; } int main() { string errorMessage; int errorCode = BIOS_OpenDRIM_OwningCollectionBIOS_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = BIOS_OpenDRIM_OwningCollectionBIOS_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 = BIOS_OpenDRIM_OwningCollectionBIOS_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 = BIOS_OpenDRIM_OwningCollectionBIOS_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 = BIOS_OpenDRIM_OwningCollectionBIOS_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-bios-1.0.0~ppa/test/testOpenDRIM_ServiceAffectsBIOSAttribute.cpp0000644000175000017500000001164111400645636027763 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_ServiceAffectsBIOSAttribute.h" #include "OpenDRIM_ServiceAffectsBIOSAttributeAccess.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_ServiceAffectsBIOSAttribute& instance) { os << " [OpenDRIM_ServiceAffectsBIOSAttribute]" << endl; ToStringRef("AffectedElement", AffectedElement, AffectedElement_isNULL); ToStringRef("AffectingElement", AffectingElement, AffectingElement_isNULL); ToStringArrayInt("ElementEffects", ElementEffects, ElementEffects_isNULL); ToStringArray("OtherElementEffectsDescriptions", OtherElementEffectsDescriptions, OtherElementEffectsDescriptions_isNULL); os << " [\\OpenDRIM_ServiceAffectsBIOSAttribute]" << endl; return os; } int main() { string errorMessage; int errorCode = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_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 = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_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 = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_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 = BIOS_OpenDRIM_ServiceAffectsBIOSAttribute_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSElement/0000755000175000017500000000000011400645636022206 5ustar guillaumeguillaumeopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSElement/cmpiOpenDRIM_BIOSElement.h0000644000175000017500000000412311400645636026733 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSELEMENT_H_ #define CMPIOPENDRIM_BIOSELEMENT_H_ #include "OpenDRIM_BIOSElement.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSElement_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSElement& instance); CMPIInstance* BIOS_OpenDRIM_BIOSElement_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSElement& instance); void BIOS_OpenDRIM_BIOSElement_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSElement& instance); void BIOS_OpenDRIM_BIOSElement_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSElement& instance); #endif /*CMPIOPENDRIM_BIOSELEMENT_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSElement/Makefile.am0000644000175000017500000000371011400645636024243 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 = libcmpiBIOS_OpenDRIM_BIOSElementProvider.la libcmpiBIOS_OpenDRIM_BIOSElementProvider_la_SOURCES = OpenDRIM_BIOSElementAccess.cpp OpenDRIM_BIOSElementProvider.cpp cmpiOpenDRIM_BIOSElement.cpp libcmpiBIOS_OpenDRIM_BIOSElementProvider_la_LIBADD = ../Common/libcmpiBIOS_Common.la libcmpiBIOS_OpenDRIM_BIOSElementProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_BIOSElement.h OpenDRIM_BIOSElement.h OpenDRIM_BIOSElementAccess.h opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSElement/OpenDRIM_BIOSElement.h0000644000175000017500000003377311400645636026077 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSELEMENT_H_ #define OPENDRIM_BIOSELEMENT_H_ #include const static char* OpenDRIM_BIOSElement_classnames[] = {"OpenDRIM_BIOSElement"}; static string OpenDRIM_BIOSElement_NAMESPACE = _NAMESPACE; class OpenDRIM_BIOSElement { public: string InstanceID; bool InstanceID_isNULL; string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string ElementName; bool ElementName_isNULL; string InstallDate; bool InstallDate_isNULL; vector OperationalStatus; bool OperationalStatus_isNULL; vector StatusDescriptions; bool StatusDescriptions_isNULL; string Status; bool Status_isNULL; unsigned short HealthState; bool HealthState_isNULL; unsigned short CommunicationStatus; bool CommunicationStatus_isNULL; unsigned short DetailedStatus; bool DetailedStatus_isNULL; unsigned short OperatingStatus; bool OperatingStatus_isNULL; unsigned short PrimaryStatus; bool PrimaryStatus_isNULL; string Name; bool Name_isNULL; string Version; bool Version_isNULL; unsigned short SoftwareElementState; bool SoftwareElementState_isNULL; string SoftwareElementID; bool SoftwareElementID_isNULL; unsigned short TargetOperatingSystem; bool TargetOperatingSystem_isNULL; string OtherTargetOS; bool OtherTargetOS_isNULL; string BuildNumber; bool BuildNumber_isNULL; string SerialNumber; bool SerialNumber_isNULL; string CodeSet; bool CodeSet_isNULL; string IdentificationCode; bool IdentificationCode_isNULL; string LanguageEdition; bool LanguageEdition_isNULL; string Manufacturer; bool Manufacturer_isNULL; bool PrimaryBIOS; bool PrimaryBIOS_isNULL; vector ListOfLanguages; bool ListOfLanguages_isNULL; string CurrentLanguage; bool CurrentLanguage_isNULL; unsigned long long LoadedStartingAddress; bool LoadedStartingAddress_isNULL; unsigned long long LoadedEndingAddress; bool LoadedEndingAddress_isNULL; string LoadUtilityInformation; bool LoadUtilityInformation_isNULL; string ReleaseDate; bool ReleaseDate_isNULL; vector RegistryURIs; bool RegistryURIs_isNULL; OpenDRIM_BIOSElement() { InstanceID_isNULL = true; Caption_isNULL = true; Description_isNULL = true; ElementName_isNULL = true; InstallDate_isNULL = true; OperationalStatus_isNULL = true; StatusDescriptions_isNULL = true; Status_isNULL = true; HealthState_isNULL = true; CommunicationStatus_isNULL = true; DetailedStatus_isNULL = true; OperatingStatus_isNULL = true; PrimaryStatus_isNULL = true; Name_isNULL = true; Version_isNULL = true; SoftwareElementState_isNULL = true; SoftwareElementID_isNULL = true; TargetOperatingSystem_isNULL = true; OtherTargetOS_isNULL = true; BuildNumber_isNULL = true; SerialNumber_isNULL = true; CodeSet_isNULL = true; IdentificationCode_isNULL = true; LanguageEdition_isNULL = true; Manufacturer_isNULL = true; PrimaryBIOS_isNULL = true; ListOfLanguages_isNULL = true; CurrentLanguage_isNULL = true; LoadedStartingAddress_isNULL = true; LoadedEndingAddress_isNULL = true; LoadUtilityInformation_isNULL = true; ReleaseDate_isNULL = true; RegistryURIs_isNULL = true; } ~OpenDRIM_BIOSElement() {} string getKeys() const { return CF_toLowCase(".Name=\"" + CF_quoteString(Name) + "\""".Version=\"" + CF_quoteString(Version) + "\""".SoftwareElementState=\"" + CF_intToStr(SoftwareElementState) + "\""".SoftwareElementID=\"" + CF_quoteString(SoftwareElementID) + "\""".TargetOperatingSystem=\"" + CF_intToStr(TargetOperatingSystem) + "\""); } 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 getCaption(string& value) const { if (Caption_isNULL==true) return NOT_FOUND; value = Caption; return OK; } int setCaption(const string& newValue) { Caption = newValue; Caption_isNULL = false; return OK; } int getDescription(string& value) const { if (Description_isNULL==true) return NOT_FOUND; value = Description; return OK; } int setDescription(const string& newValue) { Description = newValue; Description_isNULL = false; return OK; } int getElementName(string& value) const { if (ElementName_isNULL==true) return NOT_FOUND; value = ElementName; return OK; } int setElementName(const string& newValue) { ElementName = newValue; ElementName_isNULL = false; return OK; } int getInstallDate(string& value) const { if (InstallDate_isNULL==true) return NOT_FOUND; value = InstallDate; return OK; } int setInstallDate(const string& newValue) { InstallDate = newValue; InstallDate_isNULL = false; return OK; } int getOperationalStatus(vector& value) const { if (OperationalStatus_isNULL==true) return NOT_FOUND; value = OperationalStatus; return OK; } int setOperationalStatus(const vector& newValue) { OperationalStatus = newValue; OperationalStatus_isNULL = false; return OK; } int getStatusDescriptions(vector& value) const { if (StatusDescriptions_isNULL==true) return NOT_FOUND; value = StatusDescriptions; return OK; } int setStatusDescriptions(const vector& newValue) { StatusDescriptions = newValue; StatusDescriptions_isNULL = false; return OK; } int getStatus(string& value) const { if (Status_isNULL==true) return NOT_FOUND; value = Status; return OK; } int setStatus(const string& newValue) { Status = newValue; Status_isNULL = false; return OK; } int getHealthState(unsigned short& value) const { if (HealthState_isNULL==true) return NOT_FOUND; value = HealthState; return OK; } int setHealthState(const unsigned short& newValue) { HealthState = newValue; HealthState_isNULL = false; return OK; } int 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 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 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 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 getVersion(string& value) const { if (Version_isNULL==true) return NOT_FOUND; value = Version; return OK; } int setVersion(const string& newValue) { Version = newValue; Version_isNULL = false; return OK; } int getSoftwareElementState(unsigned short& value) const { if (SoftwareElementState_isNULL==true) return NOT_FOUND; value = SoftwareElementState; return OK; } int setSoftwareElementState(const unsigned short& newValue) { SoftwareElementState = newValue; SoftwareElementState_isNULL = false; return OK; } int getSoftwareElementID(string& value) const { if (SoftwareElementID_isNULL==true) return NOT_FOUND; value = SoftwareElementID; return OK; } int setSoftwareElementID(const string& newValue) { SoftwareElementID = newValue; SoftwareElementID_isNULL = false; return OK; } int getTargetOperatingSystem(unsigned short& value) const { if (TargetOperatingSystem_isNULL==true) return NOT_FOUND; value = TargetOperatingSystem; return OK; } int setTargetOperatingSystem(const unsigned short& newValue) { TargetOperatingSystem = newValue; TargetOperatingSystem_isNULL = false; return OK; } int getOtherTargetOS(string& value) const { if (OtherTargetOS_isNULL==true) return NOT_FOUND; value = OtherTargetOS; return OK; } int setOtherTargetOS(const string& newValue) { OtherTargetOS = newValue; OtherTargetOS_isNULL = false; return OK; } int getBuildNumber(string& value) const { if (BuildNumber_isNULL==true) return NOT_FOUND; value = BuildNumber; return OK; } int setBuildNumber(const string& newValue) { BuildNumber = newValue; BuildNumber_isNULL = false; return OK; } int getSerialNumber(string& value) const { if (SerialNumber_isNULL==true) return NOT_FOUND; value = SerialNumber; return OK; } int setSerialNumber(const string& newValue) { SerialNumber = newValue; SerialNumber_isNULL = false; return OK; } int getCodeSet(string& value) const { if (CodeSet_isNULL==true) return NOT_FOUND; value = CodeSet; return OK; } int setCodeSet(const string& newValue) { CodeSet = newValue; CodeSet_isNULL = false; return OK; } int getIdentificationCode(string& value) const { if (IdentificationCode_isNULL==true) return NOT_FOUND; value = IdentificationCode; return OK; } int setIdentificationCode(const string& newValue) { IdentificationCode = newValue; IdentificationCode_isNULL = false; return OK; } int getLanguageEdition(string& value) const { if (LanguageEdition_isNULL==true) return NOT_FOUND; value = LanguageEdition; return OK; } int setLanguageEdition(const string& newValue) { LanguageEdition = newValue; LanguageEdition_isNULL = false; return OK; } int getManufacturer(string& value) const { if (Manufacturer_isNULL==true) return NOT_FOUND; value = Manufacturer; return OK; } int setManufacturer(const string& newValue) { Manufacturer = newValue; Manufacturer_isNULL = false; return OK; } int getPrimaryBIOS(bool& value) const { if (PrimaryBIOS_isNULL==true) return NOT_FOUND; value = PrimaryBIOS; return OK; } int setPrimaryBIOS(const bool& newValue) { PrimaryBIOS = newValue; PrimaryBIOS_isNULL = false; return OK; } int getListOfLanguages(vector& value) const { if (ListOfLanguages_isNULL==true) return NOT_FOUND; value = ListOfLanguages; return OK; } int setListOfLanguages(const vector& newValue) { ListOfLanguages = newValue; ListOfLanguages_isNULL = false; return OK; } int getCurrentLanguage(string& value) const { if (CurrentLanguage_isNULL==true) return NOT_FOUND; value = CurrentLanguage; return OK; } int setCurrentLanguage(const string& newValue) { CurrentLanguage = newValue; CurrentLanguage_isNULL = false; return OK; } int getLoadedStartingAddress(unsigned long long& value) const { if (LoadedStartingAddress_isNULL==true) return NOT_FOUND; value = LoadedStartingAddress; return OK; } int setLoadedStartingAddress(const unsigned long long& newValue) { LoadedStartingAddress = newValue; LoadedStartingAddress_isNULL = false; return OK; } int getLoadedEndingAddress(unsigned long long& value) const { if (LoadedEndingAddress_isNULL==true) return NOT_FOUND; value = LoadedEndingAddress; return OK; } int setLoadedEndingAddress(const unsigned long long& newValue) { LoadedEndingAddress = newValue; LoadedEndingAddress_isNULL = false; return OK; } int getLoadUtilityInformation(string& value) const { if (LoadUtilityInformation_isNULL==true) return NOT_FOUND; value = LoadUtilityInformation; return OK; } int setLoadUtilityInformation(const string& newValue) { LoadUtilityInformation = newValue; LoadUtilityInformation_isNULL = false; return OK; } int getReleaseDate(string& value) const { if (ReleaseDate_isNULL==true) return NOT_FOUND; value = ReleaseDate; return OK; } int setReleaseDate(const string& newValue) { ReleaseDate = newValue; ReleaseDate_isNULL = false; return OK; } int getRegistryURIs(vector& value) const { if (RegistryURIs_isNULL==true) return NOT_FOUND; value = RegistryURIs; return OK; } int setRegistryURIs(const vector& newValue) { RegistryURIs = newValue; RegistryURIs_isNULL = false; return OK; } }; #endif /*OPENDRIM_BIOSELEMENT_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSElement/cmpiOpenDRIM_BIOSElement.cpp0000644000175000017500000002335611400645636027277 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSElement.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSElement_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSElement& instance) { _E_; Objectpath op(broker, OpenDRIM_BIOSElement_classnames[0], OpenDRIM_BIOSElement_NAMESPACE); if (!instance.Name_isNULL) op.addKey("Name", instance.Name); if (!instance.Version_isNULL) op.addKey("Version", instance.Version); if (!instance.SoftwareElementState_isNULL) op.addKey("SoftwareElementState", instance.SoftwareElementState); if (!instance.SoftwareElementID_isNULL) op.addKey("SoftwareElementID", instance.SoftwareElementID); if (!instance.TargetOperatingSystem_isNULL) op.addKey("TargetOperatingSystem", instance.TargetOperatingSystem); _L_; return op.getHdl(); } CMPIInstance* BIOS_OpenDRIM_BIOSElement_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSElement& instance) { _E_; Objectpath op(broker, BIOS_OpenDRIM_BIOSElement_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.InstanceID_isNULL) ci.setProperty("InstanceID", instance.InstanceID); if (!instance.Caption_isNULL) ci.setProperty("Caption", instance.Caption); if (!instance.Description_isNULL) ci.setProperty("Description", instance.Description); if (!instance.ElementName_isNULL) ci.setProperty("ElementName", instance.ElementName); if (!instance.InstallDate_isNULL) ci.setPropertyDatetime("InstallDate", instance.InstallDate); if (!instance.OperationalStatus_isNULL) ci.setProperty("OperationalStatus", instance.OperationalStatus); if (!instance.StatusDescriptions_isNULL) ci.setProperty("StatusDescriptions", instance.StatusDescriptions); if (!instance.Status_isNULL) ci.setProperty("Status", instance.Status); if (!instance.HealthState_isNULL) ci.setProperty("HealthState", instance.HealthState); if (!instance.CommunicationStatus_isNULL) ci.setProperty("CommunicationStatus", instance.CommunicationStatus); if (!instance.DetailedStatus_isNULL) ci.setProperty("DetailedStatus", instance.DetailedStatus); if (!instance.OperatingStatus_isNULL) ci.setProperty("OperatingStatus", instance.OperatingStatus); if (!instance.PrimaryStatus_isNULL) ci.setProperty("PrimaryStatus", instance.PrimaryStatus); if (!instance.OtherTargetOS_isNULL) ci.setProperty("OtherTargetOS", instance.OtherTargetOS); if (!instance.BuildNumber_isNULL) ci.setProperty("BuildNumber", instance.BuildNumber); if (!instance.SerialNumber_isNULL) ci.setProperty("SerialNumber", instance.SerialNumber); if (!instance.CodeSet_isNULL) ci.setProperty("CodeSet", instance.CodeSet); if (!instance.IdentificationCode_isNULL) ci.setProperty("IdentificationCode", instance.IdentificationCode); if (!instance.LanguageEdition_isNULL) ci.setProperty("LanguageEdition", instance.LanguageEdition); if (!instance.Manufacturer_isNULL) ci.setProperty("Manufacturer", instance.Manufacturer); if (!instance.PrimaryBIOS_isNULL) ci.setProperty("PrimaryBIOS", instance.PrimaryBIOS); if (!instance.ListOfLanguages_isNULL) ci.setProperty("ListOfLanguages", instance.ListOfLanguages); if (!instance.CurrentLanguage_isNULL) ci.setProperty("CurrentLanguage", instance.CurrentLanguage); if (!instance.LoadedStartingAddress_isNULL) ci.setProperty("LoadedStartingAddress", instance.LoadedStartingAddress); if (!instance.LoadedEndingAddress_isNULL) ci.setProperty("LoadedEndingAddress", instance.LoadedEndingAddress); if (!instance.LoadUtilityInformation_isNULL) ci.setProperty("LoadUtilityInformation", instance.LoadUtilityInformation); if (!instance.ReleaseDate_isNULL) ci.setPropertyDatetime("ReleaseDate", instance.ReleaseDate); if (!instance.RegistryURIs_isNULL) ci.setProperty("RegistryURIs", instance.RegistryURIs); _L_; return ci.getHdl(); } void BIOS_OpenDRIM_BIOSElement_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSElement& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("Name", instance.Name) == OK) instance.Name_isNULL = false; if (op.getKey("Version", instance.Version) == OK) instance.Version_isNULL = false; if (op.getKey("TargetOperatingSystem", instance.TargetOperatingSystem) == OK) instance.TargetOperatingSystem_isNULL = false; if (op.getKey("SoftwareElementID", instance.SoftwareElementID) == OK) instance.SoftwareElementID_isNULL = false; if (op.getKey("SoftwareElementState", instance.SoftwareElementState) == OK) instance.SoftwareElementState_isNULL = false; _L_; } void BIOS_OpenDRIM_BIOSElement_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSElement& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; if (inst.getProperty("Caption", instance.Caption) == OK) instance.Caption_isNULL = false; if (inst.getProperty("Description", instance.Description) == OK) instance.Description_isNULL = false; if (inst.getProperty("ElementName", instance.ElementName) == OK) instance.ElementName_isNULL = false; if (inst.getPropertyDatetime("InstallDate", instance.InstallDate) == OK) instance.InstallDate_isNULL = false; if (inst.getProperty("OperationalStatus", instance.OperationalStatus) == OK) instance.OperationalStatus_isNULL = false; if (inst.getProperty("StatusDescriptions", instance.StatusDescriptions) == OK) instance.StatusDescriptions_isNULL = false; if (inst.getProperty("Status", instance.Status) == OK) instance.Status_isNULL = false; if (inst.getProperty("HealthState", instance.HealthState) == OK) instance.HealthState_isNULL = false; if (inst.getProperty("CommunicationStatus", instance.CommunicationStatus) == OK) instance.CommunicationStatus_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("PrimaryStatus", instance.PrimaryStatus) == OK) instance.PrimaryStatus_isNULL = false; if (inst.getProperty("Name", instance.Name) == OK) instance.Name_isNULL = false; if (inst.getProperty("Version", instance.Version) == OK) instance.Version_isNULL = false; if (inst.getProperty("SoftwareElementState", instance.SoftwareElementState) == OK) instance.SoftwareElementState_isNULL = false; if (inst.getProperty("SoftwareElementID", instance.SoftwareElementID) == OK) instance.SoftwareElementID_isNULL = false; if (inst.getProperty("TargetOperatingSystem", instance.TargetOperatingSystem) == OK) instance.TargetOperatingSystem_isNULL = false; if (inst.getProperty("OtherTargetOS", instance.OtherTargetOS) == OK) instance.OtherTargetOS_isNULL = false; if (inst.getProperty("BuildNumber", instance.BuildNumber) == OK) instance.BuildNumber_isNULL = false; if (inst.getProperty("SerialNumber", instance.SerialNumber) == OK) instance.SerialNumber_isNULL = false; if (inst.getProperty("CodeSet", instance.CodeSet) == OK) instance.CodeSet_isNULL = false; if (inst.getProperty("IdentificationCode", instance.IdentificationCode) == OK) instance.IdentificationCode_isNULL = false; if (inst.getProperty("LanguageEdition", instance.LanguageEdition) == OK) instance.LanguageEdition_isNULL = false; if (inst.getProperty("Manufacturer", instance.Manufacturer) == OK) instance.Manufacturer_isNULL = false; if (inst.getProperty("PrimaryBIOS", instance.PrimaryBIOS) == OK) instance.PrimaryBIOS_isNULL = false; if (inst.getProperty("ListOfLanguages", instance.ListOfLanguages) == OK) instance.ListOfLanguages_isNULL = false; if (inst.getProperty("CurrentLanguage", instance.CurrentLanguage) == OK) instance.CurrentLanguage_isNULL = false; if (inst.getProperty("LoadedStartingAddress", instance.LoadedStartingAddress) == OK) instance.LoadedStartingAddress_isNULL = false; if (inst.getProperty("LoadedEndingAddress", instance.LoadedEndingAddress) == OK) instance.LoadedEndingAddress_isNULL = false; if (inst.getProperty("LoadUtilityInformation", instance.LoadUtilityInformation) == OK) instance.LoadUtilityInformation_isNULL = false; if (inst.getPropertyDatetime("ReleaseDate", instance.ReleaseDate) == OK) instance.ReleaseDate_isNULL = false; if (inst.getProperty("RegistryURIs", instance.RegistryURIs) == OK) instance.RegistryURIs_isNULL = false; _L_; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSElement/OpenDRIM_BIOSElementProvider.cpp0000644000175000017500000002446011400645636030136 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSElement.h" #include "OpenDRIM_BIOSElementAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define BIOS_OpenDRIM_BIOSElementProviderSetInstance BIOS_OpenDRIM_BIOSElementProviderModifyInstance #endif int BIOS_OpenDRIM_BIOSElement_init(const CMPIBroker* broker); int BIOS_OpenDRIM_BIOSElement_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus BIOS_OpenDRIM_BIOSElementProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_BIOSElement_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSElementProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSElement_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_BIOSElement_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSElementProviderEnumInstances(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 = BIOS_OpenDRIM_BIOSElement_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = BIOS_OpenDRIM_BIOSElement_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSElementProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSElement instance; BIOS_OpenDRIM_BIOSElement_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSElement_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = BIOS_OpenDRIM_BIOSElement_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSElementProviderSetInstance(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_BIOSElement newInstance, oldInstance; BIOS_OpenDRIM_BIOSElement_toCPP(_broker, ci, newInstance); BIOS_OpenDRIM_BIOSElement_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSElement_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSElement_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSElementProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSElement instance; BIOS_OpenDRIM_BIOSElement_toCPP(_broker, ci, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSElement_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_BIOSElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSElement_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSElement_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = BIOS_OpenDRIM_BIOSElement_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSElementProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSElement instance; BIOS_OpenDRIM_BIOSElement_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSElement_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSElement_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSElementProviderExecQuery(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 BIOS_OpenDRIM_BIOSElement_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSElement_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSElement_init FAILED: " + (string) OpenDRIM_BIOSElement_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int BIOS_OpenDRIM_BIOSElement_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSElement_unload(errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSElement_unload FAILED: " + (string) OpenDRIM_BIOSElement_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define BIOS_OpenDRIM_BIOSElement_INIT if (BIOS_OpenDRIM_BIOSElement_init(_broker) < 0) return NULL CMInstanceMIStub(BIOS_OpenDRIM_BIOSElementProvider, BIOS_OpenDRIM_BIOSElementProvider, _broker, BIOS_OpenDRIM_BIOSElement_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSElement/OpenDRIM_BIOSElementAccess.cpp0000644000175000017500000001131011400645636027533 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSElementAccess.h" vector bios; vector< vector > dmi_strings; int BIOS_OpenDRIM_BIOSElement_load(const CMPIBroker* broker, string& errorMessage) { _E_; SMBIOS_getBIOSInformation(bios,dmi_strings,errorMessage); _L_; return OK; } int BIOS_OpenDRIM_BIOSElement_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int BIOS_OpenDRIM_BIOSElement_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; for(unsigned int i=0;i= 0 && num < bios.size()) sprintf(buffer,"0x%X",bios[num].bios_starting); else { errorMessage="No instance"; return NOT_FOUND; } if(instance.Name.substr(0,4) != "BIOS" || instance.Version != dmi_strings[num][bios[num].bios_version] || instance.SoftwareElementState != 2 || instance.SoftwareElementID != buffer || instance.TargetOperatingSystem != 66) { errorMessage="No instance"; return NOT_FOUND; } CF_assert(BIOS_OpenDRIM_BIOSElement_populate(instance, num, errorMessage)); _L_; return OK; } int BIOS_OpenDRIM_BIOSElement_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSElement& newInstance, const OpenDRIM_BIOSElement& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSElement_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSElement& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSElement_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSElement& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSElement_populate(OpenDRIM_BIOSElement& instance, unsigned int num, string& errorMessage) { _E_; /* * Properties to fill from profile * + Mandatory: * [X] Version [KEY] * [X] Name [KEY] * [X] SoftwareElementState [KEY] * [X] SoftwareElementID [KEY] * [X] TargetOperatingSystem [KEY] * [X] Manufacturer */ instance.setManufacturer(dmi_strings[num][bios[num].vendor]); _L_; return OK; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSElement/OpenDRIM_BIOSElementAccess.h0000644000175000017500000000543711400645636027215 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSELEMENTACCESS_H_ #define OPENDRIM_BIOSELEMENTACCESS_H_ #include "BIOS_Common.h" #include "OpenDRIM_BIOSElement.h" int BIOS_OpenDRIM_BIOSElement_load(const CMPIBroker* broker, string& errorMessage); int BIOS_OpenDRIM_BIOSElement_unload(string& errorMessage); int BIOS_OpenDRIM_BIOSElement_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSElement_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BIOSElement& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSElement_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSElement& newInstance, const OpenDRIM_BIOSElement& oldInstance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSElement_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSElement& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSElement_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSElement& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSElement_populate(OpenDRIM_BIOSElement& instance, unsigned int num, string& errorMessage); #endif /*OPENDRIM_BIOSELEMENTACCESS_H_*/ opendrim-lmp-bios-1.0.0~ppa/acinclude.m40000644000175000017500000002103011400645636020670 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 , , ################################################################################ AC_DEFUN([SHOW_COPYRIGHT], [ echo "################################################################################# # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 Guillaume BOTTEX # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public 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-bios-1.0.0~ppa/OpenDRIM_BIOSService/0000755000175000017500000000000011400645636022215 5ustar guillaumeguillaumeopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSService/Makefile.am0000644000175000017500000000371011400645636024252 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 = libcmpiBIOS_OpenDRIM_BIOSServiceProvider.la libcmpiBIOS_OpenDRIM_BIOSServiceProvider_la_SOURCES = OpenDRIM_BIOSServiceAccess.cpp OpenDRIM_BIOSServiceProvider.cpp cmpiOpenDRIM_BIOSService.cpp libcmpiBIOS_OpenDRIM_BIOSServiceProvider_la_LIBADD = ../Common/libcmpiBIOS_Common.la libcmpiBIOS_OpenDRIM_BIOSServiceProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_BIOSService.h OpenDRIM_BIOSService.h OpenDRIM_BIOSServiceAccess.h opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSService/OpenDRIM_BIOSServiceProvider.cpp0000644000175000017500000004312711400645636030155 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSService.h" #include "OpenDRIM_BIOSServiceAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define BIOS_OpenDRIM_BIOSServiceProviderSetInstance BIOS_OpenDRIM_BIOSServiceProviderModifyInstance #endif int BIOS_OpenDRIM_BIOSService_init(const CMPIBroker* broker); int BIOS_OpenDRIM_BIOSService_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus BIOS_OpenDRIM_BIOSServiceProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_BIOSService_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSServiceProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSService_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_BIOSService_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSServiceProviderEnumInstances(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 = BIOS_OpenDRIM_BIOSService_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = BIOS_OpenDRIM_BIOSService_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSServiceProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSService instance; BIOS_OpenDRIM_BIOSService_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSService_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = BIOS_OpenDRIM_BIOSService_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSServiceProviderSetInstance(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_BIOSService newInstance, oldInstance; BIOS_OpenDRIM_BIOSService_toCPP(_broker, ci, newInstance); BIOS_OpenDRIM_BIOSService_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSService_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSService_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSServiceProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSService instance; BIOS_OpenDRIM_BIOSService_toCPP(_broker, ci, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSService_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_BIOSService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSService_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSService_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = BIOS_OpenDRIM_BIOSService_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSServiceProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSService instance; BIOS_OpenDRIM_BIOSService_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSService_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSService_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSServiceProviderExecQuery(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 BIOS_OpenDRIM_BIOSServiceProviderMethodCleanup(CMPIMethodMI * mi, const CMPIContext * ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_BIOSService_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSServiceProviderInvokeMethod(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_BIOSService instance; BIOS_OpenDRIM_BIOSService_toCPP(_broker, ref, instance); string errorMessage; const char* properties[] = {"SystemCreationClassName", "Name", "SystemName", "CreationClassName"}; int errorCode = BIOS_OpenDRIM_BIOSService_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } if ((string) methodName =="RequestStateChange") { unsigned int returnValue; OpenDRIM_BIOSService_RequestStateChange_In inArgs; BIOS_OpenDRIM_BIOSService_toCPP(_broker, in, inArgs); OpenDRIM_BIOSService_RequestStateChange_Out outArgs; errorCode = BIOS_OpenDRIM_BIOSService_RequestStateChange(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } BIOS_OpenDRIM_BIOSService_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else if ((string) methodName =="StartService") { unsigned int returnValue; errorCode = BIOS_OpenDRIM_BIOSService_StartService(_broker, ctx, instance, returnValue, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSService_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 if ((string) methodName =="StopService") { unsigned int returnValue; errorCode = BIOS_OpenDRIM_BIOSService_StopService(_broker, ctx, instance, returnValue, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSService_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 if ((string) methodName =="SetBIOSAttribute") { unsigned int returnValue; OpenDRIM_BIOSService_SetBIOSAttribute_In inArgs; BIOS_OpenDRIM_BIOSService_toCPP(_broker, in, inArgs); OpenDRIM_BIOSService_SetBIOSAttribute_Out outArgs; errorCode = BIOS_OpenDRIM_BIOSService_SetBIOSAttribute(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } BIOS_OpenDRIM_BIOSService_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else if ((string) methodName =="SetBIOSAttributeEmbeddedInstance") { unsigned int returnValue; OpenDRIM_BIOSService_SetBIOSAttributeEmbeddedInstance_In inArgs; BIOS_OpenDRIM_BIOSService_toCPP(_broker, in, inArgs); OpenDRIM_BIOSService_SetBIOSAttributeEmbeddedInstance_Out outArgs; errorCode = BIOS_OpenDRIM_BIOSService_SetBIOSAttributeEmbeddedInstance(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } BIOS_OpenDRIM_BIOSService_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else if ((string) methodName =="ReadRawBIOSData") { unsigned int returnValue; OpenDRIM_BIOSService_ReadRawBIOSData_In inArgs; BIOS_OpenDRIM_BIOSService_toCPP(_broker, in, inArgs); OpenDRIM_BIOSService_ReadRawBIOSData_Out outArgs; errorCode = BIOS_OpenDRIM_BIOSService_ReadRawBIOSData(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } BIOS_OpenDRIM_BIOSService_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else if ((string) methodName =="WriteRawBIOSData") { unsigned int returnValue; OpenDRIM_BIOSService_WriteRawBIOSData_In inArgs; BIOS_OpenDRIM_BIOSService_toCPP(_broker, in, inArgs); OpenDRIM_BIOSService_WriteRawBIOSData_Out outArgs; errorCode = BIOS_OpenDRIM_BIOSService_WriteRawBIOSData(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } BIOS_OpenDRIM_BIOSService_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else if ((string) methodName =="SetBIOSAttributes") { unsigned int returnValue; OpenDRIM_BIOSService_SetBIOSAttributes_In inArgs; BIOS_OpenDRIM_BIOSService_toCPP(_broker, in, inArgs); OpenDRIM_BIOSService_SetBIOSAttributes_Out outArgs; errorCode = BIOS_OpenDRIM_BIOSService_SetBIOSAttributes(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } BIOS_OpenDRIM_BIOSService_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else { errorMessage = (string) OpenDRIM_BIOSService_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 BIOS_OpenDRIM_BIOSService_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSService_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSService_init FAILED: " + (string) OpenDRIM_BIOSService_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int BIOS_OpenDRIM_BIOSService_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSService_unload(errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSService_unload FAILED: " + (string) OpenDRIM_BIOSService_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define BIOS_OpenDRIM_BIOSService_INIT if (BIOS_OpenDRIM_BIOSService_init(_broker) < 0) return NULL CMInstanceMIStub(BIOS_OpenDRIM_BIOSServiceProvider, BIOS_OpenDRIM_BIOSServiceProvider, _broker, BIOS_OpenDRIM_BIOSService_INIT); CMMethodMIStub(BIOS_OpenDRIM_BIOSServiceProvider, BIOS_OpenDRIM_BIOSServiceProvider, _broker, BIOS_OpenDRIM_BIOSService_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSService/OpenDRIM_BIOSServiceAccess.cpp0000644000175000017500000001262211400645636027560 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSServiceAccess.h" int BIOS_OpenDRIM_BIOSService_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int BIOS_OpenDRIM_BIOSService_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int BIOS_OpenDRIM_BIOSService_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSService_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BIOSService& instance, const char** properties, string& errorMessage) { _E_; _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSService_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSService& newInstance, const OpenDRIM_BIOSService& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSService_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSService& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSService_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSService& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSService_RequestStateChange(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSService& instance, unsigned int& returnValue, const OpenDRIM_BIOSService_RequestStateChange_In& in, OpenDRIM_BIOSService_RequestStateChange_Out& out, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSService_StartService(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSService& instance, unsigned int& returnValue, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSService_StopService(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSService& instance, unsigned int& returnValue, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSService_SetBIOSAttribute(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSService& instance, unsigned int& returnValue, const OpenDRIM_BIOSService_SetBIOSAttribute_In& in, OpenDRIM_BIOSService_SetBIOSAttribute_Out& out, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSService_SetBIOSAttributeEmbeddedInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSService& instance, unsigned int& returnValue, const OpenDRIM_BIOSService_SetBIOSAttributeEmbeddedInstance_In& in, OpenDRIM_BIOSService_SetBIOSAttributeEmbeddedInstance_Out& out, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSService_ReadRawBIOSData(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSService& instance, unsigned int& returnValue, const OpenDRIM_BIOSService_ReadRawBIOSData_In& in, OpenDRIM_BIOSService_ReadRawBIOSData_Out& out, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSService_WriteRawBIOSData(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSService& instance, unsigned int& returnValue, const OpenDRIM_BIOSService_WriteRawBIOSData_In& in, OpenDRIM_BIOSService_WriteRawBIOSData_Out& out, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSService_SetBIOSAttributes(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSService& instance, unsigned int& returnValue, const OpenDRIM_BIOSService_SetBIOSAttributes_In& in, OpenDRIM_BIOSService_SetBIOSAttributes_Out& out, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSService_populate(OpenDRIM_BIOSService& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSService/OpenDRIM_BIOSServiceAccess.h0000644000175000017500000001154211400645636027225 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSSERVICEACCESS_H_ #define OPENDRIM_BIOSSERVICEACCESS_H_ #include "BIOS_Common.h" #include "OpenDRIM_BIOSService.h" int BIOS_OpenDRIM_BIOSService_load(const CMPIBroker* broker, string& errorMessage); int BIOS_OpenDRIM_BIOSService_unload(string& errorMessage); int BIOS_OpenDRIM_BIOSService_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSService_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BIOSService& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSService_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSService& newInstance, const OpenDRIM_BIOSService& oldInstance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSService_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSService& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSService_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSService& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSService_RequestStateChange(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSService& instance, unsigned int& returnValue, const OpenDRIM_BIOSService_RequestStateChange_In& in, OpenDRIM_BIOSService_RequestStateChange_Out& out, string& errorMessage); int BIOS_OpenDRIM_BIOSService_StartService(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSService& instance, unsigned int& returnValue, string& errorMessage); int BIOS_OpenDRIM_BIOSService_StopService(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSService& instance, unsigned int& returnValue, string& errorMessage); int BIOS_OpenDRIM_BIOSService_SetBIOSAttribute(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSService& instance, unsigned int& returnValue, const OpenDRIM_BIOSService_SetBIOSAttribute_In& in, OpenDRIM_BIOSService_SetBIOSAttribute_Out& out, string& errorMessage); int BIOS_OpenDRIM_BIOSService_SetBIOSAttributeEmbeddedInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSService& instance, unsigned int& returnValue, const OpenDRIM_BIOSService_SetBIOSAttributeEmbeddedInstance_In& in, OpenDRIM_BIOSService_SetBIOSAttributeEmbeddedInstance_Out& out, string& errorMessage); int BIOS_OpenDRIM_BIOSService_ReadRawBIOSData(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSService& instance, unsigned int& returnValue, const OpenDRIM_BIOSService_ReadRawBIOSData_In& in, OpenDRIM_BIOSService_ReadRawBIOSData_Out& out, string& errorMessage); int BIOS_OpenDRIM_BIOSService_WriteRawBIOSData(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSService& instance, unsigned int& returnValue, const OpenDRIM_BIOSService_WriteRawBIOSData_In& in, OpenDRIM_BIOSService_WriteRawBIOSData_Out& out, string& errorMessage); int BIOS_OpenDRIM_BIOSService_SetBIOSAttributes(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSService& instance, unsigned int& returnValue, const OpenDRIM_BIOSService_SetBIOSAttributes_In& in, OpenDRIM_BIOSService_SetBIOSAttributes_Out& out, string& errorMessage); int BIOS_OpenDRIM_BIOSService_populate(OpenDRIM_BIOSService& instance, string& errorMessage); #endif /*OPENDRIM_BIOSSERVICEACCESS_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSService/cmpiOpenDRIM_BIOSService.cpp0000644000175000017500000004300311400645636027304 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSService.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSService_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSService& instance) { _E_; Objectpath op(broker, OpenDRIM_BIOSService_classnames[0], OpenDRIM_BIOSService_NAMESPACE); if (!instance.SystemCreationClassName_isNULL) op.addKey("SystemCreationClassName", instance.SystemCreationClassName); if (!instance.SystemName_isNULL) op.addKey("SystemName", instance.SystemName); if (!instance.CreationClassName_isNULL) op.addKey("CreationClassName", instance.CreationClassName); if (!instance.Name_isNULL) op.addKey("Name", instance.Name); _L_; return op.getHdl(); } CMPIInstance* BIOS_OpenDRIM_BIOSService_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSService& instance) { _E_; Objectpath op(broker, BIOS_OpenDRIM_BIOSService_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.InstanceID_isNULL) ci.setProperty("InstanceID", instance.InstanceID); if (!instance.Caption_isNULL) ci.setProperty("Caption", instance.Caption); if (!instance.Description_isNULL) ci.setProperty("Description", instance.Description); if (!instance.ElementName_isNULL) ci.setProperty("ElementName", instance.ElementName); if (!instance.InstallDate_isNULL) ci.setPropertyDatetime("InstallDate", instance.InstallDate); if (!instance.OperationalStatus_isNULL) ci.setProperty("OperationalStatus", instance.OperationalStatus); if (!instance.StatusDescriptions_isNULL) ci.setProperty("StatusDescriptions", instance.StatusDescriptions); if (!instance.Status_isNULL) ci.setProperty("Status", instance.Status); if (!instance.HealthState_isNULL) ci.setProperty("HealthState", instance.HealthState); if (!instance.CommunicationStatus_isNULL) ci.setProperty("CommunicationStatus", instance.CommunicationStatus); if (!instance.DetailedStatus_isNULL) ci.setProperty("DetailedStatus", instance.DetailedStatus); if (!instance.OperatingStatus_isNULL) ci.setProperty("OperatingStatus", instance.OperatingStatus); if (!instance.PrimaryStatus_isNULL) ci.setProperty("PrimaryStatus", instance.PrimaryStatus); 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.PrimaryOwnerName_isNULL) ci.setProperty("PrimaryOwnerName", instance.PrimaryOwnerName); if (!instance.PrimaryOwnerContact_isNULL) ci.setProperty("PrimaryOwnerContact", instance.PrimaryOwnerContact); if (!instance.StartMode_isNULL) ci.setProperty("StartMode", instance.StartMode); if (!instance.Started_isNULL) ci.setProperty("Started", instance.Started); _L_; return ci.getHdl(); } void BIOS_OpenDRIM_BIOSService_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSService& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("SystemCreationClassName", instance.SystemCreationClassName) == OK) instance.SystemCreationClassName_isNULL = false; if (op.getKey("Name", instance.Name) == OK) instance.Name_isNULL = false; if (op.getKey("SystemName", instance.SystemName) == OK) instance.SystemName_isNULL = false; if (op.getKey("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; _L_; } void BIOS_OpenDRIM_BIOSService_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSService& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; if (inst.getProperty("Caption", instance.Caption) == OK) instance.Caption_isNULL = false; if (inst.getProperty("Description", instance.Description) == OK) instance.Description_isNULL = false; if (inst.getProperty("ElementName", instance.ElementName) == OK) instance.ElementName_isNULL = false; if (inst.getPropertyDatetime("InstallDate", instance.InstallDate) == OK) instance.InstallDate_isNULL = false; if (inst.getProperty("OperationalStatus", instance.OperationalStatus) == OK) instance.OperationalStatus_isNULL = false; if (inst.getProperty("StatusDescriptions", instance.StatusDescriptions) == OK) instance.StatusDescriptions_isNULL = false; if (inst.getProperty("Status", instance.Status) == OK) instance.Status_isNULL = false; if (inst.getProperty("HealthState", instance.HealthState) == OK) instance.HealthState_isNULL = false; if (inst.getProperty("CommunicationStatus", instance.CommunicationStatus) == OK) instance.CommunicationStatus_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("PrimaryStatus", instance.PrimaryStatus) == OK) instance.PrimaryStatus_isNULL = false; if (inst.getProperty("EnabledState", instance.EnabledState) == OK) instance.EnabledState_isNULL = false; if (inst.getProperty("OtherEnabledState", instance.OtherEnabledState) == OK) instance.OtherEnabledState_isNULL = false; if (inst.getProperty("RequestedState", instance.RequestedState) == OK) instance.RequestedState_isNULL = false; if (inst.getProperty("EnabledDefault", instance.EnabledDefault) == OK) instance.EnabledDefault_isNULL = false; if (inst.getPropertyDatetime("TimeOfLastStateChange", instance.TimeOfLastStateChange) == OK) instance.TimeOfLastStateChange_isNULL = false; if (inst.getProperty("AvailableRequestedStates", instance.AvailableRequestedStates) == OK) instance.AvailableRequestedStates_isNULL = false; if (inst.getProperty("TransitioningToState", instance.TransitioningToState) == OK) instance.TransitioningToState_isNULL = false; if (inst.getProperty("SystemCreationClassName", instance.SystemCreationClassName) == OK) instance.SystemCreationClassName_isNULL = false; if (inst.getProperty("SystemName", instance.SystemName) == OK) instance.SystemName_isNULL = false; if (inst.getProperty("CreationClassName", instance.CreationClassName) == OK) instance.CreationClassName_isNULL = false; if (inst.getProperty("Name", instance.Name) == OK) instance.Name_isNULL = false; if (inst.getProperty("PrimaryOwnerName", instance.PrimaryOwnerName) == OK) instance.PrimaryOwnerName_isNULL = false; if (inst.getProperty("PrimaryOwnerContact", instance.PrimaryOwnerContact) == OK) instance.PrimaryOwnerContact_isNULL = false; if (inst.getProperty("StartMode", instance.StartMode) == OK) instance.StartMode_isNULL = false; if (inst.getProperty("Started", instance.Started) == OK) instance.Started_isNULL = false; _L_; } void BIOS_OpenDRIM_BIOSService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_BIOSService_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 BIOS_OpenDRIM_BIOSService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_BIOSService_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_; } void BIOS_OpenDRIM_BIOSService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_BIOSService_SetBIOSAttribute_In& args) { _E_; CMPIStatus rc; CMPIData data; Objectpath TargetBIOS; data = in->ft->getArg(in, "TargetBIOS", &rc); if (rc.rc == OK) { CT_ToC(broker, data, TargetBIOS); args.setTargetBIOS(TargetBIOS); } string AttributeName; data = in->ft->getArg(in, "AttributeName", &rc); if (rc.rc == OK) { CT_ToC(data, AttributeName); args.setAttributeName(AttributeName); } vector AttributeValue; data = in->ft->getArg(in, "AttributeValue", &rc); if (rc.rc == OK) { CT_ToC(data, AttributeValue); args.setAttributeValue(AttributeValue); } string AuthorizationToken; data = in->ft->getArg(in, "AuthorizationToken", &rc); if (rc.rc == OK) { CT_ToC(data, AuthorizationToken); args.setAuthorizationToken(AuthorizationToken); } unsigned int PasswordEncoding; data = in->ft->getArg(in, "PasswordEncoding", &rc); if (rc.rc == OK) { CT_ToC(data, PasswordEncoding); args.setPasswordEncoding(PasswordEncoding); } unsigned int SetResult; data = in->ft->getArg(in, "SetResult", &rc); if (rc.rc == OK) { CT_ToC(data, SetResult); args.setSetResult(SetResult); } _L_; } void BIOS_OpenDRIM_BIOSService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_BIOSService_SetBIOSAttribute_Out& args) { _E_; CMPIValue value; int errorMessage; unsigned int SetResult; errorMessage = args.getSetResult(SetResult); if (errorMessage == OK) { value = CT_toCMPI(SetResult); out->ft->addArg(out, "SetResult", &value, CMPI_uint32); } _L_; } void BIOS_OpenDRIM_BIOSService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_BIOSService_SetBIOSAttributeEmbeddedInstance_In& args) { _E_; CMPIStatus rc; CMPIData data; Objectpath TargetBIOS; data = in->ft->getArg(in, "TargetBIOS", &rc); if (rc.rc == OK) { CT_ToC(broker, data, TargetBIOS); args.setTargetBIOS(TargetBIOS); } string AttributeConfig; data = in->ft->getArg(in, "AttributeConfig", &rc); if (rc.rc == OK) { CT_ToC(data, AttributeConfig); args.setAttributeConfig(AttributeConfig); } string AuthorizationToken; data = in->ft->getArg(in, "AuthorizationToken", &rc); if (rc.rc == OK) { CT_ToC(data, AuthorizationToken); args.setAuthorizationToken(AuthorizationToken); } unsigned int PasswordEncoding; data = in->ft->getArg(in, "PasswordEncoding", &rc); if (rc.rc == OK) { CT_ToC(data, PasswordEncoding); args.setPasswordEncoding(PasswordEncoding); } unsigned int SetResult; data = in->ft->getArg(in, "SetResult", &rc); if (rc.rc == OK) { CT_ToC(data, SetResult); args.setSetResult(SetResult); } _L_; } void BIOS_OpenDRIM_BIOSService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_BIOSService_SetBIOSAttributeEmbeddedInstance_Out& args) { _E_; CMPIValue value; int errorMessage; unsigned int SetResult; errorMessage = args.getSetResult(SetResult); if (errorMessage == OK) { value = CT_toCMPI(SetResult); out->ft->addArg(out, "SetResult", &value, CMPI_uint32); } _L_; } void BIOS_OpenDRIM_BIOSService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_BIOSService_ReadRawBIOSData_In& args) { _E_; CMPIStatus rc; CMPIData data; Objectpath TargetBIOS; data = in->ft->getArg(in, "TargetBIOS", &rc); if (rc.rc == OK) { CT_ToC(broker, data, TargetBIOS); args.setTargetBIOS(TargetBIOS); } unsigned int Offset; data = in->ft->getArg(in, "Offset", &rc); if (rc.rc == OK) { CT_ToC(data, Offset); args.setOffset(Offset); } unsigned int NumberOfBytes; data = in->ft->getArg(in, "NumberOfBytes", &rc); if (rc.rc == OK) { CT_ToC(data, NumberOfBytes); args.setNumberOfBytes(NumberOfBytes); } vector Data; data = in->ft->getArg(in, "Data", &rc); if (rc.rc == OK) { CT_ToC(data, Data); args.setData(Data); } _L_; } void BIOS_OpenDRIM_BIOSService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_BIOSService_ReadRawBIOSData_Out& args) { _E_; CMPIValue value; int errorMessage; unsigned int NumberOfBytes; errorMessage = args.getNumberOfBytes(NumberOfBytes); if (errorMessage == OK) { value = CT_toCMPI(NumberOfBytes); out->ft->addArg(out, "NumberOfBytes", &value, CMPI_uint32); } vector Data; errorMessage = args.getData(Data); if (errorMessage == OK) { value = CT_toCMPI(broker, Data); out->ft->addArg(out, "Data", &value, CMPI_uint8A); } _L_; } void BIOS_OpenDRIM_BIOSService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_BIOSService_WriteRawBIOSData_In& args) { _E_; CMPIStatus rc; CMPIData data; Objectpath TargetBIOS; data = in->ft->getArg(in, "TargetBIOS", &rc); if (rc.rc == OK) { CT_ToC(broker, data, TargetBIOS); args.setTargetBIOS(TargetBIOS); } unsigned int Offset; data = in->ft->getArg(in, "Offset", &rc); if (rc.rc == OK) { CT_ToC(data, Offset); args.setOffset(Offset); } unsigned int NumberOfBytes; data = in->ft->getArg(in, "NumberOfBytes", &rc); if (rc.rc == OK) { CT_ToC(data, NumberOfBytes); args.setNumberOfBytes(NumberOfBytes); } vector Data; data = in->ft->getArg(in, "Data", &rc); if (rc.rc == OK) { CT_ToC(data, Data); args.setData(Data); } string AuthorizationToken; data = in->ft->getArg(in, "AuthorizationToken", &rc); if (rc.rc == OK) { CT_ToC(data, AuthorizationToken); args.setAuthorizationToken(AuthorizationToken); } unsigned int PasswordEncoding; data = in->ft->getArg(in, "PasswordEncoding", &rc); if (rc.rc == OK) { CT_ToC(data, PasswordEncoding); args.setPasswordEncoding(PasswordEncoding); } _L_; } void BIOS_OpenDRIM_BIOSService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_BIOSService_WriteRawBIOSData_Out& args) { _E_; CMPIValue value; int errorMessage; unsigned int NumberOfBytes; errorMessage = args.getNumberOfBytes(NumberOfBytes); if (errorMessage == OK) { value = CT_toCMPI(NumberOfBytes); out->ft->addArg(out, "NumberOfBytes", &value, CMPI_uint32); } _L_; } void BIOS_OpenDRIM_BIOSService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_BIOSService_SetBIOSAttributes_In& args) { _E_; CMPIStatus rc; CMPIData data; Objectpath TargetBIOS; data = in->ft->getArg(in, "TargetBIOS", &rc); if (rc.rc == OK) { CT_ToC(broker, data, TargetBIOS); args.setTargetBIOS(TargetBIOS); } string CollectionElementName; data = in->ft->getArg(in, "CollectionElementName", &rc); if (rc.rc == OK) { CT_ToC(data, CollectionElementName); args.setCollectionElementName(CollectionElementName); } vector AttributeName; data = in->ft->getArg(in, "AttributeName", &rc); if (rc.rc == OK) { CT_ToC(data, AttributeName); args.setAttributeName(AttributeName); } vector AttributeValue; data = in->ft->getArg(in, "AttributeValue", &rc); if (rc.rc == OK) { CT_ToC(data, AttributeValue); args.setAttributeValue(AttributeValue); } string AuthorizationToken; data = in->ft->getArg(in, "AuthorizationToken", &rc); if (rc.rc == OK) { CT_ToC(data, AuthorizationToken); args.setAuthorizationToken(AuthorizationToken); } unsigned int PasswordEncoding; data = in->ft->getArg(in, "PasswordEncoding", &rc); if (rc.rc == OK) { CT_ToC(data, PasswordEncoding); args.setPasswordEncoding(PasswordEncoding); } vector SetResult; data = in->ft->getArg(in, "SetResult", &rc); if (rc.rc == OK) { CT_ToC(data, SetResult); args.setSetResult(SetResult); } _L_; } void BIOS_OpenDRIM_BIOSService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_BIOSService_SetBIOSAttributes_Out& args) { _E_; CMPIValue value; int errorMessage; vector SetResult; errorMessage = args.getSetResult(SetResult); if (errorMessage == OK) { value = CT_toCMPI(broker, SetResult); out->ft->addArg(out, "SetResult", &value, CMPI_uint32A); } _L_; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSService/OpenDRIM_BIOSService.h0000644000175000017500000006701611400645636026112 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSSERVICE_H_ #define OPENDRIM_BIOSSERVICE_H_ #include const static char* OpenDRIM_BIOSService_classnames[] = {"OpenDRIM_BIOSService"}; static string OpenDRIM_BIOSService_NAMESPACE = _NAMESPACE; class OpenDRIM_BIOSService { public: string InstanceID; bool InstanceID_isNULL; string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string ElementName; bool ElementName_isNULL; string InstallDate; bool InstallDate_isNULL; vector OperationalStatus; bool OperationalStatus_isNULL; vector StatusDescriptions; bool StatusDescriptions_isNULL; string Status; bool Status_isNULL; unsigned short HealthState; bool HealthState_isNULL; unsigned short CommunicationStatus; bool CommunicationStatus_isNULL; unsigned short DetailedStatus; bool DetailedStatus_isNULL; unsigned short OperatingStatus; bool OperatingStatus_isNULL; unsigned short PrimaryStatus; bool PrimaryStatus_isNULL; unsigned short EnabledState; bool EnabledState_isNULL; string OtherEnabledState; bool OtherEnabledState_isNULL; unsigned short RequestedState; bool RequestedState_isNULL; unsigned short EnabledDefault; bool EnabledDefault_isNULL; string TimeOfLastStateChange; bool TimeOfLastStateChange_isNULL; vector AvailableRequestedStates; bool AvailableRequestedStates_isNULL; unsigned short TransitioningToState; bool TransitioningToState_isNULL; string SystemCreationClassName; bool SystemCreationClassName_isNULL; string SystemName; bool SystemName_isNULL; string CreationClassName; bool CreationClassName_isNULL; string Name; bool Name_isNULL; string PrimaryOwnerName; bool PrimaryOwnerName_isNULL; string PrimaryOwnerContact; bool PrimaryOwnerContact_isNULL; string StartMode; bool StartMode_isNULL; bool Started; bool Started_isNULL; OpenDRIM_BIOSService() { InstanceID_isNULL = true; Caption_isNULL = true; Description_isNULL = true; ElementName_isNULL = true; InstallDate_isNULL = true; OperationalStatus_isNULL = true; StatusDescriptions_isNULL = true; Status_isNULL = true; HealthState_isNULL = true; CommunicationStatus_isNULL = true; DetailedStatus_isNULL = true; OperatingStatus_isNULL = true; PrimaryStatus_isNULL = true; EnabledState_isNULL = true; OtherEnabledState_isNULL = true; RequestedState_isNULL = true; EnabledDefault_isNULL = true; TimeOfLastStateChange_isNULL = true; AvailableRequestedStates_isNULL = true; TransitioningToState_isNULL = true; SystemCreationClassName_isNULL = true; SystemName_isNULL = true; CreationClassName_isNULL = true; Name_isNULL = true; PrimaryOwnerName_isNULL = true; PrimaryOwnerContact_isNULL = true; StartMode_isNULL = true; Started_isNULL = true; } ~OpenDRIM_BIOSService() {} string getKeys() const { return CF_toLowCase(".SystemCreationClassName=\"" + CF_quoteString(SystemCreationClassName) + "\""".SystemName=\"" + CF_quoteString(SystemName) + "\""".CreationClassName=\"" + CF_quoteString(CreationClassName) + "\""".Name=\"" + CF_quoteString(Name) + "\""); } 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 getCaption(string& value) const { if (Caption_isNULL==true) return NOT_FOUND; value = Caption; return OK; } int setCaption(const string& newValue) { Caption = newValue; Caption_isNULL = false; return OK; } int getDescription(string& value) const { if (Description_isNULL==true) return NOT_FOUND; value = Description; return OK; } int setDescription(const string& newValue) { Description = newValue; Description_isNULL = false; return OK; } int getElementName(string& value) const { if (ElementName_isNULL==true) return NOT_FOUND; value = ElementName; return OK; } int setElementName(const string& newValue) { ElementName = newValue; ElementName_isNULL = false; return OK; } int getInstallDate(string& value) const { if (InstallDate_isNULL==true) return NOT_FOUND; value = InstallDate; return OK; } int setInstallDate(const string& newValue) { InstallDate = newValue; InstallDate_isNULL = false; return OK; } int getOperationalStatus(vector& value) const { if (OperationalStatus_isNULL==true) return NOT_FOUND; value = OperationalStatus; return OK; } int setOperationalStatus(const vector& newValue) { OperationalStatus = newValue; OperationalStatus_isNULL = false; return OK; } int getStatusDescriptions(vector& value) const { if (StatusDescriptions_isNULL==true) return NOT_FOUND; value = StatusDescriptions; return OK; } int setStatusDescriptions(const vector& newValue) { StatusDescriptions = newValue; StatusDescriptions_isNULL = false; return OK; } int getStatus(string& value) const { if (Status_isNULL==true) return NOT_FOUND; value = Status; return OK; } int setStatus(const string& newValue) { Status = newValue; Status_isNULL = false; return OK; } int getHealthState(unsigned short& value) const { if (HealthState_isNULL==true) return NOT_FOUND; value = HealthState; return OK; } int setHealthState(const unsigned short& newValue) { HealthState = newValue; HealthState_isNULL = false; return OK; } int 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 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 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 getEnabledState(unsigned short& value) const { if (EnabledState_isNULL==true) return NOT_FOUND; value = EnabledState; return OK; } int setEnabledState(const unsigned short& newValue) { EnabledState = newValue; EnabledState_isNULL = false; return OK; } int getOtherEnabledState(string& value) const { if (OtherEnabledState_isNULL==true) return NOT_FOUND; value = OtherEnabledState; return OK; } int setOtherEnabledState(const string& newValue) { OtherEnabledState = newValue; OtherEnabledState_isNULL = false; return OK; } int getRequestedState(unsigned short& value) const { if (RequestedState_isNULL==true) return NOT_FOUND; value = RequestedState; return OK; } int setRequestedState(const unsigned short& newValue) { RequestedState = newValue; RequestedState_isNULL = false; return OK; } int getEnabledDefault(unsigned short& value) const { if (EnabledDefault_isNULL==true) return NOT_FOUND; value = EnabledDefault; return OK; } int setEnabledDefault(const unsigned short& newValue) { EnabledDefault = newValue; EnabledDefault_isNULL = false; return OK; } int getTimeOfLastStateChange(string& value) const { if (TimeOfLastStateChange_isNULL==true) return NOT_FOUND; value = TimeOfLastStateChange; return OK; } int setTimeOfLastStateChange(const string& newValue) { TimeOfLastStateChange = newValue; TimeOfLastStateChange_isNULL = false; return OK; } int getAvailableRequestedStates(vector& value) const { if (AvailableRequestedStates_isNULL==true) return NOT_FOUND; value = AvailableRequestedStates; return OK; } int setAvailableRequestedStates(const vector& newValue) { AvailableRequestedStates = newValue; AvailableRequestedStates_isNULL = false; return OK; } int getTransitioningToState(unsigned short& value) const { if (TransitioningToState_isNULL==true) return NOT_FOUND; value = TransitioningToState; return OK; } int setTransitioningToState(const unsigned short& newValue) { TransitioningToState = newValue; TransitioningToState_isNULL = false; return OK; } int getSystemCreationClassName(string& value) const { if (SystemCreationClassName_isNULL==true) return NOT_FOUND; value = SystemCreationClassName; return OK; } int setSystemCreationClassName(const string& newValue) { SystemCreationClassName = newValue; SystemCreationClassName_isNULL = false; return OK; } int getSystemName(string& value) const { if (SystemName_isNULL==true) return NOT_FOUND; value = SystemName; return OK; } int setSystemName(const string& newValue) { SystemName = newValue; SystemName_isNULL = false; return OK; } int getCreationClassName(string& value) const { if (CreationClassName_isNULL==true) return NOT_FOUND; value = CreationClassName; return OK; } int setCreationClassName(const string& newValue) { CreationClassName = newValue; CreationClassName_isNULL = false; return OK; } int getName(string& value) const { if (Name_isNULL==true) return NOT_FOUND; value = Name; return OK; } int setName(const string& newValue) { Name = newValue; Name_isNULL = false; return OK; } int getPrimaryOwnerName(string& value) const { if (PrimaryOwnerName_isNULL==true) return NOT_FOUND; value = PrimaryOwnerName; return OK; } int setPrimaryOwnerName(const string& newValue) { PrimaryOwnerName = newValue; PrimaryOwnerName_isNULL = false; return OK; } int getPrimaryOwnerContact(string& value) const { if (PrimaryOwnerContact_isNULL==true) return NOT_FOUND; value = PrimaryOwnerContact; return OK; } int setPrimaryOwnerContact(const string& newValue) { PrimaryOwnerContact = newValue; PrimaryOwnerContact_isNULL = false; return OK; } int getStartMode(string& value) const { if (StartMode_isNULL==true) return NOT_FOUND; value = StartMode; return OK; } int setStartMode(const string& newValue) { StartMode = newValue; StartMode_isNULL = false; return OK; } int getStarted(bool& value) const { if (Started_isNULL==true) return NOT_FOUND; value = Started; return OK; } int setStarted(const bool& newValue) { Started = newValue; Started_isNULL = false; return OK; } }; class OpenDRIM_BIOSService_RequestStateChange_In { public: unsigned short RequestedState; bool RequestedState_isNULL; Objectpath Job; bool Job_isNULL; string TimeoutPeriod; bool TimeoutPeriod_isNULL; OpenDRIM_BIOSService_RequestStateChange_In() { RequestedState_isNULL = true; Job_isNULL = true; TimeoutPeriod_isNULL = true; } ~OpenDRIM_BIOSService_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_BIOSService_RequestStateChange_Out { public: Objectpath Job; bool Job_isNULL; OpenDRIM_BIOSService_RequestStateChange_Out() { Job_isNULL = true; } ~OpenDRIM_BIOSService_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; } }; class OpenDRIM_BIOSService_SetBIOSAttribute_In { public: Objectpath TargetBIOS; bool TargetBIOS_isNULL; string AttributeName; bool AttributeName_isNULL; vector AttributeValue; bool AttributeValue_isNULL; string AuthorizationToken; bool AuthorizationToken_isNULL; unsigned int PasswordEncoding; bool PasswordEncoding_isNULL; unsigned int SetResult; bool SetResult_isNULL; OpenDRIM_BIOSService_SetBIOSAttribute_In() { TargetBIOS_isNULL = true; AttributeName_isNULL = true; AttributeValue_isNULL = true; AuthorizationToken_isNULL = true; PasswordEncoding_isNULL = true; SetResult_isNULL = true; } ~OpenDRIM_BIOSService_SetBIOSAttribute_In() {} int getTargetBIOS(Objectpath& value) const { if (TargetBIOS_isNULL == true) return NOT_FOUND; value = TargetBIOS; return OK; } int setTargetBIOS(const Objectpath& newValue) { TargetBIOS = newValue; TargetBIOS_isNULL = false; return OK; } int getAttributeName(string& value) const { if (AttributeName_isNULL == true) return NOT_FOUND; value = AttributeName; return OK; } int setAttributeName(const string& newValue) { AttributeName = newValue; AttributeName_isNULL = false; return OK; } int getAttributeValue(vector& value) const { if (AttributeValue_isNULL == true) return NOT_FOUND; value = AttributeValue; return OK; } int setAttributeValue(const vector& newValue) { AttributeValue = newValue; AttributeValue_isNULL = false; return OK; } int getAuthorizationToken(string& value) const { if (AuthorizationToken_isNULL == true) return NOT_FOUND; value = AuthorizationToken; return OK; } int setAuthorizationToken(const string& newValue) { AuthorizationToken = newValue; AuthorizationToken_isNULL = false; return OK; } int getPasswordEncoding(unsigned int& value) const { if (PasswordEncoding_isNULL == true) return NOT_FOUND; value = PasswordEncoding; return OK; } int setPasswordEncoding(const unsigned int& newValue) { PasswordEncoding = newValue; PasswordEncoding_isNULL = false; return OK; } int getSetResult(unsigned int& value) const { if (SetResult_isNULL == true) return NOT_FOUND; value = SetResult; return OK; } int setSetResult(const unsigned int& newValue) { SetResult = newValue; SetResult_isNULL = false; return OK; } }; class OpenDRIM_BIOSService_SetBIOSAttribute_Out { public: unsigned int SetResult; bool SetResult_isNULL; OpenDRIM_BIOSService_SetBIOSAttribute_Out() { SetResult_isNULL = true; } ~OpenDRIM_BIOSService_SetBIOSAttribute_Out() {} int getSetResult(unsigned int& value) const { if (SetResult_isNULL == true) return NOT_FOUND; value = SetResult; return OK; } int setSetResult(const unsigned int& newValue) { SetResult = newValue; SetResult_isNULL = false; return OK; } }; class OpenDRIM_BIOSService_SetBIOSAttributeEmbeddedInstance_In { public: Objectpath TargetBIOS; bool TargetBIOS_isNULL; string AttributeConfig; bool AttributeConfig_isNULL; string AuthorizationToken; bool AuthorizationToken_isNULL; unsigned int PasswordEncoding; bool PasswordEncoding_isNULL; unsigned int SetResult; bool SetResult_isNULL; OpenDRIM_BIOSService_SetBIOSAttributeEmbeddedInstance_In() { TargetBIOS_isNULL = true; AttributeConfig_isNULL = true; AuthorizationToken_isNULL = true; PasswordEncoding_isNULL = true; SetResult_isNULL = true; } ~OpenDRIM_BIOSService_SetBIOSAttributeEmbeddedInstance_In() {} int getTargetBIOS(Objectpath& value) const { if (TargetBIOS_isNULL == true) return NOT_FOUND; value = TargetBIOS; return OK; } int setTargetBIOS(const Objectpath& newValue) { TargetBIOS = newValue; TargetBIOS_isNULL = false; return OK; } int getAttributeConfig(string& value) const { if (AttributeConfig_isNULL == true) return NOT_FOUND; value = AttributeConfig; return OK; } int setAttributeConfig(const string& newValue) { AttributeConfig = newValue; AttributeConfig_isNULL = false; return OK; } int getAuthorizationToken(string& value) const { if (AuthorizationToken_isNULL == true) return NOT_FOUND; value = AuthorizationToken; return OK; } int setAuthorizationToken(const string& newValue) { AuthorizationToken = newValue; AuthorizationToken_isNULL = false; return OK; } int getPasswordEncoding(unsigned int& value) const { if (PasswordEncoding_isNULL == true) return NOT_FOUND; value = PasswordEncoding; return OK; } int setPasswordEncoding(const unsigned int& newValue) { PasswordEncoding = newValue; PasswordEncoding_isNULL = false; return OK; } int getSetResult(unsigned int& value) const { if (SetResult_isNULL == true) return NOT_FOUND; value = SetResult; return OK; } int setSetResult(const unsigned int& newValue) { SetResult = newValue; SetResult_isNULL = false; return OK; } }; class OpenDRIM_BIOSService_SetBIOSAttributeEmbeddedInstance_Out { public: unsigned int SetResult; bool SetResult_isNULL; OpenDRIM_BIOSService_SetBIOSAttributeEmbeddedInstance_Out() { SetResult_isNULL = true; } ~OpenDRIM_BIOSService_SetBIOSAttributeEmbeddedInstance_Out() {} int getSetResult(unsigned int& value) const { if (SetResult_isNULL == true) return NOT_FOUND; value = SetResult; return OK; } int setSetResult(const unsigned int& newValue) { SetResult = newValue; SetResult_isNULL = false; return OK; } }; class OpenDRIM_BIOSService_ReadRawBIOSData_In { public: Objectpath TargetBIOS; bool TargetBIOS_isNULL; unsigned int Offset; bool Offset_isNULL; unsigned int NumberOfBytes; bool NumberOfBytes_isNULL; vector Data; bool Data_isNULL; OpenDRIM_BIOSService_ReadRawBIOSData_In() { TargetBIOS_isNULL = true; Offset_isNULL = true; NumberOfBytes_isNULL = true; Data_isNULL = true; } ~OpenDRIM_BIOSService_ReadRawBIOSData_In() {} int getTargetBIOS(Objectpath& value) const { if (TargetBIOS_isNULL == true) return NOT_FOUND; value = TargetBIOS; return OK; } int setTargetBIOS(const Objectpath& newValue) { TargetBIOS = newValue; TargetBIOS_isNULL = false; return OK; } int getOffset(unsigned int& value) const { if (Offset_isNULL == true) return NOT_FOUND; value = Offset; return OK; } int setOffset(const unsigned int& newValue) { Offset = newValue; Offset_isNULL = false; return OK; } int getNumberOfBytes(unsigned int& value) const { if (NumberOfBytes_isNULL == true) return NOT_FOUND; value = NumberOfBytes; return OK; } int setNumberOfBytes(const unsigned int& newValue) { NumberOfBytes = newValue; NumberOfBytes_isNULL = false; return OK; } int getData(vector& value) const { if (Data_isNULL == true) return NOT_FOUND; value = Data; return OK; } int setData(const vector& newValue) { Data = newValue; Data_isNULL = false; return OK; } }; class OpenDRIM_BIOSService_ReadRawBIOSData_Out { public: unsigned int NumberOfBytes; bool NumberOfBytes_isNULL; vector Data; bool Data_isNULL; OpenDRIM_BIOSService_ReadRawBIOSData_Out() { NumberOfBytes_isNULL = true; Data_isNULL = true; } ~OpenDRIM_BIOSService_ReadRawBIOSData_Out() {} int getNumberOfBytes(unsigned int& value) const { if (NumberOfBytes_isNULL == true) return NOT_FOUND; value = NumberOfBytes; return OK; } int setNumberOfBytes(const unsigned int& newValue) { NumberOfBytes = newValue; NumberOfBytes_isNULL = false; return OK; } int getData(vector& value) const { if (Data_isNULL == true) return NOT_FOUND; value = Data; return OK; } int setData(const vector& newValue) { Data = newValue; Data_isNULL = false; return OK; } }; class OpenDRIM_BIOSService_WriteRawBIOSData_In { public: Objectpath TargetBIOS; bool TargetBIOS_isNULL; unsigned int Offset; bool Offset_isNULL; unsigned int NumberOfBytes; bool NumberOfBytes_isNULL; vector Data; bool Data_isNULL; string AuthorizationToken; bool AuthorizationToken_isNULL; unsigned int PasswordEncoding; bool PasswordEncoding_isNULL; OpenDRIM_BIOSService_WriteRawBIOSData_In() { TargetBIOS_isNULL = true; Offset_isNULL = true; NumberOfBytes_isNULL = true; Data_isNULL = true; AuthorizationToken_isNULL = true; PasswordEncoding_isNULL = true; } ~OpenDRIM_BIOSService_WriteRawBIOSData_In() {} int getTargetBIOS(Objectpath& value) const { if (TargetBIOS_isNULL == true) return NOT_FOUND; value = TargetBIOS; return OK; } int setTargetBIOS(const Objectpath& newValue) { TargetBIOS = newValue; TargetBIOS_isNULL = false; return OK; } int getOffset(unsigned int& value) const { if (Offset_isNULL == true) return NOT_FOUND; value = Offset; return OK; } int setOffset(const unsigned int& newValue) { Offset = newValue; Offset_isNULL = false; return OK; } int getNumberOfBytes(unsigned int& value) const { if (NumberOfBytes_isNULL == true) return NOT_FOUND; value = NumberOfBytes; return OK; } int setNumberOfBytes(const unsigned int& newValue) { NumberOfBytes = newValue; NumberOfBytes_isNULL = false; return OK; } int getData(vector& value) const { if (Data_isNULL == true) return NOT_FOUND; value = Data; return OK; } int setData(const vector& newValue) { Data = newValue; Data_isNULL = false; return OK; } int getAuthorizationToken(string& value) const { if (AuthorizationToken_isNULL == true) return NOT_FOUND; value = AuthorizationToken; return OK; } int setAuthorizationToken(const string& newValue) { AuthorizationToken = newValue; AuthorizationToken_isNULL = false; return OK; } int getPasswordEncoding(unsigned int& value) const { if (PasswordEncoding_isNULL == true) return NOT_FOUND; value = PasswordEncoding; return OK; } int setPasswordEncoding(const unsigned int& newValue) { PasswordEncoding = newValue; PasswordEncoding_isNULL = false; return OK; } }; class OpenDRIM_BIOSService_WriteRawBIOSData_Out { public: unsigned int NumberOfBytes; bool NumberOfBytes_isNULL; OpenDRIM_BIOSService_WriteRawBIOSData_Out() { NumberOfBytes_isNULL = true; } ~OpenDRIM_BIOSService_WriteRawBIOSData_Out() {} int getNumberOfBytes(unsigned int& value) const { if (NumberOfBytes_isNULL == true) return NOT_FOUND; value = NumberOfBytes; return OK; } int setNumberOfBytes(const unsigned int& newValue) { NumberOfBytes = newValue; NumberOfBytes_isNULL = false; return OK; } }; class OpenDRIM_BIOSService_SetBIOSAttributes_In { public: Objectpath TargetBIOS; bool TargetBIOS_isNULL; string CollectionElementName; bool CollectionElementName_isNULL; vector AttributeName; bool AttributeName_isNULL; vector AttributeValue; bool AttributeValue_isNULL; string AuthorizationToken; bool AuthorizationToken_isNULL; unsigned int PasswordEncoding; bool PasswordEncoding_isNULL; vector SetResult; bool SetResult_isNULL; OpenDRIM_BIOSService_SetBIOSAttributes_In() { TargetBIOS_isNULL = true; CollectionElementName_isNULL = true; AttributeName_isNULL = true; AttributeValue_isNULL = true; AuthorizationToken_isNULL = true; PasswordEncoding_isNULL = true; SetResult_isNULL = true; } ~OpenDRIM_BIOSService_SetBIOSAttributes_In() {} int getTargetBIOS(Objectpath& value) const { if (TargetBIOS_isNULL == true) return NOT_FOUND; value = TargetBIOS; return OK; } int setTargetBIOS(const Objectpath& newValue) { TargetBIOS = newValue; TargetBIOS_isNULL = false; return OK; } int getCollectionElementName(string& value) const { if (CollectionElementName_isNULL == true) return NOT_FOUND; value = CollectionElementName; return OK; } int setCollectionElementName(const string& newValue) { CollectionElementName = newValue; CollectionElementName_isNULL = false; return OK; } int getAttributeName(vector& value) const { if (AttributeName_isNULL == true) return NOT_FOUND; value = AttributeName; return OK; } int setAttributeName(const vector& newValue) { AttributeName = newValue; AttributeName_isNULL = false; return OK; } int getAttributeValue(vector& value) const { if (AttributeValue_isNULL == true) return NOT_FOUND; value = AttributeValue; return OK; } int setAttributeValue(const vector& newValue) { AttributeValue = newValue; AttributeValue_isNULL = false; return OK; } int getAuthorizationToken(string& value) const { if (AuthorizationToken_isNULL == true) return NOT_FOUND; value = AuthorizationToken; return OK; } int setAuthorizationToken(const string& newValue) { AuthorizationToken = newValue; AuthorizationToken_isNULL = false; return OK; } int getPasswordEncoding(unsigned int& value) const { if (PasswordEncoding_isNULL == true) return NOT_FOUND; value = PasswordEncoding; return OK; } int setPasswordEncoding(const unsigned int& newValue) { PasswordEncoding = newValue; PasswordEncoding_isNULL = false; return OK; } int getSetResult(vector& value) const { if (SetResult_isNULL == true) return NOT_FOUND; value = SetResult; return OK; } int setSetResult(const vector& newValue) { SetResult = newValue; SetResult_isNULL = false; return OK; } }; class OpenDRIM_BIOSService_SetBIOSAttributes_Out { public: vector SetResult; bool SetResult_isNULL; OpenDRIM_BIOSService_SetBIOSAttributes_Out() { SetResult_isNULL = true; } ~OpenDRIM_BIOSService_SetBIOSAttributes_Out() {} int getSetResult(vector& value) const { if (SetResult_isNULL == true) return NOT_FOUND; value = SetResult; return OK; } int setSetResult(const vector& newValue) { SetResult = newValue; SetResult_isNULL = false; return OK; } }; #endif /*OPENDRIM_BIOSSERVICE_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSService/cmpiOpenDRIM_BIOSService.h0000644000175000017500000000732711400645636026762 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSSERVICE_H_ #define CMPIOPENDRIM_BIOSSERVICE_H_ #include "OpenDRIM_BIOSService.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSService_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSService& instance); CMPIInstance* BIOS_OpenDRIM_BIOSService_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSService& instance); void BIOS_OpenDRIM_BIOSService_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSService& instance); void BIOS_OpenDRIM_BIOSService_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSService& instance); void BIOS_OpenDRIM_BIOSService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_BIOSService_RequestStateChange_In& args); void BIOS_OpenDRIM_BIOSService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_BIOSService_RequestStateChange_Out& args); void BIOS_OpenDRIM_BIOSService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_BIOSService_SetBIOSAttribute_In& args); void BIOS_OpenDRIM_BIOSService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_BIOSService_SetBIOSAttribute_Out& args); void BIOS_OpenDRIM_BIOSService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_BIOSService_SetBIOSAttributeEmbeddedInstance_In& args); void BIOS_OpenDRIM_BIOSService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_BIOSService_SetBIOSAttributeEmbeddedInstance_Out& args); void BIOS_OpenDRIM_BIOSService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_BIOSService_ReadRawBIOSData_In& args); void BIOS_OpenDRIM_BIOSService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_BIOSService_ReadRawBIOSData_Out& args); void BIOS_OpenDRIM_BIOSService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_BIOSService_WriteRawBIOSData_In& args); void BIOS_OpenDRIM_BIOSService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_BIOSService_WriteRawBIOSData_Out& args); void BIOS_OpenDRIM_BIOSService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_BIOSService_SetBIOSAttributes_In& args); void BIOS_OpenDRIM_BIOSService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_BIOSService_SetBIOSAttributes_Out& args); #endif /*CMPIOPENDRIM_BIOSSERVICE_H_*/ opendrim-lmp-bios-1.0.0~ppa/Common/0000755000175000017500000000000011400645636017733 5ustar guillaumeguillaumeopendrim-lmp-bios-1.0.0~ppa/Common/Makefile.am0000644000175000017500000000332011400645636021765 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 , , ################################################################################ commonlibdir = @COMMONLIBDIR@ commonlib_LTLIBRARIES = libcmpiBIOS_Common.la libcmpiBIOS_Common_la_SOURCES = BIOS_Common.cpp libcmpiBIOS_Common_la_LDFLAGS = -avoid-version libcmpiBIOS_Common_la_LIBADD = -lopendrim noinst_HEADERS = BIOS_Common.h opendrim-lmp-bios-1.0.0~ppa/Common/BIOS_Common.cpp0000644000175000017500000001327411400645636022512 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 #include "BIOS_Common.h" #if defined(__linux__)||defined(__FreeBSD__)||defined(__NetBSD__)||defined(__CYGWIN32__)||defined(__MINGW32__) static __inline__ void outportb(uint16_t port,uint8_t value) { __asm__ volatile ("outb %0,%1"::"a" ((char) value), "d"((uint16_t) port)); } static __inline__ uint8_t inportb(uint16_t port) { uint8_t _v; __asm__ volatile ("inb %1,%0":"=a" (_v):"d"((uint16_t) port)); return _v; } #endif int set_permissions(string& errorMessage) { #if defined(__linux__) if (ioperm(PORT_CMOS_0,4*2,IO_READ)) { errorMessage="Need to be run as root to access the Cmos."; return FAILED; } #else errorMessage="Linux only"; return FAILED; #endif } int unset_permissions(string& errorMessage) { #ifdef __linux__ ioperm(PORT_CMOS_0,4*2,0); return OK; #else errorMessage="Linux only"; return FAILED; #endif } uint8_t read_cmos(const unsigned int cell) { if(cell<128) { outportb(PORT_CMOS_0,cell); return inportb(PORT_CMOS_1); } if(cell<2*128) { outportb(PORT_CMOS_2,cell); return inportb(PORT_CMOS_3); } #if !defined(WIN32) || defined(__MINGW32__) if(cell<3*128) { outportb(PORT_CMOS_4,cell); return inportb(PORT_CMOS_5); } if(cell<4*128) { outportb(PORT_CMOS_6,cell); return inportb(PORT_CMOS_7); } #endif return 0; } int CF_loadCMOS(uint8_t *cmos, const int cmos_size, string& errorMessage) { CF_assert(set_permissions(errorMessage)); for (unsigned int i=0;i& bios,vector< vector >& dmi_strings,string& errorMessage) { vector _bios; void *start_ptr; char *tableAddress; _smbios_entry_point *anchor; if((start_ptr=SMBIOS_getRawData(_SMBIOS_ANCHOR_SEARCH_OFFSET,_SMBIOS_ANCHOR_SEARCH_RANGE,errorMessage))==NULL) return FAILED; anchor = SMBIOS_getEntryPoint(start_ptr); if((tableAddress=(char*)SMBIOS_getRawData(anchor->structure_table_address,anchor->structure_table_length,errorMessage))==NULL) { free(start_ptr); return FAILED; } SMBIOS_getStructure(_bios,tableAddress,anchor-> number_of_smbios_structure,0); for(unsigned int i=0;i<_bios.size();i++) { vector _dmi_strings; vector indexes; int index_max; bios.push_back(*(bios_information*)_bios[i]); indexes.push_back((int)bios[i].vendor); indexes.push_back((int)bios[i].bios_version); indexes.push_back((int)bios[i].bios_release_date); index_max=*max_element(indexes.begin(), indexes.end()); for(unsigned int j=0;j<=index_max;j++) _dmi_strings.push_back(SMBIOS_getDmiString((_smbios_structure_header*)_bios[i],j)); dmi_strings.push_back(_dmi_strings); } free(tableAddress); free(start_ptr); return OK; } // FIXME: Need to be improved int CF_getBIOSManufacturer(const string& vendor) { string vendor_touppper=vendor; transform(vendor_touppper.begin(), vendor_touppper.end(),vendor_touppper.begin(),::toupper); if (vendor_touppper.find("ACER")!=string::npos) return ACER; // ACER else if (vendor_touppper.find("AMI")!=string::npos) return AMI; // AMI else if (vendor_touppper.find("AWARD")!=string::npos) return AWARD; // AWARD else if (vendor_touppper.find("COMPAQ")!=string::npos) return COMPAQ; // COMPAQ else if (vendor_touppper.find("DTK")!=string::npos) return DTK; // DTK else if (vendor_touppper.find("IBM")!=string::npos) return IBM; // IBM else if (vendor_touppper.find("PACKARD BELL")!=string::npos) return PACKARD_BELL; // PACKARD_BELL else if (vendor_touppper.find("PHOENIX")!=string::npos) return PHOENIX; // PHOENIX else if (vendor_touppper.find("GATEWAY")!=string::npos) return GATEWAY_PHOENIX; // GATEWAY_PHOENIX else if (vendor_touppper.find("SAMSUNG")!=string::npos) return SAMSUNG; // SAMSUNG else if (vendor_touppper.find("SONY")!=string::npos) return SONY; // SONY else if (vendor_touppper.find("TOSHIBA")!=string::npos) return TOSHIBA; // TOSHIBA else if (vendor_touppper.find("ZENITH")!=string::npos) return ZENITH_AMI; // ZENITH_AMI else return DEFAULT; // DEFAULT } opendrim-lmp-bios-1.0.0~ppa/Common/BIOS_Common.h0000644000175000017500000000612211400645636022151 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 BIOS_COMMON_H_ #define BIOS_COMMON_H_ #include #include #include /* #include #include #include #ifdef __linux__ #include #include #endif */ const unsigned int CMOS_SIZE = 4*0x80; const unsigned int CMOS_MAX_SIZE = 4096; #define IO_READ 1 #define IO_WRITE 2 #define IO_RDWR (IO_READ | IO_WRITE) #define PORT_CMOS_0 0x70 #define PORT_CMOS_1 0x71 #define PORT_CMOS_2 0x72 #define PORT_CMOS_3 0x73 #define PORT_CMOS_4 0x74 #define PORT_CMOS_5 0x75 #define PORT_CMOS_6 0x76 #define PORT_CMOS_7 0x77 #define DEFAULT 0 #define ACER 1 #define AMI 2 #define AWARD 3 #define COMPAQ 4 #define DTK 5 #define IBM 6 #define PACKARD_BELL 7 #define PHOENIX 8 #define GATEWAY_PHOENIX 9 #define SAMSUNG 10 #define SONY 11 #define TOSHIBA 12 #define ZENITH_AMI 13 typedef struct _bios_information { BYTE type; // 0 BYTE length; // Varies WORD handle; // Varies BYTE vendor; // STRING BYTE bios_version; // STRING WORD bios_starting; // Varies BYTE bios_release_date; // STRING BYTE bios_rom_size; // Varies QWORD bios_characteristics; // Bit Field }bios_information; int CF_loadCMOS(uint8_t *cmos, const int cmos_size, string& errorMessage); int SMBIOS_getBIOSInformation(vector& bios,vector< vector >& dmi_strings,string& errorMessage); int CF_getBIOSManufacturer(const string& manufacturer); #endif /*BIOS_COMMON_H_*/ opendrim-lmp-bios-1.0.0~ppa/configure.ac0000644000175000017500000001327411400645636021000 0ustar guillaumeguillaume# Process this file with autoconf to produce a configure script. ################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 , , ################################################################################ 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), BIOS provider package Copyright (C) 2010 Guillaume BOTTEX This program is being developed under the "OpenDRIM" project. The "OpenDRIM" project web page: http://opendrim.sourceforge.net The "OpenDRIM" project mailing list: opendrim@googlegroups.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public 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(BIOS 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_SystemBIOS/Makefile OpenDRIM_BIOSConcreteDependency/Makefile OpenDRIM_BIOSPassword/Makefile OpenDRIM_ServiceAffectsComputerSystem/Makefile OpenDRIM_BIOSCapabilities/Makefile OpenDRIM_OwningCollectionBIOS/Makefile OpenDRIM_BIOSHostedService/Makefile OpenDRIM_BIOSConcreteComponent/Makefile OpenDRIM_OrderedMemberOfBIOSCollection/Makefile OpenDRIM_BIOSRegisteredProfile/Makefile OpenDRIM_BIOSService/Makefile OpenDRIM_BIOSConformsToProfile/Makefile OpenDRIM_BIOSServiceCapabilities/Makefile OpenDRIM_BIOSInteger/Makefile OpenDRIM_ServiceAffectsBIOSAttribute/Makefile OpenDRIM_BIOSString/Makefile OpenDRIM_BIOSElement/Makefile OpenDRIM_BIOSEnumeration/Makefile OpenDRIM_BIOSConcreteCollection/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-bios-1.0.0~ppa/TODO0000644000175000017500000000010111400645636017163 0ustar guillaumeguillaumeTODO for Major.Minor.Revision ========================= // TODO opendrim-lmp-bios-1.0.0~ppa/INSTALL0000644000175000017500000000370211400645636017536 0ustar guillaumeguillaume --------------------------------------------------------- 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-bios-1.0.0~ppa/AUTHORS0000644000175000017500000000005611400645636017554 0ustar guillaumeguillaumeGuillaume BOTTEX opendrim-lmp-bios-1.0.0~ppa/packaging/0000755000175000017500000000000011400645636020427 5ustar guillaumeguillaumeopendrim-lmp-bios-1.0.0~ppa/packaging/opendrim-lmp-bios.spec0000644000175000017500000000516011400645636024642 0ustar guillaumeguillaume#%///////////////////////////////////////////////////////////////////////////// # # BIOS RPM spec file # #%///////////////////////////////////////////////////////////////////////////// %define packageVersion 1 Version: %{version} Release: %{packageVersion}%{?dist} Vendor: OpenDRIM Summary: OpenDRIM BIOS Provider Name: opendrim-lmp-bios Group: Systems Management/Base License: GPL BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root URL: http://opendrim.sourceforge.net Source: %{name}-%{version}.tar.gz BuildRequires: autoconf, tog-pegasus-devel, libopendrim >= 1.1.1 Requires: tog-pegasus, libopendrim >= 1.1.1 %description %global PEGASUS_ARCH_LIB %{_lib} %global COMMONLIBDIR /usr/%PEGASUS_ARCH_LIB %global PROVIDERDIR %COMMONLIBDIR/Pegasus/providers %global OPENDRIM_REG_DIR /usr/share/OpenDRIM %global OPENDRIM_MOF_DIR /usr/share/OpenDRIM/%{name}/mof %global PROVIDER_SCRIPT_POST BIOS %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-bios-1.0.0~ppa/packaging/debian/0000755000175000017500000000000011404346445021651 5ustar guillaumeguillaumeopendrim-lmp-bios-1.0.0~ppa/packaging/debian/postrm0000644000175000017500000000432711404346411023117 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_SystemBIOS rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_BIOSConcreteDependency rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_BIOSPassword rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_ServiceAffectsComputerSystem rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_BIOSCapabilities rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_OwningCollectionBIOS rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_BIOSHostedService rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_BIOSConcreteComponent rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_OrderedMemberOfBIOSCollection rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_BIOSRegisteredProfile rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_BIOSService rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_BIOSConformsToProfile rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_BIOSServiceCapabilities rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_BIOSInteger rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_ServiceAffectsBIOSAttribute rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_BIOSString rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_BIOSElement rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_BIOSEnumeration rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_BIOSConcreteCollection ;; 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-bios-1.0.0~ppa/packaging/debian/source/0000755000175000017500000000000011400646027023144 5ustar guillaumeguillaumeopendrim-lmp-bios-1.0.0~ppa/packaging/debian/source/format0000644000175000017500000000001411400646027024352 0ustar guillaumeguillaume3.0 (quilt) opendrim-lmp-bios-1.0.0~ppa/packaging/debian/copyright0000644000175000017500000000262211400645636023606 0ustar guillaumeguillaumeThis package was debianized by Guillaume BOTTEX on Tue, 2 Feb 2010 15:11:36 +0900. It was downloaded from http://opendrim.sourceforge.net/ Upstream Author: Guillaume BOTTEX Copyright: Copyright (C) 2010 ETRI Guillaume BOTTEX License: Linux Management Providers (LMP), BIOS 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 2010, Guillaume BOTTEX and is licensed under the GPL, see `/usr/share/common-licenses/GPL-2'. opendrim-lmp-bios-1.0.0~ppa/packaging/debian/control0000644000175000017500000000122311404346400023241 0ustar guillaumeguillaumeSource: opendrim-lmp-bios 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-bios Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, sfcb, libopendrim0 (>= 1.1.3) Description: OpenDRIM BIOS provider Provides information about the computer system BIOS. . Compliant with the DMTF BIOS Management Profile v1.0.0 (DSP1061). opendrim-lmp-bios-1.0.0~ppa/packaging/debian/prerm0000644000175000017500000000241011400645636022716 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-bios VERSION=`cat /usr/share/doc/opendrim-lmp-bios/VERSION` OPENDRIM_REG_DIR=/usr/share/OpenDRIM PROVIDER_SCRIPT_POST=BIOS $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-bios-1.0.0~ppa/packaging/debian/changelog0000644000175000017500000000024211404346445023521 0ustar guillaumeguillaumeopendrim-lmp-bios (1.0.0-0ubuntu1) lucid; urgency=low * Initial release -- Guillaume BOTTEX Fri, 11 Jun 2010 14:44:00 +0900 opendrim-lmp-bios-1.0.0~ppa/packaging/debian/postinst0000644000175000017500000000256511400645636023467 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-bios VERSION=`cat /usr/share/doc/opendrim-lmp-bios/VERSION` OPENDRIM_REG_DIR=/usr/share/OpenDRIM PROVIDER_SCRIPT_POST=BIOS $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-bios-1.0.0~ppa/packaging/debian/install0000644000175000017500000000004711400645636023243 0ustar guillaumeguillaumeusr/lib/cmpi/*.so usr/share/OpenDRIM/* opendrim-lmp-bios-1.0.0~ppa/packaging/debian/rules0000755000175000017500000000353611400645636022740 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-bios 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-bios.sgml > opendrim-lmp-bios.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-bios-1.0.0~ppa/packaging/debian/docs0000644000175000017500000000003111400645636022516 0ustar guillaumeguillaumeNEWS README TODO VERSION opendrim-lmp-bios-1.0.0~ppa/packaging/debian/compat0000644000175000017500000000000211400645636023047 0ustar guillaumeguillaume5 opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsComputerSystem/0000755000175000017500000000000011400645636025760 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsComputerSystem/OpenDRIM_ServiceAffectsComputerSystem.hopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsComputerSystem/OpenDRIM_ServiceAffectsComputerSys0000644000175000017500000001106411400645636034454 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_SERVICEAFFECTSCOMPUTERSYSTEM_H_ #define OPENDRIM_SERVICEAFFECTSCOMPUTERSYSTEM_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" #include "cmpiCIM_Service.h" #include "CIM_ServiceAccess.h" */ const static char* OpenDRIM_ServiceAffectsComputerSystem_classnames[] = {"OpenDRIM_ServiceAffectsComputerSystem"}; static string OpenDRIM_ServiceAffectsComputerSystem_NAMESPACE = _NAMESPACE; const static string AffectedElement_role = "AffectedElement"; const static char* AffectedElement_classnames[] = {"OpenDRIM_ComputerSystem"}; const static string AffectedElement_NAMESPACE = _NAMESPACE; const static string AffectingElement_role = "AffectingElement"; const static char* AffectingElement_classnames[] = {"OpenDRIM_BIOSService"}; const static string AffectingElement_NAMESPACE = _NAMESPACE; class OpenDRIM_ServiceAffectsComputerSystem { public: Objectpath AffectedElement; bool AffectedElement_isNULL; Objectpath AffectingElement; bool AffectingElement_isNULL; vector ElementEffects; bool ElementEffects_isNULL; vector OtherElementEffectsDescriptions; bool OtherElementEffectsDescriptions_isNULL; OpenDRIM_ServiceAffectsComputerSystem() { AffectedElement_isNULL = true; AffectingElement_isNULL = true; ElementEffects_isNULL = true; OtherElementEffectsDescriptions_isNULL = true; } ~OpenDRIM_ServiceAffectsComputerSystem() {} string getKeys() const { return CF_toLowCase(".AffectedElement=\"" + CF_quoteString(AffectedElement.toString()) + "\""".AffectingElement=\"" + CF_quoteString(AffectingElement.toString()) + "\""); } int getAffectedElement(Objectpath& value) const { if (AffectedElement_isNULL==true) return NOT_FOUND; value = AffectedElement; return OK; } int setAffectedElement(const Objectpath& newValue) { AffectedElement = newValue; AffectedElement.setNamespace(AffectedElement_NAMESPACE); AffectedElement_isNULL = false; return OK; } int getAffectingElement(Objectpath& value) const { if (AffectingElement_isNULL==true) return NOT_FOUND; value = AffectingElement; return OK; } int setAffectingElement(const Objectpath& newValue) { AffectingElement = newValue; AffectingElement.setNamespace(AffectingElement_NAMESPACE); AffectingElement_isNULL = false; return OK; } int getElementEffects(vector& value) const { if (ElementEffects_isNULL==true) return NOT_FOUND; value = ElementEffects; return OK; } int setElementEffects(const vector& newValue) { ElementEffects = newValue; ElementEffects_isNULL = false; return OK; } int getOtherElementEffectsDescriptions(vector& value) const { if (OtherElementEffectsDescriptions_isNULL==true) return NOT_FOUND; value = OtherElementEffectsDescriptions; return OK; } int setOtherElementEffectsDescriptions(const vector& newValue) { OtherElementEffectsDescriptions = newValue; OtherElementEffectsDescriptions_isNULL = false; return OK; } }; #endif /*OPENDRIM_SERVICEAFFECTSCOMPUTERSYSTEM_H_*/ ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsComputerSystem/OpenDRIM_ServiceAffectsComputerSystemProvider.cppopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsComputerSystem/OpenDRIM_ServiceAffectsComputerSys0000644000175000017500000004320011400645636034451 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_ServiceAffectsComputerSystem.h" #include "OpenDRIM_ServiceAffectsComputerSystemAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define BIOS_OpenDRIM_ServiceAffectsComputerSystemProviderSetInstance BIOS_OpenDRIM_ServiceAffectsComputerSystemProviderModifyInstance #endif int BIOS_OpenDRIM_ServiceAffectsComputerSystem_init(const CMPIBroker* broker); int BIOS_OpenDRIM_ServiceAffectsComputerSystem_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus BIOS_OpenDRIM_ServiceAffectsComputerSystemProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_ServiceAffectsComputerSystem_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_ServiceAffectsComputerSystemProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = BIOS_OpenDRIM_ServiceAffectsComputerSystem_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_ServiceAffectsComputerSystem_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_ServiceAffectsComputerSystemProviderEnumInstances(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 = BIOS_OpenDRIM_ServiceAffectsComputerSystem_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = BIOS_OpenDRIM_ServiceAffectsComputerSystem_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_ServiceAffectsComputerSystemProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ServiceAffectsComputerSystem instance; BIOS_OpenDRIM_ServiceAffectsComputerSystem_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_ServiceAffectsComputerSystem_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = BIOS_OpenDRIM_ServiceAffectsComputerSystem_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_ServiceAffectsComputerSystemProviderSetInstance(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_ServiceAffectsComputerSystem newInstance, oldInstance; BIOS_OpenDRIM_ServiceAffectsComputerSystem_toCPP(_broker, ci, newInstance); BIOS_OpenDRIM_ServiceAffectsComputerSystem_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = BIOS_OpenDRIM_ServiceAffectsComputerSystem_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_ServiceAffectsComputerSystem_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_ServiceAffectsComputerSystemProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ServiceAffectsComputerSystem instance; BIOS_OpenDRIM_ServiceAffectsComputerSystem_toCPP(_broker, ci, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_ServiceAffectsComputerSystem_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_ServiceAffectsComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_ServiceAffectsComputerSystem_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_ServiceAffectsComputerSystem_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = BIOS_OpenDRIM_ServiceAffectsComputerSystem_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_ServiceAffectsComputerSystemProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ServiceAffectsComputerSystem instance; BIOS_OpenDRIM_ServiceAffectsComputerSystem_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_ServiceAffectsComputerSystem_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_ServiceAffectsComputerSystem_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_ServiceAffectsComputerSystemProviderExecQuery(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 BIOS_OpenDRIM_ServiceAffectsComputerSystemProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_ServiceAffectsComputerSystem_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_ServiceAffectsComputerSystemProviderAssociatorNames(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 = BIOS_OpenDRIM_ServiceAffectsComputerSystem_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsComputerSystem_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 BIOS_OpenDRIM_ServiceAffectsComputerSystemProviderAssociators(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 = BIOS_OpenDRIM_ServiceAffectsComputerSystem_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsComputerSystem_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 BIOS_OpenDRIM_ServiceAffectsComputerSystemProviderReferenceNames(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 = BIOS_OpenDRIM_ServiceAffectsComputerSystem_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = BIOS_OpenDRIM_ServiceAffectsComputerSystem_referenceAffectedElementToAffectingElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = BIOS_OpenDRIM_ServiceAffectsComputerSystem_referenceAffectingElementToAffectedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_ServiceAffectsComputerSystem_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus BIOS_OpenDRIM_ServiceAffectsComputerSystemProviderReferences(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 = BIOS_OpenDRIM_ServiceAffectsComputerSystem_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = BIOS_OpenDRIM_ServiceAffectsComputerSystem_referenceAffectedElementToAffectingElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = BIOS_OpenDRIM_ServiceAffectsComputerSystem_referenceAffectingElementToAffectedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsComputerSystem_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = BIOS_OpenDRIM_ServiceAffectsComputerSystem_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int BIOS_OpenDRIM_ServiceAffectsComputerSystem_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = BIOS_OpenDRIM_ServiceAffectsComputerSystem_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_ServiceAffectsComputerSystem_init FAILED: " + (string) OpenDRIM_ServiceAffectsComputerSystem_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int BIOS_OpenDRIM_ServiceAffectsComputerSystem_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = BIOS_OpenDRIM_ServiceAffectsComputerSystem_unload(errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_ServiceAffectsComputerSystem_unload FAILED: " + (string) OpenDRIM_ServiceAffectsComputerSystem_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define BIOS_OpenDRIM_ServiceAffectsComputerSystem_INIT if (BIOS_OpenDRIM_ServiceAffectsComputerSystem_init(_broker) < 0) return NULL CMInstanceMIStub(BIOS_OpenDRIM_ServiceAffectsComputerSystemProvider, BIOS_OpenDRIM_ServiceAffectsComputerSystemProvider, _broker, BIOS_OpenDRIM_ServiceAffectsComputerSystem_INIT); CMAssociationMIStub(BIOS_OpenDRIM_ServiceAffectsComputerSystemProvider, BIOS_OpenDRIM_ServiceAffectsComputerSystemProvider, _broker, BIOS_OpenDRIM_ServiceAffectsComputerSystem_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsComputerSystem/Makefile.am0000644000175000017500000000477111400645636030025 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 = libcmpiBIOS_OpenDRIM_ServiceAffectsComputerSystemProvider.la libcmpiBIOS_OpenDRIM_ServiceAffectsComputerSystemProvider_la_SOURCES = OpenDRIM_ServiceAffectsComputerSystemAccess.cpp OpenDRIM_ServiceAffectsComputerSystemProvider.cpp cmpiOpenDRIM_ServiceAffectsComputerSystem.cpp assocOpenDRIM_ServiceAffectsComputerSystem.cpp # May have to be adjusted for direct invocation libcmpiBIOS_OpenDRIM_ServiceAffectsComputerSystemProvider_la_CPPFLAGS = -I../CIM_ManagedElement -I../CIM_Service # Uncomment the end for direct invocation, may have to be adjusted libcmpiBIOS_OpenDRIM_ServiceAffectsComputerSystemProvider_la_LIBADD = ../Common/libcmpiBIOS_Common.la #../CIM_ManagedElement/libcmpiBIOS_CIM_ManagedElementProvider.la ../CIM_Service/libcmpiBIOS_CIM_ServiceProvider.la libcmpiBIOS_OpenDRIM_ServiceAffectsComputerSystemProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_ServiceAffectsComputerSystem.h OpenDRIM_ServiceAffectsComputerSystem.h OpenDRIM_ServiceAffectsComputerSystemAccess.h ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsComputerSystem/assocOpenDRIM_ServiceAffectsComputerSystem.hopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsComputerSystem/assocOpenDRIM_ServiceAffectsComput0000644000175000017500000000630311400645636034457 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_SERVICEAFFECTSCOMPUTERSYSTEM_H_ #define ASSOCOPENDRIM_SERVICEAFFECTSCOMPUTERSYSTEM_H_ #include "OpenDRIM_ServiceAffectsComputerSystemAccess.h" int BIOS_OpenDRIM_ServiceAffectsComputerSystem_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 BIOS_OpenDRIM_ServiceAffectsComputerSystem_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 BIOS_OpenDRIM_ServiceAffectsComputerSystem_enumerateAffectedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int BIOS_OpenDRIM_ServiceAffectsComputerSystem_getAffectedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_ServiceAffectsComputerSystem_enumerateAffectingElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int BIOS_OpenDRIM_ServiceAffectsComputerSystem_getAffectingElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_SERVICEAFFECTSCOMPUTERSYSTEM_H_*/ ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsComputerSystem/cmpiOpenDRIM_ServiceAffectsComputerSystem.hopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsComputerSystem/cmpiOpenDRIM_ServiceAffectsCompute0000644000175000017500000000443711400645636034452 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_SERVICEAFFECTSCOMPUTERSYSTEM_H_ #define CMPIOPENDRIM_SERVICEAFFECTSCOMPUTERSYSTEM_H_ #include "OpenDRIM_ServiceAffectsComputerSystem.h" CMPIObjectPath* BIOS_OpenDRIM_ServiceAffectsComputerSystem_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_ServiceAffectsComputerSystem& instance); CMPIInstance* BIOS_OpenDRIM_ServiceAffectsComputerSystem_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_ServiceAffectsComputerSystem& instance); void BIOS_OpenDRIM_ServiceAffectsComputerSystem_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_ServiceAffectsComputerSystem& instance); void BIOS_OpenDRIM_ServiceAffectsComputerSystem_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_ServiceAffectsComputerSystem& instance); #endif /*CMPIOPENDRIM_SERVICEAFFECTSCOMPUTERSYSTEM_H_*/ ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsComputerSystem/OpenDRIM_ServiceAffectsComputerSystemAccess.hopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsComputerSystem/OpenDRIM_ServiceAffectsComputerSys0000644000175000017500000001105611400645636034455 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_SERVICEAFFECTSCOMPUTERSYSTEMACCESS_H_ #define OPENDRIM_SERVICEAFFECTSCOMPUTERSYSTEMACCESS_H_ #include "BIOS_Common.h" #include "OpenDRIM_ServiceAffectsComputerSystem.h" #include "assocOpenDRIM_ServiceAffectsComputerSystem.h" int BIOS_OpenDRIM_ServiceAffectsComputerSystem_load(const CMPIBroker* broker, string& errorMessage); int BIOS_OpenDRIM_ServiceAffectsComputerSystem_unload(string& errorMessage); int BIOS_OpenDRIM_ServiceAffectsComputerSystem_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_ServiceAffectsComputerSystem_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_ServiceAffectsComputerSystem& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_ServiceAffectsComputerSystem_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsComputerSystem& newInstance, const OpenDRIM_ServiceAffectsComputerSystem& oldInstance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_ServiceAffectsComputerSystem_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsComputerSystem& instance, string& errorMessage); int BIOS_OpenDRIM_ServiceAffectsComputerSystem_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsComputerSystem& instance, string& errorMessage); int BIOS_OpenDRIM_ServiceAffectsComputerSystem_associatorAffectedElementToAffectingElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectedElement_instance, const char** properties, vector& AffectingElement_associatedInstances, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_ServiceAffectsComputerSystem_associatorAffectingElementToAffectedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectingElement_instance, const char** properties, vector& AffectedElement_associatedInstances, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_ServiceAffectsComputerSystem_referenceAffectedElementToAffectingElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectedElement_instance, const vector& AffectingElement_instances, vector& OpenDRIM_ServiceAffectsComputerSystem_instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_ServiceAffectsComputerSystem_referenceAffectingElementToAffectedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectingElement_instance, const vector& AffectedElement_instances, vector& OpenDRIM_ServiceAffectsComputerSystem_instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_ServiceAffectsComputerSystem_populate(OpenDRIM_ServiceAffectsComputerSystem& instance, string& errorMessage); #endif /*OPENDRIM_SERVICEAFFECTSCOMPUTERSYSTEMACCESS_H_*/ ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsComputerSystem/OpenDRIM_ServiceAffectsComputerSystemAccess.cppopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsComputerSystem/OpenDRIM_ServiceAffectsComputerSys0000644000175000017500000002624711400645636034465 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_ServiceAffectsComputerSystemAccess.h" int BIOS_OpenDRIM_ServiceAffectsComputerSystem_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(BIOS_CIM_ManagedElement_load(broker, errorMessage)); CF_assert(BIOS_CIM_Service_load(broker, errorMessage)); */ // TODO _L_; return OK; } int BIOS_OpenDRIM_ServiceAffectsComputerSystem_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(BIOS_CIM_ManagedElement_unload(errorMessage)); CF_assert(BIOS_CIM_Service_unload(errorMessage)); */ // TODO _L_; return OK; } int BIOS_OpenDRIM_ServiceAffectsComputerSystem_isAssociated(const Instance& AffectedElement, const Instance& AffectingElement, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int BIOS_OpenDRIM_ServiceAffectsComputerSystem_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(BIOS_OpenDRIM_ServiceAffectsComputerSystem_enumerateAffectedElements(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(BIOS_OpenDRIM_ServiceAffectsComputerSystem_enumerateAffectedElements(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; BIOS_OpenDRIM_ServiceAffectsComputerSystem_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), AffectedElement_classnames[0], AffectingElement_classnames[0], AffectedElement_role.c_str(), AffectingElement_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(BIOS_OpenDRIM_ServiceAffectsComputerSystem_referenceAffectedElementToAffectingElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int BIOS_OpenDRIM_ServiceAffectsComputerSystem_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_ServiceAffectsComputerSystem& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath AffectedElement_objectpath; instance.getAffectedElement(AffectedElement_objectpath); Instance AffectedElement_instance; CF_assert(BIOS_OpenDRIM_ServiceAffectsComputerSystem_getAffectedElement(broker, ctx, AffectedElement_objectpath, AffectedElement_instance, NULL, errorMessage)); Objectpath AffectingElement_objectpath; instance.getAffectingElement(AffectingElement_objectpath); Instance AffectingElement_instance; CF_assert(BIOS_OpenDRIM_ServiceAffectsComputerSystem_getAffectingElement(broker, ctx, AffectingElement_objectpath, AffectingElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(BIOS_OpenDRIM_ServiceAffectsComputerSystem_isAssociated(AffectedElement_instance, AffectingElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } CF_assert(BIOS_OpenDRIM_ServiceAffectsComputerSystem_populate(instance, errorMessage)); _L_; return OK; } int BIOS_OpenDRIM_ServiceAffectsComputerSystem_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsComputerSystem& newInstance, const OpenDRIM_ServiceAffectsComputerSystem& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_ServiceAffectsComputerSystem_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsComputerSystem& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_ServiceAffectsComputerSystem_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsComputerSystem& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_ServiceAffectsComputerSystem_associatorAffectedElementToAffectingElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectedElement_instance, const char** properties, vector& AffectingElement_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector AffectingElement_instances; if (discriminant=="a") CF_assert(BIOS_OpenDRIM_ServiceAffectsComputerSystem_enumerateAffectingElements(broker, ctx, AffectingElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(BIOS_OpenDRIM_ServiceAffectsComputerSystem_enumerateAffectingElements(broker, ctx, AffectingElement_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(BIOS_OpenDRIM_ServiceAffectsComputerSystem_enumerateAffectingElements(broker, ctx, AffectingElement_instances, properties, false, errorMessage)); } for (size_t i=0; i& AffectedElement_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector AffectedElement_instances; if (discriminant=="a") CF_assert(BIOS_OpenDRIM_ServiceAffectsComputerSystem_enumerateAffectedElements(broker, ctx, AffectedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(BIOS_OpenDRIM_ServiceAffectsComputerSystem_enumerateAffectedElements(broker, ctx, AffectedElement_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(BIOS_OpenDRIM_ServiceAffectsComputerSystem_enumerateAffectedElements(broker, ctx, AffectedElement_instances, properties, false, errorMessage)); } for (size_t i=0; i& AffectingElement_instances, vector& OpenDRIM_ServiceAffectsComputerSystem_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 < AffectingElement_instances.size(); i++) { OpenDRIM_ServiceAffectsComputerSystem instance; instance.setAffectedElement(((Instance) AffectedElement_instance).getObjectpath()); instance.setAffectingElement(((Instance) AffectingElement_instances[i]).getObjectpath()); if (discriminant == "r") { CF_assert(BIOS_OpenDRIM_ServiceAffectsComputerSystem_populate(instance, errorMessage)); } OpenDRIM_ServiceAffectsComputerSystem_instances.push_back(instance); } _L_; return OK; } int BIOS_OpenDRIM_ServiceAffectsComputerSystem_referenceAffectingElementToAffectedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectingElement_instance, const vector& AffectedElement_instances, vector& OpenDRIM_ServiceAffectsComputerSystem_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 < AffectedElement_instances.size(); i++) { OpenDRIM_ServiceAffectsComputerSystem instance; instance.setAffectedElement(((Instance) AffectedElement_instances[i]).getObjectpath()); instance.setAffectingElement(((Instance) AffectingElement_instance).getObjectpath()); if (discriminant == "r") { CF_assert(BIOS_OpenDRIM_ServiceAffectsComputerSystem_populate(instance, errorMessage)); } OpenDRIM_ServiceAffectsComputerSystem_instances.push_back(instance); } _L_; return OK; } int BIOS_OpenDRIM_ServiceAffectsComputerSystem_populate(OpenDRIM_ServiceAffectsComputerSystem& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsComputerSystem/cmpiOpenDRIM_ServiceAffectsComputerSystem.cppopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsComputerSystem/cmpiOpenDRIM_ServiceAffectsCompute0000644000175000017500000000735611400645636034455 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_ServiceAffectsComputerSystem.h" CMPIObjectPath* BIOS_OpenDRIM_ServiceAffectsComputerSystem_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_ServiceAffectsComputerSystem& instance) { _E_; Objectpath op(broker, OpenDRIM_ServiceAffectsComputerSystem_classnames[0], OpenDRIM_ServiceAffectsComputerSystem_NAMESPACE); if (!instance.AffectedElement_isNULL) op.addKey("AffectedElement", instance.AffectedElement); if (!instance.AffectingElement_isNULL) op.addKey("AffectingElement", instance.AffectingElement); _L_; return op.getHdl(); } CMPIInstance* BIOS_OpenDRIM_ServiceAffectsComputerSystem_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_ServiceAffectsComputerSystem& instance) { _E_; Objectpath op(broker, BIOS_OpenDRIM_ServiceAffectsComputerSystem_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.ElementEffects_isNULL) ci.setProperty("ElementEffects", instance.ElementEffects); if (!instance.OtherElementEffectsDescriptions_isNULL) ci.setProperty("OtherElementEffectsDescriptions", instance.OtherElementEffectsDescriptions); _L_; return ci.getHdl(); } void BIOS_OpenDRIM_ServiceAffectsComputerSystem_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_ServiceAffectsComputerSystem& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("AffectedElement", instance.AffectedElement) == OK) instance.AffectedElement_isNULL = false; if (op.getKey("AffectingElement", instance.AffectingElement) == OK) instance.AffectingElement_isNULL = false; _L_; } void BIOS_OpenDRIM_ServiceAffectsComputerSystem_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_ServiceAffectsComputerSystem& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("AffectedElement", instance.AffectedElement) == OK) instance.AffectedElement_isNULL = false; if (inst.getProperty("AffectingElement", instance.AffectingElement) == OK) instance.AffectingElement_isNULL = false; if (inst.getProperty("ElementEffects", instance.ElementEffects) == OK) instance.ElementEffects_isNULL = false; if (inst.getProperty("OtherElementEffectsDescriptions", instance.OtherElementEffectsDescriptions) == OK) instance.OtherElementEffectsDescriptions_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsComputerSystem/assocOpenDRIM_ServiceAffectsComputerSystem.cppopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_ServiceAffectsComputerSystem/assocOpenDRIM_ServiceAffectsComput0000644000175000017500000002125611400645636034463 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_ServiceAffectsComputerSystem.h" int BIOS_OpenDRIM_ServiceAffectsComputerSystem_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 = BIOS_OpenDRIM_ServiceAffectsComputerSystem_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, "AffectedElement") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "AffectingElement") != 0) return OK; CF_assert(BIOS_OpenDRIM_ServiceAffectsComputerSystem_associatorAffectedElementToAffectingElement(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "AffectingElement") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "AffectedElement") != 0) return OK; CF_assert(BIOS_OpenDRIM_ServiceAffectsComputerSystem_associatorAffectingElementToAffectedElement(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int BIOS_OpenDRIM_ServiceAffectsComputerSystem_enumerateAffectedElements(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, AffectedElement_NAMESPACE, AffectedElement_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(BIOS_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(BIOS_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, BIOS_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int BIOS_OpenDRIM_ServiceAffectsComputerSystem_getAffectedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), AffectedElement_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), AffectedElement_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ManagedElement _instance; BIOS_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(BIOS_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, BIOS_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int BIOS_OpenDRIM_ServiceAffectsComputerSystem_enumerateAffectingElements(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, AffectingElement_NAMESPACE, AffectingElement_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(BIOS_CIM_Service_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(BIOS_CIM_Service_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, BIOS_CIM_Service_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int BIOS_OpenDRIM_ServiceAffectsComputerSystem_getAffectingElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), AffectingElement_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), AffectingElement_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_Service _instance; BIOS_CIM_Service_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(BIOS_CIM_Service_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, BIOS_CIM_Service_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteComponent/0000755000175000017500000000000011400645636024242 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteComponent/OpenDRIM_BIOSConcreteComponentProvider.cppopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteComponent/OpenDRIM_BIOSConcreteComponentProvider.cp0000644000175000017500000004177211400645636034053 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSConcreteComponent.h" #include "OpenDRIM_BIOSConcreteComponentAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define BIOS_OpenDRIM_BIOSConcreteComponentProviderSetInstance BIOS_OpenDRIM_BIOSConcreteComponentProviderModifyInstance #endif int BIOS_OpenDRIM_BIOSConcreteComponent_init(const CMPIBroker* broker); int BIOS_OpenDRIM_BIOSConcreteComponent_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus BIOS_OpenDRIM_BIOSConcreteComponentProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_BIOSConcreteComponent_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConcreteComponentProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConcreteComponent_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_BIOSConcreteComponent_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConcreteComponentProviderEnumInstances(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 = BIOS_OpenDRIM_BIOSConcreteComponent_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = BIOS_OpenDRIM_BIOSConcreteComponent_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConcreteComponentProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSConcreteComponent instance; BIOS_OpenDRIM_BIOSConcreteComponent_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConcreteComponent_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = BIOS_OpenDRIM_BIOSConcreteComponent_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConcreteComponentProviderSetInstance(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_BIOSConcreteComponent newInstance, oldInstance; BIOS_OpenDRIM_BIOSConcreteComponent_toCPP(_broker, ci, newInstance); BIOS_OpenDRIM_BIOSConcreteComponent_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConcreteComponent_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSConcreteComponent_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConcreteComponentProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSConcreteComponent instance; BIOS_OpenDRIM_BIOSConcreteComponent_toCPP(_broker, ci, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConcreteComponent_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_BIOSConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSConcreteComponent_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSConcreteComponent_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = BIOS_OpenDRIM_BIOSConcreteComponent_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConcreteComponentProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSConcreteComponent instance; BIOS_OpenDRIM_BIOSConcreteComponent_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConcreteComponent_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSConcreteComponent_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConcreteComponentProviderExecQuery(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 BIOS_OpenDRIM_BIOSConcreteComponentProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_BIOSConcreteComponent_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConcreteComponentProviderAssociatorNames(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 = BIOS_OpenDRIM_BIOSConcreteComponent_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteComponent_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 BIOS_OpenDRIM_BIOSConcreteComponentProviderAssociators(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 = BIOS_OpenDRIM_BIOSConcreteComponent_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteComponent_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 BIOS_OpenDRIM_BIOSConcreteComponentProviderReferenceNames(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 = BIOS_OpenDRIM_BIOSConcreteComponent_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = BIOS_OpenDRIM_BIOSConcreteComponent_referencePartComponentToGroupComponent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = BIOS_OpenDRIM_BIOSConcreteComponent_referenceGroupComponentToPartComponent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_BIOSConcreteComponent_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConcreteComponentProviderReferences(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 = BIOS_OpenDRIM_BIOSConcreteComponent_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = BIOS_OpenDRIM_BIOSConcreteComponent_referencePartComponentToGroupComponent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = BIOS_OpenDRIM_BIOSConcreteComponent_referenceGroupComponentToPartComponent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteComponent_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = BIOS_OpenDRIM_BIOSConcreteComponent_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int BIOS_OpenDRIM_BIOSConcreteComponent_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConcreteComponent_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSConcreteComponent_init FAILED: " + (string) OpenDRIM_BIOSConcreteComponent_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteComponent_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConcreteComponent_unload(errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSConcreteComponent_unload FAILED: " + (string) OpenDRIM_BIOSConcreteComponent_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define BIOS_OpenDRIM_BIOSConcreteComponent_INIT if (BIOS_OpenDRIM_BIOSConcreteComponent_init(_broker) < 0) return NULL CMInstanceMIStub(BIOS_OpenDRIM_BIOSConcreteComponentProvider, BIOS_OpenDRIM_BIOSConcreteComponentProvider, _broker, BIOS_OpenDRIM_BIOSConcreteComponent_INIT); CMAssociationMIStub(BIOS_OpenDRIM_BIOSConcreteComponentProvider, BIOS_OpenDRIM_BIOSConcreteComponentProvider, _broker, BIOS_OpenDRIM_BIOSConcreteComponent_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteComponent/OpenDRIM_BIOSConcreteComponentAccess.h0000644000175000017500000001051211400645636033273 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSCONCRETECOMPONENTACCESS_H_ #define OPENDRIM_BIOSCONCRETECOMPONENTACCESS_H_ #include "BIOS_Common.h" #include "OpenDRIM_BIOSConcreteComponent.h" #include "assocOpenDRIM_BIOSConcreteComponent.h" int BIOS_OpenDRIM_BIOSConcreteComponent_load(const CMPIBroker* broker, string& errorMessage); int BIOS_OpenDRIM_BIOSConcreteComponent_unload(string& errorMessage); int BIOS_OpenDRIM_BIOSConcreteComponent_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSConcreteComponent_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BIOSConcreteComponent& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSConcreteComponent_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSConcreteComponent& newInstance, const OpenDRIM_BIOSConcreteComponent& oldInstance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSConcreteComponent_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSConcreteComponent& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSConcreteComponent_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSConcreteComponent& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSConcreteComponent_associatorPartComponentToGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& PartComponent_instance, const char** properties, vector& GroupComponent_associatedInstances, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSConcreteComponent_associatorGroupComponentToPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& GroupComponent_instance, const char** properties, vector& PartComponent_associatedInstances, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSConcreteComponent_referencePartComponentToGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& PartComponent_instance, const vector& GroupComponent_instances, vector& OpenDRIM_BIOSConcreteComponent_instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSConcreteComponent_referenceGroupComponentToPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& GroupComponent_instance, const vector& PartComponent_instances, vector& OpenDRIM_BIOSConcreteComponent_instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSConcreteComponent_populate(OpenDRIM_BIOSConcreteComponent& instance, string& errorMessage); #endif /*OPENDRIM_BIOSCONCRETECOMPONENTACCESS_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteComponent/OpenDRIM_BIOSConcreteComponent.h0000644000175000017500000000700611400645636032155 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSCONCRETECOMPONENT_H_ #define OPENDRIM_BIOSCONCRETECOMPONENT_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" */ const static char* OpenDRIM_BIOSConcreteComponent_classnames[] = {"OpenDRIM_BIOSConcreteComponent"}; static string OpenDRIM_BIOSConcreteComponent_NAMESPACE = _NAMESPACE; const static string PartComponent_role = "PartComponent"; const static char* PartComponent_classnames[] = {"CIM_BIOSAttribute"}; const static string PartComponent_NAMESPACE = _NAMESPACE; const static string GroupComponent_role = "GroupComponent"; const static char* GroupComponent_classnames[] = {"OpenDRIM_BIOSElement"}; const static string GroupComponent_NAMESPACE = _NAMESPACE; class OpenDRIM_BIOSConcreteComponent { public: Objectpath GroupComponent; bool GroupComponent_isNULL; Objectpath PartComponent; bool PartComponent_isNULL; OpenDRIM_BIOSConcreteComponent() { GroupComponent_isNULL = true; PartComponent_isNULL = true; } ~OpenDRIM_BIOSConcreteComponent() {} string getKeys() const { return CF_toLowCase(".GroupComponent=\"" + CF_quoteString(GroupComponent.toString()) + "\""".PartComponent=\"" + CF_quoteString(PartComponent.toString()) + "\""); } int getGroupComponent(Objectpath& value) const { if (GroupComponent_isNULL==true) return NOT_FOUND; value = GroupComponent; return OK; } int setGroupComponent(const Objectpath& newValue) { GroupComponent = newValue; GroupComponent.setNamespace(GroupComponent_NAMESPACE); GroupComponent_isNULL = false; return OK; } int getPartComponent(Objectpath& value) const { if (PartComponent_isNULL==true) return NOT_FOUND; value = PartComponent; return OK; } int setPartComponent(const Objectpath& newValue) { PartComponent = newValue; PartComponent.setNamespace(PartComponent_NAMESPACE); PartComponent_isNULL = false; return OK; } }; #endif /*OPENDRIM_BIOSCONCRETECOMPONENT_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteComponent/Makefile.am0000644000175000017500000000467211400645636026307 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 = libcmpiBIOS_OpenDRIM_BIOSConcreteComponentProvider.la libcmpiBIOS_OpenDRIM_BIOSConcreteComponentProvider_la_SOURCES = OpenDRIM_BIOSConcreteComponentAccess.cpp OpenDRIM_BIOSConcreteComponentProvider.cpp cmpiOpenDRIM_BIOSConcreteComponent.cpp assocOpenDRIM_BIOSConcreteComponent.cpp # May have to be adjusted for direct invocation libcmpiBIOS_OpenDRIM_BIOSConcreteComponentProvider_la_CPPFLAGS = -I../CIM_ManagedElement -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiBIOS_OpenDRIM_BIOSConcreteComponentProvider_la_LIBADD = ../Common/libcmpiBIOS_Common.la #../CIM_ManagedElement/libcmpiBIOS_CIM_ManagedElementProvider.la ../CIM_ManagedElement/libcmpiBIOS_CIM_ManagedElementProvider.la libcmpiBIOS_OpenDRIM_BIOSConcreteComponentProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_BIOSConcreteComponent.h OpenDRIM_BIOSConcreteComponent.h OpenDRIM_BIOSConcreteComponentAccess.h opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteComponent/cmpiOpenDRIM_BIOSConcreteComponent.h0000644000175000017500000000431311400645636033024 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSCONCRETECOMPONENT_H_ #define CMPIOPENDRIM_BIOSCONCRETECOMPONENT_H_ #include "OpenDRIM_BIOSConcreteComponent.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSConcreteComponent_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSConcreteComponent& instance); CMPIInstance* BIOS_OpenDRIM_BIOSConcreteComponent_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSConcreteComponent& instance); void BIOS_OpenDRIM_BIOSConcreteComponent_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSConcreteComponent& instance); void BIOS_OpenDRIM_BIOSConcreteComponent_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSConcreteComponent& instance); #endif /*CMPIOPENDRIM_BIOSCONCRETECOMPONENT_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteComponent/OpenDRIM_BIOSConcreteComponentAccess.cpp0000644000175000017500000002472711400645636033643 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSConcreteComponentAccess.h" int BIOS_OpenDRIM_BIOSConcreteComponent_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(BIOS_CIM_ManagedElement_load(broker, errorMessage)); CF_assert(BIOS_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteComponent_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(BIOS_CIM_ManagedElement_unload(errorMessage)); CF_assert(BIOS_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteComponent_isAssociated(const Instance& PartComponent, const Instance& GroupComponent, bool& isAssociated, string& errorMessage) { _E_; // Determine if the association can be established or not isAssociated=false; if(PartComponent.getClassname().find("OpenDRIM")==0) isAssociated=true; _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteComponent_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(BIOS_OpenDRIM_BIOSConcreteComponent_enumeratePartComponents(broker, ctx, subjects, NULL, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(BIOS_OpenDRIM_BIOSConcreteComponent_enumeratePartComponents(broker, ctx, subjects, NULL, false, errorMessage)); vector::iterator c = subjects.begin(); vector::iterator end = subjects.end(); for (; c != end; ++c) { bool leftToRight = true; vector associatedInstances; BIOS_OpenDRIM_BIOSConcreteComponent_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), PartComponent_classnames[0], GroupComponent_classnames[0], PartComponent_role.c_str(), GroupComponent_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(BIOS_OpenDRIM_BIOSConcreteComponent_referencePartComponentToGroupComponent(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteComponent_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BIOSConcreteComponent& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath PartComponent_objectpath; instance.getPartComponent(PartComponent_objectpath); Instance PartComponent_instance; CF_assert(BIOS_OpenDRIM_BIOSConcreteComponent_getPartComponent(broker, ctx, PartComponent_objectpath, PartComponent_instance, NULL, errorMessage)); Objectpath GroupComponent_objectpath; instance.getGroupComponent(GroupComponent_objectpath); Instance GroupComponent_instance; CF_assert(BIOS_OpenDRIM_BIOSConcreteComponent_getGroupComponent(broker, ctx, GroupComponent_objectpath, GroupComponent_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(BIOS_OpenDRIM_BIOSConcreteComponent_isAssociated(PartComponent_instance, GroupComponent_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteComponent_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSConcreteComponent& newInstance, const OpenDRIM_BIOSConcreteComponent& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSConcreteComponent_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSConcreteComponent& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSConcreteComponent_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSConcreteComponent& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSConcreteComponent_associatorPartComponentToGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& PartComponent_instance, const char** properties, vector& GroupComponent_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector GroupComponent_instances; if (discriminant=="a") CF_assert(BIOS_OpenDRIM_BIOSConcreteComponent_enumerateGroupComponents(broker, ctx, GroupComponent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(BIOS_OpenDRIM_BIOSConcreteComponent_enumerateGroupComponents(broker, ctx, GroupComponent_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(BIOS_OpenDRIM_BIOSConcreteComponent_enumerateGroupComponents(broker, ctx, GroupComponent_instances, properties, false, errorMessage)); } for (size_t i=0; i& PartComponent_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector PartComponent_instances; if (discriminant=="a") CF_assert(BIOS_OpenDRIM_BIOSConcreteComponent_enumeratePartComponents(broker, ctx, PartComponent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(BIOS_OpenDRIM_BIOSConcreteComponent_enumeratePartComponents(broker, ctx, PartComponent_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(BIOS_OpenDRIM_BIOSConcreteComponent_enumeratePartComponents(broker, ctx, PartComponent_instances, properties, false, errorMessage)); } for (size_t i=0; i& GroupComponent_instances, vector& OpenDRIM_BIOSConcreteComponent_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < GroupComponent_instances.size(); i++) { OpenDRIM_BIOSConcreteComponent instance; instance.setPartComponent(((Instance) PartComponent_instance).getObjectpath()); instance.setGroupComponent(((Instance) GroupComponent_instances[i]).getObjectpath()); OpenDRIM_BIOSConcreteComponent_instances.push_back(instance); } _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteComponent_referenceGroupComponentToPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& GroupComponent_instance, const vector& PartComponent_instances, vector& OpenDRIM_BIOSConcreteComponent_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < PartComponent_instances.size(); i++) { OpenDRIM_BIOSConcreteComponent instance; instance.setPartComponent(((Instance) PartComponent_instances[i]).getObjectpath()); instance.setGroupComponent(((Instance) GroupComponent_instance).getObjectpath()); OpenDRIM_BIOSConcreteComponent_instances.push_back(instance); } _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteComponent_populate(OpenDRIM_BIOSConcreteComponent& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteComponent/assocOpenDRIM_BIOSConcreteComponent.h0000644000175000017500000000616511400645636033213 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSCONCRETECOMPONENT_H_ #define ASSOCOPENDRIM_BIOSCONCRETECOMPONENT_H_ #include "OpenDRIM_BIOSConcreteComponentAccess.h" int BIOS_OpenDRIM_BIOSConcreteComponent_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 BIOS_OpenDRIM_BIOSConcreteComponent_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 BIOS_OpenDRIM_BIOSConcreteComponent_enumeratePartComponents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int BIOS_OpenDRIM_BIOSConcreteComponent_getPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSConcreteComponent_enumerateGroupComponents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int BIOS_OpenDRIM_BIOSConcreteComponent_getGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_BIOSCONCRETECOMPONENT_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteComponent/assocOpenDRIM_BIOSConcreteComponent.cpp0000644000175000017500000002106611400645636033543 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSConcreteComponent.h" int BIOS_OpenDRIM_BIOSConcreteComponent_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 = BIOS_OpenDRIM_BIOSConcreteComponent_associatorFilter(broker, ctx, cop, knownInstance, assocClass, resultClass, role, resultRole, leftToRight, errorMessage); if (errorCode == -1) return OK; if (errorCode != OK) return errorCode; if (leftToRight) { if (role != NULL && strcasecmp(role, "PartComponent") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "GroupComponent") != 0) return OK; CF_assert(BIOS_OpenDRIM_BIOSConcreteComponent_associatorPartComponentToGroupComponent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "GroupComponent") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "PartComponent") != 0) return OK; CF_assert(BIOS_OpenDRIM_BIOSConcreteComponent_associatorGroupComponentToPartComponent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteComponent_enumeratePartComponents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, PartComponent_NAMESPACE, PartComponent_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(BIOS_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(BIOS_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, BIOS_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteComponent_getPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), PartComponent_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), PartComponent_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ManagedElement _instance; BIOS_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(BIOS_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, BIOS_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteComponent_enumerateGroupComponents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, GroupComponent_NAMESPACE, GroupComponent_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(BIOS_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(BIOS_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, BIOS_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteComponent_getGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), GroupComponent_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), GroupComponent_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ManagedElement _instance; BIOS_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(BIOS_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, BIOS_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteComponent/cmpiOpenDRIM_BIOSConcreteComponent.cpp0000644000175000017500000000614211400645636033361 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSConcreteComponent.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSConcreteComponent_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSConcreteComponent& instance) { _E_; Objectpath op(broker, OpenDRIM_BIOSConcreteComponent_classnames[0], OpenDRIM_BIOSConcreteComponent_NAMESPACE); if (!instance.GroupComponent_isNULL) op.addKey("GroupComponent", instance.GroupComponent); if (!instance.PartComponent_isNULL) op.addKey("PartComponent", instance.PartComponent); _L_; return op.getHdl(); } CMPIInstance* BIOS_OpenDRIM_BIOSConcreteComponent_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSConcreteComponent& instance) { _E_; Objectpath op(broker, BIOS_OpenDRIM_BIOSConcreteComponent_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void BIOS_OpenDRIM_BIOSConcreteComponent_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSConcreteComponent& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("PartComponent", instance.PartComponent) == OK) instance.PartComponent_isNULL = false; if (op.getKey("GroupComponent", instance.GroupComponent) == OK) instance.GroupComponent_isNULL = false; _L_; } void BIOS_OpenDRIM_BIOSConcreteComponent_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSConcreteComponent& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("GroupComponent", instance.GroupComponent) == OK) instance.GroupComponent_isNULL = false; if (inst.getProperty("PartComponent", instance.PartComponent) == OK) instance.PartComponent_isNULL = false; _L_; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteCollection/0000755000175000017500000000000011400645636024373 5ustar guillaumeguillaumeopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteCollection/Makefile.am0000644000175000017500000000406611400645636026435 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 = libcmpiBIOS_OpenDRIM_BIOSConcreteCollectionProvider.la libcmpiBIOS_OpenDRIM_BIOSConcreteCollectionProvider_la_SOURCES = OpenDRIM_BIOSConcreteCollectionAccess.cpp OpenDRIM_BIOSConcreteCollectionProvider.cpp cmpiOpenDRIM_BIOSConcreteCollection.cpp libcmpiBIOS_OpenDRIM_BIOSConcreteCollectionProvider_la_LIBADD = ../Common/libcmpiBIOS_Common.la libcmpiBIOS_OpenDRIM_BIOSConcreteCollectionProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_BIOSConcreteCollection.h OpenDRIM_BIOSConcreteCollection.h OpenDRIM_BIOSConcreteCollectionAccess.h opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteCollection/cmpiOpenDRIM_BIOSConcreteCollection.h0000644000175000017500000000432711400645636033313 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSCONCRETECOLLECTION_H_ #define CMPIOPENDRIM_BIOSCONCRETECOLLECTION_H_ #include "OpenDRIM_BIOSConcreteCollection.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSConcreteCollection_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSConcreteCollection& instance); CMPIInstance* BIOS_OpenDRIM_BIOSConcreteCollection_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSConcreteCollection& instance); void BIOS_OpenDRIM_BIOSConcreteCollection_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSConcreteCollection& instance); void BIOS_OpenDRIM_BIOSConcreteCollection_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSConcreteCollection& instance); #endif /*CMPIOPENDRIM_BIOSCONCRETECOLLECTION_H_*/ ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteCollection/OpenDRIM_BIOSConcreteCollectionAccess.cppopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteCollection/OpenDRIM_BIOSConcreteCollectionAccess.cp0000644000175000017500000000613711400645636033740 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSConcreteCollectionAccess.h" int BIOS_OpenDRIM_BIOSConcreteCollection_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteCollection_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteCollection_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteCollection_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BIOSConcreteCollection& instance, const char** properties, string& errorMessage) { _E_; _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteCollection_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSConcreteCollection& newInstance, const OpenDRIM_BIOSConcreteCollection& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSConcreteCollection_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSConcreteCollection& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSConcreteCollection_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSConcreteCollection& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSConcreteCollection_populate(OpenDRIM_BIOSConcreteCollection& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteCollection/OpenDRIM_BIOSConcreteCollectionAccess.h0000644000175000017500000000573611400645636033571 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSCONCRETECOLLECTIONACCESS_H_ #define OPENDRIM_BIOSCONCRETECOLLECTIONACCESS_H_ #include "BIOS_Common.h" #include "OpenDRIM_BIOSConcreteCollection.h" int BIOS_OpenDRIM_BIOSConcreteCollection_load(const CMPIBroker* broker, string& errorMessage); int BIOS_OpenDRIM_BIOSConcreteCollection_unload(string& errorMessage); int BIOS_OpenDRIM_BIOSConcreteCollection_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSConcreteCollection_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BIOSConcreteCollection& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSConcreteCollection_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSConcreteCollection& newInstance, const OpenDRIM_BIOSConcreteCollection& oldInstance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSConcreteCollection_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSConcreteCollection& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSConcreteCollection_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSConcreteCollection& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSConcreteCollection_populate(OpenDRIM_BIOSConcreteCollection& instance, string& errorMessage); #endif /*OPENDRIM_BIOSCONCRETECOLLECTIONACCESS_H_*/ ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteCollection/OpenDRIM_BIOSConcreteCollectionProvider.cppopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteCollection/OpenDRIM_BIOSConcreteCollectionProvider.0000644000175000017500000002574511400645636034014 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSConcreteCollection.h" #include "OpenDRIM_BIOSConcreteCollectionAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define BIOS_OpenDRIM_BIOSConcreteCollectionProviderSetInstance BIOS_OpenDRIM_BIOSConcreteCollectionProviderModifyInstance #endif int BIOS_OpenDRIM_BIOSConcreteCollection_init(const CMPIBroker* broker); int BIOS_OpenDRIM_BIOSConcreteCollection_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus BIOS_OpenDRIM_BIOSConcreteCollectionProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_BIOSConcreteCollection_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConcreteCollectionProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConcreteCollection_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_BIOSConcreteCollection_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConcreteCollectionProviderEnumInstances(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 = BIOS_OpenDRIM_BIOSConcreteCollection_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = BIOS_OpenDRIM_BIOSConcreteCollection_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConcreteCollectionProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSConcreteCollection instance; BIOS_OpenDRIM_BIOSConcreteCollection_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConcreteCollection_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = BIOS_OpenDRIM_BIOSConcreteCollection_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConcreteCollectionProviderSetInstance(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_BIOSConcreteCollection newInstance, oldInstance; BIOS_OpenDRIM_BIOSConcreteCollection_toCPP(_broker, ci, newInstance); BIOS_OpenDRIM_BIOSConcreteCollection_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConcreteCollection_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSConcreteCollection_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConcreteCollectionProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSConcreteCollection instance; BIOS_OpenDRIM_BIOSConcreteCollection_toCPP(_broker, ci, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConcreteCollection_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_BIOSConcreteCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSConcreteCollection_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSConcreteCollection_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = BIOS_OpenDRIM_BIOSConcreteCollection_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConcreteCollectionProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSConcreteCollection instance; BIOS_OpenDRIM_BIOSConcreteCollection_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConcreteCollection_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSConcreteCollection_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConcreteCollectionProviderExecQuery(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 BIOS_OpenDRIM_BIOSConcreteCollection_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConcreteCollection_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSConcreteCollection_init FAILED: " + (string) OpenDRIM_BIOSConcreteCollection_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteCollection_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConcreteCollection_unload(errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSConcreteCollection_unload FAILED: " + (string) OpenDRIM_BIOSConcreteCollection_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define BIOS_OpenDRIM_BIOSConcreteCollection_INIT if (BIOS_OpenDRIM_BIOSConcreteCollection_init(_broker) < 0) return NULL CMInstanceMIStub(BIOS_OpenDRIM_BIOSConcreteCollectionProvider, BIOS_OpenDRIM_BIOSConcreteCollectionProvider, _broker, BIOS_OpenDRIM_BIOSConcreteCollection_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteCollection/cmpiOpenDRIM_BIOSConcreteCollection.cpp0000644000175000017500000000651411400645636033646 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSConcreteCollection.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSConcreteCollection_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSConcreteCollection& instance) { _E_; Objectpath op(broker, OpenDRIM_BIOSConcreteCollection_classnames[0], OpenDRIM_BIOSConcreteCollection_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* BIOS_OpenDRIM_BIOSConcreteCollection_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSConcreteCollection& instance) { _E_; Objectpath op(broker, BIOS_OpenDRIM_BIOSConcreteCollection_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Caption_isNULL) ci.setProperty("Caption", instance.Caption); if (!instance.Description_isNULL) ci.setProperty("Description", instance.Description); if (!instance.ElementName_isNULL) ci.setProperty("ElementName", instance.ElementName); _L_; return ci.getHdl(); } void BIOS_OpenDRIM_BIOSConcreteCollection_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSConcreteCollection& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void BIOS_OpenDRIM_BIOSConcreteCollection_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSConcreteCollection& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Caption", instance.Caption) == OK) instance.Caption_isNULL = false; if (inst.getProperty("Description", instance.Description) == OK) instance.Description_isNULL = false; if (inst.getProperty("ElementName", instance.ElementName) == OK) instance.ElementName_isNULL = false; if (inst.getProperty("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteCollection/OpenDRIM_BIOSConcreteCollection.h0000644000175000017500000000643611400645636032445 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSCONCRETECOLLECTION_H_ #define OPENDRIM_BIOSCONCRETECOLLECTION_H_ #include const static char* OpenDRIM_BIOSConcreteCollection_classnames[] = {"OpenDRIM_BIOSConcreteCollection"}; static string OpenDRIM_BIOSConcreteCollection_NAMESPACE = _NAMESPACE; class OpenDRIM_BIOSConcreteCollection { public: string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string ElementName; bool ElementName_isNULL; string InstanceID; bool InstanceID_isNULL; OpenDRIM_BIOSConcreteCollection() { Caption_isNULL = true; Description_isNULL = true; ElementName_isNULL = true; InstanceID_isNULL = true; } ~OpenDRIM_BIOSConcreteCollection() {} string getKeys() const { return CF_toLowCase(".InstanceID=\"" + CF_quoteString(InstanceID) + "\""); } int getCaption(string& value) const { if (Caption_isNULL==true) return NOT_FOUND; value = Caption; return OK; } int setCaption(const string& newValue) { Caption = newValue; Caption_isNULL = false; return OK; } int getDescription(string& value) const { if (Description_isNULL==true) return NOT_FOUND; value = Description; return OK; } int setDescription(const string& newValue) { Description = newValue; Description_isNULL = false; return OK; } int getElementName(string& value) const { if (ElementName_isNULL==true) return NOT_FOUND; value = ElementName; return OK; } int setElementName(const string& newValue) { ElementName = newValue; ElementName_isNULL = false; return OK; } int getInstanceID(string& value) const { if (InstanceID_isNULL==true) return NOT_FOUND; value = InstanceID; return OK; } int setInstanceID(const string& newValue) { InstanceID = newValue; InstanceID_isNULL = false; return OK; } }; #endif /*OPENDRIM_BIOSCONCRETECOLLECTION_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSHostedService/0000755000175000017500000000000011400645636023364 5ustar guillaumeguillaumeopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSHostedService/Makefile.am0000644000175000017500000000453511400645636025427 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 = libcmpiBIOS_OpenDRIM_BIOSHostedServiceProvider.la libcmpiBIOS_OpenDRIM_BIOSHostedServiceProvider_la_SOURCES = OpenDRIM_BIOSHostedServiceAccess.cpp OpenDRIM_BIOSHostedServiceProvider.cpp cmpiOpenDRIM_BIOSHostedService.cpp assocOpenDRIM_BIOSHostedService.cpp # May have to be adjusted for direct invocation libcmpiBIOS_OpenDRIM_BIOSHostedServiceProvider_la_CPPFLAGS = -I../CIM_System -I../CIM_Service # Uncomment the end for direct invocation, may have to be adjusted libcmpiBIOS_OpenDRIM_BIOSHostedServiceProvider_la_LIBADD = ../Common/libcmpiBIOS_Common.la #../CIM_System/libcmpiBIOS_CIM_SystemProvider.la ../CIM_Service/libcmpiBIOS_CIM_ServiceProvider.la libcmpiBIOS_OpenDRIM_BIOSHostedServiceProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_BIOSHostedService.h OpenDRIM_BIOSHostedService.h OpenDRIM_BIOSHostedServiceAccess.h opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSHostedService/OpenDRIM_BIOSHostedService.h0000644000175000017500000000650211400645636030421 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSHOSTEDSERVICE_H_ #define OPENDRIM_BIOSHOSTEDSERVICE_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_System.h" #include "CIM_SystemAccess.h" #include "cmpiCIM_Service.h" #include "CIM_ServiceAccess.h" */ const static char* OpenDRIM_BIOSHostedService_classnames[] = {"OpenDRIM_BIOSHostedService"}; static string OpenDRIM_BIOSHostedService_NAMESPACE = _NAMESPACE; const static string Antecedent_role = "Antecedent"; const static char* Antecedent_classnames[] = {"OpenDRIM_ComputerSystem"}; const static string Antecedent_NAMESPACE = _NAMESPACE; const static string Dependent_role = "Dependent"; const static char* Dependent_classnames[] = {"OpenDRIM_BIOSService"}; const static string Dependent_NAMESPACE = _NAMESPACE; class OpenDRIM_BIOSHostedService { public: Objectpath Antecedent; bool Antecedent_isNULL; Objectpath Dependent; bool Dependent_isNULL; OpenDRIM_BIOSHostedService() { Antecedent_isNULL = true; Dependent_isNULL = true; } ~OpenDRIM_BIOSHostedService() {} string getKeys() const { return CF_toLowCase(".Antecedent=\"" + CF_quoteString(Antecedent.toString()) + "\""".Dependent=\"" + CF_quoteString(Dependent.toString()) + "\""); } int getAntecedent(Objectpath& value) const { if (Antecedent_isNULL==true) return NOT_FOUND; value = Antecedent; return OK; } int setAntecedent(const Objectpath& newValue) { Antecedent = newValue; Antecedent.setNamespace(Antecedent_NAMESPACE); Antecedent_isNULL = false; return OK; } int getDependent(Objectpath& value) const { if (Dependent_isNULL==true) return NOT_FOUND; value = Dependent; return OK; } int setDependent(const Objectpath& newValue) { Dependent = newValue; Dependent.setNamespace(Dependent_NAMESPACE); Dependent_isNULL = false; return OK; } }; #endif /*OPENDRIM_BIOSHOSTEDSERVICE_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSHostedService/cmpiOpenDRIM_BIOSHostedService.h0000644000175000017500000000423311400645636031271 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSHOSTEDSERVICE_H_ #define CMPIOPENDRIM_BIOSHOSTEDSERVICE_H_ #include "OpenDRIM_BIOSHostedService.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSHostedService_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSHostedService& instance); CMPIInstance* BIOS_OpenDRIM_BIOSHostedService_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSHostedService& instance); void BIOS_OpenDRIM_BIOSHostedService_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSHostedService& instance); void BIOS_OpenDRIM_BIOSHostedService_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSHostedService& instance); #endif /*CMPIOPENDRIM_BIOSHOSTEDSERVICE_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSHostedService/OpenDRIM_BIOSHostedServiceAccess.h0000644000175000017500000001023211400645636031536 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSHOSTEDSERVICEACCESS_H_ #define OPENDRIM_BIOSHOSTEDSERVICEACCESS_H_ #include "BIOS_Common.h" #include "OpenDRIM_BIOSHostedService.h" #include "assocOpenDRIM_BIOSHostedService.h" int BIOS_OpenDRIM_BIOSHostedService_load(const CMPIBroker* broker, string& errorMessage); int BIOS_OpenDRIM_BIOSHostedService_unload(string& errorMessage); int BIOS_OpenDRIM_BIOSHostedService_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSHostedService_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BIOSHostedService& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSHostedService_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSHostedService& newInstance, const OpenDRIM_BIOSHostedService& oldInstance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSHostedService_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSHostedService& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSHostedService_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSHostedService& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSHostedService_associatorAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const char** properties, vector& Dependent_associatedInstances, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSHostedService_associatorDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const char** properties, vector& Antecedent_associatedInstances, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSHostedService_referenceAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const vector& Dependent_instances, vector& OpenDRIM_BIOSHostedService_instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSHostedService_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_BIOSHostedService_instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSHostedService_populate(OpenDRIM_BIOSHostedService& instance, string& errorMessage); #endif /*OPENDRIM_BIOSHOSTEDSERVICEACCESS_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSHostedService/assocOpenDRIM_BIOSHostedService.cpp0000644000175000017500000002037611400645636032012 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSHostedService.h" int BIOS_OpenDRIM_BIOSHostedService_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 = BIOS_OpenDRIM_BIOSHostedService_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(BIOS_OpenDRIM_BIOSHostedService_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(BIOS_OpenDRIM_BIOSHostedService_associatorDependentToAntecedent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int BIOS_OpenDRIM_BIOSHostedService_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(BIOS_CIM_System_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(BIOS_CIM_System_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, BIOS_CIM_System_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int BIOS_OpenDRIM_BIOSHostedService_getAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Antecedent_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Antecedent_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_System _instance; BIOS_CIM_System_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(BIOS_CIM_System_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, BIOS_CIM_System_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int BIOS_OpenDRIM_BIOSHostedService_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(BIOS_CIM_Service_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(BIOS_CIM_Service_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, BIOS_CIM_Service_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int BIOS_OpenDRIM_BIOSHostedService_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_Service _instance; BIOS_CIM_Service_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(BIOS_CIM_Service_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, BIOS_CIM_Service_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSHostedService/cmpiOpenDRIM_BIOSHostedService.cpp0000644000175000017500000000575211400645636031633 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSHostedService.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSHostedService_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSHostedService& instance) { _E_; Objectpath op(broker, OpenDRIM_BIOSHostedService_classnames[0], OpenDRIM_BIOSHostedService_NAMESPACE); if (!instance.Antecedent_isNULL) op.addKey("Antecedent", instance.Antecedent); if (!instance.Dependent_isNULL) op.addKey("Dependent", instance.Dependent); _L_; return op.getHdl(); } CMPIInstance* BIOS_OpenDRIM_BIOSHostedService_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSHostedService& instance) { _E_; Objectpath op(broker, BIOS_OpenDRIM_BIOSHostedService_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void BIOS_OpenDRIM_BIOSHostedService_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSHostedService& 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 BIOS_OpenDRIM_BIOSHostedService_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSHostedService& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Antecedent", instance.Antecedent) == OK) instance.Antecedent_isNULL = false; if (inst.getProperty("Dependent", instance.Dependent) == OK) instance.Dependent_isNULL = false; _L_; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSHostedService/OpenDRIM_BIOSHostedServiceProvider.cpp0000644000175000017500000004116211400645636032470 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSHostedService.h" #include "OpenDRIM_BIOSHostedServiceAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define BIOS_OpenDRIM_BIOSHostedServiceProviderSetInstance BIOS_OpenDRIM_BIOSHostedServiceProviderModifyInstance #endif int BIOS_OpenDRIM_BIOSHostedService_init(const CMPIBroker* broker); int BIOS_OpenDRIM_BIOSHostedService_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus BIOS_OpenDRIM_BIOSHostedServiceProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_BIOSHostedService_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSHostedServiceProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSHostedService_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_BIOSHostedService_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSHostedServiceProviderEnumInstances(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 = BIOS_OpenDRIM_BIOSHostedService_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = BIOS_OpenDRIM_BIOSHostedService_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSHostedServiceProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSHostedService instance; BIOS_OpenDRIM_BIOSHostedService_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSHostedService_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = BIOS_OpenDRIM_BIOSHostedService_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSHostedServiceProviderSetInstance(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_BIOSHostedService newInstance, oldInstance; BIOS_OpenDRIM_BIOSHostedService_toCPP(_broker, ci, newInstance); BIOS_OpenDRIM_BIOSHostedService_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSHostedService_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSHostedService_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSHostedServiceProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSHostedService instance; BIOS_OpenDRIM_BIOSHostedService_toCPP(_broker, ci, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSHostedService_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_BIOSHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSHostedService_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSHostedService_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = BIOS_OpenDRIM_BIOSHostedService_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSHostedServiceProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSHostedService instance; BIOS_OpenDRIM_BIOSHostedService_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSHostedService_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSHostedService_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSHostedServiceProviderExecQuery(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 BIOS_OpenDRIM_BIOSHostedServiceProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_BIOSHostedService_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSHostedServiceProviderAssociatorNames(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 = BIOS_OpenDRIM_BIOSHostedService_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSHostedService_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 BIOS_OpenDRIM_BIOSHostedServiceProviderAssociators(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 = BIOS_OpenDRIM_BIOSHostedService_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSHostedService_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 BIOS_OpenDRIM_BIOSHostedServiceProviderReferenceNames(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 = BIOS_OpenDRIM_BIOSHostedService_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = BIOS_OpenDRIM_BIOSHostedService_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = BIOS_OpenDRIM_BIOSHostedService_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_BIOSHostedService_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSHostedServiceProviderReferences(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 = BIOS_OpenDRIM_BIOSHostedService_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = BIOS_OpenDRIM_BIOSHostedService_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = BIOS_OpenDRIM_BIOSHostedService_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = BIOS_OpenDRIM_BIOSHostedService_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int BIOS_OpenDRIM_BIOSHostedService_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSHostedService_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSHostedService_init FAILED: " + (string) OpenDRIM_BIOSHostedService_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int BIOS_OpenDRIM_BIOSHostedService_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSHostedService_unload(errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSHostedService_unload FAILED: " + (string) OpenDRIM_BIOSHostedService_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define BIOS_OpenDRIM_BIOSHostedService_INIT if (BIOS_OpenDRIM_BIOSHostedService_init(_broker) < 0) return NULL CMInstanceMIStub(BIOS_OpenDRIM_BIOSHostedServiceProvider, BIOS_OpenDRIM_BIOSHostedServiceProvider, _broker, BIOS_OpenDRIM_BIOSHostedService_INIT); CMAssociationMIStub(BIOS_OpenDRIM_BIOSHostedServiceProvider, BIOS_OpenDRIM_BIOSHostedServiceProvider, _broker, BIOS_OpenDRIM_BIOSHostedService_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSHostedService/assocOpenDRIM_BIOSHostedService.h0000644000175000017500000000607511400645636031457 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSHOSTEDSERVICE_H_ #define ASSOCOPENDRIM_BIOSHOSTEDSERVICE_H_ #include "OpenDRIM_BIOSHostedServiceAccess.h" int BIOS_OpenDRIM_BIOSHostedService_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 BIOS_OpenDRIM_BIOSHostedService_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 BIOS_OpenDRIM_BIOSHostedService_enumerateAntecedents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int BIOS_OpenDRIM_BIOSHostedService_getAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSHostedService_enumerateDependents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int BIOS_OpenDRIM_BIOSHostedService_getDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_BIOSHOSTEDSERVICE_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSHostedService/OpenDRIM_BIOSHostedServiceAccess.cpp0000644000175000017500000002362411400645636032102 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSHostedServiceAccess.h" int BIOS_OpenDRIM_BIOSHostedService_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(BIOS_CIM_System_load(broker, errorMessage)); CF_assert(BIOS_CIM_Service_load(broker, errorMessage)); */ // TODO _L_; return OK; } int BIOS_OpenDRIM_BIOSHostedService_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(BIOS_CIM_System_unload(errorMessage)); CF_assert(BIOS_CIM_Service_unload(errorMessage)); */ // TODO _L_; return OK; } int BIOS_OpenDRIM_BIOSHostedService_isAssociated(const Instance& Antecedent, const Instance& Dependent, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int BIOS_OpenDRIM_BIOSHostedService_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(BIOS_OpenDRIM_BIOSHostedService_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(BIOS_OpenDRIM_BIOSHostedService_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; BIOS_OpenDRIM_BIOSHostedService_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(BIOS_OpenDRIM_BIOSHostedService_referenceAntecedentToDependent(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int BIOS_OpenDRIM_BIOSHostedService_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BIOSHostedService& 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(BIOS_OpenDRIM_BIOSHostedService_getAntecedent(broker, ctx, Antecedent_objectpath, Antecedent_instance, NULL, errorMessage)); Objectpath Dependent_objectpath; instance.getDependent(Dependent_objectpath); Instance Dependent_instance; CF_assert(BIOS_OpenDRIM_BIOSHostedService_getDependent(broker, ctx, Dependent_objectpath, Dependent_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(BIOS_OpenDRIM_BIOSHostedService_isAssociated(Antecedent_instance, Dependent_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int BIOS_OpenDRIM_BIOSHostedService_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSHostedService& newInstance, const OpenDRIM_BIOSHostedService& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSHostedService_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSHostedService& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSHostedService_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSHostedService& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSHostedService_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(BIOS_OpenDRIM_BIOSHostedService_enumerateDependents(broker, ctx, Dependent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(BIOS_OpenDRIM_BIOSHostedService_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(BIOS_OpenDRIM_BIOSHostedService_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(BIOS_OpenDRIM_BIOSHostedService_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(BIOS_OpenDRIM_BIOSHostedService_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(BIOS_OpenDRIM_BIOSHostedService_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); } for (size_t i=0; i& Dependent_instances, vector& OpenDRIM_BIOSHostedService_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_BIOSHostedService instance; instance.setAntecedent(((Instance) Antecedent_instance).getObjectpath()); instance.setDependent(((Instance) Dependent_instances[i]).getObjectpath()); OpenDRIM_BIOSHostedService_instances.push_back(instance); } _L_; return OK; } int BIOS_OpenDRIM_BIOSHostedService_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_BIOSHostedService_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_BIOSHostedService instance; instance.setAntecedent(((Instance) Antecedent_instances[i]).getObjectpath()); instance.setDependent(((Instance) Dependent_instance).getObjectpath()); OpenDRIM_BIOSHostedService_instances.push_back(instance); } _L_; return OK; } int BIOS_OpenDRIM_BIOSHostedService_populate(OpenDRIM_BIOSHostedService& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-bios-1.0.0~ppa/mof/0000755000175000017500000000000011400645636017264 5ustar guillaumeguillaumeopendrim-lmp-bios-1.0.0~ppa/mof/OpenDRIM_BIOSEnumeration.mof0000644000175000017500000000315211400645636024370 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), BIOS provider package // Copyright (C) 2010 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 , , //################################################################################ [Provider("cmpi:cmpiBIOS_OpenDRIM_BIOSEnumerationProvider")] class OpenDRIM_BIOSEnumeration:CIM_BIOSEnumeration { }; opendrim-lmp-bios-1.0.0~ppa/mof/OpenDRIM_BIOSConcreteComponent.mof0000644000175000017500000000320611400645636025527 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), BIOS provider package // Copyright (C) 2010 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:cmpiBIOS_OpenDRIM_BIOSConcreteComponentProvider")] class OpenDRIM_BIOSConcreteComponent:CIM_ConcreteComponent { }; opendrim-lmp-bios-1.0.0~ppa/mof/OpenDRIM_BIOSString.mof0000644000175000017500000000313311400645636023347 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), BIOS provider package // Copyright (C) 2010 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 , , //################################################################################ [Provider("cmpi:cmpiBIOS_OpenDRIM_BIOSStringProvider")] class OpenDRIM_BIOSString:CIM_BIOSString { }; opendrim-lmp-bios-1.0.0~ppa/mof/OpenDRIM_BIOSInteger.mof0000644000175000017500000000313611400645636023501 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), BIOS provider package // Copyright (C) 2010 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 , , //################################################################################ [Provider("cmpi:cmpiBIOS_OpenDRIM_BIOSIntegerProvider")] class OpenDRIM_BIOSInteger:CIM_BIOSInteger { }; opendrim-lmp-bios-1.0.0~ppa/mof/OpenDRIM_ServiceAffectsBIOSAttribute.mof0000644000175000017500000000322611400645636026664 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), BIOS provider package // Copyright (C) 2010 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:cmpiBIOS_OpenDRIM_ServiceAffectsBIOSAttributeProvider")] class OpenDRIM_ServiceAffectsBIOSAttribute:CIM_ServiceAffectsElement { }; opendrim-lmp-bios-1.0.0~ppa/mof/OpenDRIM_OwningCollectionBIOS.mof0000644000175000017500000000321211400645636025354 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), BIOS provider package // Copyright (C) 2010 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:cmpiBIOS_OpenDRIM_OwningCollectionBIOSProvider")] class OpenDRIM_OwningCollectionBIOS:CIM_OwningCollectionElement { }; opendrim-lmp-bios-1.0.0~ppa/mof/OpenDRIM_BIOSCapabilities.mof0000644000175000017500000000317611400645636024501 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), BIOS provider package // Copyright (C) 2010 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:cmpiBIOS_OpenDRIM_BIOSCapabilitiesProvider")] class OpenDRIM_BIOSCapabilities:CIM_ElementCapabilities { }; opendrim-lmp-bios-1.0.0~ppa/mof/OpenDRIM_ServiceAffectsComputerSystem.mof0000644000175000017500000000323011400645636027242 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), BIOS provider package // Copyright (C) 2010 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:cmpiBIOS_OpenDRIM_ServiceAffectsComputerSystemProvider")] class OpenDRIM_ServiceAffectsComputerSystem:CIM_ServiceAffectsElement { }; opendrim-lmp-bios-1.0.0~ppa/mof/OpenDRIM_BIOSService.mof0000644000175000017500000000313611400645636023504 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), BIOS provider package // Copyright (C) 2010 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 , , //################################################################################ [Provider("cmpi:cmpiBIOS_OpenDRIM_BIOSServiceProvider")] class OpenDRIM_BIOSService:CIM_BIOSService { }; opendrim-lmp-bios-1.0.0~ppa/mof/OpenDRIM_BIOSRegisteredProfile.mof0000644000175000017500000000317011400645636025520 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), BIOS provider package // Copyright (C) 2010 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 , , //################################################################################ [Provider("cmpi:cmpiBIOS_OpenDRIM_BIOSRegisteredProfileProvider")] class OpenDRIM_BIOSRegisteredProfile:CIM_RegisteredProfile { }; opendrim-lmp-bios-1.0.0~ppa/mof/OpenDRIM_BIOSHostedService.mof0000644000175000017500000000317211400645636024653 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), BIOS provider package // Copyright (C) 2010 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:cmpiBIOS_OpenDRIM_BIOSHostedServiceProvider")] class OpenDRIM_BIOSHostedService:CIM_HostedService { }; opendrim-lmp-bios-1.0.0~ppa/mof/OpenDRIM_BIOSConformsToProfile.mof0000644000175000017500000000317711400645636025523 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), BIOS provider package // Copyright (C) 2010 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 , , //################################################################################ [Provider("cmpi:cmpiBIOS_OpenDRIM_BIOSConformsToProfileProvider")] class OpenDRIM_BIOSConformsToProfile:CIM_ElementConformsToProfile { }; opendrim-lmp-bios-1.0.0~ppa/mof/OpenDRIM_BIOSConcreteDependency.mof0000644000175000017500000000317311400645636025646 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), BIOS provider package // Copyright (C) 2010 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 , , //################################################################################ [Provider("cmpi:cmpiBIOS_OpenDRIM_BIOSConcreteDependencyProvider")] class OpenDRIM_BIOSConcreteDependency:CIM_ConcreteDependency { }; opendrim-lmp-bios-1.0.0~ppa/mof/OpenDRIM_BIOSPassword.mof0000644000175000017500000000314111400645636023702 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), BIOS provider package // Copyright (C) 2010 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 , , //################################################################################ [Provider("cmpi:cmpiBIOS_OpenDRIM_BIOSPasswordProvider")] class OpenDRIM_BIOSPassword:CIM_BIOSPassword { }; opendrim-lmp-bios-1.0.0~ppa/mof/OpenDRIM_SystemBIOS.mof0000644000175000017500000000315111400645636023365 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), BIOS provider package // Copyright (C) 2010 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:cmpiBIOS_OpenDRIM_SystemBIOSProvider")] class OpenDRIM_SystemBIOS:CIM_SystemBIOS { }; opendrim-lmp-bios-1.0.0~ppa/mof/OpenDRIM_BIOSServiceCapabilities.mof0000644000175000017500000000320211400645636026010 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), BIOS provider package // Copyright (C) 2010 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 , , //################################################################################ [Provider("cmpi:cmpiBIOS_OpenDRIM_BIOSServiceCapabilitiesProvider")] class OpenDRIM_BIOSServiceCapabilities:CIM_BIOSServiceCapabilities { }; opendrim-lmp-bios-1.0.0~ppa/mof/OpenDRIM_OrderedMemberOfBIOSCollection.mof0000644000175000017500000000322011400645636027113 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), BIOS provider package // Copyright (C) 2010 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 , , //################################################################################ [Provider("cmpi:cmpiBIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProvider")] class OpenDRIM_OrderedMemberOfBIOSCollection:CIM_OrderedMemberOfCollection { }; opendrim-lmp-bios-1.0.0~ppa/mof/OpenDRIM_BIOSElement.mof0000644000175000017500000000313611400645636023475 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), BIOS provider package // Copyright (C) 2010 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 , , //################################################################################ [Provider("cmpi:cmpiBIOS_OpenDRIM_BIOSElementProvider")] class OpenDRIM_BIOSElement:CIM_BIOSElement { }; opendrim-lmp-bios-1.0.0~ppa/mof/OpenDRIM_BIOSConcreteCollection.mof0000644000175000017500000000317311400645636025663 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), BIOS provider package // Copyright (C) 2010 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 , , //################################################################################ [Provider("cmpi:cmpiBIOS_OpenDRIM_BIOSConcreteCollectionProvider")] class OpenDRIM_BIOSConcreteCollection:CIM_ConcreteCollection { }; opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OrderedMemberOfBIOSCollection/0000755000175000017500000000000011400645636025632 5ustar guillaumeguillaumeopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OrderedMemberOfBIOSCollection/Makefile.am0000644000175000017500000000501611400645636027670 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 = libcmpiBIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProvider.la libcmpiBIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProvider_la_SOURCES = OpenDRIM_OrderedMemberOfBIOSCollectionAccess.cpp OpenDRIM_OrderedMemberOfBIOSCollectionProvider.cpp cmpiOpenDRIM_OrderedMemberOfBIOSCollection.cpp assocOpenDRIM_OrderedMemberOfBIOSCollection.cpp # May have to be adjusted for direct invocation libcmpiBIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProvider_la_CPPFLAGS = -I../CIM_ManagedElement -I../CIM_Collection # Uncomment the end for direct invocation, may have to be adjusted libcmpiBIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProvider_la_LIBADD = ../Common/libcmpiBIOS_Common.la #../CIM_ManagedElement/libcmpiBIOS_CIM_ManagedElementProvider.la ../CIM_Collection/libcmpiBIOS_CIM_CollectionProvider.la libcmpiBIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_OrderedMemberOfBIOSCollection.h OpenDRIM_OrderedMemberOfBIOSCollection.h OpenDRIM_OrderedMemberOfBIOSCollectionAccess.h ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OrderedMemberOfBIOSCollection/assocOpenDRIM_OrderedMemberOfBIOSCollection.hopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OrderedMemberOfBIOSCollection/assocOpenDRIM_OrderedMemberOfBIOS0000644000175000017500000000625711400645636033733 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_ORDEREDMEMBEROFBIOSCOLLECTION_H_ #define ASSOCOPENDRIM_ORDEREDMEMBEROFBIOSCOLLECTION_H_ #include "OpenDRIM_OrderedMemberOfBIOSCollectionAccess.h" int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_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 BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_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 BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_enumerateMembers(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_getMember(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_enumerateCollections(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_getCollection(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_ORDEREDMEMBEROFBIOSCOLLECTION_H_*/ ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OrderedMemberOfBIOSCollection/assocOpenDRIM_OrderedMemberOfBIOSCollection.cppopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OrderedMemberOfBIOSCollection/assocOpenDRIM_OrderedMemberOfBIOS0000644000175000017500000002074611400645636033732 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_OrderedMemberOfBIOSCollection.h" int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_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 = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_associatorFilter(broker, ctx, cop, knownInstance, assocClass, resultClass, role, resultRole, leftToRight, errorMessage); if (errorCode == -1) return OK; if (errorCode != OK) return errorCode; if (leftToRight) { if (role != NULL && strcasecmp(role, "Member") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "Collection") != 0) return OK; CF_assert(BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_associatorMemberToCollection(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "Collection") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "Member") != 0) return OK; CF_assert(BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_associatorCollectionToMember(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_enumerateMembers(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, Member_NAMESPACE, Member_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(BIOS_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(BIOS_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, BIOS_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_getMember(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Member_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Member_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ManagedElement _instance; BIOS_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(BIOS_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, BIOS_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_enumerateCollections(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, Collection_NAMESPACE, Collection_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(BIOS_CIM_Collection_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(BIOS_CIM_Collection_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, BIOS_CIM_Collection_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_getCollection(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Collection_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Collection_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_Collection _instance; BIOS_CIM_Collection_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(BIOS_CIM_Collection_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, BIOS_CIM_Collection_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OrderedMemberOfBIOSCollection/cmpiOpenDRIM_OrderedMemberOfBIOSCollection.cppopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OrderedMemberOfBIOSCollection/cmpiOpenDRIM_OrderedMemberOfBIOSC0000644000175000017500000000650211400645636033647 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_OrderedMemberOfBIOSCollection.h" CMPIObjectPath* BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_OrderedMemberOfBIOSCollection& instance) { _E_; Objectpath op(broker, OpenDRIM_OrderedMemberOfBIOSCollection_classnames[0], OpenDRIM_OrderedMemberOfBIOSCollection_NAMESPACE); if (!instance.Collection_isNULL) op.addKey("Collection", instance.Collection); if (!instance.Member_isNULL) op.addKey("Member", instance.Member); _L_; return op.getHdl(); } CMPIInstance* BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_OrderedMemberOfBIOSCollection& instance) { _E_; Objectpath op(broker, BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.AssignedSequence_isNULL) ci.setProperty("AssignedSequence", instance.AssignedSequence); _L_; return ci.getHdl(); } void BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_OrderedMemberOfBIOSCollection& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("Member", instance.Member) == OK) instance.Member_isNULL = false; if (op.getKey("Collection", instance.Collection) == OK) instance.Collection_isNULL = false; _L_; } void BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_OrderedMemberOfBIOSCollection& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Collection", instance.Collection) == OK) instance.Collection_isNULL = false; if (inst.getProperty("Member", instance.Member) == OK) instance.Member_isNULL = false; if (inst.getProperty("AssignedSequence", instance.AssignedSequence) == OK) instance.AssignedSequence_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OrderedMemberOfBIOSCollection/OpenDRIM_OrderedMemberOfBIOSCollectionProvider.cppopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OrderedMemberOfBIOSCollection/OpenDRIM_OrderedMemberOfBIOSColle0000644000175000017500000004323611400645636033657 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_OrderedMemberOfBIOSCollection.h" #include "OpenDRIM_OrderedMemberOfBIOSCollectionAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define BIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProviderSetInstance BIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProviderModifyInstance #endif int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_init(const CMPIBroker* broker); int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus BIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedMemberOfBIOSCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProviderEnumInstances(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 = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedMemberOfBIOSCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_OrderedMemberOfBIOSCollection instance; BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedMemberOfBIOSCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProviderSetInstance(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_OrderedMemberOfBIOSCollection newInstance, oldInstance; BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_toCPP(_broker, ci, newInstance); BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedMemberOfBIOSCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedMemberOfBIOSCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_OrderedMemberOfBIOSCollection instance; BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_toCPP(_broker, ci, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_OrderedMemberOfBIOSCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedMemberOfBIOSCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedMemberOfBIOSCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_OrderedMemberOfBIOSCollection instance; BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedMemberOfBIOSCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedMemberOfBIOSCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProviderExecQuery(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 BIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProviderAssociatorNames(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 = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedMemberOfBIOSCollection_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 BIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProviderAssociators(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 = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedMemberOfBIOSCollection_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 BIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProviderReferenceNames(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 = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedMemberOfBIOSCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_referenceMemberToCollection(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_referenceCollectionToMember(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedMemberOfBIOSCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus BIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProviderReferences(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 = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedMemberOfBIOSCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_referenceMemberToCollection(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_referenceCollectionToMember(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OrderedMemberOfBIOSCollection_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_init FAILED: " + (string) OpenDRIM_OrderedMemberOfBIOSCollection_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_unload(errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_unload FAILED: " + (string) OpenDRIM_OrderedMemberOfBIOSCollection_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_INIT if (BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_init(_broker) < 0) return NULL CMInstanceMIStub(BIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProvider, BIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProvider, _broker, BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_INIT); CMAssociationMIStub(BIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProvider, BIOS_OpenDRIM_OrderedMemberOfBIOSCollectionProvider, _broker, BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OrderedMemberOfBIOSCollection/OpenDRIM_OrderedMemberOfBIOSCollection.hopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OrderedMemberOfBIOSCollection/OpenDRIM_OrderedMemberOfBIOSColle0000644000175000017500000000746511400645636033663 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_ORDEREDMEMBEROFBIOSCOLLECTION_H_ #define OPENDRIM_ORDEREDMEMBEROFBIOSCOLLECTION_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" #include "cmpiCIM_Collection.h" #include "CIM_CollectionAccess.h" */ const static char* OpenDRIM_OrderedMemberOfBIOSCollection_classnames[] = {"OpenDRIM_OrderedMemberOfBIOSCollection"}; static string OpenDRIM_OrderedMemberOfBIOSCollection_NAMESPACE = _NAMESPACE; const static string Member_role = "Member"; const static char* Member_classnames[] = {"CIM_BIOSAttribute"}; const static string Member_NAMESPACE = _NAMESPACE; const static string Collection_role = "Collection"; const static char* Collection_classnames[] = {"OpenDRIM_BIOSConcreteCollection"}; const static string Collection_NAMESPACE = _NAMESPACE; class OpenDRIM_OrderedMemberOfBIOSCollection { public: Objectpath Collection; bool Collection_isNULL; Objectpath Member; bool Member_isNULL; unsigned long long AssignedSequence; bool AssignedSequence_isNULL; OpenDRIM_OrderedMemberOfBIOSCollection() { Collection_isNULL = true; Member_isNULL = true; AssignedSequence_isNULL = true; } ~OpenDRIM_OrderedMemberOfBIOSCollection() {} string getKeys() const { return CF_toLowCase(".Collection=\"" + CF_quoteString(Collection.toString()) + "\""".Member=\"" + CF_quoteString(Member.toString()) + "\""); } int getCollection(Objectpath& value) const { if (Collection_isNULL==true) return NOT_FOUND; value = Collection; return OK; } int setCollection(const Objectpath& newValue) { Collection = newValue; Collection.setNamespace(Collection_NAMESPACE); Collection_isNULL = false; return OK; } int getMember(Objectpath& value) const { if (Member_isNULL==true) return NOT_FOUND; value = Member; return OK; } int setMember(const Objectpath& newValue) { Member = newValue; Member.setNamespace(Member_NAMESPACE); Member_isNULL = false; return OK; } int getAssignedSequence(unsigned long long& value) const { if (AssignedSequence_isNULL==true) return NOT_FOUND; value = AssignedSequence; return OK; } int setAssignedSequence(const unsigned long long& newValue) { AssignedSequence = newValue; AssignedSequence_isNULL = false; return OK; } }; #endif /*OPENDRIM_ORDEREDMEMBEROFBIOSCOLLECTION_H_*/ ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OrderedMemberOfBIOSCollection/cmpiOpenDRIM_OrderedMemberOfBIOSCollection.hopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OrderedMemberOfBIOSCollection/cmpiOpenDRIM_OrderedMemberOfBIOSC0000644000175000017500000000445311400645636033652 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_ORDEREDMEMBEROFBIOSCOLLECTION_H_ #define CMPIOPENDRIM_ORDEREDMEMBEROFBIOSCOLLECTION_H_ #include "OpenDRIM_OrderedMemberOfBIOSCollection.h" CMPIObjectPath* BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_OrderedMemberOfBIOSCollection& instance); CMPIInstance* BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_OrderedMemberOfBIOSCollection& instance); void BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_OrderedMemberOfBIOSCollection& instance); void BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_OrderedMemberOfBIOSCollection& instance); #endif /*CMPIOPENDRIM_ORDEREDMEMBEROFBIOSCOLLECTION_H_*/ ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OrderedMemberOfBIOSCollection/OpenDRIM_OrderedMemberOfBIOSCollectionAccess.cppopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OrderedMemberOfBIOSCollection/OpenDRIM_OrderedMemberOfBIOSColle0000644000175000017500000002533711400645636033661 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_OrderedMemberOfBIOSCollectionAccess.h" int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(BIOS_CIM_ManagedElement_load(broker, errorMessage)); CF_assert(BIOS_CIM_Collection_load(broker, errorMessage)); */ // TODO _L_; return OK; } int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(BIOS_CIM_ManagedElement_unload(errorMessage)); CF_assert(BIOS_CIM_Collection_unload(errorMessage)); */ // TODO _L_; return OK; } int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_isAssociated(const Instance& Member, const Instance& Collection, bool& isAssociated, string& errorMessage) { _E_; // Determine if the association can be established or not isAssociated=false; if(Member.getClassname().find("OpenDRIM")==0) isAssociated=true; _L_; return OK; } int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_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(BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_enumerateMembers(broker, ctx, subjects, NULL, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_enumerateMembers(broker, ctx, subjects, NULL, false, errorMessage)); vector::iterator c = subjects.begin(); vector::iterator end = subjects.end(); for (; c != end; ++c) { bool leftToRight = true; vector associatedInstances; BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), Member_classnames[0], Collection_classnames[0], Member_role.c_str(), Collection_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_referenceMemberToCollection(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_OrderedMemberOfBIOSCollection& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath Member_objectpath; instance.getMember(Member_objectpath); Instance Member_instance; CF_assert(BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_getMember(broker, ctx, Member_objectpath, Member_instance, NULL, errorMessage)); Objectpath Collection_objectpath; instance.getCollection(Collection_objectpath); Instance Collection_instance; CF_assert(BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_getCollection(broker, ctx, Collection_objectpath, Collection_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_isAssociated(Member_instance, Collection_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } CF_assert(BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_populate(instance, errorMessage)); _L_; return OK; } int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_OrderedMemberOfBIOSCollection& newInstance, const OpenDRIM_OrderedMemberOfBIOSCollection& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_OrderedMemberOfBIOSCollection& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_OrderedMemberOfBIOSCollection& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_associatorMemberToCollection(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Member_instance, const char** properties, vector& Collection_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector Collection_instances; if (discriminant=="a") CF_assert(BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_enumerateCollections(broker, ctx, Collection_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_enumerateCollections(broker, ctx, Collection_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_enumerateCollections(broker, ctx, Collection_instances, properties, false, errorMessage)); } for (size_t i=0; i& Member_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector Member_instances; if (discriminant=="a") CF_assert(BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_enumerateMembers(broker, ctx, Member_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_enumerateMembers(broker, ctx, Member_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_enumerateMembers(broker, ctx, Member_instances, properties, false, errorMessage)); } for (size_t i=0; i& Collection_instances, vector& OpenDRIM_OrderedMemberOfBIOSCollection_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < Collection_instances.size(); i++) { OpenDRIM_OrderedMemberOfBIOSCollection instance; instance.setMember(((Instance) Member_instance).getObjectpath()); instance.setCollection(((Instance) Collection_instances[i]).getObjectpath()); if (discriminant == "r") { CF_assert(BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_populate(instance, errorMessage)); } OpenDRIM_OrderedMemberOfBIOSCollection_instances.push_back(instance); } _L_; return OK; } int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_referenceCollectionToMember(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Collection_instance, const vector& Member_instances, vector& OpenDRIM_OrderedMemberOfBIOSCollection_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < Member_instances.size(); i++) { OpenDRIM_OrderedMemberOfBIOSCollection instance; instance.setMember(((Instance) Member_instances[i]).getObjectpath()); instance.setCollection(((Instance) Collection_instance).getObjectpath()); if (discriminant == "r") { CF_assert(BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_populate(instance, errorMessage)); } OpenDRIM_OrderedMemberOfBIOSCollection_instances.push_back(instance); } _L_; return OK; } int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_populate(OpenDRIM_OrderedMemberOfBIOSCollection& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OrderedMemberOfBIOSCollection/OpenDRIM_OrderedMemberOfBIOSCollectionAccess.hopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OrderedMemberOfBIOSCollection/OpenDRIM_OrderedMemberOfBIOSColle0000644000175000017500000001072211400645636033651 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_ORDEREDMEMBEROFBIOSCOLLECTIONACCESS_H_ #define OPENDRIM_ORDEREDMEMBEROFBIOSCOLLECTIONACCESS_H_ #include "BIOS_Common.h" #include "OpenDRIM_OrderedMemberOfBIOSCollection.h" #include "assocOpenDRIM_OrderedMemberOfBIOSCollection.h" int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_load(const CMPIBroker* broker, string& errorMessage); int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_unload(string& errorMessage); int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_OrderedMemberOfBIOSCollection& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_OrderedMemberOfBIOSCollection& newInstance, const OpenDRIM_OrderedMemberOfBIOSCollection& oldInstance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_OrderedMemberOfBIOSCollection& instance, string& errorMessage); int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_OrderedMemberOfBIOSCollection& instance, string& errorMessage); int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_associatorMemberToCollection(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Member_instance, const char** properties, vector& Collection_associatedInstances, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_associatorCollectionToMember(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Collection_instance, const char** properties, vector& Member_associatedInstances, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_referenceMemberToCollection(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Member_instance, const vector& Collection_instances, vector& OpenDRIM_OrderedMemberOfBIOSCollection_instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_referenceCollectionToMember(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Collection_instance, const vector& Member_instances, vector& OpenDRIM_OrderedMemberOfBIOSCollection_instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_OrderedMemberOfBIOSCollection_populate(OpenDRIM_OrderedMemberOfBIOSCollection& instance, string& errorMessage); #endif /*OPENDRIM_ORDEREDMEMBEROFBIOSCOLLECTIONACCESS_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_SystemBIOS/0000755000175000017500000000000011400645636022101 5ustar guillaumeguillaumeopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_SystemBIOS/assocOpenDRIM_SystemBIOS.cpp0000644000175000017500000002055611400645636027244 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_SystemBIOS.h" int BIOS_OpenDRIM_SystemBIOS_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 = BIOS_OpenDRIM_SystemBIOS_associatorFilter(broker, ctx, cop, knownInstance, assocClass, resultClass, role, resultRole, leftToRight, errorMessage); if (errorCode == -1) return OK; if (errorCode != OK) return errorCode; if (leftToRight) { if (role != NULL && strcasecmp(role, "PartComponent") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "GroupComponent") != 0) return OK; CF_assert(BIOS_OpenDRIM_SystemBIOS_associatorPartComponentToGroupComponent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "GroupComponent") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "PartComponent") != 0) return OK; CF_assert(BIOS_OpenDRIM_SystemBIOS_associatorGroupComponentToPartComponent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int BIOS_OpenDRIM_SystemBIOS_enumeratePartComponents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, PartComponent_NAMESPACE, PartComponent_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(BIOS_CIM_BIOSElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(BIOS_CIM_BIOSElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, BIOS_CIM_BIOSElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int BIOS_OpenDRIM_SystemBIOS_getPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), PartComponent_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), PartComponent_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_BIOSElement _instance; BIOS_CIM_BIOSElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(BIOS_CIM_BIOSElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, BIOS_CIM_BIOSElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int BIOS_OpenDRIM_SystemBIOS_enumerateGroupComponents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage) { _E_; /* * CMPI broker version */ if (onlyNames) { vector objectpaths; CF_assert(CB_enumerateInstanceNames(broker, ctx, GroupComponent_NAMESPACE, GroupComponent_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(BIOS_CIM_ComputerSystem_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(BIOS_CIM_ComputerSystem_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, BIOS_CIM_ComputerSystem_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int BIOS_OpenDRIM_SystemBIOS_getGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), GroupComponent_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), GroupComponent_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ComputerSystem _instance; BIOS_CIM_ComputerSystem_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(BIOS_CIM_ComputerSystem_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, BIOS_CIM_ComputerSystem_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_SystemBIOS/Makefile.am0000644000175000017500000000445511400645636024145 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 = libcmpiBIOS_OpenDRIM_SystemBIOSProvider.la libcmpiBIOS_OpenDRIM_SystemBIOSProvider_la_SOURCES = OpenDRIM_SystemBIOSAccess.cpp OpenDRIM_SystemBIOSProvider.cpp cmpiOpenDRIM_SystemBIOS.cpp assocOpenDRIM_SystemBIOS.cpp # May have to be adjusted for direct invocation libcmpiBIOS_OpenDRIM_SystemBIOSProvider_la_CPPFLAGS = -I../CIM_BIOSElement -I../CIM_ComputerSystem # Uncomment the end for direct invocation, may have to be adjusted libcmpiBIOS_OpenDRIM_SystemBIOSProvider_la_LIBADD = ../Common/libcmpiBIOS_Common.la #../CIM_BIOSElement/libcmpiBIOS_CIM_BIOSElementProvider.la ../CIM_ComputerSystem/libcmpiBIOS_CIM_ComputerSystemProvider.la libcmpiBIOS_OpenDRIM_SystemBIOSProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_SystemBIOS.h OpenDRIM_SystemBIOS.h OpenDRIM_SystemBIOSAccess.h opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_SystemBIOS/OpenDRIM_SystemBIOSProvider.cpp0000644000175000017500000004003411400645636027717 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_SystemBIOS.h" #include "OpenDRIM_SystemBIOSAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define BIOS_OpenDRIM_SystemBIOSProviderSetInstance BIOS_OpenDRIM_SystemBIOSProviderModifyInstance #endif int BIOS_OpenDRIM_SystemBIOS_init(const CMPIBroker* broker); int BIOS_OpenDRIM_SystemBIOS_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus BIOS_OpenDRIM_SystemBIOSProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_SystemBIOS_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_SystemBIOSProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = BIOS_OpenDRIM_SystemBIOS_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_SystemBIOS_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_SystemBIOSProviderEnumInstances(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 = BIOS_OpenDRIM_SystemBIOS_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = BIOS_OpenDRIM_SystemBIOS_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_SystemBIOSProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SystemBIOS instance; BIOS_OpenDRIM_SystemBIOS_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_SystemBIOS_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = BIOS_OpenDRIM_SystemBIOS_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_SystemBIOSProviderSetInstance(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_SystemBIOS newInstance, oldInstance; BIOS_OpenDRIM_SystemBIOS_toCPP(_broker, ci, newInstance); BIOS_OpenDRIM_SystemBIOS_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = BIOS_OpenDRIM_SystemBIOS_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_SystemBIOS_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_SystemBIOSProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SystemBIOS instance; BIOS_OpenDRIM_SystemBIOS_toCPP(_broker, ci, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_SystemBIOS_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_SystemBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_SystemBIOS_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_SystemBIOS_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = BIOS_OpenDRIM_SystemBIOS_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_SystemBIOSProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SystemBIOS instance; BIOS_OpenDRIM_SystemBIOS_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_SystemBIOS_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_SystemBIOS_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_SystemBIOSProviderExecQuery(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 BIOS_OpenDRIM_SystemBIOSProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_SystemBIOS_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_SystemBIOSProviderAssociatorNames(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 = BIOS_OpenDRIM_SystemBIOS_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemBIOS_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 BIOS_OpenDRIM_SystemBIOSProviderAssociators(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 = BIOS_OpenDRIM_SystemBIOS_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemBIOS_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 BIOS_OpenDRIM_SystemBIOSProviderReferenceNames(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 = BIOS_OpenDRIM_SystemBIOS_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = BIOS_OpenDRIM_SystemBIOS_referencePartComponentToGroupComponent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = BIOS_OpenDRIM_SystemBIOS_referenceGroupComponentToPartComponent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_SystemBIOS_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus BIOS_OpenDRIM_SystemBIOSProviderReferences(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 = BIOS_OpenDRIM_SystemBIOS_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = BIOS_OpenDRIM_SystemBIOS_referencePartComponentToGroupComponent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = BIOS_OpenDRIM_SystemBIOS_referenceGroupComponentToPartComponent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SystemBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = BIOS_OpenDRIM_SystemBIOS_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int BIOS_OpenDRIM_SystemBIOS_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = BIOS_OpenDRIM_SystemBIOS_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_SystemBIOS_init FAILED: " + (string) OpenDRIM_SystemBIOS_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int BIOS_OpenDRIM_SystemBIOS_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = BIOS_OpenDRIM_SystemBIOS_unload(errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_SystemBIOS_unload FAILED: " + (string) OpenDRIM_SystemBIOS_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define BIOS_OpenDRIM_SystemBIOS_INIT if (BIOS_OpenDRIM_SystemBIOS_init(_broker) < 0) return NULL CMInstanceMIStub(BIOS_OpenDRIM_SystemBIOSProvider, BIOS_OpenDRIM_SystemBIOSProvider, _broker, BIOS_OpenDRIM_SystemBIOS_INIT); CMAssociationMIStub(BIOS_OpenDRIM_SystemBIOSProvider, BIOS_OpenDRIM_SystemBIOSProvider, _broker, BIOS_OpenDRIM_SystemBIOS_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_SystemBIOS/assocOpenDRIM_SystemBIOS.h0000644000175000017500000000600711400645636026704 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_SYSTEMBIOS_H_ #define ASSOCOPENDRIM_SYSTEMBIOS_H_ #include "OpenDRIM_SystemBIOSAccess.h" int BIOS_OpenDRIM_SystemBIOS_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 BIOS_OpenDRIM_SystemBIOS_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 BIOS_OpenDRIM_SystemBIOS_enumeratePartComponents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int BIOS_OpenDRIM_SystemBIOS_getPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_SystemBIOS_enumerateGroupComponents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int BIOS_OpenDRIM_SystemBIOS_getGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_SYSTEMBIOS_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_SystemBIOS/OpenDRIM_SystemBIOSAccess.h0000644000175000017500000001002611400645636026771 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_SYSTEMBIOSACCESS_H_ #define OPENDRIM_SYSTEMBIOSACCESS_H_ #include "BIOS_Common.h" #include "OpenDRIM_SystemBIOS.h" #include "assocOpenDRIM_SystemBIOS.h" int BIOS_OpenDRIM_SystemBIOS_load(const CMPIBroker* broker, string& errorMessage); int BIOS_OpenDRIM_SystemBIOS_unload(string& errorMessage); int BIOS_OpenDRIM_SystemBIOS_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_SystemBIOS_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_SystemBIOS& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_SystemBIOS_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SystemBIOS& newInstance, const OpenDRIM_SystemBIOS& oldInstance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_SystemBIOS_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SystemBIOS& instance, string& errorMessage); int BIOS_OpenDRIM_SystemBIOS_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SystemBIOS& instance, string& errorMessage); int BIOS_OpenDRIM_SystemBIOS_associatorPartComponentToGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& PartComponent_instance, const char** properties, vector& GroupComponent_associatedInstances, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_SystemBIOS_associatorGroupComponentToPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& GroupComponent_instance, const char** properties, vector& PartComponent_associatedInstances, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_SystemBIOS_referencePartComponentToGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& PartComponent_instance, const vector& GroupComponent_instances, vector& OpenDRIM_SystemBIOS_instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_SystemBIOS_referenceGroupComponentToPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& GroupComponent_instance, const vector& PartComponent_instances, vector& OpenDRIM_SystemBIOS_instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_SystemBIOS_populate(OpenDRIM_SystemBIOS& instance, string& errorMessage); #endif /*OPENDRIM_SYSTEMBIOSACCESS_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_SystemBIOS/OpenDRIM_SystemBIOS.h0000644000175000017500000000664311400645636025661 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_SYSTEMBIOS_H_ #define OPENDRIM_SYSTEMBIOS_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_BIOSElement.h" #include "CIM_BIOSElementAccess.h" #include "cmpiCIM_ComputerSystem.h" #include "CIM_ComputerSystemAccess.h" */ const static char* OpenDRIM_SystemBIOS_classnames[] = {"OpenDRIM_SystemBIOS"}; static string OpenDRIM_SystemBIOS_NAMESPACE = _NAMESPACE; const static string PartComponent_role = "PartComponent"; const static char* PartComponent_classnames[] = {"OpenDRIM_BIOSElement"}; const static string PartComponent_NAMESPACE = _NAMESPACE; const static string GroupComponent_role = "GroupComponent"; const static char* GroupComponent_classnames[] = {"OpenDRIM_ComputerSystem"}; const static string GroupComponent_NAMESPACE = _NAMESPACE; class OpenDRIM_SystemBIOS { public: Objectpath GroupComponent; bool GroupComponent_isNULL; Objectpath PartComponent; bool PartComponent_isNULL; OpenDRIM_SystemBIOS() { GroupComponent_isNULL = true; PartComponent_isNULL = true; } ~OpenDRIM_SystemBIOS() {} string getKeys() const { return CF_toLowCase(".GroupComponent=\"" + CF_quoteString(GroupComponent.toString()) + "\""".PartComponent=\"" + CF_quoteString(PartComponent.toString()) + "\""); } int getGroupComponent(Objectpath& value) const { if (GroupComponent_isNULL==true) return NOT_FOUND; value = GroupComponent; return OK; } int setGroupComponent(const Objectpath& newValue) { GroupComponent = newValue; GroupComponent.setNamespace(GroupComponent_NAMESPACE); GroupComponent_isNULL = false; return OK; } int getPartComponent(Objectpath& value) const { if (PartComponent_isNULL==true) return NOT_FOUND; value = PartComponent; return OK; } int setPartComponent(const Objectpath& newValue) { PartComponent = newValue; PartComponent.setNamespace(PartComponent_NAMESPACE); PartComponent_isNULL = false; return OK; } }; #endif /*OPENDRIM_SYSTEMBIOS_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_SystemBIOS/OpenDRIM_SystemBIOSAccess.cpp0000644000175000017500000002364611400645636027340 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_SystemBIOSAccess.h" int BIOS_OpenDRIM_SystemBIOS_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(BIOS_CIM_BIOSElement_load(broker, errorMessage)); CF_assert(BIOS_CIM_ComputerSystem_load(broker, errorMessage)); */ // TODO _L_; return OK; } int BIOS_OpenDRIM_SystemBIOS_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(BIOS_CIM_BIOSElement_unload(errorMessage)); CF_assert(BIOS_CIM_ComputerSystem_unload(errorMessage)); */ // TODO _L_; return OK; } int BIOS_OpenDRIM_SystemBIOS_isAssociated(const Instance& PartComponent, const Instance& GroupComponent, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int BIOS_OpenDRIM_SystemBIOS_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(BIOS_OpenDRIM_SystemBIOS_enumeratePartComponents(broker, ctx, subjects, NULL, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(BIOS_OpenDRIM_SystemBIOS_enumeratePartComponents(broker, ctx, subjects, NULL, false, errorMessage)); vector::iterator c = subjects.begin(); vector::iterator end = subjects.end(); for (; c != end; ++c) { bool leftToRight = true; vector associatedInstances; BIOS_OpenDRIM_SystemBIOS_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), PartComponent_classnames[0], GroupComponent_classnames[0], PartComponent_role.c_str(), GroupComponent_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(BIOS_OpenDRIM_SystemBIOS_referencePartComponentToGroupComponent(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int BIOS_OpenDRIM_SystemBIOS_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_SystemBIOS& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath PartComponent_objectpath; instance.getPartComponent(PartComponent_objectpath); Instance PartComponent_instance; CF_assert(BIOS_OpenDRIM_SystemBIOS_getPartComponent(broker, ctx, PartComponent_objectpath, PartComponent_instance, NULL, errorMessage)); Objectpath GroupComponent_objectpath; instance.getGroupComponent(GroupComponent_objectpath); Instance GroupComponent_instance; CF_assert(BIOS_OpenDRIM_SystemBIOS_getGroupComponent(broker, ctx, GroupComponent_objectpath, GroupComponent_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(BIOS_OpenDRIM_SystemBIOS_isAssociated(PartComponent_instance, GroupComponent_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int BIOS_OpenDRIM_SystemBIOS_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SystemBIOS& newInstance, const OpenDRIM_SystemBIOS& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_SystemBIOS_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SystemBIOS& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_SystemBIOS_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SystemBIOS& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_SystemBIOS_associatorPartComponentToGroupComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& PartComponent_instance, const char** properties, vector& GroupComponent_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector GroupComponent_instances; if (discriminant=="a") CF_assert(BIOS_OpenDRIM_SystemBIOS_enumerateGroupComponents(broker, ctx, GroupComponent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(BIOS_OpenDRIM_SystemBIOS_enumerateGroupComponents(broker, ctx, GroupComponent_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(BIOS_OpenDRIM_SystemBIOS_enumerateGroupComponents(broker, ctx, GroupComponent_instances, properties, false, errorMessage)); } for (size_t i=0; i& PartComponent_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector PartComponent_instances; if (discriminant=="a") CF_assert(BIOS_OpenDRIM_SystemBIOS_enumeratePartComponents(broker, ctx, PartComponent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(BIOS_OpenDRIM_SystemBIOS_enumeratePartComponents(broker, ctx, PartComponent_instances, properties, true, errorMessage)); // OR get the full instances IF we need the content of the instance to evaluate the association condition OR to set the reference properties // CF_assert(BIOS_OpenDRIM_SystemBIOS_enumeratePartComponents(broker, ctx, PartComponent_instances, properties, false, errorMessage)); } for (size_t i=0; i& GroupComponent_instances, vector& OpenDRIM_SystemBIOS_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < GroupComponent_instances.size(); i++) { OpenDRIM_SystemBIOS instance; instance.setPartComponent(((Instance) PartComponent_instance).getObjectpath()); instance.setGroupComponent(((Instance) GroupComponent_instances[i]).getObjectpath()); OpenDRIM_SystemBIOS_instances.push_back(instance); } _L_; return OK; } int BIOS_OpenDRIM_SystemBIOS_referenceGroupComponentToPartComponent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& GroupComponent_instance, const vector& PartComponent_instances, vector& OpenDRIM_SystemBIOS_instances, const char** properties, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ for (size_t i=0; i < PartComponent_instances.size(); i++) { OpenDRIM_SystemBIOS instance; instance.setPartComponent(((Instance) PartComponent_instances[i]).getObjectpath()); instance.setGroupComponent(((Instance) GroupComponent_instance).getObjectpath()); OpenDRIM_SystemBIOS_instances.push_back(instance); } _L_; return OK; } int BIOS_OpenDRIM_SystemBIOS_populate(OpenDRIM_SystemBIOS& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_SystemBIOS/cmpiOpenDRIM_SystemBIOS.cpp0000644000175000017500000000573611400645636027067 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_SystemBIOS.h" CMPIObjectPath* BIOS_OpenDRIM_SystemBIOS_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_SystemBIOS& instance) { _E_; Objectpath op(broker, OpenDRIM_SystemBIOS_classnames[0], OpenDRIM_SystemBIOS_NAMESPACE); if (!instance.GroupComponent_isNULL) op.addKey("GroupComponent", instance.GroupComponent); if (!instance.PartComponent_isNULL) op.addKey("PartComponent", instance.PartComponent); _L_; return op.getHdl(); } CMPIInstance* BIOS_OpenDRIM_SystemBIOS_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_SystemBIOS& instance) { _E_; Objectpath op(broker, BIOS_OpenDRIM_SystemBIOS_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void BIOS_OpenDRIM_SystemBIOS_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_SystemBIOS& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("PartComponent", instance.PartComponent) == OK) instance.PartComponent_isNULL = false; if (op.getKey("GroupComponent", instance.GroupComponent) == OK) instance.GroupComponent_isNULL = false; _L_; } void BIOS_OpenDRIM_SystemBIOS_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_SystemBIOS& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("GroupComponent", instance.GroupComponent) == OK) instance.GroupComponent_isNULL = false; if (inst.getProperty("PartComponent", instance.PartComponent) == OK) instance.PartComponent_isNULL = false; _L_; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_SystemBIOS/cmpiOpenDRIM_SystemBIOS.h0000644000175000017500000000410711400645636026523 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_SYSTEMBIOS_H_ #define CMPIOPENDRIM_SYSTEMBIOS_H_ #include "OpenDRIM_SystemBIOS.h" CMPIObjectPath* BIOS_OpenDRIM_SystemBIOS_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_SystemBIOS& instance); CMPIInstance* BIOS_OpenDRIM_SystemBIOS_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_SystemBIOS& instance); void BIOS_OpenDRIM_SystemBIOS_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_SystemBIOS& instance); void BIOS_OpenDRIM_SystemBIOS_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_SystemBIOS& instance); #endif /*CMPIOPENDRIM_SYSTEMBIOS_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteDependency/0000755000175000017500000000000011400645636024356 5ustar guillaumeguillaumeopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteDependency/Makefile.am0000644000175000017500000000470611400645636026421 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 = libcmpiBIOS_OpenDRIM_BIOSConcreteDependencyProvider.la libcmpiBIOS_OpenDRIM_BIOSConcreteDependencyProvider_la_SOURCES = OpenDRIM_BIOSConcreteDependencyAccess.cpp OpenDRIM_BIOSConcreteDependencyProvider.cpp cmpiOpenDRIM_BIOSConcreteDependency.cpp assocOpenDRIM_BIOSConcreteDependency.cpp # May have to be adjusted for direct invocation libcmpiBIOS_OpenDRIM_BIOSConcreteDependencyProvider_la_CPPFLAGS = -I../CIM_ManagedElement -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiBIOS_OpenDRIM_BIOSConcreteDependencyProvider_la_LIBADD = ../Common/libcmpiBIOS_Common.la #../CIM_ManagedElement/libcmpiBIOS_CIM_ManagedElementProvider.la ../CIM_ManagedElement/libcmpiBIOS_CIM_ManagedElementProvider.la libcmpiBIOS_OpenDRIM_BIOSConcreteDependencyProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_BIOSConcreteDependency.h OpenDRIM_BIOSConcreteDependency.h OpenDRIM_BIOSConcreteDependencyAccess.h opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteDependency/assocOpenDRIM_BIOSConcreteDependency.h0000644000175000017500000000615711400645636033444 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSCONCRETEDEPENDENCY_H_ #define ASSOCOPENDRIM_BIOSCONCRETEDEPENDENCY_H_ #include "OpenDRIM_BIOSConcreteDependencyAccess.h" int BIOS_OpenDRIM_BIOSConcreteDependency_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 BIOS_OpenDRIM_BIOSConcreteDependency_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 BIOS_OpenDRIM_BIOSConcreteDependency_enumerateAntecedents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int BIOS_OpenDRIM_BIOSConcreteDependency_getAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSConcreteDependency_enumerateDependents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int BIOS_OpenDRIM_BIOSConcreteDependency_getDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_BIOSCONCRETEDEPENDENCY_H_*/ ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteDependency/OpenDRIM_BIOSConcreteDependencyAccess.cppopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteDependency/OpenDRIM_BIOSConcreteDependencyAccess.cp0000644000175000017500000002432211400645636033702 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSConcreteDependencyAccess.h" int BIOS_OpenDRIM_BIOSConcreteDependency_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(BIOS_CIM_ManagedElement_load(broker, errorMessage)); CF_assert(BIOS_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteDependency_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(BIOS_CIM_ManagedElement_unload(errorMessage)); CF_assert(BIOS_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteDependency_isAssociated(const Instance& Antecedent, const Instance& Dependent, bool& isAssociated, string& errorMessage) { _E_; // Determine if the association can be established or not isAssociated=false; if(Antecedent.getClassname().find("OpenDRIM")==0) isAssociated=true; _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteDependency_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(BIOS_OpenDRIM_BIOSConcreteDependency_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(BIOS_OpenDRIM_BIOSConcreteDependency_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; BIOS_OpenDRIM_BIOSConcreteDependency_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(BIOS_OpenDRIM_BIOSConcreteDependency_referenceAntecedentToDependent(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteDependency_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BIOSConcreteDependency& 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(BIOS_OpenDRIM_BIOSConcreteDependency_getAntecedent(broker, ctx, Antecedent_objectpath, Antecedent_instance, NULL, errorMessage)); Objectpath Dependent_objectpath; instance.getDependent(Dependent_objectpath); Instance Dependent_instance; CF_assert(BIOS_OpenDRIM_BIOSConcreteDependency_getDependent(broker, ctx, Dependent_objectpath, Dependent_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(BIOS_OpenDRIM_BIOSConcreteDependency_isAssociated(Antecedent_instance, Dependent_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteDependency_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSConcreteDependency& newInstance, const OpenDRIM_BIOSConcreteDependency& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSConcreteDependency_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSConcreteDependency& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSConcreteDependency_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSConcreteDependency& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSConcreteDependency_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(BIOS_OpenDRIM_BIOSConcreteDependency_enumerateDependents(broker, ctx, Dependent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(BIOS_OpenDRIM_BIOSConcreteDependency_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(BIOS_OpenDRIM_BIOSConcreteDependency_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(BIOS_OpenDRIM_BIOSConcreteDependency_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(BIOS_OpenDRIM_BIOSConcreteDependency_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(BIOS_OpenDRIM_BIOSConcreteDependency_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); } for (size_t i=0; i& Dependent_instances, vector& OpenDRIM_BIOSConcreteDependency_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_BIOSConcreteDependency instance; instance.setAntecedent(((Instance) Antecedent_instance).getObjectpath()); instance.setDependent(((Instance) Dependent_instances[i]).getObjectpath()); OpenDRIM_BIOSConcreteDependency_instances.push_back(instance); } _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteDependency_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_BIOSConcreteDependency_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_BIOSConcreteDependency instance; instance.setAntecedent(((Instance) Antecedent_instances[i]).getObjectpath()); instance.setDependent(((Instance) Dependent_instance).getObjectpath()); OpenDRIM_BIOSConcreteDependency_instances.push_back(instance); } _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteDependency_populate(OpenDRIM_BIOSConcreteDependency& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteDependency/cmpiOpenDRIM_BIOSConcreteDependency.h0000644000175000017500000000432711400645636033261 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSCONCRETEDEPENDENCY_H_ #define CMPIOPENDRIM_BIOSCONCRETEDEPENDENCY_H_ #include "OpenDRIM_BIOSConcreteDependency.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSConcreteDependency_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSConcreteDependency& instance); CMPIInstance* BIOS_OpenDRIM_BIOSConcreteDependency_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSConcreteDependency& instance); void BIOS_OpenDRIM_BIOSConcreteDependency_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSConcreteDependency& instance); void BIOS_OpenDRIM_BIOSConcreteDependency_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSConcreteDependency& instance); #endif /*CMPIOPENDRIM_BIOSCONCRETEDEPENDENCY_H_*/ ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteDependency/OpenDRIM_BIOSConcreteDependencyProvider.cppopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteDependency/OpenDRIM_BIOSConcreteDependencyProvider.0000644000175000017500000004206411400645636033753 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSConcreteDependency.h" #include "OpenDRIM_BIOSConcreteDependencyAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define BIOS_OpenDRIM_BIOSConcreteDependencyProviderSetInstance BIOS_OpenDRIM_BIOSConcreteDependencyProviderModifyInstance #endif int BIOS_OpenDRIM_BIOSConcreteDependency_init(const CMPIBroker* broker); int BIOS_OpenDRIM_BIOSConcreteDependency_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus BIOS_OpenDRIM_BIOSConcreteDependencyProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_BIOSConcreteDependency_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConcreteDependencyProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConcreteDependency_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_BIOSConcreteDependency_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConcreteDependencyProviderEnumInstances(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 = BIOS_OpenDRIM_BIOSConcreteDependency_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = BIOS_OpenDRIM_BIOSConcreteDependency_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConcreteDependencyProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSConcreteDependency instance; BIOS_OpenDRIM_BIOSConcreteDependency_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConcreteDependency_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = BIOS_OpenDRIM_BIOSConcreteDependency_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConcreteDependencyProviderSetInstance(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_BIOSConcreteDependency newInstance, oldInstance; BIOS_OpenDRIM_BIOSConcreteDependency_toCPP(_broker, ci, newInstance); BIOS_OpenDRIM_BIOSConcreteDependency_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConcreteDependency_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSConcreteDependency_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConcreteDependencyProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSConcreteDependency instance; BIOS_OpenDRIM_BIOSConcreteDependency_toCPP(_broker, ci, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConcreteDependency_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_BIOSConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSConcreteDependency_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSConcreteDependency_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = BIOS_OpenDRIM_BIOSConcreteDependency_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConcreteDependencyProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSConcreteDependency instance; BIOS_OpenDRIM_BIOSConcreteDependency_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConcreteDependency_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSConcreteDependency_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConcreteDependencyProviderExecQuery(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 BIOS_OpenDRIM_BIOSConcreteDependencyProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_BIOSConcreteDependency_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConcreteDependencyProviderAssociatorNames(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 = BIOS_OpenDRIM_BIOSConcreteDependency_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteDependency_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 BIOS_OpenDRIM_BIOSConcreteDependencyProviderAssociators(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 = BIOS_OpenDRIM_BIOSConcreteDependency_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteDependency_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 BIOS_OpenDRIM_BIOSConcreteDependencyProviderReferenceNames(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 = BIOS_OpenDRIM_BIOSConcreteDependency_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = BIOS_OpenDRIM_BIOSConcreteDependency_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = BIOS_OpenDRIM_BIOSConcreteDependency_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_BIOSConcreteDependency_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSConcreteDependencyProviderReferences(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 = BIOS_OpenDRIM_BIOSConcreteDependency_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = BIOS_OpenDRIM_BIOSConcreteDependency_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = BIOS_OpenDRIM_BIOSConcreteDependency_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSConcreteDependency_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = BIOS_OpenDRIM_BIOSConcreteDependency_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int BIOS_OpenDRIM_BIOSConcreteDependency_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConcreteDependency_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSConcreteDependency_init FAILED: " + (string) OpenDRIM_BIOSConcreteDependency_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteDependency_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSConcreteDependency_unload(errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSConcreteDependency_unload FAILED: " + (string) OpenDRIM_BIOSConcreteDependency_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define BIOS_OpenDRIM_BIOSConcreteDependency_INIT if (BIOS_OpenDRIM_BIOSConcreteDependency_init(_broker) < 0) return NULL CMInstanceMIStub(BIOS_OpenDRIM_BIOSConcreteDependencyProvider, BIOS_OpenDRIM_BIOSConcreteDependencyProvider, _broker, BIOS_OpenDRIM_BIOSConcreteDependency_INIT); CMAssociationMIStub(BIOS_OpenDRIM_BIOSConcreteDependencyProvider, BIOS_OpenDRIM_BIOSConcreteDependencyProvider, _broker, BIOS_OpenDRIM_BIOSConcreteDependency_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteDependency/OpenDRIM_BIOSConcreteDependencyAccess.h0000644000175000017500000001044611400645636033531 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSCONCRETEDEPENDENCYACCESS_H_ #define OPENDRIM_BIOSCONCRETEDEPENDENCYACCESS_H_ #include "BIOS_Common.h" #include "OpenDRIM_BIOSConcreteDependency.h" #include "assocOpenDRIM_BIOSConcreteDependency.h" int BIOS_OpenDRIM_BIOSConcreteDependency_load(const CMPIBroker* broker, string& errorMessage); int BIOS_OpenDRIM_BIOSConcreteDependency_unload(string& errorMessage); int BIOS_OpenDRIM_BIOSConcreteDependency_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSConcreteDependency_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BIOSConcreteDependency& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSConcreteDependency_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSConcreteDependency& newInstance, const OpenDRIM_BIOSConcreteDependency& oldInstance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSConcreteDependency_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSConcreteDependency& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSConcreteDependency_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSConcreteDependency& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSConcreteDependency_associatorAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const char** properties, vector& Dependent_associatedInstances, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSConcreteDependency_associatorDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const char** properties, vector& Antecedent_associatedInstances, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSConcreteDependency_referenceAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const vector& Dependent_instances, vector& OpenDRIM_BIOSConcreteDependency_instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSConcreteDependency_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_BIOSConcreteDependency_instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSConcreteDependency_populate(OpenDRIM_BIOSConcreteDependency& instance, string& errorMessage); #endif /*OPENDRIM_BIOSCONCRETEDEPENDENCYACCESS_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteDependency/OpenDRIM_BIOSConcreteDependency.h0000644000175000017500000000660511400645636032411 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSCONCRETEDEPENDENCY_H_ #define OPENDRIM_BIOSCONCRETEDEPENDENCY_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" */ const static char* OpenDRIM_BIOSConcreteDependency_classnames[] = {"OpenDRIM_BIOSConcreteDependency"}; static string OpenDRIM_BIOSConcreteDependency_NAMESPACE = _NAMESPACE; const static string Antecedent_role = "Antecedent"; const static char* Antecedent_classnames[] = {"CIM_BIOSAttribute"}; const static string Antecedent_NAMESPACE = _NAMESPACE; const static string Dependent_role = "Dependent"; const static char* Dependent_classnames[] = {"CIM_ManagedElement"}; const static string Dependent_NAMESPACE = _NAMESPACE; class OpenDRIM_BIOSConcreteDependency { public: Objectpath Antecedent; bool Antecedent_isNULL; Objectpath Dependent; bool Dependent_isNULL; OpenDRIM_BIOSConcreteDependency() { Antecedent_isNULL = true; Dependent_isNULL = true; } ~OpenDRIM_BIOSConcreteDependency() {} string getKeys() const { return CF_toLowCase(".Antecedent=\"" + CF_quoteString(Antecedent.toString()) + "\""".Dependent=\"" + CF_quoteString(Dependent.toString()) + "\""); } int getAntecedent(Objectpath& value) const { if (Antecedent_isNULL==true) return NOT_FOUND; value = Antecedent; return OK; } int setAntecedent(const Objectpath& newValue) { Antecedent = newValue; Antecedent.setNamespace(Antecedent_NAMESPACE); Antecedent_isNULL = false; return OK; } int getDependent(Objectpath& value) const { if (Dependent_isNULL==true) return NOT_FOUND; value = Dependent; return OK; } int setDependent(const Objectpath& newValue) { Dependent = newValue; Dependent.setNamespace(Dependent_NAMESPACE); Dependent_isNULL = false; return OK; } }; #endif /*OPENDRIM_BIOSCONCRETEDEPENDENCY_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteDependency/cmpiOpenDRIM_BIOSConcreteDependency.cpp0000644000175000017500000000604611400645636033614 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSConcreteDependency.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSConcreteDependency_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSConcreteDependency& instance) { _E_; Objectpath op(broker, OpenDRIM_BIOSConcreteDependency_classnames[0], OpenDRIM_BIOSConcreteDependency_NAMESPACE); if (!instance.Antecedent_isNULL) op.addKey("Antecedent", instance.Antecedent); if (!instance.Dependent_isNULL) op.addKey("Dependent", instance.Dependent); _L_; return op.getHdl(); } CMPIInstance* BIOS_OpenDRIM_BIOSConcreteDependency_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSConcreteDependency& instance) { _E_; Objectpath op(broker, BIOS_OpenDRIM_BIOSConcreteDependency_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void BIOS_OpenDRIM_BIOSConcreteDependency_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSConcreteDependency& 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 BIOS_OpenDRIM_BIOSConcreteDependency_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSConcreteDependency& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("Antecedent", instance.Antecedent) == OK) instance.Antecedent_isNULL = false; if (inst.getProperty("Dependent", instance.Dependent) == OK) instance.Dependent_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteDependency/assocOpenDRIM_BIOSConcreteDependency.cppopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSConcreteDependency/assocOpenDRIM_BIOSConcreteDependency.cpp0000644000175000017500000002070611400645636033773 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSConcreteDependency.h" int BIOS_OpenDRIM_BIOSConcreteDependency_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 = BIOS_OpenDRIM_BIOSConcreteDependency_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(BIOS_OpenDRIM_BIOSConcreteDependency_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(BIOS_OpenDRIM_BIOSConcreteDependency_associatorDependentToAntecedent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteDependency_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(BIOS_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(BIOS_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, BIOS_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteDependency_getAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Antecedent_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Antecedent_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ManagedElement _instance; BIOS_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(BIOS_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, BIOS_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteDependency_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(BIOS_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(BIOS_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, BIOS_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int BIOS_OpenDRIM_BIOSConcreteDependency_getDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), Dependent_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), Dependent_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ManagedElement _instance; BIOS_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(BIOS_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, BIOS_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSServiceCapabilities/0000755000175000017500000000000011400645636024527 5ustar guillaumeguillaumeopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSServiceCapabilities/OpenDRIM_BIOSServiceCapabilities.h0000644000175000017500000001130111400645636032720 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSSERVICECAPABILITIES_H_ #define OPENDRIM_BIOSSERVICECAPABILITIES_H_ #include const static char* OpenDRIM_BIOSServiceCapabilities_classnames[] = {"OpenDRIM_BIOSServiceCapabilities"}; static string OpenDRIM_BIOSServiceCapabilities_NAMESPACE = _NAMESPACE; class OpenDRIM_BIOSServiceCapabilities { public: string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string InstanceID; bool InstanceID_isNULL; string ElementName; bool ElementName_isNULL; vector MethodsSupported; bool MethodsSupported_isNULL; vector SupportedPasswordAlgorithms; bool SupportedPasswordAlgorithms_isNULL; vector SupportedPasswordEncodings; bool SupportedPasswordEncodings_isNULL; OpenDRIM_BIOSServiceCapabilities() { Caption_isNULL = true; Description_isNULL = true; InstanceID_isNULL = true; ElementName_isNULL = true; MethodsSupported_isNULL = true; SupportedPasswordAlgorithms_isNULL = true; SupportedPasswordEncodings_isNULL = true; } ~OpenDRIM_BIOSServiceCapabilities() {} 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 getMethodsSupported(vector& value) const { if (MethodsSupported_isNULL==true) return NOT_FOUND; value = MethodsSupported; return OK; } int setMethodsSupported(const vector& newValue) { MethodsSupported = newValue; MethodsSupported_isNULL = false; return OK; } int getSupportedPasswordAlgorithms(vector& value) const { if (SupportedPasswordAlgorithms_isNULL==true) return NOT_FOUND; value = SupportedPasswordAlgorithms; return OK; } int setSupportedPasswordAlgorithms(const vector& newValue) { SupportedPasswordAlgorithms = newValue; SupportedPasswordAlgorithms_isNULL = false; return OK; } int getSupportedPasswordEncodings(vector& value) const { if (SupportedPasswordEncodings_isNULL==true) return NOT_FOUND; value = SupportedPasswordEncodings; return OK; } int setSupportedPasswordEncodings(const vector& newValue) { SupportedPasswordEncodings = newValue; SupportedPasswordEncodings_isNULL = false; return OK; } }; #endif /*OPENDRIM_BIOSSERVICECAPABILITIES_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSServiceCapabilities/Makefile.am0000644000175000017500000000410011400645636026556 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 = libcmpiBIOS_OpenDRIM_BIOSServiceCapabilitiesProvider.la libcmpiBIOS_OpenDRIM_BIOSServiceCapabilitiesProvider_la_SOURCES = OpenDRIM_BIOSServiceCapabilitiesAccess.cpp OpenDRIM_BIOSServiceCapabilitiesProvider.cpp cmpiOpenDRIM_BIOSServiceCapabilities.cpp libcmpiBIOS_OpenDRIM_BIOSServiceCapabilitiesProvider_la_LIBADD = ../Common/libcmpiBIOS_Common.la libcmpiBIOS_OpenDRIM_BIOSServiceCapabilitiesProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_BIOSServiceCapabilities.h OpenDRIM_BIOSServiceCapabilities.h OpenDRIM_BIOSServiceCapabilitiesAccess.h ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSServiceCapabilities/OpenDRIM_BIOSServiceCapabilitiesAccess.hopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSServiceCapabilities/OpenDRIM_BIOSServiceCapabilitiesAccess.0000644000175000017500000000576111400645636033707 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSSERVICECAPABILITIESACCESS_H_ #define OPENDRIM_BIOSSERVICECAPABILITIESACCESS_H_ #include "BIOS_Common.h" #include "OpenDRIM_BIOSServiceCapabilities.h" int BIOS_OpenDRIM_BIOSServiceCapabilities_load(const CMPIBroker* broker, string& errorMessage); int BIOS_OpenDRIM_BIOSServiceCapabilities_unload(string& errorMessage); int BIOS_OpenDRIM_BIOSServiceCapabilities_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSServiceCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BIOSServiceCapabilities& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSServiceCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSServiceCapabilities& newInstance, const OpenDRIM_BIOSServiceCapabilities& oldInstance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSServiceCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSServiceCapabilities& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSServiceCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSServiceCapabilities& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSServiceCapabilities_populate(OpenDRIM_BIOSServiceCapabilities& instance, string& errorMessage); #endif /*OPENDRIM_BIOSSERVICECAPABILITIESACCESS_H_*/ ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSServiceCapabilities/OpenDRIM_BIOSServiceCapabilitiesAccess.cppopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSServiceCapabilities/OpenDRIM_BIOSServiceCapabilitiesAccess.0000644000175000017500000000615711400645636033707 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSServiceCapabilitiesAccess.h" int BIOS_OpenDRIM_BIOSServiceCapabilities_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int BIOS_OpenDRIM_BIOSServiceCapabilities_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int BIOS_OpenDRIM_BIOSServiceCapabilities_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; _L_; return OK; } int BIOS_OpenDRIM_BIOSServiceCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BIOSServiceCapabilities& instance, const char** properties, string& errorMessage) { _E_; _L_; return OK; } int BIOS_OpenDRIM_BIOSServiceCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSServiceCapabilities& newInstance, const OpenDRIM_BIOSServiceCapabilities& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSServiceCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSServiceCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSServiceCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSServiceCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSServiceCapabilities_populate(OpenDRIM_BIOSServiceCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSServiceCapabilities/cmpiOpenDRIM_BIOSServiceCapabilities.h0000644000175000017500000000434311400645636033601 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSSERVICECAPABILITIES_H_ #define CMPIOPENDRIM_BIOSSERVICECAPABILITIES_H_ #include "OpenDRIM_BIOSServiceCapabilities.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSServiceCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSServiceCapabilities& instance); CMPIInstance* BIOS_OpenDRIM_BIOSServiceCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSServiceCapabilities& instance); void BIOS_OpenDRIM_BIOSServiceCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSServiceCapabilities& instance); void BIOS_OpenDRIM_BIOSServiceCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSServiceCapabilities& instance); #endif /*CMPIOPENDRIM_BIOSSERVICECAPABILITIES_H_*/ ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSServiceCapabilities/OpenDRIM_BIOSServiceCapabilitiesProvider.cppopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSServiceCapabilities/OpenDRIM_BIOSServiceCapabilitiesProvide0000644000175000017500000002604411400645636034035 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSServiceCapabilities.h" #include "OpenDRIM_BIOSServiceCapabilitiesAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define BIOS_OpenDRIM_BIOSServiceCapabilitiesProviderSetInstance BIOS_OpenDRIM_BIOSServiceCapabilitiesProviderModifyInstance #endif int BIOS_OpenDRIM_BIOSServiceCapabilities_init(const CMPIBroker* broker); int BIOS_OpenDRIM_BIOSServiceCapabilities_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus BIOS_OpenDRIM_BIOSServiceCapabilitiesProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_BIOSServiceCapabilities_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSServiceCapabilitiesProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSServiceCapabilities_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_BIOSServiceCapabilities_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSServiceCapabilitiesProviderEnumInstances(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 = BIOS_OpenDRIM_BIOSServiceCapabilities_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = BIOS_OpenDRIM_BIOSServiceCapabilities_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSServiceCapabilitiesProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSServiceCapabilities instance; BIOS_OpenDRIM_BIOSServiceCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSServiceCapabilities_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = BIOS_OpenDRIM_BIOSServiceCapabilities_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSServiceCapabilitiesProviderSetInstance(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_BIOSServiceCapabilities newInstance, oldInstance; BIOS_OpenDRIM_BIOSServiceCapabilities_toCPP(_broker, ci, newInstance); BIOS_OpenDRIM_BIOSServiceCapabilities_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSServiceCapabilities_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSServiceCapabilities_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSServiceCapabilitiesProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSServiceCapabilities instance; BIOS_OpenDRIM_BIOSServiceCapabilities_toCPP(_broker, ci, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSServiceCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_BIOSServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSServiceCapabilities_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSServiceCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = BIOS_OpenDRIM_BIOSServiceCapabilities_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSServiceCapabilitiesProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSServiceCapabilities instance; BIOS_OpenDRIM_BIOSServiceCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSServiceCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSServiceCapabilities_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSServiceCapabilitiesProviderExecQuery(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 BIOS_OpenDRIM_BIOSServiceCapabilities_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSServiceCapabilities_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSServiceCapabilities_init FAILED: " + (string) OpenDRIM_BIOSServiceCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int BIOS_OpenDRIM_BIOSServiceCapabilities_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSServiceCapabilities_unload(errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSServiceCapabilities_unload FAILED: " + (string) OpenDRIM_BIOSServiceCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define BIOS_OpenDRIM_BIOSServiceCapabilities_INIT if (BIOS_OpenDRIM_BIOSServiceCapabilities_init(_broker) < 0) return NULL CMInstanceMIStub(BIOS_OpenDRIM_BIOSServiceCapabilitiesProvider, BIOS_OpenDRIM_BIOSServiceCapabilitiesProvider, _broker, BIOS_OpenDRIM_BIOSServiceCapabilities_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSServiceCapabilities/cmpiOpenDRIM_BIOSServiceCapabilities.cppopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSServiceCapabilities/cmpiOpenDRIM_BIOSServiceCapabilities.cp0000644000175000017500000001017711400645636033756 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSServiceCapabilities.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSServiceCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSServiceCapabilities& instance) { _E_; Objectpath op(broker, OpenDRIM_BIOSServiceCapabilities_classnames[0], OpenDRIM_BIOSServiceCapabilities_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* BIOS_OpenDRIM_BIOSServiceCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSServiceCapabilities& instance) { _E_; Objectpath op(broker, BIOS_OpenDRIM_BIOSServiceCapabilities_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.MethodsSupported_isNULL) ci.setProperty("MethodsSupported", instance.MethodsSupported); if (!instance.SupportedPasswordAlgorithms_isNULL) ci.setProperty("SupportedPasswordAlgorithms", instance.SupportedPasswordAlgorithms); if (!instance.SupportedPasswordEncodings_isNULL) ci.setProperty("SupportedPasswordEncodings", instance.SupportedPasswordEncodings); _L_; return ci.getHdl(); } void BIOS_OpenDRIM_BIOSServiceCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSServiceCapabilities& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void BIOS_OpenDRIM_BIOSServiceCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSServiceCapabilities& 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("MethodsSupported", instance.MethodsSupported) == OK) instance.MethodsSupported_isNULL = false; if (inst.getProperty("SupportedPasswordAlgorithms", instance.SupportedPasswordAlgorithms) == OK) instance.SupportedPasswordAlgorithms_isNULL = false; if (inst.getProperty("SupportedPasswordEncodings", instance.SupportedPasswordEncodings) == OK) instance.SupportedPasswordEncodings_isNULL = false; _L_; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSRegisteredProfile/0000755000175000017500000000000011400645636024233 5ustar guillaumeguillaumeopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSRegisteredProfile/Makefile.am0000644000175000017500000000405411400645636026272 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 = libcmpiBIOS_OpenDRIM_BIOSRegisteredProfileProvider.la libcmpiBIOS_OpenDRIM_BIOSRegisteredProfileProvider_la_SOURCES = OpenDRIM_BIOSRegisteredProfileAccess.cpp OpenDRIM_BIOSRegisteredProfileProvider.cpp cmpiOpenDRIM_BIOSRegisteredProfile.cpp libcmpiBIOS_OpenDRIM_BIOSRegisteredProfileProvider_la_LIBADD = ../Common/libcmpiBIOS_Common.la libcmpiBIOS_OpenDRIM_BIOSRegisteredProfileProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_BIOSRegisteredProfile.h OpenDRIM_BIOSRegisteredProfile.h OpenDRIM_BIOSRegisteredProfileAccess.h opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSRegisteredProfile/cmpiOpenDRIM_BIOSRegisteredProfile.h0000644000175000017500000000431311400645636033006 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSREGISTEREDPROFILE_H_ #define CMPIOPENDRIM_BIOSREGISTEREDPROFILE_H_ #include "OpenDRIM_BIOSRegisteredProfile.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSRegisteredProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSRegisteredProfile& instance); CMPIInstance* BIOS_OpenDRIM_BIOSRegisteredProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSRegisteredProfile& instance); void BIOS_OpenDRIM_BIOSRegisteredProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSRegisteredProfile& instance); void BIOS_OpenDRIM_BIOSRegisteredProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSRegisteredProfile& instance); #endif /*CMPIOPENDRIM_BIOSREGISTEREDPROFILE_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSRegisteredProfile/cmpiOpenDRIM_BIOSRegisteredProfile.cpp0000644000175000017500000001143411400645636033343 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSRegisteredProfile.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSRegisteredProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSRegisteredProfile& instance) { _E_; Objectpath op(broker, OpenDRIM_BIOSRegisteredProfile_classnames[0], OpenDRIM_BIOSRegisteredProfile_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* BIOS_OpenDRIM_BIOSRegisteredProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSRegisteredProfile& instance) { _E_; Objectpath op(broker, BIOS_OpenDRIM_BIOSRegisteredProfile_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 BIOS_OpenDRIM_BIOSRegisteredProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSRegisteredProfile& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void BIOS_OpenDRIM_BIOSRegisteredProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSRegisteredProfile& 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-bios-1.0.0~ppa/OpenDRIM_BIOSRegisteredProfile/OpenDRIM_BIOSRegisteredProfileAccess.h0000644000175000017500000000571311400645636033264 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSREGISTEREDPROFILEACCESS_H_ #define OPENDRIM_BIOSREGISTEREDPROFILEACCESS_H_ #include "BIOS_Common.h" #include "OpenDRIM_BIOSRegisteredProfile.h" int BIOS_OpenDRIM_BIOSRegisteredProfile_load(const CMPIBroker* broker, string& errorMessage); int BIOS_OpenDRIM_BIOSRegisteredProfile_unload(string& errorMessage); int BIOS_OpenDRIM_BIOSRegisteredProfile_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSRegisteredProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BIOSRegisteredProfile& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSRegisteredProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSRegisteredProfile& newInstance, const OpenDRIM_BIOSRegisteredProfile& oldInstance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSRegisteredProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSRegisteredProfile& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSRegisteredProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSRegisteredProfile& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSRegisteredProfile_populate(OpenDRIM_BIOSRegisteredProfile& instance, string& errorMessage); #endif /*OPENDRIM_BIOSREGISTEREDPROFILEACCESS_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSRegisteredProfile/OpenDRIM_BIOSRegisteredProfile.h0000644000175000017500000001345611400645636032145 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSREGISTEREDPROFILE_H_ #define OPENDRIM_BIOSREGISTEREDPROFILE_H_ #include const static char* OpenDRIM_BIOSRegisteredProfile_classnames[] = {"OpenDRIM_BIOSRegisteredProfile"}; static string OpenDRIM_BIOSRegisteredProfile_NAMESPACE = _INTEROP_NAMESPACE; class OpenDRIM_BIOSRegisteredProfile { 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_BIOSRegisteredProfile() { 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_BIOSRegisteredProfile() {} 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_BIOSREGISTEREDPROFILE_H_*/ ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSRegisteredProfile/OpenDRIM_BIOSRegisteredProfileProvider.cppopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSRegisteredProfile/OpenDRIM_BIOSRegisteredProfileProvider.cp0000644000175000017500000002564611400645636034037 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSRegisteredProfile.h" #include "OpenDRIM_BIOSRegisteredProfileAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define BIOS_OpenDRIM_BIOSRegisteredProfileProviderSetInstance BIOS_OpenDRIM_BIOSRegisteredProfileProviderModifyInstance #endif int BIOS_OpenDRIM_BIOSRegisteredProfile_init(const CMPIBroker* broker); int BIOS_OpenDRIM_BIOSRegisteredProfile_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus BIOS_OpenDRIM_BIOSRegisteredProfileProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_BIOSRegisteredProfile_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSRegisteredProfileProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSRegisteredProfile_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSRegisteredProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_BIOSRegisteredProfile_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSRegisteredProfileProviderEnumInstances(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 = BIOS_OpenDRIM_BIOSRegisteredProfile_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSRegisteredProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = BIOS_OpenDRIM_BIOSRegisteredProfile_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSRegisteredProfileProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSRegisteredProfile instance; BIOS_OpenDRIM_BIOSRegisteredProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSRegisteredProfile_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSRegisteredProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = BIOS_OpenDRIM_BIOSRegisteredProfile_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSRegisteredProfileProviderSetInstance(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_BIOSRegisteredProfile newInstance, oldInstance; BIOS_OpenDRIM_BIOSRegisteredProfile_toCPP(_broker, ci, newInstance); BIOS_OpenDRIM_BIOSRegisteredProfile_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSRegisteredProfile_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSRegisteredProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSRegisteredProfile_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSRegisteredProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSRegisteredProfileProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSRegisteredProfile instance; BIOS_OpenDRIM_BIOSRegisteredProfile_toCPP(_broker, ci, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSRegisteredProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_BIOSRegisteredProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSRegisteredProfile_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSRegisteredProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSRegisteredProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSRegisteredProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = BIOS_OpenDRIM_BIOSRegisteredProfile_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSRegisteredProfileProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSRegisteredProfile instance; BIOS_OpenDRIM_BIOSRegisteredProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSRegisteredProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSRegisteredProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSRegisteredProfile_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSRegisteredProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSRegisteredProfileProviderExecQuery(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 BIOS_OpenDRIM_BIOSRegisteredProfile_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSRegisteredProfile_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSRegisteredProfile_init FAILED: " + (string) OpenDRIM_BIOSRegisteredProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int BIOS_OpenDRIM_BIOSRegisteredProfile_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSRegisteredProfile_unload(errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSRegisteredProfile_unload FAILED: " + (string) OpenDRIM_BIOSRegisteredProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define BIOS_OpenDRIM_BIOSRegisteredProfile_INIT if (BIOS_OpenDRIM_BIOSRegisteredProfile_init(_broker) < 0) return NULL CMInstanceMIStub(BIOS_OpenDRIM_BIOSRegisteredProfileProvider, BIOS_OpenDRIM_BIOSRegisteredProfileProvider, _broker, BIOS_OpenDRIM_BIOSRegisteredProfile_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSRegisteredProfile/OpenDRIM_BIOSRegisteredProfileAccess.cpp0000644000175000017500000000743211400645636033617 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSRegisteredProfileAccess.h" const string instanceID="OpenDRIM:BIOS:1.0.0"; int BIOS_OpenDRIM_BIOSRegisteredProfile_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int BIOS_OpenDRIM_BIOSRegisteredProfile_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int BIOS_OpenDRIM_BIOSRegisteredProfile_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; OpenDRIM_BIOSRegisteredProfile instance; instance.setInstanceID(instanceID); if (discriminant == "ei") CF_assert(BIOS_OpenDRIM_BIOSRegisteredProfile_populate(instance, errorMessage)); result.push_back(instance); _L_; return OK; } int BIOS_OpenDRIM_BIOSRegisteredProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BIOSRegisteredProfile& instance, const char** properties, string& errorMessage) { _E_; if (instance.InstanceID!=instanceID) { errorMessage = "No instance"; return NOT_FOUND; } CF_assert(BIOS_OpenDRIM_BIOSRegisteredProfile_populate(instance, errorMessage)); _L_; return OK; } int BIOS_OpenDRIM_BIOSRegisteredProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSRegisteredProfile& newInstance, const OpenDRIM_BIOSRegisteredProfile& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSRegisteredProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSRegisteredProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSRegisteredProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSRegisteredProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSRegisteredProfile_populate(OpenDRIM_BIOSRegisteredProfile& instance, string& errorMessage) { _E_; vector AdvertiseTypes; instance.setRegisteredName("BIOS Management"); instance.setRegisteredVersion("1.0.0"); instance.setRegisteredOrganization(2); // DMTF AdvertiseTypes.push_back(2); // Not Advertised instance.setAdvertiseTypes(AdvertiseTypes); _L_; return OK; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSString/0000755000175000017500000000000011400645636022063 5ustar guillaumeguillaumeopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSString/OpenDRIM_BIOSStringProvider.cpp0000644000175000017500000002436111400645636027670 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSString.h" #include "OpenDRIM_BIOSStringAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define BIOS_OpenDRIM_BIOSStringProviderSetInstance BIOS_OpenDRIM_BIOSStringProviderModifyInstance #endif int BIOS_OpenDRIM_BIOSString_init(const CMPIBroker* broker); int BIOS_OpenDRIM_BIOSString_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus BIOS_OpenDRIM_BIOSStringProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_BIOSString_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSStringProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSString_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSString_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_BIOSString_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSStringProviderEnumInstances(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 = BIOS_OpenDRIM_BIOSString_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSString_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = BIOS_OpenDRIM_BIOSString_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSStringProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSString instance; BIOS_OpenDRIM_BIOSString_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSString_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSString_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = BIOS_OpenDRIM_BIOSString_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSStringProviderSetInstance(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_BIOSString newInstance, oldInstance; BIOS_OpenDRIM_BIOSString_toCPP(_broker, ci, newInstance); BIOS_OpenDRIM_BIOSString_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSString_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSString_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSString_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSString_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSStringProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSString instance; BIOS_OpenDRIM_BIOSString_toCPP(_broker, ci, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSString_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_BIOSString_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSString_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSString_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSString_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSString_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = BIOS_OpenDRIM_BIOSString_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSStringProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSString instance; BIOS_OpenDRIM_BIOSString_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSString_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSString_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSString_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSString_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSStringProviderExecQuery(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 BIOS_OpenDRIM_BIOSString_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSString_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSString_init FAILED: " + (string) OpenDRIM_BIOSString_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int BIOS_OpenDRIM_BIOSString_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSString_unload(errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSString_unload FAILED: " + (string) OpenDRIM_BIOSString_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define BIOS_OpenDRIM_BIOSString_INIT if (BIOS_OpenDRIM_BIOSString_init(_broker) < 0) return NULL CMInstanceMIStub(BIOS_OpenDRIM_BIOSStringProvider, BIOS_OpenDRIM_BIOSStringProvider, _broker, BIOS_OpenDRIM_BIOSString_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSString/cmpiOpenDRIM_BIOSString.cpp0000644000175000017500000001221411400645636027020 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSString.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSString_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSString& instance) { _E_; Objectpath op(broker, OpenDRIM_BIOSString_classnames[0], OpenDRIM_BIOSString_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* BIOS_OpenDRIM_BIOSString_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSString& instance) { _E_; Objectpath op(broker, BIOS_OpenDRIM_BIOSString_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.AttributeName_isNULL) ci.setProperty("AttributeName", instance.AttributeName); if (!instance.CurrentValue_isNULL) ci.setProperty("CurrentValue", instance.CurrentValue); if (!instance.DefaultValue_isNULL) ci.setProperty("DefaultValue", instance.DefaultValue); if (!instance.PendingValue_isNULL) ci.setProperty("PendingValue", instance.PendingValue); if (!instance.IsOrderedList_isNULL) ci.setProperty("IsOrderedList", instance.IsOrderedList); if (!instance.IsReadOnly_isNULL) ci.setProperty("IsReadOnly", instance.IsReadOnly); if (!instance.StringType_isNULL) ci.setProperty("StringType", instance.StringType); if (!instance.MinLength_isNULL) ci.setProperty("MinLength", instance.MinLength); if (!instance.MaxLength_isNULL) ci.setProperty("MaxLength", instance.MaxLength); if (!instance.ValueExpression_isNULL) ci.setProperty("ValueExpression", instance.ValueExpression); _L_; return ci.getHdl(); } void BIOS_OpenDRIM_BIOSString_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSString& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void BIOS_OpenDRIM_BIOSString_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSString& 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("AttributeName", instance.AttributeName) == OK) instance.AttributeName_isNULL = false; if (inst.getProperty("CurrentValue", instance.CurrentValue) == OK) instance.CurrentValue_isNULL = false; if (inst.getProperty("DefaultValue", instance.DefaultValue) == OK) instance.DefaultValue_isNULL = false; if (inst.getProperty("PendingValue", instance.PendingValue) == OK) instance.PendingValue_isNULL = false; if (inst.getProperty("IsOrderedList", instance.IsOrderedList) == OK) instance.IsOrderedList_isNULL = false; if (inst.getProperty("IsReadOnly", instance.IsReadOnly) == OK) instance.IsReadOnly_isNULL = false; if (inst.getProperty("StringType", instance.StringType) == OK) instance.StringType_isNULL = false; if (inst.getProperty("MinLength", instance.MinLength) == OK) instance.MinLength_isNULL = false; if (inst.getProperty("MaxLength", instance.MaxLength) == OK) instance.MaxLength_isNULL = false; if (inst.getProperty("ValueExpression", instance.ValueExpression) == OK) instance.ValueExpression_isNULL = false; _L_; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSString/Makefile.am0000644000175000017500000000367611400645636024133 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 = libcmpiBIOS_OpenDRIM_BIOSStringProvider.la libcmpiBIOS_OpenDRIM_BIOSStringProvider_la_SOURCES = OpenDRIM_BIOSStringAccess.cpp OpenDRIM_BIOSStringProvider.cpp cmpiOpenDRIM_BIOSString.cpp libcmpiBIOS_OpenDRIM_BIOSStringProvider_la_LIBADD = ../Common/libcmpiBIOS_Common.la libcmpiBIOS_OpenDRIM_BIOSStringProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_BIOSString.h OpenDRIM_BIOSString.h OpenDRIM_BIOSStringAccess.h opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSString/OpenDRIM_BIOSStringAccess.h0000644000175000017500000000537211400645636026745 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSSTRINGACCESS_H_ #define OPENDRIM_BIOSSTRINGACCESS_H_ #include "BIOS_Common.h" #include "OpenDRIM_BIOSString.h" int BIOS_OpenDRIM_BIOSString_load(const CMPIBroker* broker, string& errorMessage); int BIOS_OpenDRIM_BIOSString_unload(string& errorMessage); int BIOS_OpenDRIM_BIOSString_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSString_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BIOSString& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSString_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSString& newInstance, const OpenDRIM_BIOSString& oldInstance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSString_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSString& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSString_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSString& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSString_populate(OpenDRIM_BIOSString& instance, string& errorMessage); #endif /*OPENDRIM_BIOSSTRINGACCESS_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSString/OpenDRIM_BIOSString.h0000644000175000017500000001520111400645636025613 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSSTRING_H_ #define OPENDRIM_BIOSSTRING_H_ #include const static char* OpenDRIM_BIOSString_classnames[] = {"OpenDRIM_BIOSString"}; static string OpenDRIM_BIOSString_NAMESPACE = _NAMESPACE; class OpenDRIM_BIOSString { public: string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string ElementName; bool ElementName_isNULL; string InstanceID; bool InstanceID_isNULL; string AttributeName; bool AttributeName_isNULL; vector CurrentValue; bool CurrentValue_isNULL; vector DefaultValue; bool DefaultValue_isNULL; vector PendingValue; bool PendingValue_isNULL; bool IsOrderedList; bool IsOrderedList_isNULL; bool IsReadOnly; bool IsReadOnly_isNULL; unsigned int StringType; bool StringType_isNULL; unsigned long long MinLength; bool MinLength_isNULL; unsigned long long MaxLength; bool MaxLength_isNULL; string ValueExpression; bool ValueExpression_isNULL; OpenDRIM_BIOSString() { Caption_isNULL = true; Description_isNULL = true; ElementName_isNULL = true; InstanceID_isNULL = true; AttributeName_isNULL = true; CurrentValue_isNULL = true; DefaultValue_isNULL = true; PendingValue_isNULL = true; IsOrderedList_isNULL = true; IsReadOnly_isNULL = true; StringType_isNULL = true; MinLength_isNULL = true; MaxLength_isNULL = true; ValueExpression_isNULL = true; } ~OpenDRIM_BIOSString() {} 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 getAttributeName(string& value) const { if (AttributeName_isNULL==true) return NOT_FOUND; value = AttributeName; return OK; } int setAttributeName(const string& newValue) { AttributeName = newValue; AttributeName_isNULL = false; return OK; } int getCurrentValue(vector& value) const { if (CurrentValue_isNULL==true) return NOT_FOUND; value = CurrentValue; return OK; } int setCurrentValue(const vector& newValue) { CurrentValue = newValue; CurrentValue_isNULL = false; return OK; } int getDefaultValue(vector& value) const { if (DefaultValue_isNULL==true) return NOT_FOUND; value = DefaultValue; return OK; } int setDefaultValue(const vector& newValue) { DefaultValue = newValue; DefaultValue_isNULL = false; return OK; } int getPendingValue(vector& value) const { if (PendingValue_isNULL==true) return NOT_FOUND; value = PendingValue; return OK; } int setPendingValue(const vector& newValue) { PendingValue = newValue; PendingValue_isNULL = false; return OK; } int getIsOrderedList(bool& value) const { if (IsOrderedList_isNULL==true) return NOT_FOUND; value = IsOrderedList; return OK; } int setIsOrderedList(const bool& newValue) { IsOrderedList = newValue; IsOrderedList_isNULL = false; return OK; } int getIsReadOnly(bool& value) const { if (IsReadOnly_isNULL==true) return NOT_FOUND; value = IsReadOnly; return OK; } int setIsReadOnly(const bool& newValue) { IsReadOnly = newValue; IsReadOnly_isNULL = false; return OK; } int getStringType(unsigned int& value) const { if (StringType_isNULL==true) return NOT_FOUND; value = StringType; return OK; } int setStringType(const unsigned int& newValue) { StringType = newValue; StringType_isNULL = false; return OK; } int getMinLength(unsigned long long& value) const { if (MinLength_isNULL==true) return NOT_FOUND; value = MinLength; return OK; } int setMinLength(const unsigned long long& newValue) { MinLength = newValue; MinLength_isNULL = false; return OK; } int getMaxLength(unsigned long long& value) const { if (MaxLength_isNULL==true) return NOT_FOUND; value = MaxLength; return OK; } int setMaxLength(const unsigned long long& newValue) { MaxLength = newValue; MaxLength_isNULL = false; return OK; } int getValueExpression(string& value) const { if (ValueExpression_isNULL==true) return NOT_FOUND; value = ValueExpression; return OK; } int setValueExpression(const string& newValue) { ValueExpression = newValue; ValueExpression_isNULL = false; return OK; } }; #endif /*OPENDRIM_BIOSSTRING_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSString/cmpiOpenDRIM_BIOSString.h0000644000175000017500000000410711400645636026467 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSSTRING_H_ #define CMPIOPENDRIM_BIOSSTRING_H_ #include "OpenDRIM_BIOSString.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSString_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSString& instance); CMPIInstance* BIOS_OpenDRIM_BIOSString_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSString& instance); void BIOS_OpenDRIM_BIOSString_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSString& instance); void BIOS_OpenDRIM_BIOSString_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSString& instance); #endif /*CMPIOPENDRIM_BIOSSTRING_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSString/OpenDRIM_BIOSStringAccess.cpp0000644000175000017500000000563711400645636027304 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSStringAccess.h" int BIOS_OpenDRIM_BIOSString_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int BIOS_OpenDRIM_BIOSString_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int BIOS_OpenDRIM_BIOSString_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; _L_; return OK; } int BIOS_OpenDRIM_BIOSString_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BIOSString& instance, const char** properties, string& errorMessage) { _E_; _L_; return OK; } int BIOS_OpenDRIM_BIOSString_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSString& newInstance, const OpenDRIM_BIOSString& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSString_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSString& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSString_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSString& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSString_populate(OpenDRIM_BIOSString& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-bios-1.0.0~ppa/COPYING0000644000175000017500000004310311400645636017537 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-bios-1.0.0~ppa/OpenDRIM_BIOSInteger/0000755000175000017500000000000011400645636022212 5ustar guillaumeguillaumeopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSInteger/OpenDRIM_BIOSIntegerProvider.cpp0000644000175000017500000002446011400645636030146 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSInteger.h" #include "OpenDRIM_BIOSIntegerAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define BIOS_OpenDRIM_BIOSIntegerProviderSetInstance BIOS_OpenDRIM_BIOSIntegerProviderModifyInstance #endif int BIOS_OpenDRIM_BIOSInteger_init(const CMPIBroker* broker); int BIOS_OpenDRIM_BIOSInteger_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus BIOS_OpenDRIM_BIOSIntegerProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_BIOSInteger_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSIntegerProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSInteger_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSInteger_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_BIOSInteger_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSIntegerProviderEnumInstances(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 = BIOS_OpenDRIM_BIOSInteger_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSInteger_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = BIOS_OpenDRIM_BIOSInteger_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSIntegerProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSInteger instance; BIOS_OpenDRIM_BIOSInteger_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSInteger_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSInteger_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = BIOS_OpenDRIM_BIOSInteger_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSIntegerProviderSetInstance(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_BIOSInteger newInstance, oldInstance; BIOS_OpenDRIM_BIOSInteger_toCPP(_broker, ci, newInstance); BIOS_OpenDRIM_BIOSInteger_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSInteger_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSInteger_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSInteger_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSInteger_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSIntegerProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSInteger instance; BIOS_OpenDRIM_BIOSInteger_toCPP(_broker, ci, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSInteger_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_BIOSInteger_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSInteger_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSInteger_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSInteger_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSInteger_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = BIOS_OpenDRIM_BIOSInteger_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSIntegerProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSInteger instance; BIOS_OpenDRIM_BIOSInteger_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSInteger_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSInteger_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSInteger_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSInteger_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSIntegerProviderExecQuery(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 BIOS_OpenDRIM_BIOSInteger_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSInteger_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSInteger_init FAILED: " + (string) OpenDRIM_BIOSInteger_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int BIOS_OpenDRIM_BIOSInteger_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSInteger_unload(errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSInteger_unload FAILED: " + (string) OpenDRIM_BIOSInteger_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define BIOS_OpenDRIM_BIOSInteger_INIT if (BIOS_OpenDRIM_BIOSInteger_init(_broker) < 0) return NULL CMInstanceMIStub(BIOS_OpenDRIM_BIOSIntegerProvider, BIOS_OpenDRIM_BIOSIntegerProvider, _broker, BIOS_OpenDRIM_BIOSInteger_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSInteger/Makefile.am0000644000175000017500000000371011400645636024247 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 = libcmpiBIOS_OpenDRIM_BIOSIntegerProvider.la libcmpiBIOS_OpenDRIM_BIOSIntegerProvider_la_SOURCES = OpenDRIM_BIOSIntegerAccess.cpp OpenDRIM_BIOSIntegerProvider.cpp cmpiOpenDRIM_BIOSInteger.cpp libcmpiBIOS_OpenDRIM_BIOSIntegerProvider_la_LIBADD = ../Common/libcmpiBIOS_Common.la libcmpiBIOS_OpenDRIM_BIOSIntegerProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_BIOSInteger.h OpenDRIM_BIOSInteger.h OpenDRIM_BIOSIntegerAccess.h opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSInteger/cmpiOpenDRIM_BIOSInteger.cpp0000644000175000017500000001231011400645636027273 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSInteger.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSInteger_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSInteger& instance) { _E_; Objectpath op(broker, OpenDRIM_BIOSInteger_classnames[0], OpenDRIM_BIOSInteger_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* BIOS_OpenDRIM_BIOSInteger_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSInteger& instance) { _E_; Objectpath op(broker, BIOS_OpenDRIM_BIOSInteger_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.AttributeName_isNULL) ci.setProperty("AttributeName", instance.AttributeName); if (!instance.CurrentValue_isNULL) ci.setProperty("CurrentValue", instance.CurrentValue); if (!instance.DefaultValue_isNULL) ci.setProperty("DefaultValue", instance.DefaultValue); if (!instance.PendingValue_isNULL) ci.setProperty("PendingValue", instance.PendingValue); if (!instance.IsOrderedList_isNULL) ci.setProperty("IsOrderedList", instance.IsOrderedList); if (!instance.IsReadOnly_isNULL) ci.setProperty("IsReadOnly", instance.IsReadOnly); if (!instance.LowerBound_isNULL) ci.setProperty("LowerBound", instance.LowerBound); if (!instance.UpperBound_isNULL) ci.setProperty("UpperBound", instance.UpperBound); if (!instance.ProgrammaticUnit_isNULL) ci.setProperty("ProgrammaticUnit", instance.ProgrammaticUnit); if (!instance.ScalarIncrement_isNULL) ci.setProperty("ScalarIncrement", instance.ScalarIncrement); _L_; return ci.getHdl(); } void BIOS_OpenDRIM_BIOSInteger_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSInteger& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void BIOS_OpenDRIM_BIOSInteger_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSInteger& 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("AttributeName", instance.AttributeName) == OK) instance.AttributeName_isNULL = false; if (inst.getProperty("CurrentValue", instance.CurrentValue) == OK) instance.CurrentValue_isNULL = false; if (inst.getProperty("DefaultValue", instance.DefaultValue) == OK) instance.DefaultValue_isNULL = false; if (inst.getProperty("PendingValue", instance.PendingValue) == OK) instance.PendingValue_isNULL = false; if (inst.getProperty("IsOrderedList", instance.IsOrderedList) == OK) instance.IsOrderedList_isNULL = false; if (inst.getProperty("IsReadOnly", instance.IsReadOnly) == OK) instance.IsReadOnly_isNULL = false; if (inst.getProperty("LowerBound", instance.LowerBound) == OK) instance.LowerBound_isNULL = false; if (inst.getProperty("UpperBound", instance.UpperBound) == OK) instance.UpperBound_isNULL = false; if (inst.getProperty("ProgrammaticUnit", instance.ProgrammaticUnit) == OK) instance.ProgrammaticUnit_isNULL = false; if (inst.getProperty("ScalarIncrement", instance.ScalarIncrement) == OK) instance.ScalarIncrement_isNULL = false; _L_; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSInteger/OpenDRIM_BIOSInteger.h0000644000175000017500000001532211400645636026075 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSINTEGER_H_ #define OPENDRIM_BIOSINTEGER_H_ #include const static char* OpenDRIM_BIOSInteger_classnames[] = {"OpenDRIM_BIOSInteger"}; static string OpenDRIM_BIOSInteger_NAMESPACE = _NAMESPACE; class OpenDRIM_BIOSInteger { public: string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string ElementName; bool ElementName_isNULL; string InstanceID; bool InstanceID_isNULL; string AttributeName; bool AttributeName_isNULL; vector CurrentValue; bool CurrentValue_isNULL; vector DefaultValue; bool DefaultValue_isNULL; vector PendingValue; bool PendingValue_isNULL; bool IsOrderedList; bool IsOrderedList_isNULL; bool IsReadOnly; bool IsReadOnly_isNULL; unsigned long long LowerBound; bool LowerBound_isNULL; unsigned long long UpperBound; bool UpperBound_isNULL; string ProgrammaticUnit; bool ProgrammaticUnit_isNULL; unsigned int ScalarIncrement; bool ScalarIncrement_isNULL; OpenDRIM_BIOSInteger() { Caption_isNULL = true; Description_isNULL = true; ElementName_isNULL = true; InstanceID_isNULL = true; AttributeName_isNULL = true; CurrentValue_isNULL = true; DefaultValue_isNULL = true; PendingValue_isNULL = true; IsOrderedList_isNULL = true; IsReadOnly_isNULL = true; LowerBound_isNULL = true; UpperBound_isNULL = true; ProgrammaticUnit_isNULL = true; ScalarIncrement_isNULL = true; } ~OpenDRIM_BIOSInteger() {} 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 getAttributeName(string& value) const { if (AttributeName_isNULL==true) return NOT_FOUND; value = AttributeName; return OK; } int setAttributeName(const string& newValue) { AttributeName = newValue; AttributeName_isNULL = false; return OK; } int getCurrentValue(vector& value) const { if (CurrentValue_isNULL==true) return NOT_FOUND; value = CurrentValue; return OK; } int setCurrentValue(const vector& newValue) { CurrentValue = newValue; CurrentValue_isNULL = false; return OK; } int getDefaultValue(vector& value) const { if (DefaultValue_isNULL==true) return NOT_FOUND; value = DefaultValue; return OK; } int setDefaultValue(const vector& newValue) { DefaultValue = newValue; DefaultValue_isNULL = false; return OK; } int getPendingValue(vector& value) const { if (PendingValue_isNULL==true) return NOT_FOUND; value = PendingValue; return OK; } int setPendingValue(const vector& newValue) { PendingValue = newValue; PendingValue_isNULL = false; return OK; } int getIsOrderedList(bool& value) const { if (IsOrderedList_isNULL==true) return NOT_FOUND; value = IsOrderedList; return OK; } int setIsOrderedList(const bool& newValue) { IsOrderedList = newValue; IsOrderedList_isNULL = false; return OK; } int getIsReadOnly(bool& value) const { if (IsReadOnly_isNULL==true) return NOT_FOUND; value = IsReadOnly; return OK; } int setIsReadOnly(const bool& newValue) { IsReadOnly = newValue; IsReadOnly_isNULL = false; return OK; } int getLowerBound(unsigned long long& value) const { if (LowerBound_isNULL==true) return NOT_FOUND; value = LowerBound; return OK; } int setLowerBound(const unsigned long long& newValue) { LowerBound = newValue; LowerBound_isNULL = false; return OK; } int getUpperBound(unsigned long long& value) const { if (UpperBound_isNULL==true) return NOT_FOUND; value = UpperBound; return OK; } int setUpperBound(const unsigned long long& newValue) { UpperBound = newValue; UpperBound_isNULL = false; return OK; } int getProgrammaticUnit(string& value) const { if (ProgrammaticUnit_isNULL==true) return NOT_FOUND; value = ProgrammaticUnit; return OK; } int setProgrammaticUnit(const string& newValue) { ProgrammaticUnit = newValue; ProgrammaticUnit_isNULL = false; return OK; } int getScalarIncrement(unsigned int& value) const { if (ScalarIncrement_isNULL==true) return NOT_FOUND; value = ScalarIncrement; return OK; } int setScalarIncrement(const unsigned int& newValue) { ScalarIncrement = newValue; ScalarIncrement_isNULL = false; return OK; } }; #endif /*OPENDRIM_BIOSINTEGER_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSInteger/OpenDRIM_BIOSIntegerAccess.h0000644000175000017500000000541511400645636027221 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSINTEGERACCESS_H_ #define OPENDRIM_BIOSINTEGERACCESS_H_ #include "BIOS_Common.h" #include "OpenDRIM_BIOSInteger.h" int BIOS_OpenDRIM_BIOSInteger_load(const CMPIBroker* broker, string& errorMessage); int BIOS_OpenDRIM_BIOSInteger_unload(string& errorMessage); int BIOS_OpenDRIM_BIOSInteger_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSInteger_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BIOSInteger& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSInteger_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSInteger& newInstance, const OpenDRIM_BIOSInteger& oldInstance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSInteger_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSInteger& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSInteger_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSInteger& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSInteger_populate(OpenDRIM_BIOSInteger& instance, string& errorMessage); #endif /*OPENDRIM_BIOSINTEGERACCESS_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSInteger/cmpiOpenDRIM_BIOSInteger.h0000644000175000017500000000412311400645636026743 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSINTEGER_H_ #define CMPIOPENDRIM_BIOSINTEGER_H_ #include "OpenDRIM_BIOSInteger.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSInteger_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSInteger& instance); CMPIInstance* BIOS_OpenDRIM_BIOSInteger_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSInteger& instance); void BIOS_OpenDRIM_BIOSInteger_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSInteger& instance); void BIOS_OpenDRIM_BIOSInteger_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSInteger& instance); #endif /*CMPIOPENDRIM_BIOSINTEGER_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSInteger/OpenDRIM_BIOSIntegerAccess.cpp0000644000175000017500000000565711400645636027564 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSIntegerAccess.h" int BIOS_OpenDRIM_BIOSInteger_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int BIOS_OpenDRIM_BIOSInteger_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int BIOS_OpenDRIM_BIOSInteger_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; _L_; return OK; } int BIOS_OpenDRIM_BIOSInteger_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BIOSInteger& instance, const char** properties, string& errorMessage) { _E_; _L_; return OK; } int BIOS_OpenDRIM_BIOSInteger_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSInteger& newInstance, const OpenDRIM_BIOSInteger& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSInteger_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSInteger& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSInteger_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSInteger& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSInteger_populate(OpenDRIM_BIOSInteger& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OwningCollectionBIOS/0000755000175000017500000000000011400645636024072 5ustar guillaumeguillaumeopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OwningCollectionBIOS/assocOpenDRIM_OwningCollectionBIOS.h0000644000175000017500000000614711400645636032673 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_OWNINGCOLLECTIONBIOS_H_ #define ASSOCOPENDRIM_OWNINGCOLLECTIONBIOS_H_ #include "OpenDRIM_OwningCollectionBIOSAccess.h" int BIOS_OpenDRIM_OwningCollectionBIOS_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 BIOS_OpenDRIM_OwningCollectionBIOS_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 BIOS_OpenDRIM_OwningCollectionBIOS_enumerateOwnedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int BIOS_OpenDRIM_OwningCollectionBIOS_getOwnedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_OwningCollectionBIOS_enumerateOwningElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int BIOS_OpenDRIM_OwningCollectionBIOS_getOwningElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_OWNINGCOLLECTIONBIOS_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OwningCollectionBIOS/OpenDRIM_OwningCollectionBIOSProvider.cpp0000644000175000017500000004163011400645636033704 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_OwningCollectionBIOS.h" #include "OpenDRIM_OwningCollectionBIOSAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define BIOS_OpenDRIM_OwningCollectionBIOSProviderSetInstance BIOS_OpenDRIM_OwningCollectionBIOSProviderModifyInstance #endif int BIOS_OpenDRIM_OwningCollectionBIOS_init(const CMPIBroker* broker); int BIOS_OpenDRIM_OwningCollectionBIOS_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus BIOS_OpenDRIM_OwningCollectionBIOSProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_OwningCollectionBIOS_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_OwningCollectionBIOSProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = BIOS_OpenDRIM_OwningCollectionBIOS_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OwningCollectionBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_OwningCollectionBIOS_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_OwningCollectionBIOSProviderEnumInstances(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 = BIOS_OpenDRIM_OwningCollectionBIOS_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OwningCollectionBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = BIOS_OpenDRIM_OwningCollectionBIOS_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_OwningCollectionBIOSProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_OwningCollectionBIOS instance; BIOS_OpenDRIM_OwningCollectionBIOS_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_OwningCollectionBIOS_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OwningCollectionBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = BIOS_OpenDRIM_OwningCollectionBIOS_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_OwningCollectionBIOSProviderSetInstance(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_OwningCollectionBIOS newInstance, oldInstance; BIOS_OpenDRIM_OwningCollectionBIOS_toCPP(_broker, ci, newInstance); BIOS_OpenDRIM_OwningCollectionBIOS_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = BIOS_OpenDRIM_OwningCollectionBIOS_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OwningCollectionBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_OwningCollectionBIOS_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OwningCollectionBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_OwningCollectionBIOSProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_OwningCollectionBIOS instance; BIOS_OpenDRIM_OwningCollectionBIOS_toCPP(_broker, ci, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_OwningCollectionBIOS_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_OwningCollectionBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_OwningCollectionBIOS_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OwningCollectionBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_OwningCollectionBIOS_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OwningCollectionBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = BIOS_OpenDRIM_OwningCollectionBIOS_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_OwningCollectionBIOSProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_OwningCollectionBIOS instance; BIOS_OpenDRIM_OwningCollectionBIOS_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_OwningCollectionBIOS_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OwningCollectionBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_OwningCollectionBIOS_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OwningCollectionBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_OwningCollectionBIOSProviderExecQuery(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 BIOS_OpenDRIM_OwningCollectionBIOSProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_OwningCollectionBIOS_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_OwningCollectionBIOSProviderAssociatorNames(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 = BIOS_OpenDRIM_OwningCollectionBIOS_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OwningCollectionBIOS_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 BIOS_OpenDRIM_OwningCollectionBIOSProviderAssociators(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 = BIOS_OpenDRIM_OwningCollectionBIOS_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OwningCollectionBIOS_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 BIOS_OpenDRIM_OwningCollectionBIOSProviderReferenceNames(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 = BIOS_OpenDRIM_OwningCollectionBIOS_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OwningCollectionBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = BIOS_OpenDRIM_OwningCollectionBIOS_referenceOwnedElementToOwningElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = BIOS_OpenDRIM_OwningCollectionBIOS_referenceOwningElementToOwnedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OwningCollectionBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_OwningCollectionBIOS_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus BIOS_OpenDRIM_OwningCollectionBIOSProviderReferences(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 = BIOS_OpenDRIM_OwningCollectionBIOS_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OwningCollectionBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = BIOS_OpenDRIM_OwningCollectionBIOS_referenceOwnedElementToOwningElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = BIOS_OpenDRIM_OwningCollectionBIOS_referenceOwningElementToOwnedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_OwningCollectionBIOS_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = BIOS_OpenDRIM_OwningCollectionBIOS_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int BIOS_OpenDRIM_OwningCollectionBIOS_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = BIOS_OpenDRIM_OwningCollectionBIOS_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_OwningCollectionBIOS_init FAILED: " + (string) OpenDRIM_OwningCollectionBIOS_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int BIOS_OpenDRIM_OwningCollectionBIOS_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = BIOS_OpenDRIM_OwningCollectionBIOS_unload(errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_OwningCollectionBIOS_unload FAILED: " + (string) OpenDRIM_OwningCollectionBIOS_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define BIOS_OpenDRIM_OwningCollectionBIOS_INIT if (BIOS_OpenDRIM_OwningCollectionBIOS_init(_broker) < 0) return NULL CMInstanceMIStub(BIOS_OpenDRIM_OwningCollectionBIOSProvider, BIOS_OpenDRIM_OwningCollectionBIOSProvider, _broker, BIOS_OpenDRIM_OwningCollectionBIOS_INIT); CMAssociationMIStub(BIOS_OpenDRIM_OwningCollectionBIOSProvider, BIOS_OpenDRIM_OwningCollectionBIOSProvider, _broker, BIOS_OpenDRIM_OwningCollectionBIOS_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OwningCollectionBIOS/Makefile.am0000644000175000017500000000464211400645636026134 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 = libcmpiBIOS_OpenDRIM_OwningCollectionBIOSProvider.la libcmpiBIOS_OpenDRIM_OwningCollectionBIOSProvider_la_SOURCES = OpenDRIM_OwningCollectionBIOSAccess.cpp OpenDRIM_OwningCollectionBIOSProvider.cpp cmpiOpenDRIM_OwningCollectionBIOS.cpp assocOpenDRIM_OwningCollectionBIOS.cpp # May have to be adjusted for direct invocation libcmpiBIOS_OpenDRIM_OwningCollectionBIOSProvider_la_CPPFLAGS = -I../CIM_Collection -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiBIOS_OpenDRIM_OwningCollectionBIOSProvider_la_LIBADD = ../Common/libcmpiBIOS_Common.la #../CIM_Collection/libcmpiBIOS_CIM_CollectionProvider.la ../CIM_ManagedElement/libcmpiBIOS_CIM_ManagedElementProvider.la libcmpiBIOS_OpenDRIM_OwningCollectionBIOSProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_OwningCollectionBIOS.h OpenDRIM_OwningCollectionBIOS.h OpenDRIM_OwningCollectionBIOSAccess.h opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OwningCollectionBIOS/OpenDRIM_OwningCollectionBIOSAccess.cpp0000644000175000017500000002442011400645636033311 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_OwningCollectionBIOSAccess.h" int BIOS_OpenDRIM_OwningCollectionBIOS_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(BIOS_CIM_Collection_load(broker, errorMessage)); CF_assert(BIOS_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int BIOS_OpenDRIM_OwningCollectionBIOS_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(BIOS_CIM_Collection_unload(errorMessage)); CF_assert(BIOS_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int BIOS_OpenDRIM_OwningCollectionBIOS_isAssociated(const Instance& OwnedElement, const Instance& OwningElement, bool& isAssociated, string& errorMessage) { _E_; // TODO Determine if the association can be established or not isAssociated=true; _L_; return OK; } int BIOS_OpenDRIM_OwningCollectionBIOS_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(BIOS_OpenDRIM_OwningCollectionBIOS_enumerateOwnedElements(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(BIOS_OpenDRIM_OwningCollectionBIOS_enumerateOwnedElements(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; BIOS_OpenDRIM_OwningCollectionBIOS_associator(broker, ctx, (*c).getObjectpath().getHdl(), (*c), OwnedElement_classnames[0], OwningElement_classnames[0], OwnedElement_role.c_str(), OwningElement_role.c_str(), NULL, associatedInstances, leftToRight, errorMessage, "an"); string ref_discriminant = discriminant == "ein" ? "rn" : "r"; CF_assert(BIOS_OpenDRIM_OwningCollectionBIOS_referenceOwnedElementToOwningElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int BIOS_OpenDRIM_OwningCollectionBIOS_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_OwningCollectionBIOS& instance, const char** properties, string& errorMessage) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ Objectpath OwnedElement_objectpath; instance.getOwnedElement(OwnedElement_objectpath); Instance OwnedElement_instance; CF_assert(BIOS_OpenDRIM_OwningCollectionBIOS_getOwnedElement(broker, ctx, OwnedElement_objectpath, OwnedElement_instance, NULL, errorMessage)); Objectpath OwningElement_objectpath; instance.getOwningElement(OwningElement_objectpath); Instance OwningElement_instance; CF_assert(BIOS_OpenDRIM_OwningCollectionBIOS_getOwningElement(broker, ctx, OwningElement_objectpath, OwningElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(BIOS_OpenDRIM_OwningCollectionBIOS_isAssociated(OwnedElement_instance, OwningElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int BIOS_OpenDRIM_OwningCollectionBIOS_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_OwningCollectionBIOS& newInstance, const OpenDRIM_OwningCollectionBIOS& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_OwningCollectionBIOS_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_OwningCollectionBIOS& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_OwningCollectionBIOS_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_OwningCollectionBIOS& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_OwningCollectionBIOS_associatorOwnedElementToOwningElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& OwnedElement_instance, const char** properties, vector& OwningElement_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector OwningElement_instances; if (discriminant=="a") CF_assert(BIOS_OpenDRIM_OwningCollectionBIOS_enumerateOwningElements(broker, ctx, OwningElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(BIOS_OpenDRIM_OwningCollectionBIOS_enumerateOwningElements(broker, ctx, OwningElement_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(BIOS_OpenDRIM_OwningCollectionBIOS_enumerateOwningElements(broker, ctx, OwningElement_instances, properties, false, errorMessage)); } for (size_t i=0; i& OwnedElement_associatedInstances, string& errorMessage, const string& discriminant) { _E_; /* * The following code has been generated for your convenience. * Feel free to modify/delete. */ vector OwnedElement_instances; if (discriminant=="a") CF_assert(BIOS_OpenDRIM_OwningCollectionBIOS_enumerateOwnedElements(broker, ctx, OwnedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(BIOS_OpenDRIM_OwningCollectionBIOS_enumerateOwnedElements(broker, ctx, OwnedElement_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(BIOS_OpenDRIM_OwningCollectionBIOS_enumerateOwnedElements(broker, ctx, OwnedElement_instances, properties, false, errorMessage)); } for (size_t i=0; i& OwningElement_instances, vector& OpenDRIM_OwningCollectionBIOS_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 < OwningElement_instances.size(); i++) { OpenDRIM_OwningCollectionBIOS instance; instance.setOwnedElement(((Instance) OwnedElement_instance).getObjectpath()); instance.setOwningElement(((Instance) OwningElement_instances[i]).getObjectpath()); OpenDRIM_OwningCollectionBIOS_instances.push_back(instance); } _L_; return OK; } int BIOS_OpenDRIM_OwningCollectionBIOS_referenceOwningElementToOwnedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& OwningElement_instance, const vector& OwnedElement_instances, vector& OpenDRIM_OwningCollectionBIOS_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 < OwnedElement_instances.size(); i++) { OpenDRIM_OwningCollectionBIOS instance; instance.setOwnedElement(((Instance) OwnedElement_instances[i]).getObjectpath()); instance.setOwningElement(((Instance) OwningElement_instance).getObjectpath()); OpenDRIM_OwningCollectionBIOS_instances.push_back(instance); } _L_; return OK; } int BIOS_OpenDRIM_OwningCollectionBIOS_populate(OpenDRIM_OwningCollectionBIOS& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OwningCollectionBIOS/OpenDRIM_OwningCollectionBIOS.h0000644000175000017500000000674111400645636031642 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_OWNINGCOLLECTIONBIOS_H_ #define OPENDRIM_OWNINGCOLLECTIONBIOS_H_ #include // Direct Invocation includes, may have to be adjusted /* #include "cmpiCIM_Collection.h" #include "CIM_CollectionAccess.h" #include "cmpiCIM_ManagedElement.h" #include "CIM_ManagedElementAccess.h" */ const static char* OpenDRIM_OwningCollectionBIOS_classnames[] = {"OpenDRIM_OwningCollectionBIOS"}; static string OpenDRIM_OwningCollectionBIOS_NAMESPACE = _NAMESPACE; const static string OwnedElement_role = "OwnedElement"; const static char* OwnedElement_classnames[] = {"OpenDRIM_BIOSConcreteCollection"}; const static string OwnedElement_NAMESPACE = _NAMESPACE; const static string OwningElement_role = "OwningElement"; const static char* OwningElement_classnames[] = {"OpenDRIM_BIOSElement"}; const static string OwningElement_NAMESPACE = _NAMESPACE; class OpenDRIM_OwningCollectionBIOS { public: Objectpath OwningElement; bool OwningElement_isNULL; Objectpath OwnedElement; bool OwnedElement_isNULL; OpenDRIM_OwningCollectionBIOS() { OwningElement_isNULL = true; OwnedElement_isNULL = true; } ~OpenDRIM_OwningCollectionBIOS() {} string getKeys() const { return CF_toLowCase(".OwningElement=\"" + CF_quoteString(OwningElement.toString()) + "\""".OwnedElement=\"" + CF_quoteString(OwnedElement.toString()) + "\""); } int getOwningElement(Objectpath& value) const { if (OwningElement_isNULL==true) return NOT_FOUND; value = OwningElement; return OK; } int setOwningElement(const Objectpath& newValue) { OwningElement = newValue; OwningElement.setNamespace(OwningElement_NAMESPACE); OwningElement_isNULL = false; return OK; } int getOwnedElement(Objectpath& value) const { if (OwnedElement_isNULL==true) return NOT_FOUND; value = OwnedElement; return OK; } int setOwnedElement(const Objectpath& newValue) { OwnedElement = newValue; OwnedElement.setNamespace(OwnedElement_NAMESPACE); OwnedElement_isNULL = false; return OK; } }; #endif /*OPENDRIM_OWNINGCOLLECTIONBIOS_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OwningCollectionBIOS/OpenDRIM_OwningCollectionBIOSAccess.h0000644000175000017500000001043611400645636032760 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_OWNINGCOLLECTIONBIOSACCESS_H_ #define OPENDRIM_OWNINGCOLLECTIONBIOSACCESS_H_ #include "BIOS_Common.h" #include "OpenDRIM_OwningCollectionBIOS.h" #include "assocOpenDRIM_OwningCollectionBIOS.h" int BIOS_OpenDRIM_OwningCollectionBIOS_load(const CMPIBroker* broker, string& errorMessage); int BIOS_OpenDRIM_OwningCollectionBIOS_unload(string& errorMessage); int BIOS_OpenDRIM_OwningCollectionBIOS_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_OwningCollectionBIOS_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_OwningCollectionBIOS& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_OwningCollectionBIOS_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_OwningCollectionBIOS& newInstance, const OpenDRIM_OwningCollectionBIOS& oldInstance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_OwningCollectionBIOS_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_OwningCollectionBIOS& instance, string& errorMessage); int BIOS_OpenDRIM_OwningCollectionBIOS_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_OwningCollectionBIOS& instance, string& errorMessage); int BIOS_OpenDRIM_OwningCollectionBIOS_associatorOwnedElementToOwningElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& OwnedElement_instance, const char** properties, vector& OwningElement_associatedInstances, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_OwningCollectionBIOS_associatorOwningElementToOwnedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& OwningElement_instance, const char** properties, vector& OwnedElement_associatedInstances, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_OwningCollectionBIOS_referenceOwnedElementToOwningElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& OwnedElement_instance, const vector& OwningElement_instances, vector& OpenDRIM_OwningCollectionBIOS_instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_OwningCollectionBIOS_referenceOwningElementToOwnedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& OwningElement_instance, const vector& OwnedElement_instances, vector& OpenDRIM_OwningCollectionBIOS_instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_OwningCollectionBIOS_populate(OpenDRIM_OwningCollectionBIOS& instance, string& errorMessage); #endif /*OPENDRIM_OWNINGCOLLECTIONBIOSACCESS_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OwningCollectionBIOS/cmpiOpenDRIM_OwningCollectionBIOS.h0000644000175000017500000000427711400645636032515 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_OWNINGCOLLECTIONBIOS_H_ #define CMPIOPENDRIM_OWNINGCOLLECTIONBIOS_H_ #include "OpenDRIM_OwningCollectionBIOS.h" CMPIObjectPath* BIOS_OpenDRIM_OwningCollectionBIOS_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_OwningCollectionBIOS& instance); CMPIInstance* BIOS_OpenDRIM_OwningCollectionBIOS_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_OwningCollectionBIOS& instance); void BIOS_OpenDRIM_OwningCollectionBIOS_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_OwningCollectionBIOS& instance); void BIOS_OpenDRIM_OwningCollectionBIOS_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_OwningCollectionBIOS& instance); #endif /*CMPIOPENDRIM_OWNINGCOLLECTIONBIOS_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OwningCollectionBIOS/cmpiOpenDRIM_OwningCollectionBIOS.cpp0000644000175000017500000000610411400645636033037 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_OwningCollectionBIOS.h" CMPIObjectPath* BIOS_OpenDRIM_OwningCollectionBIOS_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_OwningCollectionBIOS& instance) { _E_; Objectpath op(broker, OpenDRIM_OwningCollectionBIOS_classnames[0], OpenDRIM_OwningCollectionBIOS_NAMESPACE); if (!instance.OwningElement_isNULL) op.addKey("OwningElement", instance.OwningElement); if (!instance.OwnedElement_isNULL) op.addKey("OwnedElement", instance.OwnedElement); _L_; return op.getHdl(); } CMPIInstance* BIOS_OpenDRIM_OwningCollectionBIOS_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_OwningCollectionBIOS& instance) { _E_; Objectpath op(broker, BIOS_OpenDRIM_OwningCollectionBIOS_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void BIOS_OpenDRIM_OwningCollectionBIOS_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_OwningCollectionBIOS& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("OwnedElement", instance.OwnedElement) == OK) instance.OwnedElement_isNULL = false; if (op.getKey("OwningElement", instance.OwningElement) == OK) instance.OwningElement_isNULL = false; _L_; } void BIOS_OpenDRIM_OwningCollectionBIOS_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_OwningCollectionBIOS& instance) { _E_; Instance inst(broker, (CMPIInstance*) ci); if (inst.getProperty("OwningElement", instance.OwningElement) == OK) instance.OwningElement_isNULL = false; if (inst.getProperty("OwnedElement", instance.OwnedElement) == OK) instance.OwnedElement_isNULL = false; _L_; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_OwningCollectionBIOS/assocOpenDRIM_OwningCollectionBIOS.cpp0000644000175000017500000002074611400645636033227 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_OwningCollectionBIOS.h" int BIOS_OpenDRIM_OwningCollectionBIOS_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 = BIOS_OpenDRIM_OwningCollectionBIOS_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, "OwnedElement") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "OwningElement") != 0) return OK; CF_assert(BIOS_OpenDRIM_OwningCollectionBIOS_associatorOwnedElementToOwningElement(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } else { if (role != NULL && strcasecmp(role, "OwningElement") != 0) return OK; if (resultRole != NULL && strcasecmp(resultRole, "OwnedElement") != 0) return OK; CF_assert(BIOS_OpenDRIM_OwningCollectionBIOS_associatorOwningElementToOwnedElement(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int BIOS_OpenDRIM_OwningCollectionBIOS_enumerateOwnedElements(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, OwnedElement_NAMESPACE, OwnedElement_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(BIOS_CIM_Collection_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(BIOS_CIM_Collection_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, BIOS_CIM_Collection_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int BIOS_OpenDRIM_OwningCollectionBIOS_getOwnedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), OwnedElement_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), OwnedElement_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_Collection _instance; BIOS_CIM_Collection_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(BIOS_CIM_Collection_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, BIOS_CIM_Collection_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int BIOS_OpenDRIM_OwningCollectionBIOS_enumerateOwningElements(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, OwningElement_NAMESPACE, OwningElement_classnames[0], objectpaths, errorMessage)); for (size_t i=0; i _instances; if (onlyNames) { CF_assert(BIOS_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(BIOS_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, BIOS_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int BIOS_OpenDRIM_OwningCollectionBIOS_getOwningElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage) { _E_; if (!CF_strCmpNoCase(objectpath.getClassname(), OwningElement_classnames[0])) return INVALID_CLASS; //if (!CF_strCmpNoCase(objectpath.getNamespace(), OwningElement_NAMESPACE)) // return INVALID_NAMESPACE; /* * CMPI broker version */ CF_assert(CB_getInstance(broker, ctx, objectpath, properties, instance, errorMessage)); /* * Direct Invocation version */ /* CIM_ManagedElement _instance; BIOS_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(BIOS_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, BIOS_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSEnumeration/0000755000175000017500000000000011400645636023103 5ustar guillaumeguillaumeopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSEnumeration/cmpiOpenDRIM_BIOSEnumeration.h0000644000175000017500000000420311400645636030524 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSENUMERATION_H_ #define CMPIOPENDRIM_BIOSENUMERATION_H_ #include "OpenDRIM_BIOSEnumeration.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSEnumeration_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSEnumeration& instance); CMPIInstance* BIOS_OpenDRIM_BIOSEnumeration_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSEnumeration& instance); void BIOS_OpenDRIM_BIOSEnumeration_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSEnumeration& instance); void BIOS_OpenDRIM_BIOSEnumeration_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSEnumeration& instance); #endif /*CMPIOPENDRIM_BIOSENUMERATION_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSEnumeration/OpenDRIM_BIOSEnumerationAccess.h0000644000175000017500000000553111400645636031002 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSENUMERATIONACCESS_H_ #define OPENDRIM_BIOSENUMERATIONACCESS_H_ #include "BIOS_Common.h" #include "OpenDRIM_BIOSEnumeration.h" int BIOS_OpenDRIM_BIOSEnumeration_load(const CMPIBroker* broker, string& errorMessage); int BIOS_OpenDRIM_BIOSEnumeration_unload(string& errorMessage); int BIOS_OpenDRIM_BIOSEnumeration_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSEnumeration_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BIOSEnumeration& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSEnumeration_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSEnumeration& newInstance, const OpenDRIM_BIOSEnumeration& oldInstance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSEnumeration_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSEnumeration& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSEnumeration_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSEnumeration& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSEnumeration_populate(OpenDRIM_BIOSEnumeration& instance, string& errorMessage); #endif /*OPENDRIM_BIOSENUMERATIONACCESS_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSEnumeration/Makefile.am0000644000175000017500000000376011400645636025145 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 = libcmpiBIOS_OpenDRIM_BIOSEnumerationProvider.la libcmpiBIOS_OpenDRIM_BIOSEnumerationProvider_la_SOURCES = OpenDRIM_BIOSEnumerationAccess.cpp OpenDRIM_BIOSEnumerationProvider.cpp cmpiOpenDRIM_BIOSEnumeration.cpp libcmpiBIOS_OpenDRIM_BIOSEnumerationProvider_la_LIBADD = ../Common/libcmpiBIOS_Common.la libcmpiBIOS_OpenDRIM_BIOSEnumerationProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_BIOSEnumeration.h OpenDRIM_BIOSEnumeration.h OpenDRIM_BIOSEnumerationAccess.h opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSEnumeration/cmpiOpenDRIM_BIOSEnumeration.cpp0000644000175000017500000001165211400645636031065 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSEnumeration.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSEnumeration_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSEnumeration& instance) { _E_; Objectpath op(broker, OpenDRIM_BIOSEnumeration_classnames[0], OpenDRIM_BIOSEnumeration_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* BIOS_OpenDRIM_BIOSEnumeration_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSEnumeration& instance) { _E_; Objectpath op(broker, BIOS_OpenDRIM_BIOSEnumeration_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.AttributeName_isNULL) ci.setProperty("AttributeName", instance.AttributeName); if (!instance.CurrentValue_isNULL) ci.setProperty("CurrentValue", instance.CurrentValue); if (!instance.DefaultValue_isNULL) ci.setProperty("DefaultValue", instance.DefaultValue); if (!instance.PendingValue_isNULL) ci.setProperty("PendingValue", instance.PendingValue); if (!instance.IsOrderedList_isNULL) ci.setProperty("IsOrderedList", instance.IsOrderedList); if (!instance.IsReadOnly_isNULL) ci.setProperty("IsReadOnly", instance.IsReadOnly); if (!instance.PossibleValues_isNULL) ci.setProperty("PossibleValues", instance.PossibleValues); if (!instance.PossibleValuesDescription_isNULL) ci.setProperty("PossibleValuesDescription", instance.PossibleValuesDescription); _L_; return ci.getHdl(); } void BIOS_OpenDRIM_BIOSEnumeration_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSEnumeration& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void BIOS_OpenDRIM_BIOSEnumeration_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSEnumeration& 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("AttributeName", instance.AttributeName) == OK) instance.AttributeName_isNULL = false; if (inst.getProperty("CurrentValue", instance.CurrentValue) == OK) instance.CurrentValue_isNULL = false; if (inst.getProperty("DefaultValue", instance.DefaultValue) == OK) instance.DefaultValue_isNULL = false; if (inst.getProperty("PendingValue", instance.PendingValue) == OK) instance.PendingValue_isNULL = false; if (inst.getProperty("IsOrderedList", instance.IsOrderedList) == OK) instance.IsOrderedList_isNULL = false; if (inst.getProperty("IsReadOnly", instance.IsReadOnly) == OK) instance.IsReadOnly_isNULL = false; if (inst.getProperty("PossibleValues", instance.PossibleValues) == OK) instance.PossibleValues_isNULL = false; if (inst.getProperty("PossibleValuesDescription", instance.PossibleValuesDescription) == OK) instance.PossibleValuesDescription_isNULL = false; _L_; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSEnumeration/OpenDRIM_BIOSEnumeration.h0000644000175000017500000001421211400645636027654 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSENUMERATION_H_ #define OPENDRIM_BIOSENUMERATION_H_ #include const static char* OpenDRIM_BIOSEnumeration_classnames[] = {"OpenDRIM_BIOSEnumeration"}; static string OpenDRIM_BIOSEnumeration_NAMESPACE = _NAMESPACE; class OpenDRIM_BIOSEnumeration { public: string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string ElementName; bool ElementName_isNULL; string InstanceID; bool InstanceID_isNULL; string AttributeName; bool AttributeName_isNULL; vector CurrentValue; bool CurrentValue_isNULL; vector DefaultValue; bool DefaultValue_isNULL; vector PendingValue; bool PendingValue_isNULL; bool IsOrderedList; bool IsOrderedList_isNULL; bool IsReadOnly; bool IsReadOnly_isNULL; vector PossibleValues; bool PossibleValues_isNULL; vector PossibleValuesDescription; bool PossibleValuesDescription_isNULL; OpenDRIM_BIOSEnumeration() { Caption_isNULL = true; Description_isNULL = true; ElementName_isNULL = true; InstanceID_isNULL = true; AttributeName_isNULL = true; CurrentValue_isNULL = true; DefaultValue_isNULL = true; PendingValue_isNULL = true; IsOrderedList_isNULL = true; IsReadOnly_isNULL = true; PossibleValues_isNULL = true; PossibleValuesDescription_isNULL = true; } ~OpenDRIM_BIOSEnumeration() {} 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 getAttributeName(string& value) const { if (AttributeName_isNULL==true) return NOT_FOUND; value = AttributeName; return OK; } int setAttributeName(const string& newValue) { AttributeName = newValue; AttributeName_isNULL = false; return OK; } int getCurrentValue(vector& value) const { if (CurrentValue_isNULL==true) return NOT_FOUND; value = CurrentValue; return OK; } int setCurrentValue(const vector& newValue) { CurrentValue = newValue; CurrentValue_isNULL = false; return OK; } int getDefaultValue(vector& value) const { if (DefaultValue_isNULL==true) return NOT_FOUND; value = DefaultValue; return OK; } int setDefaultValue(const vector& newValue) { DefaultValue = newValue; DefaultValue_isNULL = false; return OK; } int getPendingValue(vector& value) const { if (PendingValue_isNULL==true) return NOT_FOUND; value = PendingValue; return OK; } int setPendingValue(const vector& newValue) { PendingValue = newValue; PendingValue_isNULL = false; return OK; } int getIsOrderedList(bool& value) const { if (IsOrderedList_isNULL==true) return NOT_FOUND; value = IsOrderedList; return OK; } int setIsOrderedList(const bool& newValue) { IsOrderedList = newValue; IsOrderedList_isNULL = false; return OK; } int getIsReadOnly(bool& value) const { if (IsReadOnly_isNULL==true) return NOT_FOUND; value = IsReadOnly; return OK; } int setIsReadOnly(const bool& newValue) { IsReadOnly = newValue; IsReadOnly_isNULL = false; return OK; } int getPossibleValues(vector& value) const { if (PossibleValues_isNULL==true) return NOT_FOUND; value = PossibleValues; return OK; } int setPossibleValues(const vector& newValue) { PossibleValues = newValue; PossibleValues_isNULL = false; return OK; } int getPossibleValuesDescription(vector& value) const { if (PossibleValuesDescription_isNULL==true) return NOT_FOUND; value = PossibleValuesDescription; return OK; } int setPossibleValuesDescription(const vector& newValue) { PossibleValuesDescription = newValue; PossibleValuesDescription_isNULL = false; return OK; } }; #endif /*OPENDRIM_BIOSENUMERATION_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSEnumeration/OpenDRIM_BIOSEnumerationAccess.cpp0000644000175000017500000000575711400645636031347 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSEnumerationAccess.h" int BIOS_OpenDRIM_BIOSEnumeration_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int BIOS_OpenDRIM_BIOSEnumeration_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int BIOS_OpenDRIM_BIOSEnumeration_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; _L_; return OK; } int BIOS_OpenDRIM_BIOSEnumeration_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BIOSEnumeration& instance, const char** properties, string& errorMessage) { _E_; _L_; return OK; } int BIOS_OpenDRIM_BIOSEnumeration_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSEnumeration& newInstance, const OpenDRIM_BIOSEnumeration& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSEnumeration_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSEnumeration& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSEnumeration_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSEnumeration& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSEnumeration_populate(OpenDRIM_BIOSEnumeration& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSEnumeration/OpenDRIM_BIOSEnumerationProvider.cpp0000644000175000017500000002505411400645636031730 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSEnumeration.h" #include "OpenDRIM_BIOSEnumerationAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define BIOS_OpenDRIM_BIOSEnumerationProviderSetInstance BIOS_OpenDRIM_BIOSEnumerationProviderModifyInstance #endif int BIOS_OpenDRIM_BIOSEnumeration_init(const CMPIBroker* broker); int BIOS_OpenDRIM_BIOSEnumeration_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus BIOS_OpenDRIM_BIOSEnumerationProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_BIOSEnumeration_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSEnumerationProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSEnumeration_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSEnumeration_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_BIOSEnumeration_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSEnumerationProviderEnumInstances(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 = BIOS_OpenDRIM_BIOSEnumeration_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSEnumeration_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = BIOS_OpenDRIM_BIOSEnumeration_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSEnumerationProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSEnumeration instance; BIOS_OpenDRIM_BIOSEnumeration_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSEnumeration_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSEnumeration_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = BIOS_OpenDRIM_BIOSEnumeration_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSEnumerationProviderSetInstance(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_BIOSEnumeration newInstance, oldInstance; BIOS_OpenDRIM_BIOSEnumeration_toCPP(_broker, ci, newInstance); BIOS_OpenDRIM_BIOSEnumeration_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSEnumeration_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSEnumeration_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSEnumeration_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSEnumeration_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSEnumerationProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSEnumeration instance; BIOS_OpenDRIM_BIOSEnumeration_toCPP(_broker, ci, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSEnumeration_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_BIOSEnumeration_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSEnumeration_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSEnumeration_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSEnumeration_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSEnumeration_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = BIOS_OpenDRIM_BIOSEnumeration_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSEnumerationProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSEnumeration instance; BIOS_OpenDRIM_BIOSEnumeration_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSEnumeration_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSEnumeration_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSEnumeration_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSEnumeration_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSEnumerationProviderExecQuery(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 BIOS_OpenDRIM_BIOSEnumeration_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSEnumeration_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSEnumeration_init FAILED: " + (string) OpenDRIM_BIOSEnumeration_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int BIOS_OpenDRIM_BIOSEnumeration_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSEnumeration_unload(errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSEnumeration_unload FAILED: " + (string) OpenDRIM_BIOSEnumeration_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define BIOS_OpenDRIM_BIOSEnumeration_INIT if (BIOS_OpenDRIM_BIOSEnumeration_init(_broker) < 0) return NULL CMInstanceMIStub(BIOS_OpenDRIM_BIOSEnumerationProvider, BIOS_OpenDRIM_BIOSEnumerationProvider, _broker, BIOS_OpenDRIM_BIOSEnumeration_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-bios-1.0.0~ppa/NEWS0000644000175000017500000000017511400645636017205 0ustar guillaumeguillaumeInitial Release 1.0.0 ========================= // TODO Changes in Major.Minor.Revision ========================= // TODO opendrim-lmp-bios-1.0.0~ppa/LICENSE0000644000175000017500000000272711400645636017520 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 , , ################################################################################ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSCapabilities/0000755000175000017500000000000011400645636023206 5ustar guillaumeguillaumeopendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSCapabilities/Makefile.am0000644000175000017500000000457011400645636025250 0ustar guillaumeguillaume################################################################################ # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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 = libcmpiBIOS_OpenDRIM_BIOSCapabilitiesProvider.la libcmpiBIOS_OpenDRIM_BIOSCapabilitiesProvider_la_SOURCES = OpenDRIM_BIOSCapabilitiesAccess.cpp OpenDRIM_BIOSCapabilitiesProvider.cpp cmpiOpenDRIM_BIOSCapabilities.cpp assocOpenDRIM_BIOSCapabilities.cpp # May have to be adjusted for direct invocation libcmpiBIOS_OpenDRIM_BIOSCapabilitiesProvider_la_CPPFLAGS = -I../CIM_Capabilities -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiBIOS_OpenDRIM_BIOSCapabilitiesProvider_la_LIBADD = ../Common/libcmpiBIOS_Common.la #../CIM_Capabilities/libcmpiBIOS_CIM_CapabilitiesProvider.la ../CIM_ManagedElement/libcmpiBIOS_CIM_ManagedElementProvider.la libcmpiBIOS_OpenDRIM_BIOSCapabilitiesProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_BIOSCapabilities.h OpenDRIM_BIOSCapabilities.h OpenDRIM_BIOSCapabilitiesAccess.h opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSCapabilities/OpenDRIM_BIOSCapabilitiesAccess.h0000644000175000017500000001026611400645636031211 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSCAPABILITIESACCESS_H_ #define OPENDRIM_BIOSCAPABILITIESACCESS_H_ #include "BIOS_Common.h" #include "OpenDRIM_BIOSCapabilities.h" #include "assocOpenDRIM_BIOSCapabilities.h" int BIOS_OpenDRIM_BIOSCapabilities_load(const CMPIBroker* broker, string& errorMessage); int BIOS_OpenDRIM_BIOSCapabilities_unload(string& errorMessage); int BIOS_OpenDRIM_BIOSCapabilities_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BIOSCapabilities& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSCapabilities& newInstance, const OpenDRIM_BIOSCapabilities& oldInstance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSCapabilities& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSCapabilities& instance, string& errorMessage); int BIOS_OpenDRIM_BIOSCapabilities_associatorCapabilitiesToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Capabilities_instance, const char** properties, vector& ManagedElement_associatedInstances, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSCapabilities_associatorManagedElementToCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const char** properties, vector& Capabilities_associatedInstances, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSCapabilities_referenceCapabilitiesToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Capabilities_instance, const vector& ManagedElement_instances, vector& OpenDRIM_BIOSCapabilities_instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSCapabilities_referenceManagedElementToCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& Capabilities_instances, vector& OpenDRIM_BIOSCapabilities_instances, const char** properties, string& errorMessage, const string& discriminant); int BIOS_OpenDRIM_BIOSCapabilities_populate(OpenDRIM_BIOSCapabilities& instance, string& errorMessage); #endif /*OPENDRIM_BIOSCAPABILITIESACCESS_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSCapabilities/OpenDRIM_BIOSCapabilitiesProvider.cpp0000644000175000017500000004106411400645636032135 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSCapabilities.h" #include "OpenDRIM_BIOSCapabilitiesAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define BIOS_OpenDRIM_BIOSCapabilitiesProviderSetInstance BIOS_OpenDRIM_BIOSCapabilitiesProviderModifyInstance #endif int BIOS_OpenDRIM_BIOSCapabilities_init(const CMPIBroker* broker); int BIOS_OpenDRIM_BIOSCapabilities_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus BIOS_OpenDRIM_BIOSCapabilitiesProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_BIOSCapabilities_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSCapabilitiesProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSCapabilities_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_BIOSCapabilities_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSCapabilitiesProviderEnumInstances(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 = BIOS_OpenDRIM_BIOSCapabilities_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = BIOS_OpenDRIM_BIOSCapabilities_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSCapabilitiesProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSCapabilities instance; BIOS_OpenDRIM_BIOSCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSCapabilities_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = BIOS_OpenDRIM_BIOSCapabilities_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSCapabilitiesProviderSetInstance(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_BIOSCapabilities newInstance, oldInstance; BIOS_OpenDRIM_BIOSCapabilities_toCPP(_broker, ci, newInstance); BIOS_OpenDRIM_BIOSCapabilities_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSCapabilities_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSCapabilities_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSCapabilitiesProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSCapabilities instance; BIOS_OpenDRIM_BIOSCapabilities_toCPP(_broker, ci, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_BIOSCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSCapabilities_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = BIOS_OpenDRIM_BIOSCapabilities_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSCapabilitiesProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_BIOSCapabilities instance; BIOS_OpenDRIM_BIOSCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = BIOS_OpenDRIM_BIOSCapabilities_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSCapabilitiesProviderExecQuery(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 BIOS_OpenDRIM_BIOSCapabilitiesProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = BIOS_OpenDRIM_BIOSCapabilities_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSCapabilitiesProviderAssociatorNames(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 = BIOS_OpenDRIM_BIOSCapabilities_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSCapabilities_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 BIOS_OpenDRIM_BIOSCapabilitiesProviderAssociators(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 = BIOS_OpenDRIM_BIOSCapabilities_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSCapabilities_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 BIOS_OpenDRIM_BIOSCapabilitiesProviderReferenceNames(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 = BIOS_OpenDRIM_BIOSCapabilities_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = BIOS_OpenDRIM_BIOSCapabilities_referenceCapabilitiesToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = BIOS_OpenDRIM_BIOSCapabilities_referenceManagedElementToCapabilities(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = BIOS_OpenDRIM_BIOSCapabilities_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus BIOS_OpenDRIM_BIOSCapabilitiesProviderReferences(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 = BIOS_OpenDRIM_BIOSCapabilities_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = BIOS_OpenDRIM_BIOSCapabilities_referenceCapabilitiesToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = BIOS_OpenDRIM_BIOSCapabilities_referenceManagedElementToCapabilities(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_BIOSCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = BIOS_OpenDRIM_BIOSCapabilities_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int BIOS_OpenDRIM_BIOSCapabilities_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSCapabilities_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSCapabilities_init FAILED: " + (string) OpenDRIM_BIOSCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int BIOS_OpenDRIM_BIOSCapabilities_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = BIOS_OpenDRIM_BIOSCapabilities_unload(errorMessage); if (errorCode != OK) { errorMessage += "BIOS_OpenDRIM_BIOSCapabilities_unload FAILED: " + (string) OpenDRIM_BIOSCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define BIOS_OpenDRIM_BIOSCapabilities_INIT if (BIOS_OpenDRIM_BIOSCapabilities_init(_broker) < 0) return NULL CMInstanceMIStub(BIOS_OpenDRIM_BIOSCapabilitiesProvider, BIOS_OpenDRIM_BIOSCapabilitiesProvider, _broker, BIOS_OpenDRIM_BIOSCapabilities_INIT); CMAssociationMIStub(BIOS_OpenDRIM_BIOSCapabilitiesProvider, BIOS_OpenDRIM_BIOSCapabilitiesProvider, _broker, BIOS_OpenDRIM_BIOSCapabilities_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSCapabilities/OpenDRIM_BIOSCapabilitiesAccess.cpp0000644000175000017500000002467611400645636031556 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSCapabilitiesAccess.h" int BIOS_OpenDRIM_BIOSCapabilities_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(BIOS_CIM_Capabilities_load(broker, errorMessage)); CF_assert(BIOS_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int BIOS_OpenDRIM_BIOSCapabilities_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(BIOS_CIM_Capabilities_unload(errorMessage)); CF_assert(BIOS_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int BIOS_OpenDRIM_BIOSCapabilities_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 BIOS_OpenDRIM_BIOSCapabilities_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(BIOS_OpenDRIM_BIOSCapabilities_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(BIOS_OpenDRIM_BIOSCapabilities_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; BIOS_OpenDRIM_BIOSCapabilities_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(BIOS_OpenDRIM_BIOSCapabilities_referenceCapabilitiesToManagedElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int BIOS_OpenDRIM_BIOSCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_BIOSCapabilities& 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(BIOS_OpenDRIM_BIOSCapabilities_getCapabilities(broker, ctx, Capabilities_objectpath, Capabilities_instance, NULL, errorMessage)); Objectpath ManagedElement_objectpath; instance.getManagedElement(ManagedElement_objectpath); Instance ManagedElement_instance; CF_assert(BIOS_OpenDRIM_BIOSCapabilities_getManagedElement(broker, ctx, ManagedElement_objectpath, ManagedElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(BIOS_OpenDRIM_BIOSCapabilities_isAssociated(Capabilities_instance, ManagedElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } CF_assert(BIOS_OpenDRIM_BIOSCapabilities_populate(instance, errorMessage)); _L_; return OK; } int BIOS_OpenDRIM_BIOSCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSCapabilities& newInstance, const OpenDRIM_BIOSCapabilities& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_BIOSCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int BIOS_OpenDRIM_BIOSCapabilities_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(BIOS_OpenDRIM_BIOSCapabilities_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(BIOS_OpenDRIM_BIOSCapabilities_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(BIOS_OpenDRIM_BIOSCapabilities_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(BIOS_OpenDRIM_BIOSCapabilities_enumerateCapabilitiess(broker, ctx, Capabilities_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(BIOS_OpenDRIM_BIOSCapabilities_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(BIOS_OpenDRIM_BIOSCapabilities_enumerateCapabilitiess(broker, ctx, Capabilities_instances, properties, false, errorMessage)); } for (size_t i=0; i& ManagedElement_instances, vector& OpenDRIM_BIOSCapabilities_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_BIOSCapabilities instance; instance.setCapabilities(((Instance) Capabilities_instance).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instances[i]).getObjectpath()); if (discriminant == "r") { CF_assert(BIOS_OpenDRIM_BIOSCapabilities_populate(instance, errorMessage)); } OpenDRIM_BIOSCapabilities_instances.push_back(instance); } _L_; return OK; } int BIOS_OpenDRIM_BIOSCapabilities_referenceManagedElementToCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& Capabilities_instances, vector& OpenDRIM_BIOSCapabilities_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_BIOSCapabilities instance; instance.setCapabilities(((Instance) Capabilities_instances[i]).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instance).getObjectpath()); if (discriminant == "r") { CF_assert(BIOS_OpenDRIM_BIOSCapabilities_populate(instance, errorMessage)); } OpenDRIM_BIOSCapabilities_instances.push_back(instance); } _L_; return OK; } int BIOS_OpenDRIM_BIOSCapabilities_populate(OpenDRIM_BIOSCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSCapabilities/OpenDRIM_BIOSCapabilities.h0000644000175000017500000000756511400645636030077 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSCAPABILITIES_H_ #define OPENDRIM_BIOSCAPABILITIES_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_BIOSCapabilities_classnames[] = {"OpenDRIM_BIOSCapabilities"}; static string OpenDRIM_BIOSCapabilities_NAMESPACE = _NAMESPACE; const static string Capabilities_role = "Capabilities"; const static char* Capabilities_classnames[] = {"OpenDRIM_BIOSServiceCapabilities"}; const static string Capabilities_NAMESPACE = _NAMESPACE; const static string ManagedElement_role = "ManagedElement"; const static char* ManagedElement_classnames[] = {"OpenDRIM_BIOSService"}; const static string ManagedElement_NAMESPACE = _NAMESPACE; class OpenDRIM_BIOSCapabilities { public: Objectpath ManagedElement; bool ManagedElement_isNULL; Objectpath Capabilities; bool Capabilities_isNULL; vector Characteristics; bool Characteristics_isNULL; OpenDRIM_BIOSCapabilities() { ManagedElement_isNULL = true; Capabilities_isNULL = true; Characteristics_isNULL = true; } ~OpenDRIM_BIOSCapabilities() {} 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_BIOSCAPABILITIES_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSCapabilities/assocOpenDRIM_BIOSCapabilities.h0000644000175000017500000000610111400645636031111 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSCAPABILITIES_H_ #define ASSOCOPENDRIM_BIOSCAPABILITIES_H_ #include "OpenDRIM_BIOSCapabilitiesAccess.h" int BIOS_OpenDRIM_BIOSCapabilities_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 BIOS_OpenDRIM_BIOSCapabilities_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 BIOS_OpenDRIM_BIOSCapabilities_enumerateCapabilitiess(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int BIOS_OpenDRIM_BIOSCapabilities_getCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int BIOS_OpenDRIM_BIOSCapabilities_enumerateManagedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int BIOS_OpenDRIM_BIOSCapabilities_getManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_BIOSCAPABILITIES_H_*/ opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSCapabilities/cmpiOpenDRIM_BIOSCapabilities.cpp0000644000175000017500000000637211400645636031276 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSCapabilities.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSCapabilities& instance) { _E_; Objectpath op(broker, OpenDRIM_BIOSCapabilities_classnames[0], OpenDRIM_BIOSCapabilities_NAMESPACE); if (!instance.ManagedElement_isNULL) op.addKey("ManagedElement", instance.ManagedElement); if (!instance.Capabilities_isNULL) op.addKey("Capabilities", instance.Capabilities); _L_; return op.getHdl(); } CMPIInstance* BIOS_OpenDRIM_BIOSCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSCapabilities& instance) { _E_; Objectpath op(broker, BIOS_OpenDRIM_BIOSCapabilities_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Characteristics_isNULL) ci.setProperty("Characteristics", instance.Characteristics); _L_; return ci.getHdl(); } void BIOS_OpenDRIM_BIOSCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSCapabilities& 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 BIOS_OpenDRIM_BIOSCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSCapabilities& 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_; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSCapabilities/assocOpenDRIM_BIOSCapabilities.cpp0000644000175000017500000002070611400645636031453 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSCapabilities.h" int BIOS_OpenDRIM_BIOSCapabilities_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 = BIOS_OpenDRIM_BIOSCapabilities_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(BIOS_OpenDRIM_BIOSCapabilities_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(BIOS_OpenDRIM_BIOSCapabilities_associatorManagedElementToCapabilities(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int BIOS_OpenDRIM_BIOSCapabilities_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(BIOS_CIM_Capabilities_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(BIOS_CIM_Capabilities_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, BIOS_CIM_Capabilities_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int BIOS_OpenDRIM_BIOSCapabilities_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; BIOS_CIM_Capabilities_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(BIOS_CIM_Capabilities_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, BIOS_CIM_Capabilities_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int BIOS_OpenDRIM_BIOSCapabilities_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(BIOS_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(BIOS_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, BIOS_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int BIOS_OpenDRIM_BIOSCapabilities_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; BIOS_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(BIOS_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, BIOS_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } opendrim-lmp-bios-1.0.0~ppa/OpenDRIM_BIOSCapabilities/cmpiOpenDRIM_BIOSCapabilities.h0000644000175000017500000000421711400645636030737 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), BIOS provider package # Copyright (C) 2010 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_BIOSCAPABILITIES_H_ #define CMPIOPENDRIM_BIOSCAPABILITIES_H_ #include "OpenDRIM_BIOSCapabilities.h" CMPIObjectPath* BIOS_OpenDRIM_BIOSCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_BIOSCapabilities& instance); CMPIInstance* BIOS_OpenDRIM_BIOSCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_BIOSCapabilities& instance); void BIOS_OpenDRIM_BIOSCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_BIOSCapabilities& instance); void BIOS_OpenDRIM_BIOSCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_BIOSCapabilities& instance); #endif /*CMPIOPENDRIM_BIOSCAPABILITIES_H_*/ opendrim-lmp-bios-1.0.0~ppa/README0000644000175000017500000000103311400645636017360 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!