opendrim-lmp-softwareupdate-1.0.0~ppa/0000755000175000017500000000000011401066772020603 5ustar guillaumeguillaumeopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationCapabilities/0000755000175000017500000000000011401066772030726 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000020000000000000011555 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationCapabilities/cmpiOpenDRIM_SoftwareInstallationCapabilities.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationCapabilities/cmpiOpenDRIM_Softwar0000644000175000017500000000472411401066772034613 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_SOFTWAREINSTALLATIONCAPABILITIES_H_ #define CMPIOPENDRIM_SOFTWAREINSTALLATIONCAPABILITIES_H_ #include "OpenDRIM_SoftwareInstallationCapabilities.h" CMPIObjectPath* SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_SoftwareInstallationCapabilities& instance); CMPIInstance* SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_SoftwareInstallationCapabilities& instance); void SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_SoftwareInstallationCapabilities& instance); void SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_SoftwareInstallationCapabilities& instance); #endif /*CMPIOPENDRIM_SOFTWAREINSTALLATIONCAPABILITIES_H_*/ opendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationCapabilities/Makefile.am0000644000175000017500000000533611401066772032771 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProvider.la libcmpiSoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProvider_la_SOURCES = OpenDRIM_SoftwareInstallationCapabilitiesAccess.cpp OpenDRIM_SoftwareInstallationCapabilitiesProvider.cpp cmpiOpenDRIM_SoftwareInstallationCapabilities.cpp assocOpenDRIM_SoftwareInstallationCapabilities.cpp # May have to be adjusted for direct invocation libcmpiSoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProvider_la_CPPFLAGS = -I../CIM_Capabilities -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiSoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProvider_la_LIBADD = ../Common/libcmpiSoftwareUpdate_Common.la #../CIM_Capabilities/libcmpiSoftwareUpdate_CIM_CapabilitiesProvider.la ../CIM_ManagedElement/libcmpiSoftwareUpdate_CIM_ManagedElementProvider.la libcmpiSoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_SoftwareInstallationCapabilities.h OpenDRIM_SoftwareInstallationCapabilities.h OpenDRIM_SoftwareInstallationCapabilitiesAccess.h ././@LongLink0000000000000000000000000000020300000000000011560 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationCapabilities/assocOpenDRIM_SoftwareInstallationCapabilities.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationCapabilities/assocOpenDRIM_Softwa0000644000175000017500000002201111401066772034576 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "assocOpenDRIM_SoftwareInstallationCapabilities.h" int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_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 = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_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(SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_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(SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_associatorManagedElementToCapabilities(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_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(SoftwareUpdate_CIM_Capabilities_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareUpdate_CIM_Capabilities_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareUpdate_CIM_Capabilities_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_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; SoftwareUpdate_CIM_Capabilities_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareUpdate_CIM_Capabilities_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareUpdate_CIM_Capabilities_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_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(SoftwareUpdate_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareUpdate_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareUpdate_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_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; SoftwareUpdate_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareUpdate_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareUpdate_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000020200000000000011557 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationCapabilities/cmpiOpenDRIM_SoftwareInstallationCapabilities.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationCapabilities/cmpiOpenDRIM_Softwar0000644000175000017500000000711111401066772034604 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SoftwareInstallationCapabilities.h" CMPIObjectPath* SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_SoftwareInstallationCapabilities& instance) { _E_; Objectpath op(broker, OpenDRIM_SoftwareInstallationCapabilities_classnames[0], OpenDRIM_SoftwareInstallationCapabilities_NAMESPACE); if (!instance.ManagedElement_isNULL) op.addKey("ManagedElement", instance.ManagedElement); if (!instance.Capabilities_isNULL) op.addKey("Capabilities", instance.Capabilities); _L_; return op.getHdl(); } CMPIInstance* SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_SoftwareInstallationCapabilities& instance) { _E_; Objectpath op(broker, SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); if (!instance.Characteristics_isNULL) ci.setProperty("Characteristics", instance.Characteristics); _L_; return ci.getHdl(); } void SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_SoftwareInstallationCapabilities& 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 SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_SoftwareInstallationCapabilities& 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_; } ././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationCapabilities/OpenDRIM_SoftwareInstallationCapabilitiesProvider.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationCapabilities/OpenDRIM_SoftwareIns0000644000175000017500000004523511401066772034563 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SoftwareInstallationCapabilities.h" #include "OpenDRIM_SoftwareInstallationCapabilitiesAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProviderSetInstance SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProviderModifyInstance #endif int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_init(const CMPIBroker* broker); int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProviderEnumInstances(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 = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareInstallationCapabilities instance; SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProviderSetInstance(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_SoftwareInstallationCapabilities newInstance, oldInstance; SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_toCPP(_broker, ci, newInstance); SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareInstallationCapabilities instance; SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_toCPP(_broker, ci, instance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_SoftwareInstallationCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareInstallationCapabilities instance; SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProviderExecQuery(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 SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProviderAssociatorNames(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 = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationCapabilities_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 SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProviderAssociators(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 = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationCapabilities_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 SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProviderReferenceNames(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 = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_referenceCapabilitiesToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_referenceManagedElementToCapabilities(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProviderReferences(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 = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_referenceCapabilitiesToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_referenceManagedElementToCapabilities(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_init FAILED: " + (string) OpenDRIM_SoftwareInstallationCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_unload(errorMessage); if (errorCode != OK) { errorMessage += "SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_unload FAILED: " + (string) OpenDRIM_SoftwareInstallationCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_INIT if (SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_init(_broker) < 0) return NULL CMInstanceMIStub(SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProvider, SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProvider, _broker, SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_INIT); CMAssociationMIStub(SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProvider, SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProvider, _broker, SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000020200000000000011557 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationCapabilities/OpenDRIM_SoftwareInstallationCapabilitiesAccess.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationCapabilities/OpenDRIM_SoftwareIns0000644000175000017500000001152511401066772034556 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SOFTWAREINSTALLATIONCAPABILITIESACCESS_H_ #define OPENDRIM_SOFTWAREINSTALLATIONCAPABILITIESACCESS_H_ #include "SoftwareUpdate_Common.h" #include "OpenDRIM_SoftwareInstallationCapabilities.h" #include "assocOpenDRIM_SoftwareInstallationCapabilities.h" int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_load(const CMPIBroker* broker, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_unload(string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_SoftwareInstallationCapabilities& instance, const char** properties, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationCapabilities& newInstance, const OpenDRIM_SoftwareInstallationCapabilities& oldInstance, const char** properties, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationCapabilities& instance, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationCapabilities& instance, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_associatorCapabilitiesToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Capabilities_instance, const char** properties, vector& ManagedElement_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_associatorManagedElementToCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const char** properties, vector& Capabilities_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_referenceCapabilitiesToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Capabilities_instance, const vector& ManagedElement_instances, vector& OpenDRIM_SoftwareInstallationCapabilities_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_referenceManagedElementToCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& Capabilities_instances, vector& OpenDRIM_SoftwareInstallationCapabilities_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_populate(OpenDRIM_SoftwareInstallationCapabilities& instance, string& errorMessage); #endif /*OPENDRIM_SOFTWAREINSTALLATIONCAPABILITIESACCESS_H_*/ ././@LongLink0000000000000000000000000000020100000000000011556 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationCapabilities/assocOpenDRIM_SoftwareInstallationCapabilities.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationCapabilities/assocOpenDRIM_Softwa0000644000175000017500000000657211401066772034614 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ASSOCOPENDRIM_SOFTWAREINSTALLATIONCAPABILITIES_H_ #define ASSOCOPENDRIM_SOFTWAREINSTALLATIONCAPABILITIES_H_ #include "OpenDRIM_SoftwareInstallationCapabilitiesAccess.h" int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_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 SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_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 SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_enumerateCapabilitiess(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_getCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_enumerateManagedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_getManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_SOFTWAREINSTALLATIONCAPABILITIES_H_*/ ././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationCapabilities/OpenDRIM_SoftwareInstallationCapabilities.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationCapabilities/OpenDRIM_SoftwareIns0000644000175000017500000001020211401066772034545 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SOFTWAREINSTALLATIONCAPABILITIES_H_ #define OPENDRIM_SOFTWAREINSTALLATIONCAPABILITIES_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_SoftwareInstallationCapabilities_classnames[] = {"OpenDRIM_SoftwareInstallationCapabilities"}; static string OpenDRIM_SoftwareInstallationCapabilities_NAMESPACE = _NAMESPACE; const static string Capabilities_role = "Capabilities"; const static char* Capabilities_classnames[] = {"OpenDRIM_SoftwareInstallationServiceCapabilities"}; const static string Capabilities_NAMESPACE = _NAMESPACE; const static string ManagedElement_role = "ManagedElement"; const static char* ManagedElement_classnames[] = {"OpenDRIM_SoftwareInstallationService"}; const static string ManagedElement_NAMESPACE = _NAMESPACE; class OpenDRIM_SoftwareInstallationCapabilities { public: Objectpath ManagedElement; bool ManagedElement_isNULL; Objectpath Capabilities; bool Capabilities_isNULL; vector Characteristics; bool Characteristics_isNULL; OpenDRIM_SoftwareInstallationCapabilities() { ManagedElement_isNULL = true; Capabilities_isNULL = true; Characteristics_isNULL = true; } ~OpenDRIM_SoftwareInstallationCapabilities() {} 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_SOFTWAREINSTALLATIONCAPABILITIES_H_*/ ././@LongLink0000000000000000000000000000020400000000000011561 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationCapabilities/OpenDRIM_SoftwareInstallationCapabilitiesAccess.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationCapabilities/OpenDRIM_SoftwareIns0000644000175000017500000002715111401066772034560 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_SoftwareInstallationCapabilitiesAccess.h" int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareUpdate_CIM_Capabilities_load(broker, errorMessage)); CF_assert(SoftwareUpdate_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareUpdate_CIM_Capabilities_unload(errorMessage)); CF_assert(SoftwareUpdate_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_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 SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_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(SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_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(SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_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; SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_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(SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_referenceCapabilitiesToManagedElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_SoftwareInstallationCapabilities& 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(SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_getCapabilities(broker, ctx, Capabilities_objectpath, Capabilities_instance, NULL, errorMessage)); Objectpath ManagedElement_objectpath; instance.getManagedElement(ManagedElement_objectpath); Instance ManagedElement_instance; CF_assert(SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_getManagedElement(broker, ctx, ManagedElement_objectpath, ManagedElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_isAssociated(Capabilities_instance, ManagedElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } CF_assert(SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_populate(instance, errorMessage)); _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationCapabilities& newInstance, const OpenDRIM_SoftwareInstallationCapabilities& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_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(SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_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(SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_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(SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_enumerateCapabilitiess(broker, ctx, Capabilities_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_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(SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_enumerateCapabilitiess(broker, ctx, Capabilities_instances, properties, false, errorMessage)); } for (size_t i=0; i& ManagedElement_instances, vector& OpenDRIM_SoftwareInstallationCapabilities_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_SoftwareInstallationCapabilities instance; instance.setCapabilities(((Instance) Capabilities_instance).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instances[i]).getObjectpath()); if (discriminant == "r") { CF_assert(SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_populate(instance, errorMessage)); } OpenDRIM_SoftwareInstallationCapabilities_instances.push_back(instance); } _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_referenceManagedElementToCapabilities(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& Capabilities_instances, vector& OpenDRIM_SoftwareInstallationCapabilities_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_SoftwareInstallationCapabilities instance; instance.setCapabilities(((Instance) Capabilities_instances[i]).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instance).getObjectpath()); if (discriminant == "r") { CF_assert(SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_populate(instance, errorMessage)); } OpenDRIM_SoftwareInstallationCapabilities_instances.push_back(instance); } _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_populate(OpenDRIM_SoftwareInstallationCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsManagedElement/0000755000175000017500000000000011401066772027723 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsManagedElement/cmpiOpenDRIM_ServiceAffectsManagedElement.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsManagedElement/cmpiOpenDRIM_ServiceAffe0000644000175000017500000000757511401066772034354 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_ServiceAffectsManagedElement.h" CMPIObjectPath* SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_ServiceAffectsManagedElement& instance) { _E_; Objectpath op(broker, OpenDRIM_ServiceAffectsManagedElement_classnames[0], OpenDRIM_ServiceAffectsManagedElement_NAMESPACE); if (!instance.AffectedElement_isNULL) op.addKey("AffectedElement", instance.AffectedElement); if (!instance.AffectingElement_isNULL) op.addKey("AffectingElement", instance.AffectingElement); _L_; return op.getHdl(); } CMPIInstance* SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_ServiceAffectsManagedElement& instance) { _E_; Objectpath op(broker, SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_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 SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_ServiceAffectsManagedElement& 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 SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_ServiceAffectsManagedElement& 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_; } ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsManagedElement/OpenDRIM_ServiceAffectsManagedElement.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsManagedElement/OpenDRIM_ServiceAffectsM0000644000175000017500000001123411401066772034315 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SERVICEAFFECTSMANAGEDELEMENT_H_ #define OPENDRIM_SERVICEAFFECTSMANAGEDELEMENT_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_ServiceAffectsManagedElement_classnames[] = {"OpenDRIM_ServiceAffectsManagedElement"}; static string OpenDRIM_ServiceAffectsManagedElement_NAMESPACE = _NAMESPACE; const static string AffectedElement_role = "AffectedElement"; const static char* AffectedElement_classnames[] = {"CIM_ManagedElement"}; const static string AffectedElement_NAMESPACE = _NAMESPACE; const static string AffectingElement_role = "AffectingElement"; const static char* AffectingElement_classnames[] = {"OpenDRIM_SoftwareInstallationService"}; const static string AffectingElement_NAMESPACE = _NAMESPACE; class OpenDRIM_ServiceAffectsManagedElement { public: Objectpath AffectedElement; bool AffectedElement_isNULL; Objectpath AffectingElement; bool AffectingElement_isNULL; vector ElementEffects; bool ElementEffects_isNULL; vector OtherElementEffectsDescriptions; bool OtherElementEffectsDescriptions_isNULL; OpenDRIM_ServiceAffectsManagedElement() { AffectedElement_isNULL = true; AffectingElement_isNULL = true; ElementEffects_isNULL = true; OtherElementEffectsDescriptions_isNULL = true; } ~OpenDRIM_ServiceAffectsManagedElement() {} 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_SERVICEAFFECTSMANAGEDELEMENT_H_*/ opendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsManagedElement/Makefile.am0000644000175000017500000000523711401066772031766 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProvider.la libcmpiSoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProvider_la_SOURCES = OpenDRIM_ServiceAffectsManagedElementAccess.cpp OpenDRIM_ServiceAffectsManagedElementProvider.cpp cmpiOpenDRIM_ServiceAffectsManagedElement.cpp assocOpenDRIM_ServiceAffectsManagedElement.cpp # May have to be adjusted for direct invocation libcmpiSoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProvider_la_CPPFLAGS = -I../CIM_ManagedElement -I../CIM_Service # Uncomment the end for direct invocation, may have to be adjusted libcmpiSoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProvider_la_LIBADD = ../Common/libcmpiSoftwareUpdate_Common.la #../CIM_ManagedElement/libcmpiSoftwareUpdate_CIM_ManagedElementProvider.la ../CIM_Service/libcmpiSoftwareUpdate_CIM_ServiceProvider.la libcmpiSoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_ServiceAffectsManagedElement.h OpenDRIM_ServiceAffectsManagedElement.h OpenDRIM_ServiceAffectsManagedElementAccess.h ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsManagedElement/cmpiOpenDRIM_ServiceAffectsManagedElement.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsManagedElement/cmpiOpenDRIM_ServiceAffe0000644000175000017500000000464411401066772034346 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_SERVICEAFFECTSMANAGEDELEMENT_H_ #define CMPIOPENDRIM_SERVICEAFFECTSMANAGEDELEMENT_H_ #include "OpenDRIM_ServiceAffectsManagedElement.h" CMPIObjectPath* SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_ServiceAffectsManagedElement& instance); CMPIInstance* SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_ServiceAffectsManagedElement& instance); void SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_ServiceAffectsManagedElement& instance); void SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_ServiceAffectsManagedElement& instance); #endif /*CMPIOPENDRIM_SERVICEAFFECTSMANAGEDELEMENT_H_*/ ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsManagedElement/assocOpenDRIM_ServiceAffectsManagedElement.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsManagedElement/assocOpenDRIM_ServiceAff0000644000175000017500000000653411401066772034361 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ASSOCOPENDRIM_SERVICEAFFECTSMANAGEDELEMENT_H_ #define ASSOCOPENDRIM_SERVICEAFFECTSMANAGEDELEMENT_H_ #include "OpenDRIM_ServiceAffectsManagedElementAccess.h" int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_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 SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_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 SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_enumerateAffectedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_getAffectedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_enumerateAffectingElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_getAffectingElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_SERVICEAFFECTSMANAGEDELEMENT_H_*/ ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsManagedElement/OpenDRIM_ServiceAffectsManagedElementAccess.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsManagedElement/OpenDRIM_ServiceAffectsM0000644000175000017500000001141511401066772034316 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SERVICEAFFECTSMANAGEDELEMENTACCESS_H_ #define OPENDRIM_SERVICEAFFECTSMANAGEDELEMENTACCESS_H_ #include "SoftwareUpdate_Common.h" #include "OpenDRIM_ServiceAffectsManagedElement.h" #include "assocOpenDRIM_ServiceAffectsManagedElement.h" int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_load(const CMPIBroker* broker, string& errorMessage); int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_unload(string& errorMessage); int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_ServiceAffectsManagedElement& instance, const char** properties, string& errorMessage); int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsManagedElement& newInstance, const OpenDRIM_ServiceAffectsManagedElement& oldInstance, const char** properties, string& errorMessage); int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsManagedElement& instance, string& errorMessage); int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsManagedElement& instance, string& errorMessage); int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_associatorAffectedElementToAffectingElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectedElement_instance, const char** properties, vector& AffectingElement_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_associatorAffectingElementToAffectedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectingElement_instance, const char** properties, vector& AffectedElement_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_referenceAffectedElementToAffectingElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectedElement_instance, const vector& AffectingElement_instances, vector& OpenDRIM_ServiceAffectsManagedElement_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_referenceAffectingElementToAffectedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectingElement_instance, const vector& AffectedElement_instances, vector& OpenDRIM_ServiceAffectsManagedElement_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_populate(OpenDRIM_ServiceAffectsManagedElement& instance, string& errorMessage); #endif /*OPENDRIM_SERVICEAFFECTSMANAGEDELEMENTACCESS_H_*/ ././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsManagedElement/OpenDRIM_ServiceAffectsManagedElementProvider.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsManagedElement/OpenDRIM_ServiceAffectsM0000644000175000017500000004451111401066772034321 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_ServiceAffectsManagedElement.h" #include "OpenDRIM_ServiceAffectsManagedElementAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProviderSetInstance SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProviderModifyInstance #endif int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_init(const CMPIBroker* broker); int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsManagedElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProviderEnumInstances(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 = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsManagedElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ServiceAffectsManagedElement instance; SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsManagedElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProviderSetInstance(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_ServiceAffectsManagedElement newInstance, oldInstance; SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_toCPP(_broker, ci, newInstance); SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsManagedElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsManagedElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ServiceAffectsManagedElement instance; SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_toCPP(_broker, ci, instance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_ServiceAffectsManagedElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsManagedElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsManagedElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ServiceAffectsManagedElement instance; SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsManagedElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsManagedElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProviderExecQuery(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 SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProviderAssociatorNames(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 = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsManagedElement_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 SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProviderAssociators(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 = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsManagedElement_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 SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProviderReferenceNames(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 = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsManagedElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_referenceAffectedElementToAffectingElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_referenceAffectingElementToAffectedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsManagedElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProviderReferences(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 = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsManagedElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_referenceAffectedElementToAffectingElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_referenceAffectingElementToAffectedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsManagedElement_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_init FAILED: " + (string) OpenDRIM_ServiceAffectsManagedElement_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_unload(errorMessage); if (errorCode != OK) { errorMessage += "SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_unload FAILED: " + (string) OpenDRIM_ServiceAffectsManagedElement_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_INIT if (SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_init(_broker) < 0) return NULL CMInstanceMIStub(SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProvider, SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProvider, _broker, SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_INIT); CMAssociationMIStub(SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProvider, SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProvider, _broker, SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsManagedElement/assocOpenDRIM_ServiceAffectsManagedElement.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsManagedElement/assocOpenDRIM_ServiceAff0000644000175000017500000002176111401066772034360 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "assocOpenDRIM_ServiceAffectsManagedElement.h" int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_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 = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_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(SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_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(SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_associatorAffectingElementToAffectedElement(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_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(SoftwareUpdate_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareUpdate_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareUpdate_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_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; SoftwareUpdate_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareUpdate_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareUpdate_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_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(SoftwareUpdate_CIM_Service_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareUpdate_CIM_Service_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareUpdate_CIM_Service_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_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; SoftwareUpdate_CIM_Service_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareUpdate_CIM_Service_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareUpdate_CIM_Service_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsManagedElement/OpenDRIM_ServiceAffectsManagedElementAccess.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsManagedElement/OpenDRIM_ServiceAffectsM0000644000175000017500000002714211401066772034322 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_ServiceAffectsManagedElementAccess.h" int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareUpdate_CIM_ManagedElement_load(broker, errorMessage)); CF_assert(SoftwareUpdate_CIM_Service_load(broker, errorMessage)); */ // TODO _L_; return OK; } int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareUpdate_CIM_ManagedElement_unload(errorMessage)); CF_assert(SoftwareUpdate_CIM_Service_unload(errorMessage)); */ // TODO _L_; return OK; } int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_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 SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_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(SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_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(SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_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; SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_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(SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_referenceAffectedElementToAffectingElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_ServiceAffectsManagedElement& 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(SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_getAffectedElement(broker, ctx, AffectedElement_objectpath, AffectedElement_instance, NULL, errorMessage)); Objectpath AffectingElement_objectpath; instance.getAffectingElement(AffectingElement_objectpath); Instance AffectingElement_instance; CF_assert(SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_getAffectingElement(broker, ctx, AffectingElement_objectpath, AffectingElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_isAssociated(AffectedElement_instance, AffectingElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } CF_assert(SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_populate(instance, errorMessage)); _L_; return OK; } int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsManagedElement& newInstance, const OpenDRIM_ServiceAffectsManagedElement& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsManagedElement& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsManagedElement& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_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(SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_enumerateAffectingElements(broker, ctx, AffectingElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_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(SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_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(SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_enumerateAffectedElements(broker, ctx, AffectedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_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(SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_enumerateAffectedElements(broker, ctx, AffectedElement_instances, properties, false, errorMessage)); } for (size_t i=0; i& AffectingElement_instances, vector& OpenDRIM_ServiceAffectsManagedElement_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_ServiceAffectsManagedElement instance; instance.setAffectedElement(((Instance) AffectedElement_instance).getObjectpath()); instance.setAffectingElement(((Instance) AffectingElement_instances[i]).getObjectpath()); if (discriminant == "r") { CF_assert(SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_populate(instance, errorMessage)); } OpenDRIM_ServiceAffectsManagedElement_instances.push_back(instance); } _L_; return OK; } int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_referenceAffectingElementToAffectedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectingElement_instance, const vector& AffectedElement_instances, vector& OpenDRIM_ServiceAffectsManagedElement_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_ServiceAffectsManagedElement instance; instance.setAffectedElement(((Instance) AffectedElement_instances[i]).getObjectpath()); instance.setAffectingElement(((Instance) AffectingElement_instance).getObjectpath()); if (discriminant == "r") { CF_assert(SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_populate(instance, errorMessage)); } OpenDRIM_ServiceAffectsManagedElement_instances.push_back(instance); } _L_; return OK; } int SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_populate(OpenDRIM_ServiceAffectsManagedElement& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } opendrim-lmp-softwareupdate-1.0.0~ppa/Makefile.am0000644000175000017500000001066211401066772022644 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### VENDOR = OpenDRIM VERSION = $(shell cat ./VERSION) APP_NAME = opendrim-lmp-softwareupdate RPM_PACKAGE_DIR = packaging PLATFORM = $(shell rpm --eval %_target_cpu) WORKING_DIR = $(shell pwd) SUBDIRS = Common OpenDRIM_RegisteredSoftwareUpdateProfile OpenDRIM_SoftwareInstallationServiceCapabilities OpenDRIM_SoftwareInstallationService OpenDRIM_ServiceAffectsSoftwareIdentity OpenDRIM_SoftwareInstallationCapabilities OpenDRIM_SoftwareUpdateHostedService OpenDRIM_ServiceAffectsManagedElement OpenDRIM_SoftwareUpdateConformsToProfile test postinstall: registration/SoftwareUpdate.sh @CIMNAMESPACE@ $(VENDOR) @CIMSERVER@ @INTEROPNAMESPACE@ $(VERSION) . preuninstall: registration/SoftwareUpdate-remove.sh @CIMNAMESPACE@ @CIMSERVER@ @INTEROPNAMESPACE@ . test-OpenDRIM_ServiceAffectsSoftwareIdentity: all make -C test test-OpenDRIM_ServiceAffectsSoftwareIdentity test-OpenDRIM_SoftwareInstallationCapabilities: all make -C test test-OpenDRIM_SoftwareInstallationCapabilities test-OpenDRIM_SoftwareUpdateHostedService: all make -C test test-OpenDRIM_SoftwareUpdateHostedService test-OpenDRIM_RegisteredSoftwareUpdateProfile: all make -C test test-OpenDRIM_RegisteredSoftwareUpdateProfile test-OpenDRIM_SoftwareInstallationServiceCapabilities: all make -C test test-OpenDRIM_SoftwareInstallationServiceCapabilities test-OpenDRIM_ServiceAffectsManagedElement: all make -C test test-OpenDRIM_ServiceAffectsManagedElement test-OpenDRIM_SoftwareUpdateConformsToProfile: all make -C test test-OpenDRIM_SoftwareUpdateConformsToProfile test-OpenDRIM_SoftwareInstallationService: all make -C test test-OpenDRIM_SoftwareInstallationService 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-softwareupdate-1.0.0~ppa/registration/0000755000175000017500000000000011401066772023315 5ustar guillaumeguillaumeopendrim-lmp-softwareupdate-1.0.0~ppa/registration/OpenDRIM_RegisteredSoftwareUpdateProfile.sh0000755000175000017500000000742611401066772033616 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $4 $6/mof/OpenDRIM_RegisteredSoftwareUpdateProfile.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_RegisteredSoftwareUpdateProfile provider module"; Name = "SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfileModule"; Location = "cmpiSoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfileProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_RegisteredSoftwareUpdateProfile provider"; Name = "SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfileProvider"; ProviderModuleName = "SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfileModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_RegisteredSoftwareUpdateProfile provider capabilities"; ProviderModuleName = "SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfileModule"; ProviderName = "SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfileProvider"; ClassName = "OpenDRIM_RegisteredSoftwareUpdateProfile"; ProviderType = {2}; Namespaces = {"$4"}; SupportedProperties = {"Caption", "Description", "ElementName", "InstanceID", "RegisteredOrganization", "OtherRegisteredOrganization", "RegisteredName", "RegisteredVersion", "AdvertiseTypes", "AdvertiseTypeDescriptions"}; CapabilityID = "SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_RegisteredSoftwareUpdateProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$4 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-softwareupdate-1.0.0~ppa/registration/SoftwareUpdate.sh0000755000175000017500000000506711401066772026621 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then if !( ps -C cimserver > /dev/null 2>&1 ) then echo "ERROR: Pegasus CIM server is not running" exit 1 fi fi if test "$3" = openwbem then if !( ps -C owcimomd > /dev/null 2>&1 ) then echo "ERROR: OpenWBEM CIM server is not running" exit 1 fi fi if test "$3" = sfcb then /etc/init.d/sfcb stop fi $6/registration/OpenDRIM_ServiceAffectsSoftwareIdentity.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_SoftwareInstallationCapabilities.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_SoftwareUpdateHostedService.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_RegisteredSoftwareUpdateProfile.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_SoftwareInstallationServiceCapabilities.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_ServiceAffectsManagedElement.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_SoftwareUpdateConformsToProfile.sh $1 $2 $3 $4 $5 $6 $6/registration/OpenDRIM_SoftwareInstallationService.sh $1 $2 $3 $4 $5 $6 if test "$3" = sfcb then /etc/init.d/sfcb start fi ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/registration/OpenDRIM_SoftwareInstallationServiceCapabilities-remove.shopendrim-lmp-softwareupdate-1.0.0~ppa/registration/OpenDRIM_SoftwareInstallationServiceCapabilities-0000755000175000017500000000675711401066772035003 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilitiesModule cimprovider -r -m SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilitiesModule 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_SoftwareInstallationServiceCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-softwareupdate-1.0.0~ppa/registration/OpenDRIM_SoftwareUpdateHostedService.sh0000755000175000017500000000705611401066772032746 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_SoftwareUpdateHostedService.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_SoftwareUpdateHostedService provider module"; Name = "SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceModule"; Location = "cmpiSoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_SoftwareUpdateHostedService provider"; Name = "SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProvider"; ProviderModuleName = "SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_SoftwareUpdateHostedService provider capabilities"; ProviderModuleName = "SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceModule"; ProviderName = "SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProvider"; ClassName = "OpenDRIM_SoftwareUpdateHostedService"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"Antecedent", "Dependent"}; CapabilityID = "SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_SoftwareUpdateHostedService.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-softwareupdate-1.0.0~ppa/registration/OpenDRIM_SoftwareUpdateConformsToProfile.sh0000755000175000017500000000751711401066772033613 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_SoftwareUpdateConformsToProfile.mof cimmof -aE -n $4 $6/mof/OpenDRIM_SoftwareUpdateConformsToProfile.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_SoftwareUpdateConformsToProfile provider module"; Name = "SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileModule"; Location = "cmpiSoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_SoftwareUpdateConformsToProfile provider"; Name = "SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProvider"; ProviderModuleName = "SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_SoftwareUpdateConformsToProfile provider capabilities"; ProviderModuleName = "SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileModule"; ProviderName = "SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProvider"; ClassName = "OpenDRIM_SoftwareUpdateConformsToProfile"; ProviderType = {2, 3}; Namespaces = {"$1", "$4"}; SupportedProperties = {"ConformantStandard", "ManagedElement"}; CapabilityID = "SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_SoftwareUpdateConformsToProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE owmofc -u http://localhost/$4 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-softwareupdate-1.0.0~ppa/registration/OpenDRIM_SoftwareInstallationService-remove.sh0000755000175000017500000000657611401066772034317 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceModule cimprovider -r -m SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceModule 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_SoftwareInstallationService.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-softwareupdate-1.0.0~ppa/registration/OpenDRIM_SoftwareUpdateHostedService-remove.sh0000755000175000017500000000660311401066772034236 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceModule cimprovider -r -m SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceModule 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_SoftwareUpdateHostedService.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/registration/OpenDRIM_SoftwareUpdateConformsToProfile-remove.shopendrim-lmp-softwareupdate-1.0.0~ppa/registration/OpenDRIM_SoftwareUpdateConformsToProfile-remove.s0000755000175000017500000001060711401066772034730 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileModule cimprovider -r -m SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileModule 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_SoftwareUpdateConformsToProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE owmofc -u http://localhost/$3 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-softwareupdate-1.0.0~ppa/registration/OpenDRIM_ServiceAffectsSoftwareIdentity.sh0000755000175000017500000000725011401066772033436 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_ServiceAffectsSoftwareIdentity.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_ServiceAffectsSoftwareIdentity provider module"; Name = "SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityModule"; Location = "cmpiSoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_ServiceAffectsSoftwareIdentity provider"; Name = "SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProvider"; ProviderModuleName = "SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_ServiceAffectsSoftwareIdentity provider capabilities"; ProviderModuleName = "SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityModule"; ProviderName = "SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProvider"; ClassName = "OpenDRIM_ServiceAffectsSoftwareIdentity"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"AffectedElement", "AffectingElement", "ElementEffects", "OtherElementEffectsDescriptions"}; CapabilityID = "SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_ServiceAffectsSoftwareIdentity.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/registration/OpenDRIM_RegisteredSoftwareUpdateProfile-remove.shopendrim-lmp-softwareupdate-1.0.0~ppa/registration/OpenDRIM_RegisteredSoftwareUpdateProfile-remove.s0000755000175000017500000000663711401066772034744 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfileModule cimprovider -r -m SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfileModule 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_RegisteredSoftwareUpdateProfile.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$3 -r $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/registration/OpenDRIM_SoftwareInstallationServiceCapabilities.shopendrim-lmp-softwareupdate-1.0.0~ppa/registration/OpenDRIM_SoftwareInstallationServiceCapabilities.0000755000175000017500000001031711401066772034767 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_SoftwareInstallationServiceCapabilities.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_SoftwareInstallationServiceCapabilities provider module"; Name = "SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilitiesModule"; Location = "cmpiSoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilitiesProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_SoftwareInstallationServiceCapabilities provider"; Name = "SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilitiesProvider"; ProviderModuleName = "SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilitiesModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_SoftwareInstallationServiceCapabilities provider capabilities"; ProviderModuleName = "SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilitiesModule"; ProviderName = "SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilitiesProvider"; ClassName = "OpenDRIM_SoftwareInstallationServiceCapabilities"; ProviderType = {2}; Namespaces = {"$1"}; SupportedProperties = {"Caption", "Description", "InstanceID", "ElementName", "SupportedAsynchronousActions", "SupportedSynchronousActions", "SupportedTargetTypes", "SupportedExtendedResourceTypes", "CanAddToCollection", "SupportedInstallOptions", "OtherSupportedExtendedResourceTypeDescriptions", "SupportedExtendedResourceTypesMajorVersions", "SupportedExtendedResourceTypesMinorVersions", "SupportedExtendedResourceTypesRevisionNumbers", "SupportedExtendedResourceTypesBuildNumbers", "SupportedURISchemes"}; CapabilityID = "SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_SoftwareInstallationServiceCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/registration/OpenDRIM_SoftwareInstallationCapabilities-remove.shopendrim-lmp-softwareupdate-1.0.0~ppa/registration/OpenDRIM_SoftwareInstallationCapabilities-remove.0000755000175000017500000000666511401066772034754 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesModule cimprovider -r -m SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesModule 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_SoftwareInstallationCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-softwareupdate-1.0.0~ppa/registration/OpenDRIM_SoftwareInstallationService.sh0000755000175000017500000001023011401066772033002 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_SoftwareInstallationService.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_SoftwareInstallationService provider module"; Name = "SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceModule"; Location = "cmpiSoftwareUpdate_OpenDRIM_SoftwareInstallationServiceProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_SoftwareInstallationService provider"; Name = "SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceProvider"; ProviderModuleName = "SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_SoftwareInstallationService provider capabilities"; ProviderModuleName = "SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceModule"; ProviderName = "SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceProvider"; ClassName = "OpenDRIM_SoftwareInstallationService"; 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", "CheckSoftwareIdentity", "InstallFromSoftwareIdentity", "InstallFromURI"}; CapabilityID = "SoftwareUpdate_OpenDRIM_SoftwareInstallationService"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_SoftwareInstallationService.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-softwareupdate-1.0.0~ppa/registration/OpenDRIM_ServiceAffectsManagedElement-remove.sh0000755000175000017500000000661511401066772034277 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementModule cimprovider -r -m SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementModule 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_ServiceAffectsManagedElement.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-softwareupdate-1.0.0~ppa/registration/SoftwareUpdate-remove.sh0000755000175000017500000000507711401066772030115 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then if !( ps -C cimserver > /dev/null 2>&1 ) then echo "ERROR: Pegasus CIM server is not running" exit 1 fi fi if test "$2" = openwbem then if !( ps -C owcimomd > /dev/null 2>&1 ) then echo "ERROR: OpenWBEM CIM server is not running" exit 1 fi fi if test "$2" = sfcb then /etc/init.d/sfcb stop fi $4/registration/OpenDRIM_SoftwareInstallationService-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_SoftwareUpdateConformsToProfile-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_ServiceAffectsManagedElement-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_SoftwareInstallationServiceCapabilities-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_RegisteredSoftwareUpdateProfile-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_SoftwareUpdateHostedService-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_SoftwareInstallationCapabilities-remove.sh $1 $2 $3 $4 $4/registration/OpenDRIM_ServiceAffectsSoftwareIdentity-remove.sh $1 $2 $3 $4 if test "$2" = sfcb then /etc/init.d/sfcb start fi ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/registration/OpenDRIM_ServiceAffectsSoftwareIdentity-remove.shopendrim-lmp-softwareupdate-1.0.0~ppa/registration/OpenDRIM_ServiceAffectsSoftwareIdentity-remove.sh0000755000175000017500000000664111401066772034734 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$2" = pegasus then cimprovider -d -m SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityModule cimprovider -r -m SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityModule 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_ServiceAffectsSoftwareIdentity.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 -r $OUTFILE rm -f $OUTFILE fi opendrim-lmp-softwareupdate-1.0.0~ppa/registration/OpenDRIM_SoftwareInstallationCapabilities.sh0000755000175000017500000000724711401066772034011 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_SoftwareInstallationCapabilities.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_SoftwareInstallationCapabilities provider module"; Name = "SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesModule"; Location = "cmpiSoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_SoftwareInstallationCapabilities provider"; Name = "SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProvider"; ProviderModuleName = "SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_SoftwareInstallationCapabilities provider capabilities"; ProviderModuleName = "SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesModule"; ProviderName = "SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProvider"; ClassName = "OpenDRIM_SoftwareInstallationCapabilities"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"ManagedElement", "Capabilities", "Characteristics"}; CapabilityID = "SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_SoftwareInstallationCapabilities.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-softwareupdate-1.0.0~ppa/registration/OpenDRIM_ServiceAffectsManagedElement.sh0000755000175000017500000000720211401066772032775 0ustar guillaumeguillaume#!/bin/bash ################################################################################ # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ################################################################################ if test "$3" = pegasus then cimmof -aE -n $1 $6/mof/OpenDRIM_ServiceAffectsManagedElement.mof OUTFILE=./TEMP_REGISTRATION cat >> $OUTFILE << EOFC instance of PG_ProviderModule { Caption = "OpenDRIM_ServiceAffectsManagedElement provider module"; Name = "SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementModule"; Location = "cmpiSoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProvider"; Vendor = "$2"; Version = "$5"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; }; instance of PG_Provider { Caption = "OpenDRIM_ServiceAffectsManagedElement provider"; Name = "SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProvider"; ProviderModuleName = "SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementModule"; }; instance of PG_ProviderCapabilities { Caption = "OpenDRIM_ServiceAffectsManagedElement provider capabilities"; ProviderModuleName = "SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementModule"; ProviderName = "SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProvider"; ClassName = "OpenDRIM_ServiceAffectsManagedElement"; ProviderType = {2, 3}; Namespaces = {"$1"}; SupportedProperties = {"AffectedElement", "AffectingElement", "ElementEffects", "OtherElementEffectsDescriptions"}; CapabilityID = "SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement"; }; EOFC cimmof -n root/PG_InterOp $OUTFILE rm -f $OUTFILE fi if test "$3" = sfcb then OUTFILE=./OpenDRIM_ServiceAffectsManagedElement.reg cat >> $OUTFILE <> $OUTFILE owmofc -u http://localhost/$1 $OUTFILE rm -f $OUTFILE fi opendrim-lmp-softwareupdate-1.0.0~ppa/VERSION0000644000175000017500000000000611401066772021647 0ustar guillaumeguillaume1.0.0 opendrim-lmp-softwareupdate-1.0.0~ppa/test/0000755000175000017500000000000011401066772021562 5ustar guillaumeguillaumeopendrim-lmp-softwareupdate-1.0.0~ppa/test/Makefile.am0000644000175000017500000001446411401066772023627 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### noinst_PROGRAMS = testOpenDRIM_ServiceAffectsSoftwareIdentity testOpenDRIM_SoftwareInstallationCapabilities testOpenDRIM_SoftwareUpdateHostedService testOpenDRIM_RegisteredSoftwareUpdateProfile testOpenDRIM_SoftwareInstallationServiceCapabilities testOpenDRIM_ServiceAffectsManagedElement testOpenDRIM_SoftwareUpdateConformsToProfile testOpenDRIM_SoftwareInstallationService # May have to be adjusted for direct invocation testOpenDRIM_ServiceAffectsSoftwareIdentity_CPPFLAGS = -I../OpenDRIM_ServiceAffectsSoftwareIdentity/ -I../null/ -I../null/ testOpenDRIM_ServiceAffectsSoftwareIdentity_SOURCES = testOpenDRIM_ServiceAffectsSoftwareIdentity.cpp testOpenDRIM_ServiceAffectsSoftwareIdentity_LDADD = ../OpenDRIM_ServiceAffectsSoftwareIdentity/libcmpiSoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProvider.la test-OpenDRIM_ServiceAffectsSoftwareIdentity: testOpenDRIM_ServiceAffectsSoftwareIdentity ./testOpenDRIM_ServiceAffectsSoftwareIdentity # May have to be adjusted for direct invocation testOpenDRIM_SoftwareInstallationCapabilities_CPPFLAGS = -I../OpenDRIM_SoftwareInstallationCapabilities/ -I../null/ -I../null/ testOpenDRIM_SoftwareInstallationCapabilities_SOURCES = testOpenDRIM_SoftwareInstallationCapabilities.cpp testOpenDRIM_SoftwareInstallationCapabilities_LDADD = ../OpenDRIM_SoftwareInstallationCapabilities/libcmpiSoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProvider.la test-OpenDRIM_SoftwareInstallationCapabilities: testOpenDRIM_SoftwareInstallationCapabilities ./testOpenDRIM_SoftwareInstallationCapabilities # May have to be adjusted for direct invocation testOpenDRIM_SoftwareUpdateHostedService_CPPFLAGS = -I../OpenDRIM_SoftwareUpdateHostedService/ -I../null/ -I../null/ testOpenDRIM_SoftwareUpdateHostedService_SOURCES = testOpenDRIM_SoftwareUpdateHostedService.cpp testOpenDRIM_SoftwareUpdateHostedService_LDADD = ../OpenDRIM_SoftwareUpdateHostedService/libcmpiSoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProvider.la test-OpenDRIM_SoftwareUpdateHostedService: testOpenDRIM_SoftwareUpdateHostedService ./testOpenDRIM_SoftwareUpdateHostedService testOpenDRIM_RegisteredSoftwareUpdateProfile_CPPFLAGS = -I../OpenDRIM_RegisteredSoftwareUpdateProfile/ testOpenDRIM_RegisteredSoftwareUpdateProfile_SOURCES = testOpenDRIM_RegisteredSoftwareUpdateProfile.cpp testOpenDRIM_RegisteredSoftwareUpdateProfile_LDADD = ../OpenDRIM_RegisteredSoftwareUpdateProfile/libcmpiSoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfileProvider.la test-OpenDRIM_RegisteredSoftwareUpdateProfile: testOpenDRIM_RegisteredSoftwareUpdateProfile ./testOpenDRIM_RegisteredSoftwareUpdateProfile testOpenDRIM_SoftwareInstallationServiceCapabilities_CPPFLAGS = -I../OpenDRIM_SoftwareInstallationServiceCapabilities/ testOpenDRIM_SoftwareInstallationServiceCapabilities_SOURCES = testOpenDRIM_SoftwareInstallationServiceCapabilities.cpp testOpenDRIM_SoftwareInstallationServiceCapabilities_LDADD = ../OpenDRIM_SoftwareInstallationServiceCapabilities/libcmpiSoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilitiesProvider.la test-OpenDRIM_SoftwareInstallationServiceCapabilities: testOpenDRIM_SoftwareInstallationServiceCapabilities ./testOpenDRIM_SoftwareInstallationServiceCapabilities # May have to be adjusted for direct invocation testOpenDRIM_ServiceAffectsManagedElement_CPPFLAGS = -I../OpenDRIM_ServiceAffectsManagedElement/ -I../null/ -I../null/ testOpenDRIM_ServiceAffectsManagedElement_SOURCES = testOpenDRIM_ServiceAffectsManagedElement.cpp testOpenDRIM_ServiceAffectsManagedElement_LDADD = ../OpenDRIM_ServiceAffectsManagedElement/libcmpiSoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProvider.la test-OpenDRIM_ServiceAffectsManagedElement: testOpenDRIM_ServiceAffectsManagedElement ./testOpenDRIM_ServiceAffectsManagedElement # May have to be adjusted for direct invocation testOpenDRIM_SoftwareUpdateConformsToProfile_CPPFLAGS = -I../OpenDRIM_SoftwareUpdateConformsToProfile/ -I../null/ -I../null/ testOpenDRIM_SoftwareUpdateConformsToProfile_SOURCES = testOpenDRIM_SoftwareUpdateConformsToProfile.cpp testOpenDRIM_SoftwareUpdateConformsToProfile_LDADD = ../OpenDRIM_SoftwareUpdateConformsToProfile/libcmpiSoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProvider.la test-OpenDRIM_SoftwareUpdateConformsToProfile: testOpenDRIM_SoftwareUpdateConformsToProfile ./testOpenDRIM_SoftwareUpdateConformsToProfile testOpenDRIM_SoftwareInstallationService_CPPFLAGS = -I../OpenDRIM_SoftwareInstallationService/ testOpenDRIM_SoftwareInstallationService_SOURCES = testOpenDRIM_SoftwareInstallationService.cpp testOpenDRIM_SoftwareInstallationService_LDADD = ../OpenDRIM_SoftwareInstallationService/libcmpiSoftwareUpdate_OpenDRIM_SoftwareInstallationServiceProvider.la test-OpenDRIM_SoftwareInstallationService: testOpenDRIM_SoftwareInstallationService ./testOpenDRIM_SoftwareInstallationService opendrim-lmp-softwareupdate-1.0.0~ppa/test/testOpenDRIM_RegisteredSoftwareUpdateProfile.cpp0000644000175000017500000001275711401066772033133 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_RegisteredSoftwareUpdateProfile.h" #include "OpenDRIM_RegisteredSoftwareUpdateProfileAccess.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_RegisteredSoftwareUpdateProfile& instance) { os << " [OpenDRIM_RegisteredSoftwareUpdateProfile]" << 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_RegisteredSoftwareUpdateProfile]" << endl; return os; } int main() { string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_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 = SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_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 = SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_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 = SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-softwareupdate-1.0.0~ppa/test/testOpenDRIM_SoftwareInstallationServiceCapabilities.cpp0000644000175000017500000001511011401066772034630 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SoftwareInstallationServiceCapabilities.h" #include "OpenDRIM_SoftwareInstallationServiceCapabilitiesAccess.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_SoftwareInstallationServiceCapabilities& instance) { os << " [OpenDRIM_SoftwareInstallationServiceCapabilities]" << endl; ToString("Caption", Caption, Caption_isNULL); ToString("Description", Description, Description_isNULL); ToString("InstanceID", InstanceID, InstanceID_isNULL); ToString("ElementName", ElementName, ElementName_isNULL); ToStringArrayInt("SupportedAsynchronousActions", SupportedAsynchronousActions, SupportedAsynchronousActions_isNULL); ToStringArrayInt("SupportedSynchronousActions", SupportedSynchronousActions, SupportedSynchronousActions_isNULL); ToStringArray("SupportedTargetTypes", SupportedTargetTypes, SupportedTargetTypes_isNULL); ToStringArrayInt("SupportedExtendedResourceTypes", SupportedExtendedResourceTypes, SupportedExtendedResourceTypes_isNULL); ToString("CanAddToCollection", CanAddToCollection, CanAddToCollection_isNULL); ToStringArrayInt("SupportedInstallOptions", SupportedInstallOptions, SupportedInstallOptions_isNULL); ToStringArray("OtherSupportedExtendedResourceTypeDescriptions", OtherSupportedExtendedResourceTypeDescriptions, OtherSupportedExtendedResourceTypeDescriptions_isNULL); ToStringArrayInt("SupportedExtendedResourceTypesMajorVersions", SupportedExtendedResourceTypesMajorVersions, SupportedExtendedResourceTypesMajorVersions_isNULL); ToStringArrayInt("SupportedExtendedResourceTypesMinorVersions", SupportedExtendedResourceTypesMinorVersions, SupportedExtendedResourceTypesMinorVersions_isNULL); ToStringArrayInt("SupportedExtendedResourceTypesRevisionNumbers", SupportedExtendedResourceTypesRevisionNumbers, SupportedExtendedResourceTypesRevisionNumbers_isNULL); ToStringArrayInt("SupportedExtendedResourceTypesBuildNumbers", SupportedExtendedResourceTypesBuildNumbers, SupportedExtendedResourceTypesBuildNumbers_isNULL); ToStringArrayInt("SupportedURISchemes", SupportedURISchemes, SupportedURISchemes_isNULL); os << " [\\OpenDRIM_SoftwareInstallationServiceCapabilities]" << endl; return os; } int main() { string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_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 = SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_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 = SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_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 = SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-softwareupdate-1.0.0~ppa/test/testOpenDRIM_ServiceAffectsManagedElement.cpp0000644000175000017500000001207411401066772032312 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_ServiceAffectsManagedElement.h" #include "OpenDRIM_ServiceAffectsManagedElementAccess.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_ServiceAffectsManagedElement& instance) { os << " [OpenDRIM_ServiceAffectsManagedElement]" << endl; ToStringRef("AffectedElement", AffectedElement, AffectedElement_isNULL); ToStringRef("AffectingElement", AffectingElement, AffectingElement_isNULL); ToStringArrayInt("ElementEffects", ElementEffects, ElementEffects_isNULL); ToStringArray("OtherElementEffectsDescriptions", OtherElementEffectsDescriptions, OtherElementEffectsDescriptions_isNULL); os << " [\\OpenDRIM_ServiceAffectsManagedElement]" << endl; return os; } int main() { string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_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 = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_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 = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_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 = SoftwareUpdate_OpenDRIM_ServiceAffectsManagedElement_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-softwareupdate-1.0.0~ppa/test/testOpenDRIM_SoftwareInstallationService.cpp0000644000175000017500000001515311401066772032325 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SoftwareInstallationService.h" #include "OpenDRIM_SoftwareInstallationServiceAccess.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_SoftwareInstallationService& instance) { os << " [OpenDRIM_SoftwareInstallationService]" << 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_SoftwareInstallationService]" << endl; return os; } int main() { string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_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 = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_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 = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_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 = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-softwareupdate-1.0.0~ppa/test/testOpenDRIM_ServiceAffectsSoftwareIdentity.cpp0000644000175000017500000001212411401066772032744 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_ServiceAffectsSoftwareIdentity.h" #include "OpenDRIM_ServiceAffectsSoftwareIdentityAccess.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_ServiceAffectsSoftwareIdentity& instance) { os << " [OpenDRIM_ServiceAffectsSoftwareIdentity]" << endl; ToStringRef("AffectedElement", AffectedElement, AffectedElement_isNULL); ToStringRef("AffectingElement", AffectingElement, AffectingElement_isNULL); ToStringArrayInt("ElementEffects", ElementEffects, ElementEffects_isNULL); ToStringArray("OtherElementEffectsDescriptions", OtherElementEffectsDescriptions, OtherElementEffectsDescriptions_isNULL); os << " [\\OpenDRIM_ServiceAffectsSoftwareIdentity]" << endl; return os; } int main() { string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_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 = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_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 = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_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 = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-softwareupdate-1.0.0~ppa/test/testOpenDRIM_SoftwareUpdateHostedService.cpp0000644000175000017500000001150411401066772032251 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SoftwareUpdateHostedService.h" #include "OpenDRIM_SoftwareUpdateHostedServiceAccess.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_SoftwareUpdateHostedService& instance) { os << " [OpenDRIM_SoftwareUpdateHostedService]" << endl; ToStringRef("Antecedent", Antecedent, Antecedent_isNULL); ToStringRef("Dependent", Dependent, Dependent_isNULL); os << " [\\OpenDRIM_SoftwareUpdateHostedService]" << endl; return os; } int main() { string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_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 = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_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 = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_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 = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-softwareupdate-1.0.0~ppa/test/testOpenDRIM_SoftwareInstallationCapabilities.cpp0000644000175000017500000001174411401066772033320 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SoftwareInstallationCapabilities.h" #include "OpenDRIM_SoftwareInstallationCapabilitiesAccess.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_SoftwareInstallationCapabilities& instance) { os << " [OpenDRIM_SoftwareInstallationCapabilities]" << endl; ToStringRef("ManagedElement", ManagedElement, ManagedElement_isNULL); ToStringRef("Capabilities", Capabilities, Capabilities_isNULL); ToStringArrayInt("Characteristics", Characteristics, Characteristics_isNULL); os << " [\\OpenDRIM_SoftwareInstallationCapabilities]" << endl; return os; } int main() { string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_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 = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_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 = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_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 = SoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilities_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-softwareupdate-1.0.0~ppa/test/testOpenDRIM_SoftwareUpdateConformsToProfile.cpp0000644000175000017500000001163311401066772033117 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SoftwareUpdateConformsToProfile.h" #include "OpenDRIM_SoftwareUpdateConformsToProfileAccess.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_SoftwareUpdateConformsToProfile& instance) { os << " [OpenDRIM_SoftwareUpdateConformsToProfile]" << endl; ToStringRef("ConformantStandard", ConformantStandard, ConformantStandard_isNULL); ToStringRef("ManagedElement", ManagedElement, ManagedElement_isNULL); os << " [\\OpenDRIM_SoftwareUpdateConformsToProfile]" << endl; return os; } int main() { string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_load(NULL, errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } cout << endl << "[enumInstances]" << endl; vector instances; errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_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 = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_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 = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_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 = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_unload(errorMessage); if (errorCode != OK) { cout << "ERROR " << errorCode << ": " << errorMessage << endl; return -1; } return 0; } opendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_RegisteredSoftwareUpdateProfile/0000755000175000017500000000000011401066772030534 5ustar guillaumeguillaumeopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_RegisteredSoftwareUpdateProfile/Makefile.am0000644000175000017500000000443011401066772032571 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfileProvider.la libcmpiSoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfileProvider_la_SOURCES = OpenDRIM_RegisteredSoftwareUpdateProfileAccess.cpp OpenDRIM_RegisteredSoftwareUpdateProfileProvider.cpp cmpiOpenDRIM_RegisteredSoftwareUpdateProfile.cpp libcmpiSoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfileProvider_la_LIBADD = ../Common/libcmpiSoftwareUpdate_Common.la libcmpiSoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfileProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_RegisteredSoftwareUpdateProfile.h OpenDRIM_RegisteredSoftwareUpdateProfile.h OpenDRIM_RegisteredSoftwareUpdateProfileAccess.h ././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_RegisteredSoftwareUpdateProfile/cmpiOpenDRIM_RegisteredSoftwareUpdateProfile.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_RegisteredSoftwareUpdateProfile/cmpiOpenDRIM_Register0000644000175000017500000000471011401066772034553 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_REGISTEREDSOFTWAREUPDATEPROFILE_H_ #define CMPIOPENDRIM_REGISTEREDSOFTWAREUPDATEPROFILE_H_ #include "OpenDRIM_RegisteredSoftwareUpdateProfile.h" CMPIObjectPath* SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_RegisteredSoftwareUpdateProfile& instance); CMPIInstance* SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_RegisteredSoftwareUpdateProfile& instance); void SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_RegisteredSoftwareUpdateProfile& instance); void SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_RegisteredSoftwareUpdateProfile& instance); #endif /*CMPIOPENDRIM_REGISTEREDSOFTWAREUPDATEPROFILE_H_*/ ././@LongLink0000000000000000000000000000020200000000000011557 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_RegisteredSoftwareUpdateProfile/OpenDRIM_RegisteredSoftwareUpdateProfileAccess.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_RegisteredSoftwareUpdateProfile/OpenDRIM_RegisteredSo0000644000175000017500000001024211401066772034512 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_RegisteredSoftwareUpdateProfileAccess.h" const string instanceID="OpenDRIM:SoftwareUpdate:1.0.0"; int SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_load(const CMPIBroker* broker, string& errorMessage) { _E_; // TODO _L_; return OK; } int SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; OpenDRIM_RegisteredSoftwareUpdateProfile instance; instance.setInstanceID(instanceID); if (discriminant == "ei") CF_assert(SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_populate(instance, errorMessage)); result.push_back(instance); _L_; return OK; } int SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_RegisteredSoftwareUpdateProfile& instance, const char** properties, string& errorMessage) { _E_; if (instance.InstanceID!=instanceID) { errorMessage = "No instance"; return NOT_FOUND; } CF_assert(SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_populate(instance, errorMessage)); _L_; return OK; } int SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredSoftwareUpdateProfile& newInstance, const OpenDRIM_RegisteredSoftwareUpdateProfile& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredSoftwareUpdateProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredSoftwareUpdateProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_populate(OpenDRIM_RegisteredSoftwareUpdateProfile& instance, string& errorMessage) { _E_; vector AdvertiseTypes; instance.setRegisteredName("Software Update"); instance.setRegisteredVersion("1.0.0"); instance.setRegisteredOrganization(2); // DMTF AdvertiseTypes.push_back(2); // Not Advertised instance.setAdvertiseTypes(AdvertiseTypes); _L_; return OK; } ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_RegisteredSoftwareUpdateProfile/OpenDRIM_RegisteredSoftwareUpdateProfile.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_RegisteredSoftwareUpdateProfile/OpenDRIM_RegisteredSo0000644000175000017500000001374511401066772034525 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_REGISTEREDSOFTWAREUPDATEPROFILE_H_ #define OPENDRIM_REGISTEREDSOFTWAREUPDATEPROFILE_H_ #include const static char* OpenDRIM_RegisteredSoftwareUpdateProfile_classnames[] = {"OpenDRIM_RegisteredSoftwareUpdateProfile"}; static string OpenDRIM_RegisteredSoftwareUpdateProfile_NAMESPACE = _INTEROP_NAMESPACE; class OpenDRIM_RegisteredSoftwareUpdateProfile { 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_RegisteredSoftwareUpdateProfile() { 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_RegisteredSoftwareUpdateProfile() {} 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_REGISTEREDSOFTWAREUPDATEPROFILE_H_*/ ././@LongLink0000000000000000000000000000020000000000000011555 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_RegisteredSoftwareUpdateProfile/OpenDRIM_RegisteredSoftwareUpdateProfileAccess.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_RegisteredSoftwareUpdateProfile/OpenDRIM_RegisteredSo0000644000175000017500000000650011401066772034514 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_REGISTEREDSOFTWAREUPDATEPROFILEACCESS_H_ #define OPENDRIM_REGISTEREDSOFTWAREUPDATEPROFILEACCESS_H_ #include "SoftwareUpdate_Common.h" #include "OpenDRIM_RegisteredSoftwareUpdateProfile.h" int SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_load(const CMPIBroker* broker, string& errorMessage); int SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_unload(string& errorMessage); int SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_RegisteredSoftwareUpdateProfile& instance, const char** properties, string& errorMessage); int SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredSoftwareUpdateProfile& newInstance, const OpenDRIM_RegisteredSoftwareUpdateProfile& oldInstance, const char** properties, string& errorMessage); int SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredSoftwareUpdateProfile& instance, string& errorMessage); int SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_RegisteredSoftwareUpdateProfile& instance, string& errorMessage); int SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_populate(OpenDRIM_RegisteredSoftwareUpdateProfile& instance, string& errorMessage); #endif /*OPENDRIM_REGISTEREDSOFTWAREUPDATEPROFILEACCESS_H_*/ ././@LongLink0000000000000000000000000000020000000000000011555 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_RegisteredSoftwareUpdateProfile/cmpiOpenDRIM_RegisteredSoftwareUpdateProfile.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_RegisteredSoftwareUpdateProfile/cmpiOpenDRIM_Register0000644000175000017500000001204311401066772034551 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_RegisteredSoftwareUpdateProfile.h" CMPIObjectPath* SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_RegisteredSoftwareUpdateProfile& instance) { _E_; Objectpath op(broker, OpenDRIM_RegisteredSoftwareUpdateProfile_classnames[0], OpenDRIM_RegisteredSoftwareUpdateProfile_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_RegisteredSoftwareUpdateProfile& instance) { _E_; Objectpath op(broker, SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_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 SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_RegisteredSoftwareUpdateProfile& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_RegisteredSoftwareUpdateProfile& 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_; } ././@LongLink0000000000000000000000000000020400000000000011561 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_RegisteredSoftwareUpdateProfile/OpenDRIM_RegisteredSoftwareUpdateProfileProvider.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_RegisteredSoftwareUpdateProfile/OpenDRIM_RegisteredSo0000644000175000017500000003004711401066772034517 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_RegisteredSoftwareUpdateProfile.h" #include "OpenDRIM_RegisteredSoftwareUpdateProfileAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfileProviderSetInstance SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfileProviderModifyInstance #endif int SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_init(const CMPIBroker* broker); int SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfileProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfileProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredSoftwareUpdateProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfileProviderEnumInstances(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 = SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredSoftwareUpdateProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfileProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RegisteredSoftwareUpdateProfile instance; SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredSoftwareUpdateProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfileProviderSetInstance(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_RegisteredSoftwareUpdateProfile newInstance, oldInstance; SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_toCPP(_broker, ci, newInstance); SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredSoftwareUpdateProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredSoftwareUpdateProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfileProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RegisteredSoftwareUpdateProfile instance; SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_toCPP(_broker, ci, instance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_RegisteredSoftwareUpdateProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredSoftwareUpdateProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredSoftwareUpdateProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfileProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_RegisteredSoftwareUpdateProfile instance; SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredSoftwareUpdateProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_RegisteredSoftwareUpdateProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfileProviderExecQuery(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 SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_init FAILED: " + (string) OpenDRIM_RegisteredSoftwareUpdateProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_unload(errorMessage); if (errorCode != OK) { errorMessage += "SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_unload FAILED: " + (string) OpenDRIM_RegisteredSoftwareUpdateProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_INIT if (SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_init(_broker) < 0) return NULL CMInstanceMIStub(SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfileProvider, SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfileProvider, _broker, SoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfile_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-softwareupdate-1.0.0~ppa/acinclude.m40000644000175000017500000002117011401066772022775 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### AC_DEFUN([SHOW_COPYRIGHT], [ echo "################################################################################# # Linux Management Providers (LMP), SoftwareUpdate provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# " ] ) 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-softwareupdate-1.0.0~ppa/Common/0000755000175000017500000000000011401066772022033 5ustar guillaumeguillaumeopendrim-lmp-softwareupdate-1.0.0~ppa/Common/Makefile.am0000644000175000017500000000354211401066772024073 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### commonlibdir = @COMMONLIBDIR@ commonlib_LTLIBRARIES = libcmpiSoftwareUpdate_Common.la libcmpiSoftwareUpdate_Common_la_SOURCES = SoftwareUpdate_Common.cpp libcmpiSoftwareUpdate_Common_la_LDFLAGS = -avoid-version libcmpiSoftwareUpdate_Common_la_LIBADD = -lopendrim noinst_HEADERS = SoftwareUpdate_Common.h opendrim-lmp-softwareupdate-1.0.0~ppa/Common/SoftwareUpdate_Common.cpp0000644000175000017500000000371011401066772027005 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "SoftwareUpdate_Common.h" int CF_getSoftwareInstallationServiceName(string& Name, string& errorMessage) { string output; CF_assert(CF_runCommandFL("lsb_release -i | awk -F \" \" '{print $3;}';",output, errorMessage)); if(output == "Ubuntu" || output == "Debian") Name="apt"; else if(output.find("Fedora") == 0 || output.find("RedHat") == 0) Name="yum"; else Name.clear(); return OK; } opendrim-lmp-softwareupdate-1.0.0~ppa/Common/SoftwareUpdate_Common.h0000644000175000017500000000337511401066772026461 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef SOFTWAREUPDATE_COMMON_H_ #define SOFTWAREUPDATE_COMMON_H_ #include int CF_getSoftwareInstallationServiceName(string& Name, string& errorMessage); #endif /*SOFTWAREUPDATE_COMMON_H_*/ opendrim-lmp-softwareupdate-1.0.0~ppa/configure.ac0000644000175000017500000001275711401066772023105 0ustar guillaumeguillaume# Process this file with autoconf to produce a configure script. ############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### AC_PREREQ(2.59) AC_COPYRIGHT([[############################################################################### Note: This Copyright statement covers the OpenDRIM original parts of this file. It does NOT concern the parts generated by autoconf. Linux Management Providers (LMP), SoftwareUpdate provider package Copyright (C) 2009 Nazarov Nodir, TUIT This program is being developed under the "OpenDRIM" project. The "OpenDRIM" project web page: http://opendrim.sourceforge.net The "OpenDRIM" project mailing list: opendrim@googlegroups.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ###############################################################################]]) AC_INIT(SoftwareUpdate 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_ServiceAffectsSoftwareIdentity/Makefile OpenDRIM_SoftwareInstallationCapabilities/Makefile OpenDRIM_SoftwareUpdateHostedService/Makefile OpenDRIM_RegisteredSoftwareUpdateProfile/Makefile OpenDRIM_SoftwareInstallationServiceCapabilities/Makefile OpenDRIM_ServiceAffectsManagedElement/Makefile OpenDRIM_SoftwareUpdateConformsToProfile/Makefile OpenDRIM_SoftwareInstallationService/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-softwareupdate-1.0.0~ppa/TODO0000644000175000017500000000010111401066772021263 0ustar guillaumeguillaumeTODO for Major.Minor.Revision ========================= // TODO opendrim-lmp-softwareupdate-1.0.0~ppa/INSTALL0000644000175000017500000000370211401066772021636 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-softwareupdate-1.0.0~ppa/AUTHORS0000644000175000017500000000021211401066772021646 0ustar guillaumeguillaumeNodir Nazarov, TUIT Shakhrom RUSTAMOV,TUIT Guillaume BOTTEX opendrim-lmp-softwareupdate-1.0.0~ppa/packaging/0000755000175000017500000000000011401066772022527 5ustar guillaumeguillaumeopendrim-lmp-softwareupdate-1.0.0~ppa/packaging/opendrim-lmp-softwareupdate.spec0000644000175000017500000000523011401066772031041 0ustar guillaumeguillaume#%///////////////////////////////////////////////////////////////////////////// # # SoftwareUpdate RPM spec file # #%///////////////////////////////////////////////////////////////////////////// %define packageVersion 1 Version: %{version} Release: %{packageVersion}%{?dist} Vendor: OpenDRIM Summary: OpenDRIM SoftwareUpdate Provider Name: opendrim-lmp-softwareupdate 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 SoftwareUpdate %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-softwareupdate-1.0.0~ppa/packaging/debian/0000755000175000017500000000000011404355715023752 5ustar guillaumeguillaumeopendrim-lmp-softwareupdate-1.0.0~ppa/packaging/debian/postrm0000644000175000017500000000303711404355715025224 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_ServiceAffectsSoftwareIdentity rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_SoftwareInstallationCapabilities rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_SoftwareUpdateHostedService rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_RegisteredSoftwareUpdateProfile rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_SoftwareInstallationServiceCapabilities rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_ServiceAffectsManagedElement rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_SoftwareUpdateConformsToProfile rm -rf /var/lib/OpenDRIM/root/cimv2/OpenDRIM_SoftwareInstallationService ;; 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-softwareupdate-1.0.0~ppa/packaging/debian/source/0000755000175000017500000000000011401066772025251 5ustar guillaumeguillaumeopendrim-lmp-softwareupdate-1.0.0~ppa/packaging/debian/source/format0000644000175000017500000000001411401066772026457 0ustar guillaumeguillaume3.0 (quilt) opendrim-lmp-softwareupdate-1.0.0~ppa/packaging/debian/copyright0000644000175000017500000000312111401066772025701 0ustar guillaumeguillaumeThis package was debianized by Guillaume BOTTEX on Fri, 11 Dec 2009 16:23:36 +0900. It was downloaded from http://opendrim.sourceforge.net/ Upstream Authors: Nodir Nazarov Shakhrom RUSTAMOV Guillaume BOTTEX Copyright: Copyright (C) 2009 TUIT Nodir Nazarov Copyright (C) 2009 TUIT Shakhrom RUSTAMOV Copyright (C) 2009 ETRI Guillaume BOTTEX License: Linux Management Providers (LMP), Software Update provider package This program is being developed under the "OpenDRIM" project. The "OpenDRIM" project web page: http://opendrim.sourceforge.net The "OpenDRIM" project mailing list: opendrim@googlegroups.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. The Debian packaging is copyright 2009, Guillaume BOTTEX and is licensed under the GPL, see `/usr/share/common-licenses/GPL-2'. opendrim-lmp-softwareupdate-1.0.0~ppa/packaging/debian/control0000644000175000017500000000133011404355706025352 0ustar guillaumeguillaumeSource: opendrim-lmp-softwareupdate 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-softwareupdate Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, sfcb, libopendrim0 (>= 1.1.3), lsb-release Description: OpenDRIM Software Update provider Provides information about the computer system software update capabilities. . Compliant with the DMTF Software Update Profile v1.0.0 (DSP1025). opendrim-lmp-softwareupdate-1.0.0~ppa/packaging/debian/prerm0000644000175000017500000000244611401066772025027 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-softwareupdate VERSION=`cat /usr/share/doc/opendrim-lmp-softwareupdate/VERSION` OPENDRIM_REG_DIR=/usr/share/OpenDRIM PROVIDER_SCRIPT_POST=SoftwareUpdate $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-softwareupdate-1.0.0~ppa/packaging/debian/changelog0000644000175000017500000000025411404355673025630 0ustar guillaumeguillaumeopendrim-lmp-softwareupdate (1.0.0-0ubuntu1) lucid; urgency=low * Initial release -- Guillaume BOTTEX Fri, 11 Jun 2010 15:46:00 +0900 opendrim-lmp-softwareupdate-1.0.0~ppa/packaging/debian/postinst0000644000175000017500000000262311401066772025562 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-softwareupdate VERSION=`cat /usr/share/doc/opendrim-lmp-softwareupdate/VERSION` OPENDRIM_REG_DIR=/usr/share/OpenDRIM PROVIDER_SCRIPT_POST=SoftwareUpdate $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-softwareupdate-1.0.0~ppa/packaging/debian/install0000644000175000017500000000004711401066772025343 0ustar guillaumeguillaumeusr/lib/cmpi/*.so usr/share/OpenDRIM/* opendrim-lmp-softwareupdate-1.0.0~ppa/packaging/debian/rules0000755000175000017500000000357411401066772025042 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-softwareupdate 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-softwareupdate.sgml > opendrim-lmp-softwareupdate.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-softwareupdate-1.0.0~ppa/packaging/debian/docs0000644000175000017500000000003111401066772024616 0ustar guillaumeguillaumeNEWS README TODO VERSION opendrim-lmp-softwareupdate-1.0.0~ppa/packaging/debian/compat0000644000175000017500000000000211401066772025147 0ustar guillaumeguillaume5 opendrim-lmp-softwareupdate-1.0.0~ppa/mof/0000755000175000017500000000000011401066772021364 5ustar guillaumeguillaumeopendrim-lmp-softwareupdate-1.0.0~ppa/mof/OpenDRIM_SoftwareInstallationServiceCapabilities.mof0000644000175000017500000000343211401066772033535 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Software Update provider package // Copyright (C) 2009 Nazarov Nodir, TUIT // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Shakhrom RUSTAMOV, TUIT // Modified by 2009 Guillaume BOTTEX, ETRI //################################################################################ [Provider("cmpi:cmpiSoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilitiesProvider")] class OpenDRIM_SoftwareInstallationServiceCapabilities:CIM_SoftwareInstallationServiceCapabilities { }; opendrim-lmp-softwareupdate-1.0.0~ppa/mof/OpenDRIM_ServiceAffectsSoftwareIdentity.mof0000644000175000017500000000340411401066772031646 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Software Update provider package // Copyright (C) 2009 Nazarov Nodir, TUIT // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Shakhrom RUSTAMOV, TUIT // Modified by 2009 Guillaume BOTTEX, ETRI //################################################################################ [Association, Provider("cmpi:cmpiSoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProvider")] class OpenDRIM_ServiceAffectsSoftwareIdentity:CIM_ServiceAffectsElement { }; opendrim-lmp-softwareupdate-1.0.0~ppa/mof/OpenDRIM_SoftwareUpdateHostedService.mof0000644000175000017500000000336611401066772031161 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Software Update provider package // Copyright (C) 2009 Nazarov Nodir, TUIT // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Shakhrom RUSTAMOV, TUIT // Modified by 2009 Guillaume BOTTEX, ETRI //################################################################################ [Association, Provider("cmpi:cmpiSoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProvider")] class OpenDRIM_SoftwareUpdateHostedService:CIM_HostedService { }; opendrim-lmp-softwareupdate-1.0.0~ppa/mof/OpenDRIM_SoftwareInstallationCapabilities.mof0000644000175000017500000000340611401066772032215 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Software Update provider package // Copyright (C) 2009 Nazarov Nodir, TUIT // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Shakhrom RUSTAMOV, TUIT // Modified by 2009 Guillaume BOTTEX, ETRI //################################################################################ [Association, Provider("cmpi:cmpiSoftwareUpdate_OpenDRIM_SoftwareInstallationCapabilitiesProvider")] class OpenDRIM_SoftwareInstallationCapabilities:CIM_ElementCapabilities { }; opendrim-lmp-softwareupdate-1.0.0~ppa/mof/OpenDRIM_RegisteredSoftwareUpdateProfile.mof0000644000175000017500000000336411401066772032026 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Software Update provider package // Copyright (C) 2009 Nazarov Nodir, TUIT // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Shakhrom RUSTAMOV, TUIT // Modified by 2009 Guillaume BOTTEX, ETRI //################################################################################ [Provider("cmpi:cmpiSoftwareUpdate_OpenDRIM_RegisteredSoftwareUpdateProfileProvider")] class OpenDRIM_RegisteredSoftwareUpdateProfile:CIM_RegisteredProfile { }; opendrim-lmp-softwareupdate-1.0.0~ppa/mof/OpenDRIM_SoftwareInstallationService.mof0000644000175000017500000000336611401066772031231 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Software Update provider package // Copyright (C) 2009 Nazarov Nodir, TUIT // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Shakhrom RUSTAMOV, TUIT // Modified by 2009 Guillaume BOTTEX, ETRI //################################################################################ [Provider("cmpi:cmpiSoftwareUpdate_OpenDRIM_SoftwareInstallationServiceProvider")] class OpenDRIM_SoftwareInstallationService:CIM_SoftwareInstallationService { }; opendrim-lmp-softwareupdate-1.0.0~ppa/mof/OpenDRIM_SoftwareUpdateConformsToProfile.mof0000644000175000017500000000341111401066772032013 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Software Update provider package // Copyright (C) 2009 Nazarov Nodir, TUIT // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Shakhrom RUSTAMOV, TUIT // Modified by 2009 Guillaume BOTTEX, ETRI //################################################################################ [Association, Provider("cmpi:cmpiSoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProvider")] class OpenDRIM_SoftwareUpdateConformsToProfile:CIM_ElementConformsToProfile { }; opendrim-lmp-softwareupdate-1.0.0~ppa/mof/OpenDRIM_ServiceAffectsManagedElement.mof0000644000175000017500000000340011401066772031204 0ustar guillaumeguillaume//################################################################################ // Linux Management Providers (LMP), Software Update provider package // Copyright (C) 2009 Nazarov Nodir, TUIT // // This program is being developed under the "OpenDRIM" project. // The "OpenDRIM" project web page: http://opendrim.sourceforge.net // The "OpenDRIM" project mailing list: opendrim@googlegroups.com // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //################################################################################ //################################################################################ // To contributors, please leave your contact information in this section // AND comment your changes in the source code. // // Modified by 2009 Shakhrom RUSTAMOV, TUIT // Modified by 2009 Guillaume BOTTEX, ETRI //################################################################################ [Association, Provider("cmpi:cmpiSoftwareUpdate_OpenDRIM_ServiceAffectsManagedElementProvider")] class OpenDRIM_ServiceAffectsManagedElement:CIM_ServiceAffectsElement { }; opendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationService/0000755000175000017500000000000011401066772027735 5ustar guillaumeguillaumeopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationService/Makefile.am0000644000175000017500000000436011401066772031774 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSoftwareUpdate_OpenDRIM_SoftwareInstallationServiceProvider.la libcmpiSoftwareUpdate_OpenDRIM_SoftwareInstallationServiceProvider_la_SOURCES = OpenDRIM_SoftwareInstallationServiceAccess.cpp OpenDRIM_SoftwareInstallationServiceProvider.cpp cmpiOpenDRIM_SoftwareInstallationService.cpp libcmpiSoftwareUpdate_OpenDRIM_SoftwareInstallationServiceProvider_la_LIBADD = ../Common/libcmpiSoftwareUpdate_Common.la libcmpiSoftwareUpdate_OpenDRIM_SoftwareInstallationServiceProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_SoftwareInstallationService.h OpenDRIM_SoftwareInstallationService.h OpenDRIM_SoftwareInstallationServiceAccess.h ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationService/cmpiOpenDRIM_SoftwareInstallationService.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationService/cmpiOpenDRIM_SoftwareInst0000644000175000017500000003475411401066772034633 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SoftwareInstallationService.h" CMPIObjectPath* SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_SoftwareInstallationService& instance) { _E_; Objectpath op(broker, OpenDRIM_SoftwareInstallationService_classnames[0], OpenDRIM_SoftwareInstallationService_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* SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_SoftwareInstallationService& instance) { _E_; Objectpath op(broker, SoftwareUpdate_OpenDRIM_SoftwareInstallationService_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 SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_SoftwareInstallationService& 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 SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_SoftwareInstallationService& 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 SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_SoftwareInstallationService_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 SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_SoftwareInstallationService_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 SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_SoftwareInstallationService_CheckSoftwareIdentity_In& args) { _E_; CMPIStatus rc; CMPIData data; Objectpath Source; data = in->ft->getArg(in, "Source", &rc); if (rc.rc == OK) { CT_ToC(broker, data, Source); args.setSource(Source); } Objectpath Target; data = in->ft->getArg(in, "Target", &rc); if (rc.rc == OK) { CT_ToC(broker, data, Target); args.setTarget(Target); } Objectpath Collection; data = in->ft->getArg(in, "Collection", &rc); if (rc.rc == OK) { CT_ToC(broker, data, Collection); args.setCollection(Collection); } vector InstallCharacteristics; data = in->ft->getArg(in, "InstallCharacteristics", &rc); if (rc.rc == OK) { CT_ToC(data, InstallCharacteristics); args.setInstallCharacteristics(InstallCharacteristics); } _L_; } void SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_SoftwareInstallationService_CheckSoftwareIdentity_Out& args) { _E_; CMPIValue value; int errorMessage; vector InstallCharacteristics; errorMessage = args.getInstallCharacteristics(InstallCharacteristics); if (errorMessage == OK) { value = CT_toCMPI(broker, InstallCharacteristics); out->ft->addArg(out, "InstallCharacteristics", &value, CMPI_uint16A); } _L_; } void SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_SoftwareInstallationService_InstallFromSoftwareIdentity_In& args) { _E_; CMPIStatus rc; CMPIData data; Objectpath Job; data = in->ft->getArg(in, "Job", &rc); if (rc.rc == OK) { CT_ToC(broker, data, Job); args.setJob(Job); } vector InstallOptions; data = in->ft->getArg(in, "InstallOptions", &rc); if (rc.rc == OK) { CT_ToC(data, InstallOptions); args.setInstallOptions(InstallOptions); } vector InstallOptionsValues; data = in->ft->getArg(in, "InstallOptionsValues", &rc); if (rc.rc == OK) { CT_ToC(data, InstallOptionsValues); args.setInstallOptionsValues(InstallOptionsValues); } Objectpath Source; data = in->ft->getArg(in, "Source", &rc); if (rc.rc == OK) { CT_ToC(broker, data, Source); args.setSource(Source); } Objectpath Target; data = in->ft->getArg(in, "Target", &rc); if (rc.rc == OK) { CT_ToC(broker, data, Target); args.setTarget(Target); } Objectpath Collection; data = in->ft->getArg(in, "Collection", &rc); if (rc.rc == OK) { CT_ToC(broker, data, Collection); args.setCollection(Collection); } _L_; } void SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_SoftwareInstallationService_InstallFromSoftwareIdentity_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 SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_SoftwareInstallationService_InstallFromURI_In& args) { _E_; CMPIStatus rc; CMPIData data; Objectpath Job; data = in->ft->getArg(in, "Job", &rc); if (rc.rc == OK) { CT_ToC(broker, data, Job); args.setJob(Job); } string URI; data = in->ft->getArg(in, "URI", &rc); if (rc.rc == OK) { CT_ToC(data, URI); args.setURI(URI); } Objectpath Target; data = in->ft->getArg(in, "Target", &rc); if (rc.rc == OK) { CT_ToC(broker, data, Target); args.setTarget(Target); } vector InstallOptions; data = in->ft->getArg(in, "InstallOptions", &rc); if (rc.rc == OK) { CT_ToC(data, InstallOptions); args.setInstallOptions(InstallOptions); } vector InstallOptionsValues; data = in->ft->getArg(in, "InstallOptionsValues", &rc); if (rc.rc == OK) { CT_ToC(data, InstallOptionsValues); args.setInstallOptionsValues(InstallOptionsValues); } _L_; } void SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_SoftwareInstallationService_InstallFromURI_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_; } ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationService/OpenDRIM_SoftwareInstallationServiceAccess.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationService/OpenDRIM_SoftwareInstalla0000644000175000017500000001220311401066772034575 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SOFTWAREINSTALLATIONSERVICEACCESS_H_ #define OPENDRIM_SOFTWAREINSTALLATIONSERVICEACCESS_H_ #include "SoftwareUpdate_Common.h" #include "OpenDRIM_SoftwareInstallationService.h" int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_load(const CMPIBroker* broker, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_unload(string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_SoftwareInstallationService& instance, const char** properties, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationService& newInstance, const OpenDRIM_SoftwareInstallationService& oldInstance, const char** properties, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationService& instance, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationService& instance, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_RequestStateChange(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationService& instance, unsigned int& returnValue, const OpenDRIM_SoftwareInstallationService_RequestStateChange_In& in, OpenDRIM_SoftwareInstallationService_RequestStateChange_Out& out, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_StartService(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationService& instance, unsigned int& returnValue, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_StopService(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationService& instance, unsigned int& returnValue, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_CheckSoftwareIdentity(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationService& instance, unsigned int& returnValue, const OpenDRIM_SoftwareInstallationService_CheckSoftwareIdentity_In& in, OpenDRIM_SoftwareInstallationService_CheckSoftwareIdentity_Out& out, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_InstallFromSoftwareIdentity(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationService& instance, unsigned int& returnValue, const OpenDRIM_SoftwareInstallationService_InstallFromSoftwareIdentity_In& in, OpenDRIM_SoftwareInstallationService_InstallFromSoftwareIdentity_Out& out, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_InstallFromURI(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationService& instance, unsigned int& returnValue, const OpenDRIM_SoftwareInstallationService_InstallFromURI_In& in, OpenDRIM_SoftwareInstallationService_InstallFromURI_Out& out, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_populate(OpenDRIM_SoftwareInstallationService& instance, string& errorMessage); #endif /*OPENDRIM_SOFTWAREINSTALLATIONSERVICEACCESS_H_*/ ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationService/OpenDRIM_SoftwareInstallationServiceAccess.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationService/OpenDRIM_SoftwareInstalla0000644000175000017500000001535311401066772034606 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_SoftwareInstallationServiceAccess.h" const string systemCreationClassName = "OpenDRIM_ComputerSystem"; const string creationClassName = "OpenDRIM_SoftwareUpdate"; string systemName; string Name; int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_load(const CMPIBroker* broker, string& errorMessage) { _E_; CF_assert(CF_getSystemName(systemName, errorMessage)); CF_assert(CF_getSoftwareInstallationServiceName(Name,errorMessage)); _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; if(Name.empty()) return OK; OpenDRIM_SoftwareInstallationService instance; instance.setSystemCreationClassName(systemCreationClassName); instance.setCreationClassName(creationClassName); instance.setSystemName(systemName); instance.setName(Name); if(discriminant == "ei") CF_assert(SoftwareUpdate_OpenDRIM_SoftwareInstallationService_populate(instance, errorMessage)); result.push_back(instance); _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_SoftwareInstallationService& instance, const char** properties, string& errorMessage) { _E_; if (instance.SystemCreationClassName != systemCreationClassName || instance.CreationClassName != creationClassName || instance.SystemName != systemName || instance.Name != Name) { errorMessage = "No instance"; return NOT_FOUND; } CF_assert(SoftwareUpdate_OpenDRIM_SoftwareInstallationService_populate(instance,errorMessage)); _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationService& newInstance, const OpenDRIM_SoftwareInstallationService& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationService& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationService& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_RequestStateChange(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationService& instance, unsigned int& returnValue, const OpenDRIM_SoftwareInstallationService_RequestStateChange_In& in, OpenDRIM_SoftwareInstallationService_RequestStateChange_Out& out, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_StartService(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationService& instance, unsigned int& returnValue, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_StopService(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationService& instance, unsigned int& returnValue, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_CheckSoftwareIdentity(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationService& instance, unsigned int& returnValue, const OpenDRIM_SoftwareInstallationService_CheckSoftwareIdentity_In& in, OpenDRIM_SoftwareInstallationService_CheckSoftwareIdentity_Out& out, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_InstallFromSoftwareIdentity(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationService& instance, unsigned int& returnValue, const OpenDRIM_SoftwareInstallationService_InstallFromSoftwareIdentity_In& in, OpenDRIM_SoftwareInstallationService_InstallFromSoftwareIdentity_Out& out, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_InstallFromURI(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationService& instance, unsigned int& returnValue, const OpenDRIM_SoftwareInstallationService_InstallFromURI_In& in, OpenDRIM_SoftwareInstallationService_InstallFromURI_Out& out, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_populate(OpenDRIM_SoftwareInstallationService& instance, string& errorMessage) { _E_; /* * Properties to fill from profile * + Mandatory: * [X] SystemCreationClassName [KEY] * [X] SystemName [KEY] * [X] CreationClassName [KEY] * [X] Name [KEY] */ // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationService/cmpiOpenDRIM_SoftwareInstallationService.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationService/cmpiOpenDRIM_SoftwareInst0000644000175000017500000000751011401066772034621 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_SOFTWAREINSTALLATIONSERVICE_H_ #define CMPIOPENDRIM_SOFTWAREINSTALLATIONSERVICE_H_ #include "OpenDRIM_SoftwareInstallationService.h" CMPIObjectPath* SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_SoftwareInstallationService& instance); CMPIInstance* SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_SoftwareInstallationService& instance); void SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_SoftwareInstallationService& instance); void SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_SoftwareInstallationService& instance); void SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_SoftwareInstallationService_RequestStateChange_In& args); void SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_SoftwareInstallationService_RequestStateChange_Out& args); void SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_SoftwareInstallationService_CheckSoftwareIdentity_In& args); void SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_SoftwareInstallationService_CheckSoftwareIdentity_Out& args); void SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_SoftwareInstallationService_InstallFromSoftwareIdentity_In& args); void SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_SoftwareInstallationService_InstallFromSoftwareIdentity_Out& args); void SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_SoftwareInstallationService_InstallFromURI_In& args); void SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_SoftwareInstallationService_InstallFromURI_Out& args); #endif /*CMPIOPENDRIM_SOFTWAREINSTALLATIONSERVICE_H_*/ ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationService/OpenDRIM_SoftwareInstallationService.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationService/OpenDRIM_SoftwareInstalla0000644000175000017500000005307511401066772034611 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SOFTWAREINSTALLATIONSERVICE_H_ #define OPENDRIM_SOFTWAREINSTALLATIONSERVICE_H_ #include const static char* OpenDRIM_SoftwareInstallationService_classnames[] = {"OpenDRIM_SoftwareInstallationService"}; static string OpenDRIM_SoftwareInstallationService_NAMESPACE = _NAMESPACE; class OpenDRIM_SoftwareInstallationService { 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_SoftwareInstallationService() { 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_SoftwareInstallationService() {} 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_SoftwareInstallationService_RequestStateChange_In { public: unsigned short RequestedState; bool RequestedState_isNULL; Objectpath Job; bool Job_isNULL; string TimeoutPeriod; bool TimeoutPeriod_isNULL; OpenDRIM_SoftwareInstallationService_RequestStateChange_In() { RequestedState_isNULL = true; Job_isNULL = true; TimeoutPeriod_isNULL = true; } ~OpenDRIM_SoftwareInstallationService_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_SoftwareInstallationService_RequestStateChange_Out { public: Objectpath Job; bool Job_isNULL; OpenDRIM_SoftwareInstallationService_RequestStateChange_Out() { Job_isNULL = true; } ~OpenDRIM_SoftwareInstallationService_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_SoftwareInstallationService_CheckSoftwareIdentity_In { public: Objectpath Source; bool Source_isNULL; Objectpath Target; bool Target_isNULL; Objectpath Collection; bool Collection_isNULL; vector InstallCharacteristics; bool InstallCharacteristics_isNULL; OpenDRIM_SoftwareInstallationService_CheckSoftwareIdentity_In() { Source_isNULL = true; Target_isNULL = true; Collection_isNULL = true; InstallCharacteristics_isNULL = true; } ~OpenDRIM_SoftwareInstallationService_CheckSoftwareIdentity_In() {} int getSource(Objectpath& value) const { if (Source_isNULL == true) return NOT_FOUND; value = Source; return OK; } int setSource(const Objectpath& newValue) { Source = newValue; Source_isNULL = false; return OK; } int getTarget(Objectpath& value) const { if (Target_isNULL == true) return NOT_FOUND; value = Target; return OK; } int setTarget(const Objectpath& newValue) { Target = newValue; Target_isNULL = false; return OK; } int getCollection(Objectpath& value) const { if (Collection_isNULL == true) return NOT_FOUND; value = Collection; return OK; } int setCollection(const Objectpath& newValue) { Collection = newValue; Collection_isNULL = false; return OK; } int getInstallCharacteristics(vector& value) const { if (InstallCharacteristics_isNULL == true) return NOT_FOUND; value = InstallCharacteristics; return OK; } int setInstallCharacteristics(const vector& newValue) { InstallCharacteristics = newValue; InstallCharacteristics_isNULL = false; return OK; } }; class OpenDRIM_SoftwareInstallationService_CheckSoftwareIdentity_Out { public: vector InstallCharacteristics; bool InstallCharacteristics_isNULL; OpenDRIM_SoftwareInstallationService_CheckSoftwareIdentity_Out() { InstallCharacteristics_isNULL = true; } ~OpenDRIM_SoftwareInstallationService_CheckSoftwareIdentity_Out() {} int getInstallCharacteristics(vector& value) const { if (InstallCharacteristics_isNULL == true) return NOT_FOUND; value = InstallCharacteristics; return OK; } int setInstallCharacteristics(const vector& newValue) { InstallCharacteristics = newValue; InstallCharacteristics_isNULL = false; return OK; } }; class OpenDRIM_SoftwareInstallationService_InstallFromSoftwareIdentity_In { public: Objectpath Job; bool Job_isNULL; vector InstallOptions; bool InstallOptions_isNULL; vector InstallOptionsValues; bool InstallOptionsValues_isNULL; Objectpath Source; bool Source_isNULL; Objectpath Target; bool Target_isNULL; Objectpath Collection; bool Collection_isNULL; OpenDRIM_SoftwareInstallationService_InstallFromSoftwareIdentity_In() { Job_isNULL = true; InstallOptions_isNULL = true; InstallOptionsValues_isNULL = true; Source_isNULL = true; Target_isNULL = true; Collection_isNULL = true; } ~OpenDRIM_SoftwareInstallationService_InstallFromSoftwareIdentity_In() {} 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 getInstallOptions(vector& value) const { if (InstallOptions_isNULL == true) return NOT_FOUND; value = InstallOptions; return OK; } int setInstallOptions(const vector& newValue) { InstallOptions = newValue; InstallOptions_isNULL = false; return OK; } int getInstallOptionsValues(vector& value) const { if (InstallOptionsValues_isNULL == true) return NOT_FOUND; value = InstallOptionsValues; return OK; } int setInstallOptionsValues(const vector& newValue) { InstallOptionsValues = newValue; InstallOptionsValues_isNULL = false; return OK; } int getSource(Objectpath& value) const { if (Source_isNULL == true) return NOT_FOUND; value = Source; return OK; } int setSource(const Objectpath& newValue) { Source = newValue; Source_isNULL = false; return OK; } int getTarget(Objectpath& value) const { if (Target_isNULL == true) return NOT_FOUND; value = Target; return OK; } int setTarget(const Objectpath& newValue) { Target = newValue; Target_isNULL = false; return OK; } int getCollection(Objectpath& value) const { if (Collection_isNULL == true) return NOT_FOUND; value = Collection; return OK; } int setCollection(const Objectpath& newValue) { Collection = newValue; Collection_isNULL = false; return OK; } }; class OpenDRIM_SoftwareInstallationService_InstallFromSoftwareIdentity_Out { public: Objectpath Job; bool Job_isNULL; OpenDRIM_SoftwareInstallationService_InstallFromSoftwareIdentity_Out() { Job_isNULL = true; } ~OpenDRIM_SoftwareInstallationService_InstallFromSoftwareIdentity_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_SoftwareInstallationService_InstallFromURI_In { public: Objectpath Job; bool Job_isNULL; string URI; bool URI_isNULL; Objectpath Target; bool Target_isNULL; vector InstallOptions; bool InstallOptions_isNULL; vector InstallOptionsValues; bool InstallOptionsValues_isNULL; OpenDRIM_SoftwareInstallationService_InstallFromURI_In() { Job_isNULL = true; URI_isNULL = true; Target_isNULL = true; InstallOptions_isNULL = true; InstallOptionsValues_isNULL = true; } ~OpenDRIM_SoftwareInstallationService_InstallFromURI_In() {} 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 getURI(string& value) const { if (URI_isNULL == true) return NOT_FOUND; value = URI; return OK; } int setURI(const string& newValue) { URI = newValue; URI_isNULL = false; return OK; } int getTarget(Objectpath& value) const { if (Target_isNULL == true) return NOT_FOUND; value = Target; return OK; } int setTarget(const Objectpath& newValue) { Target = newValue; Target_isNULL = false; return OK; } int getInstallOptions(vector& value) const { if (InstallOptions_isNULL == true) return NOT_FOUND; value = InstallOptions; return OK; } int setInstallOptions(const vector& newValue) { InstallOptions = newValue; InstallOptions_isNULL = false; return OK; } int getInstallOptionsValues(vector& value) const { if (InstallOptionsValues_isNULL == true) return NOT_FOUND; value = InstallOptionsValues; return OK; } int setInstallOptionsValues(const vector& newValue) { InstallOptionsValues = newValue; InstallOptionsValues_isNULL = false; return OK; } }; class OpenDRIM_SoftwareInstallationService_InstallFromURI_Out { public: Objectpath Job; bool Job_isNULL; OpenDRIM_SoftwareInstallationService_InstallFromURI_Out() { Job_isNULL = true; } ~OpenDRIM_SoftwareInstallationService_InstallFromURI_Out() {} int getJob(Objectpath& value) const { if (Job_isNULL == true) return NOT_FOUND; value = Job; return OK; } int setJob(const Objectpath& newValue) { Job = newValue; Job_isNULL = false; return OK; } }; #endif /*OPENDRIM_SOFTWAREINSTALLATIONSERVICE_H_*/ ././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationService/OpenDRIM_SoftwareInstallationServiceProvider.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationService/OpenDRIM_SoftwareInstalla0000644000175000017500000004471211401066772034607 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SoftwareInstallationService.h" #include "OpenDRIM_SoftwareInstallationServiceAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceProviderSetInstance SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceProviderModifyInstance #endif int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_init(const CMPIBroker* broker); int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceProviderEnumInstances(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 = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareInstallationService instance; SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceProviderSetInstance(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_SoftwareInstallationService newInstance, oldInstance; SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCPP(_broker, ci, newInstance); SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareInstallationService instance; SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCPP(_broker, ci, instance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_SoftwareInstallationService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareInstallationService instance; SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceProviderExecQuery(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 SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceProviderMethodCleanup(CMPIMethodMI * mi, const CMPIContext * ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceProviderInvokeMethod(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_SoftwareInstallationService instance; SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCPP(_broker, ref, instance); string errorMessage; const char* properties[] = {"SystemCreationClassName", "Name", "SystemName", "CreationClassName"}; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } if ((string) methodName =="RequestStateChange") { unsigned int returnValue; OpenDRIM_SoftwareInstallationService_RequestStateChange_In inArgs; SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCPP(_broker, in, inArgs); OpenDRIM_SoftwareInstallationService_RequestStateChange_Out outArgs; errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_RequestStateChange(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else if ((string) methodName =="StartService") { unsigned int returnValue; errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_StartService(_broker, ctx, instance, returnValue, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationService_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 = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_StopService(_broker, ctx, instance, returnValue, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationService_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 =="CheckSoftwareIdentity") { unsigned int returnValue; OpenDRIM_SoftwareInstallationService_CheckSoftwareIdentity_In inArgs; SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCPP(_broker, in, inArgs); OpenDRIM_SoftwareInstallationService_CheckSoftwareIdentity_Out outArgs; errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_CheckSoftwareIdentity(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else if ((string) methodName =="InstallFromSoftwareIdentity") { unsigned int returnValue; OpenDRIM_SoftwareInstallationService_InstallFromSoftwareIdentity_In inArgs; SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCPP(_broker, in, inArgs); OpenDRIM_SoftwareInstallationService_InstallFromSoftwareIdentity_Out outArgs; errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_InstallFromSoftwareIdentity(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else if ((string) methodName =="InstallFromURI") { unsigned int returnValue; OpenDRIM_SoftwareInstallationService_InstallFromURI_In inArgs; SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCPP(_broker, in, inArgs); OpenDRIM_SoftwareInstallationService_InstallFromURI_Out outArgs; errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_InstallFromURI(_broker, ctx, instance, returnValue, inArgs, outArgs, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } SoftwareUpdate_OpenDRIM_SoftwareInstallationService_toCMPIArg(_broker, out, outArgs); CMPIValue value = CT_toCMPI(returnValue); CMReturnData(rslt, &value.uint32, CMPI_uint32); } else { errorMessage = (string) OpenDRIM_SoftwareInstallationService_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 SoftwareUpdate_OpenDRIM_SoftwareInstallationService_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "SoftwareUpdate_OpenDRIM_SoftwareInstallationService_init FAILED: " + (string) OpenDRIM_SoftwareInstallationService_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationService_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationService_unload(errorMessage); if (errorCode != OK) { errorMessage += "SoftwareUpdate_OpenDRIM_SoftwareInstallationService_unload FAILED: " + (string) OpenDRIM_SoftwareInstallationService_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define SoftwareUpdate_OpenDRIM_SoftwareInstallationService_INIT if (SoftwareUpdate_OpenDRIM_SoftwareInstallationService_init(_broker) < 0) return NULL CMInstanceMIStub(SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceProvider, SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceProvider, _broker, SoftwareUpdate_OpenDRIM_SoftwareInstallationService_INIT); CMMethodMIStub(SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceProvider, SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceProvider, _broker, SoftwareUpdate_OpenDRIM_SoftwareInstallationService_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ opendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateConformsToProfile/0000755000175000017500000000000011401066772030530 5ustar guillaumeguillaumeopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateConformsToProfile/Makefile.am0000644000175000017500000000534111401066772032567 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProvider.la libcmpiSoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProvider_la_SOURCES = OpenDRIM_SoftwareUpdateConformsToProfileAccess.cpp OpenDRIM_SoftwareUpdateConformsToProfileProvider.cpp cmpiOpenDRIM_SoftwareUpdateConformsToProfile.cpp assocOpenDRIM_SoftwareUpdateConformsToProfile.cpp # May have to be adjusted for direct invocation libcmpiSoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProvider_la_CPPFLAGS = -I../CIM_RegisteredProfile -I../CIM_ManagedElement # Uncomment the end for direct invocation, may have to be adjusted libcmpiSoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProvider_la_LIBADD = ../Common/libcmpiSoftwareUpdate_Common.la #../CIM_RegisteredProfile/libcmpiSoftwareUpdate_CIM_RegisteredProfileProvider.la ../CIM_ManagedElement/libcmpiSoftwareUpdate_CIM_ManagedElementProvider.la libcmpiSoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_SoftwareUpdateConformsToProfile.h OpenDRIM_SoftwareUpdateConformsToProfile.h OpenDRIM_SoftwareUpdateConformsToProfileAccess.h ././@LongLink0000000000000000000000000000020100000000000011556 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateConformsToProfile/assocOpenDRIM_SoftwareUpdateConformsToProfile.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateConformsToProfile/assocOpenDRIM_Softwar0000644000175000017500000002220111401066772034563 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "assocOpenDRIM_SoftwareUpdateConformsToProfile.h" int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_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 = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_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(SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_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(SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_associatorManagedElementToConformantStandard(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_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(SoftwareUpdate_CIM_RegisteredProfile_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareUpdate_CIM_RegisteredProfile_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareUpdate_CIM_RegisteredProfile_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_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; SoftwareUpdate_CIM_RegisteredProfile_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareUpdate_CIM_RegisteredProfile_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareUpdate_CIM_RegisteredProfile_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_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(SoftwareUpdate_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareUpdate_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareUpdate_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_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; SoftwareUpdate_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareUpdate_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareUpdate_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000017700000000000011572 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateConformsToProfile/assocOpenDRIM_SoftwareUpdateConformsToProfile.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateConformsToProfile/assocOpenDRIM_Softwar0000644000175000017500000000657411401066772034602 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ASSOCOPENDRIM_SOFTWAREUPDATECONFORMSTOPROFILE_H_ #define ASSOCOPENDRIM_SOFTWAREUPDATECONFORMSTOPROFILE_H_ #include "OpenDRIM_SoftwareUpdateConformsToProfileAccess.h" int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_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 SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_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 SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_enumerateConformantStandards(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_getConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_enumerateManagedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_getManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_SOFTWAREUPDATECONFORMSTOPROFILE_H_*/ ././@LongLink0000000000000000000000000000020400000000000011561 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateConformsToProfile/OpenDRIM_SoftwareUpdateConformsToProfileProvider.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateConformsToProfile/OpenDRIM_SoftwareUpda0000644000175000017500000004513311401066772034522 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SoftwareUpdateConformsToProfile.h" #include "OpenDRIM_SoftwareUpdateConformsToProfileAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProviderSetInstance SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProviderModifyInstance #endif int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_init(const CMPIBroker* broker); int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProviderEnumInstances(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 = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareUpdateConformsToProfile instance; SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProviderSetInstance(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_SoftwareUpdateConformsToProfile newInstance, oldInstance; SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_toCPP(_broker, ci, newInstance); SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareUpdateConformsToProfile instance; SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_toCPP(_broker, ci, instance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_SoftwareUpdateConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareUpdateConformsToProfile instance; SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProviderExecQuery(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 SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProviderAssociatorNames(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 = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateConformsToProfile_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 SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProviderAssociators(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 = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateConformsToProfile_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 SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProviderReferenceNames(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 = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_referenceConformantStandardToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_referenceManagedElementToConformantStandard(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProviderReferences(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 = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_referenceConformantStandardToManagedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_referenceManagedElementToConformantStandard(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateConformsToProfile_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_init FAILED: " + (string) OpenDRIM_SoftwareUpdateConformsToProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_unload(errorMessage); if (errorCode != OK) { errorMessage += "SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_unload FAILED: " + (string) OpenDRIM_SoftwareUpdateConformsToProfile_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_INIT if (SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_init(_broker) < 0) return NULL CMInstanceMIStub(SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProvider, SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProvider, _broker, SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_INIT); CMAssociationMIStub(SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProvider, SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfileProvider, _broker, SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000020000000000000011555 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateConformsToProfile/OpenDRIM_SoftwareUpdateConformsToProfileAccess.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateConformsToProfile/OpenDRIM_SoftwareUpda0000644000175000017500000001155111401066772034517 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SOFTWAREUPDATECONFORMSTOPROFILEACCESS_H_ #define OPENDRIM_SOFTWAREUPDATECONFORMSTOPROFILEACCESS_H_ #include "SoftwareUpdate_Common.h" #include "OpenDRIM_SoftwareUpdateConformsToProfile.h" #include "assocOpenDRIM_SoftwareUpdateConformsToProfile.h" int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_load(const CMPIBroker* broker, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_unload(string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_SoftwareUpdateConformsToProfile& instance, const char** properties, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareUpdateConformsToProfile& newInstance, const OpenDRIM_SoftwareUpdateConformsToProfile& oldInstance, const char** properties, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareUpdateConformsToProfile& instance, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareUpdateConformsToProfile& instance, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_associatorConformantStandardToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ConformantStandard_instance, const char** properties, vector& ManagedElement_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_associatorManagedElementToConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const char** properties, vector& ConformantStandard_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_referenceConformantStandardToManagedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ConformantStandard_instance, const vector& ManagedElement_instances, vector& OpenDRIM_SoftwareUpdateConformsToProfile_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_referenceManagedElementToConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& ConformantStandard_instances, vector& OpenDRIM_SoftwareUpdateConformsToProfile_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_populate(OpenDRIM_SoftwareUpdateConformsToProfile& instance, string& errorMessage); #endif /*OPENDRIM_SOFTWAREUPDATECONFORMSTOPROFILEACCESS_H_*/ ././@LongLink0000000000000000000000000000020200000000000011557 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateConformsToProfile/OpenDRIM_SoftwareUpdateConformsToProfileAccess.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateConformsToProfile/OpenDRIM_SoftwareUpda0000644000175000017500000002665611401066772034533 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_SoftwareUpdateConformsToProfileAccess.h" int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareUpdate_CIM_RegisteredProfile_load(broker, errorMessage)); CF_assert(SoftwareUpdate_CIM_ManagedElement_load(broker, errorMessage)); */ // TODO _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareUpdate_CIM_RegisteredProfile_unload(errorMessage)); CF_assert(SoftwareUpdate_CIM_ManagedElement_unload(errorMessage)); */ // TODO _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_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 SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_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(SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_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(SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_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; SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_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(SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_referenceConformantStandardToManagedElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_SoftwareUpdateConformsToProfile& 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(SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_getConformantStandard(broker, ctx, ConformantStandard_objectpath, ConformantStandard_instance, NULL, errorMessage)); Objectpath ManagedElement_objectpath; instance.getManagedElement(ManagedElement_objectpath); Instance ManagedElement_instance; CF_assert(SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_getManagedElement(broker, ctx, ManagedElement_objectpath, ManagedElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_isAssociated(ConformantStandard_instance, ManagedElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareUpdateConformsToProfile& newInstance, const OpenDRIM_SoftwareUpdateConformsToProfile& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareUpdateConformsToProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareUpdateConformsToProfile& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_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(SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_enumerateManagedElements(broker, ctx, ManagedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_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(SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_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(SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_enumerateConformantStandards(broker, ctx, ConformantStandard_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_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(SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_enumerateConformantStandards(broker, ctx, ConformantStandard_instances, properties, false, errorMessage)); } for (size_t i=0; i& ManagedElement_instances, vector& OpenDRIM_SoftwareUpdateConformsToProfile_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_SoftwareUpdateConformsToProfile instance; instance.setConformantStandard(((Instance) ConformantStandard_instance).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instances[i]).getObjectpath()); OpenDRIM_SoftwareUpdateConformsToProfile_instances.push_back(instance); } _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_referenceManagedElementToConformantStandard(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& ManagedElement_instance, const vector& ConformantStandard_instances, vector& OpenDRIM_SoftwareUpdateConformsToProfile_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_SoftwareUpdateConformsToProfile instance; instance.setConformantStandard(((Instance) ConformantStandard_instances[i]).getObjectpath()); instance.setManagedElement(((Instance) ManagedElement_instance).getObjectpath()); OpenDRIM_SoftwareUpdateConformsToProfile_instances.push_back(instance); } _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_populate(OpenDRIM_SoftwareUpdateConformsToProfile& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateConformsToProfile/OpenDRIM_SoftwareUpdateConformsToProfile.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateConformsToProfile/OpenDRIM_SoftwareUpda0000644000175000017500000000751711401066772034526 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SOFTWAREUPDATECONFORMSTOPROFILE_H_ #define OPENDRIM_SOFTWAREUPDATECONFORMSTOPROFILE_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_SoftwareUpdateConformsToProfile_classnames[] = {"OpenDRIM_SoftwareUpdateConformsToProfile"}; static string OpenDRIM_SoftwareUpdateConformsToProfile_NAMESPACE = _INTEROP_NAMESPACE; const static string ConformantStandard_role = "ConformantStandard"; const static char* ConformantStandard_classnames[] = {"OpenDRIM_RegisteredSoftwareUpdateProfile"}; const static string ConformantStandard_NAMESPACE = _INTEROP_NAMESPACE; const static string ManagedElement_role = "ManagedElement"; const static char* ManagedElement_classnames[] = {"OpenDRIM_SoftwareInstallationService"}; const static string ManagedElement_NAMESPACE = _NAMESPACE; class OpenDRIM_SoftwareUpdateConformsToProfile { public: Objectpath ConformantStandard; bool ConformantStandard_isNULL; Objectpath ManagedElement; bool ManagedElement_isNULL; OpenDRIM_SoftwareUpdateConformsToProfile() { ConformantStandard_isNULL = true; ManagedElement_isNULL = true; } ~OpenDRIM_SoftwareUpdateConformsToProfile() {} 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_SOFTWAREUPDATECONFORMSTOPROFILE_H_*/ ././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateConformsToProfile/cmpiOpenDRIM_SoftwareUpdateConformsToProfile.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateConformsToProfile/cmpiOpenDRIM_Software0000644000175000017500000000471011401066772034555 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_SOFTWAREUPDATECONFORMSTOPROFILE_H_ #define CMPIOPENDRIM_SOFTWAREUPDATECONFORMSTOPROFILE_H_ #include "OpenDRIM_SoftwareUpdateConformsToProfile.h" CMPIObjectPath* SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_SoftwareUpdateConformsToProfile& instance); CMPIInstance* SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_SoftwareUpdateConformsToProfile& instance); void SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_SoftwareUpdateConformsToProfile& instance); void SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_SoftwareUpdateConformsToProfile& instance); #endif /*CMPIOPENDRIM_SOFTWAREUPDATECONFORMSTOPROFILE_H_*/ ././@LongLink0000000000000000000000000000020000000000000011555 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateConformsToProfile/cmpiOpenDRIM_SoftwareUpdateConformsToProfile.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateConformsToProfile/cmpiOpenDRIM_Software0000644000175000017500000000662611401066772034565 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SoftwareUpdateConformsToProfile.h" CMPIObjectPath* SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_SoftwareUpdateConformsToProfile& instance) { _E_; Objectpath op(broker, OpenDRIM_SoftwareUpdateConformsToProfile_classnames[0], OpenDRIM_SoftwareUpdateConformsToProfile_NAMESPACE); if (!instance.ConformantStandard_isNULL) op.addKey("ConformantStandard", instance.ConformantStandard); if (!instance.ManagedElement_isNULL) op.addKey("ManagedElement", instance.ManagedElement); _L_; return op.getHdl(); } CMPIInstance* SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_SoftwareUpdateConformsToProfile& instance) { _E_; Objectpath op(broker, SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_SoftwareUpdateConformsToProfile& 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 SoftwareUpdate_OpenDRIM_SoftwareUpdateConformsToProfile_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_SoftwareUpdateConformsToProfile& 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_; } opendrim-lmp-softwareupdate-1.0.0~ppa/COPYING0000644000175000017500000004310311401066772021637 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-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsSoftwareIdentity/0000755000175000017500000000000011401066772030361 5ustar guillaumeguillaumeopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsSoftwareIdentity/Makefile.am0000644000175000017500000000526711401066772032427 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProvider.la libcmpiSoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProvider_la_SOURCES = OpenDRIM_ServiceAffectsSoftwareIdentityAccess.cpp OpenDRIM_ServiceAffectsSoftwareIdentityProvider.cpp cmpiOpenDRIM_ServiceAffectsSoftwareIdentity.cpp assocOpenDRIM_ServiceAffectsSoftwareIdentity.cpp # May have to be adjusted for direct invocation libcmpiSoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProvider_la_CPPFLAGS = -I../CIM_ManagedElement -I../CIM_Service # Uncomment the end for direct invocation, may have to be adjusted libcmpiSoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProvider_la_LIBADD = ../Common/libcmpiSoftwareUpdate_Common.la #../CIM_ManagedElement/libcmpiSoftwareUpdate_CIM_ManagedElementProvider.la ../CIM_Service/libcmpiSoftwareUpdate_CIM_ServiceProvider.la libcmpiSoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_ServiceAffectsSoftwareIdentity.h OpenDRIM_ServiceAffectsSoftwareIdentity.h OpenDRIM_ServiceAffectsSoftwareIdentityAccess.h ././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsSoftwareIdentity/OpenDRIM_ServiceAffectsSoftwareIdentityAccess.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsSoftwareIdentity/OpenDRIM_ServiceAffect0000644000175000017500000001150511401066772034454 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SERVICEAFFECTSSOFTWAREIDENTITYACCESS_H_ #define OPENDRIM_SERVICEAFFECTSSOFTWAREIDENTITYACCESS_H_ #include "SoftwareUpdate_Common.h" #include "OpenDRIM_ServiceAffectsSoftwareIdentity.h" #include "assocOpenDRIM_ServiceAffectsSoftwareIdentity.h" int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_load(const CMPIBroker* broker, string& errorMessage); int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_unload(string& errorMessage); int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_ServiceAffectsSoftwareIdentity& instance, const char** properties, string& errorMessage); int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsSoftwareIdentity& newInstance, const OpenDRIM_ServiceAffectsSoftwareIdentity& oldInstance, const char** properties, string& errorMessage); int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsSoftwareIdentity& instance, string& errorMessage); int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsSoftwareIdentity& instance, string& errorMessage); int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_associatorAffectedElementToAffectingElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectedElement_instance, const char** properties, vector& AffectingElement_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_associatorAffectingElementToAffectedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectingElement_instance, const char** properties, vector& AffectedElement_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_referenceAffectedElementToAffectingElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectedElement_instance, const vector& AffectingElement_instances, vector& OpenDRIM_ServiceAffectsSoftwareIdentity_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_referenceAffectingElementToAffectedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectingElement_instance, const vector& AffectedElement_instances, vector& OpenDRIM_ServiceAffectsSoftwareIdentity_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_populate(OpenDRIM_ServiceAffectsSoftwareIdentity& instance, string& errorMessage); #endif /*OPENDRIM_SERVICEAFFECTSSOFTWAREIDENTITYACCESS_H_*/ ././@LongLink0000000000000000000000000000020000000000000011555 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsSoftwareIdentity/OpenDRIM_ServiceAffectsSoftwareIdentityAccess.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsSoftwareIdentity/OpenDRIM_ServiceAffect0000644000175000017500000002730011401066772034454 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_ServiceAffectsSoftwareIdentityAccess.h" int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareUpdate_CIM_ManagedElement_load(broker, errorMessage)); CF_assert(SoftwareUpdate_CIM_Service_load(broker, errorMessage)); */ // TODO _L_; return OK; } int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareUpdate_CIM_ManagedElement_unload(errorMessage)); CF_assert(SoftwareUpdate_CIM_Service_unload(errorMessage)); */ // TODO _L_; return OK; } int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_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 SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_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(SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_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(SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_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; SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_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(SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_referenceAffectedElementToAffectingElement(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_ServiceAffectsSoftwareIdentity& 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(SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_getAffectedElement(broker, ctx, AffectedElement_objectpath, AffectedElement_instance, NULL, errorMessage)); Objectpath AffectingElement_objectpath; instance.getAffectingElement(AffectingElement_objectpath); Instance AffectingElement_instance; CF_assert(SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_getAffectingElement(broker, ctx, AffectingElement_objectpath, AffectingElement_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_isAssociated(AffectedElement_instance, AffectingElement_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } CF_assert(SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_populate(instance, errorMessage)); _L_; return OK; } int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsSoftwareIdentity& newInstance, const OpenDRIM_ServiceAffectsSoftwareIdentity& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsSoftwareIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_ServiceAffectsSoftwareIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_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(SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_enumerateAffectingElements(broker, ctx, AffectingElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_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(SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_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(SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_enumerateAffectedElements(broker, ctx, AffectedElement_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_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(SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_enumerateAffectedElements(broker, ctx, AffectedElement_instances, properties, false, errorMessage)); } for (size_t i=0; i& AffectingElement_instances, vector& OpenDRIM_ServiceAffectsSoftwareIdentity_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_ServiceAffectsSoftwareIdentity instance; instance.setAffectedElement(((Instance) AffectedElement_instance).getObjectpath()); instance.setAffectingElement(((Instance) AffectingElement_instances[i]).getObjectpath()); if (discriminant == "r") { CF_assert(SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_populate(instance, errorMessage)); } OpenDRIM_ServiceAffectsSoftwareIdentity_instances.push_back(instance); } _L_; return OK; } int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_referenceAffectingElementToAffectedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& AffectingElement_instance, const vector& AffectedElement_instances, vector& OpenDRIM_ServiceAffectsSoftwareIdentity_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_ServiceAffectsSoftwareIdentity instance; instance.setAffectedElement(((Instance) AffectedElement_instances[i]).getObjectpath()); instance.setAffectingElement(((Instance) AffectingElement_instance).getObjectpath()); if (discriminant == "r") { CF_assert(SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_populate(instance, errorMessage)); } OpenDRIM_ServiceAffectsSoftwareIdentity_instances.push_back(instance); } _L_; return OK; } int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_populate(OpenDRIM_ServiceAffectsSoftwareIdentity& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000017700000000000011572 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsSoftwareIdentity/assocOpenDRIM_ServiceAffectsSoftwareIdentity.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsSoftwareIdentity/assocOpenDRIM_ServiceA0000644000175000017500000002202111401066772034470 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "assocOpenDRIM_ServiceAffectsSoftwareIdentity.h" int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_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 = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_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(SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_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(SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_associatorAffectingElementToAffectedElement(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_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(SoftwareUpdate_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareUpdate_CIM_ManagedElement_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareUpdate_CIM_ManagedElement_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_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; SoftwareUpdate_CIM_ManagedElement_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareUpdate_CIM_ManagedElement_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareUpdate_CIM_ManagedElement_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_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(SoftwareUpdate_CIM_Service_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareUpdate_CIM_Service_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareUpdate_CIM_Service_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_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; SoftwareUpdate_CIM_Service_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareUpdate_CIM_Service_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareUpdate_CIM_Service_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsSoftwareIdentity/OpenDRIM_ServiceAffectsSoftwareIdentity.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsSoftwareIdentity/OpenDRIM_ServiceAffect0000644000175000017500000001126511401066772034457 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SERVICEAFFECTSSOFTWAREIDENTITY_H_ #define OPENDRIM_SERVICEAFFECTSSOFTWAREIDENTITY_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_ServiceAffectsSoftwareIdentity_classnames[] = {"OpenDRIM_ServiceAffectsSoftwareIdentity"}; static string OpenDRIM_ServiceAffectsSoftwareIdentity_NAMESPACE = _NAMESPACE; const static string AffectedElement_role = "AffectedElement"; const static char* AffectedElement_classnames[] = {"OpenDRIM_SoftwareIdentity"}; const static string AffectedElement_NAMESPACE = _NAMESPACE; const static string AffectingElement_role = "AffectingElement"; const static char* AffectingElement_classnames[] = {"OpenDRIM_SoftwareInstallationService"}; const static string AffectingElement_NAMESPACE = _NAMESPACE; class OpenDRIM_ServiceAffectsSoftwareIdentity { public: Objectpath AffectedElement; bool AffectedElement_isNULL; Objectpath AffectingElement; bool AffectingElement_isNULL; vector ElementEffects; bool ElementEffects_isNULL; vector OtherElementEffectsDescriptions; bool OtherElementEffectsDescriptions_isNULL; OpenDRIM_ServiceAffectsSoftwareIdentity() { AffectedElement_isNULL = true; AffectingElement_isNULL = true; ElementEffects_isNULL = true; OtherElementEffectsDescriptions_isNULL = true; } ~OpenDRIM_ServiceAffectsSoftwareIdentity() {} 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_SERVICEAFFECTSSOFTWAREIDENTITY_H_*/ ././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsSoftwareIdentity/assocOpenDRIM_ServiceAffectsSoftwareIdentity.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsSoftwareIdentity/assocOpenDRIM_ServiceA0000644000175000017500000000656011401066772034502 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ASSOCOPENDRIM_SERVICEAFFECTSSOFTWAREIDENTITY_H_ #define ASSOCOPENDRIM_SERVICEAFFECTSSOFTWAREIDENTITY_H_ #include "OpenDRIM_ServiceAffectsSoftwareIdentityAccess.h" int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_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 SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_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 SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_enumerateAffectedElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_getAffectedElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_enumerateAffectingElements(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_getAffectingElement(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_SERVICEAFFECTSSOFTWAREIDENTITY_H_*/ ././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsSoftwareIdentity/cmpiOpenDRIM_ServiceAffectsSoftwareIdentity.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsSoftwareIdentity/cmpiOpenDRIM_ServiceAf0000644000175000017500000000762511401066772034473 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_ServiceAffectsSoftwareIdentity.h" CMPIObjectPath* SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_ServiceAffectsSoftwareIdentity& instance) { _E_; Objectpath op(broker, OpenDRIM_ServiceAffectsSoftwareIdentity_classnames[0], OpenDRIM_ServiceAffectsSoftwareIdentity_NAMESPACE); if (!instance.AffectedElement_isNULL) op.addKey("AffectedElement", instance.AffectedElement); if (!instance.AffectingElement_isNULL) op.addKey("AffectingElement", instance.AffectingElement); _L_; return op.getHdl(); } CMPIInstance* SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_ServiceAffectsSoftwareIdentity& instance) { _E_; Objectpath op(broker, SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_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 SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_ServiceAffectsSoftwareIdentity& 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 SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_ServiceAffectsSoftwareIdentity& 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_; } ././@LongLink0000000000000000000000000000020200000000000011557 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsSoftwareIdentity/OpenDRIM_ServiceAffectsSoftwareIdentityProvider.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsSoftwareIdentity/OpenDRIM_ServiceAffect0000644000175000017500000004477511401066772034473 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_ServiceAffectsSoftwareIdentity.h" #include "OpenDRIM_ServiceAffectsSoftwareIdentityAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProviderSetInstance SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProviderModifyInstance #endif int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_init(const CMPIBroker* broker); int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProviderEnumInstances(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 = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ServiceAffectsSoftwareIdentity instance; SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProviderSetInstance(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_ServiceAffectsSoftwareIdentity newInstance, oldInstance; SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_toCPP(_broker, ci, newInstance); SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ServiceAffectsSoftwareIdentity instance; SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_toCPP(_broker, ci, instance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_ServiceAffectsSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_ServiceAffectsSoftwareIdentity instance; SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProviderExecQuery(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 SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProviderAssociatorNames(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 = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsSoftwareIdentity_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 SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProviderAssociators(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 = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsSoftwareIdentity_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 SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProviderReferenceNames(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 = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_referenceAffectedElementToAffectingElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_referenceAffectingElementToAffectedElement(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProviderReferences(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 = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_referenceAffectedElementToAffectingElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_referenceAffectingElementToAffectedElement(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_ServiceAffectsSoftwareIdentity_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_init FAILED: " + (string) OpenDRIM_ServiceAffectsSoftwareIdentity_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_unload(errorMessage); if (errorCode != OK) { errorMessage += "SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_unload FAILED: " + (string) OpenDRIM_ServiceAffectsSoftwareIdentity_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_INIT if (SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_init(_broker) < 0) return NULL CMInstanceMIStub(SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProvider, SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProvider, _broker, SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_INIT); CMAssociationMIStub(SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProvider, SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentityProvider, _broker, SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsSoftwareIdentity/cmpiOpenDRIM_ServiceAffectsSoftwareIdentity.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_ServiceAffectsSoftwareIdentity/cmpiOpenDRIM_ServiceAf0000644000175000017500000000467411401066772034474 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_SERVICEAFFECTSSOFTWAREIDENTITY_H_ #define CMPIOPENDRIM_SERVICEAFFECTSSOFTWAREIDENTITY_H_ #include "OpenDRIM_ServiceAffectsSoftwareIdentity.h" CMPIObjectPath* SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_ServiceAffectsSoftwareIdentity& instance); CMPIInstance* SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_ServiceAffectsSoftwareIdentity& instance); void SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_ServiceAffectsSoftwareIdentity& instance); void SoftwareUpdate_OpenDRIM_ServiceAffectsSoftwareIdentity_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_ServiceAffectsSoftwareIdentity& instance); #endif /*CMPIOPENDRIM_SERVICEAFFECTSSOFTWAREIDENTITY_H_*/ opendrim-lmp-softwareupdate-1.0.0~ppa/NEWS0000644000175000017500000000017511401066772021305 0ustar guillaumeguillaumeInitial Release 1.0.0 ========================= // TODO Changes in Major.Minor.Revision ========================= // TODO opendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateHostedService/0000755000175000017500000000000011401066772027665 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateHostedService/cmpiOpenDRIM_SoftwareUpdateHostedService.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateHostedService/cmpiOpenDRIM_SoftwareUpda0000644000175000017500000000636111401066772034530 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SoftwareUpdateHostedService.h" CMPIObjectPath* SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_SoftwareUpdateHostedService& instance) { _E_; Objectpath op(broker, OpenDRIM_SoftwareUpdateHostedService_classnames[0], OpenDRIM_SoftwareUpdateHostedService_NAMESPACE); if (!instance.Antecedent_isNULL) op.addKey("Antecedent", instance.Antecedent); if (!instance.Dependent_isNULL) op.addKey("Dependent", instance.Dependent); _L_; return op.getHdl(); } CMPIInstance* SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_SoftwareUpdateHostedService& instance) { _E_; Objectpath op(broker, SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_toCMPIObjectPath(broker, instance)); Instance ci(broker, op); _L_; return ci.getHdl(); } void SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_SoftwareUpdateHostedService& 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 SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_SoftwareUpdateHostedService& 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-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateHostedService/Makefile.am0000644000175000017500000000517311401066772031727 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProvider.la libcmpiSoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProvider_la_SOURCES = OpenDRIM_SoftwareUpdateHostedServiceAccess.cpp OpenDRIM_SoftwareUpdateHostedServiceProvider.cpp cmpiOpenDRIM_SoftwareUpdateHostedService.cpp assocOpenDRIM_SoftwareUpdateHostedService.cpp # May have to be adjusted for direct invocation libcmpiSoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProvider_la_CPPFLAGS = -I../CIM_System -I../CIM_Service # Uncomment the end for direct invocation, may have to be adjusted libcmpiSoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProvider_la_LIBADD = ../Common/libcmpiSoftwareUpdate_Common.la #../CIM_System/libcmpiSoftwareUpdate_CIM_SystemProvider.la ../CIM_Service/libcmpiSoftwareUpdate_CIM_ServiceProvider.la libcmpiSoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_SoftwareUpdateHostedService.h OpenDRIM_SoftwareUpdateHostedService.h OpenDRIM_SoftwareUpdateHostedServiceAccess.h ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateHostedService/OpenDRIM_SoftwareUpdateHostedService.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateHostedService/OpenDRIM_SoftwareUpdateHo0000644000175000017500000000701111401066772034470 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SOFTWAREUPDATEHOSTEDSERVICE_H_ #define OPENDRIM_SOFTWAREUPDATEHOSTEDSERVICE_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_SoftwareUpdateHostedService_classnames[] = {"OpenDRIM_SoftwareUpdateHostedService"}; static string OpenDRIM_SoftwareUpdateHostedService_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_SoftwareInstallationService"}; const static string Dependent_NAMESPACE = _NAMESPACE; class OpenDRIM_SoftwareUpdateHostedService { public: Objectpath Antecedent; bool Antecedent_isNULL; Objectpath Dependent; bool Dependent_isNULL; OpenDRIM_SoftwareUpdateHostedService() { Antecedent_isNULL = true; Dependent_isNULL = true; } ~OpenDRIM_SoftwareUpdateHostedService() {} 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_SOFTWAREUPDATEHOSTEDSERVICE_H_*/ ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateHostedService/cmpiOpenDRIM_SoftwareUpdateHostedService.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateHostedService/cmpiOpenDRIM_SoftwareUpda0000644000175000017500000000463011401066772034525 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_SOFTWAREUPDATEHOSTEDSERVICE_H_ #define CMPIOPENDRIM_SOFTWAREUPDATEHOSTEDSERVICE_H_ #include "OpenDRIM_SoftwareUpdateHostedService.h" CMPIObjectPath* SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_SoftwareUpdateHostedService& instance); CMPIInstance* SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_SoftwareUpdateHostedService& instance); void SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_SoftwareUpdateHostedService& instance); void SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_SoftwareUpdateHostedService& instance); #endif /*CMPIOPENDRIM_SOFTWAREUPDATEHOSTEDSERVICE_H_*/ ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateHostedService/OpenDRIM_SoftwareUpdateHostedServiceAccess.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateHostedService/OpenDRIM_SoftwareUpdateHo0000644000175000017500000002535111401066772034477 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_SoftwareUpdateHostedServiceAccess.h" int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_load(const CMPIBroker* broker, string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareUpdate_CIM_System_load(broker, errorMessage)); CF_assert(SoftwareUpdate_CIM_Service_load(broker, errorMessage)); */ // TODO _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_unload(string& errorMessage) { _E_; /* * for Direct Invocation */ /* CF_assert(SoftwareUpdate_CIM_System_unload(errorMessage)); CF_assert(SoftwareUpdate_CIM_Service_unload(errorMessage)); */ // TODO _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_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 SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_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(SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_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(SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_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; SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_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(SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_referenceAntecedentToDependent(broker, ctx, (*c), associatedInstances, result, NULL, errorMessage, ref_discriminant)); } _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_SoftwareUpdateHostedService& 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(SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_getAntecedent(broker, ctx, Antecedent_objectpath, Antecedent_instance, NULL, errorMessage)); Objectpath Dependent_objectpath; instance.getDependent(Dependent_objectpath); Instance Dependent_instance; CF_assert(SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_getDependent(broker, ctx, Dependent_objectpath, Dependent_instance, NULL, errorMessage)); bool isAssociated = false; CF_assert(SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_isAssociated(Antecedent_instance, Dependent_instance, isAssociated, errorMessage)); if (!isAssociated) { if(errorMessage.empty()) errorMessage = "No instance"; return NOT_FOUND; } _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareUpdateHostedService& newInstance, const OpenDRIM_SoftwareUpdateHostedService& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareUpdateHostedService& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareUpdateHostedService& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_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(SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_enumerateDependents(broker, ctx, Dependent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_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(SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_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(SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); if (discriminant=="an") { // Only get the instance names CF_assert(SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_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(SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_enumerateAntecedents(broker, ctx, Antecedent_instances, properties, false, errorMessage)); } for (size_t i=0; i& Dependent_instances, vector& OpenDRIM_SoftwareUpdateHostedService_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_SoftwareUpdateHostedService instance; instance.setAntecedent(((Instance) Antecedent_instance).getObjectpath()); instance.setDependent(((Instance) Dependent_instances[i]).getObjectpath()); OpenDRIM_SoftwareUpdateHostedService_instances.push_back(instance); } _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_SoftwareUpdateHostedService_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_SoftwareUpdateHostedService instance; instance.setAntecedent(((Instance) Antecedent_instances[i]).getObjectpath()); instance.setDependent(((Instance) Dependent_instance).getObjectpath()); OpenDRIM_SoftwareUpdateHostedService_instances.push_back(instance); } _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_populate(OpenDRIM_SoftwareUpdateHostedService& instance, string& errorMessage) { _E_; // TODO _L_; return OK; } ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateHostedService/OpenDRIM_SoftwareUpdateHostedServiceAccess.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateHostedService/OpenDRIM_SoftwareUpdateHo0000644000175000017500000001122111401066772034466 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SOFTWAREUPDATEHOSTEDSERVICEACCESS_H_ #define OPENDRIM_SOFTWAREUPDATEHOSTEDSERVICEACCESS_H_ #include "SoftwareUpdate_Common.h" #include "OpenDRIM_SoftwareUpdateHostedService.h" #include "assocOpenDRIM_SoftwareUpdateHostedService.h" int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_load(const CMPIBroker* broker, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_unload(string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_SoftwareUpdateHostedService& instance, const char** properties, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareUpdateHostedService& newInstance, const OpenDRIM_SoftwareUpdateHostedService& oldInstance, const char** properties, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareUpdateHostedService& instance, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareUpdateHostedService& instance, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_associatorAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const char** properties, vector& Dependent_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_associatorDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const char** properties, vector& Antecedent_associatedInstances, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_referenceAntecedentToDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Antecedent_instance, const vector& Dependent_instances, vector& OpenDRIM_SoftwareUpdateHostedService_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_referenceDependentToAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Instance& Dependent_instance, const vector& Antecedent_instances, vector& OpenDRIM_SoftwareUpdateHostedService_instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_populate(OpenDRIM_SoftwareUpdateHostedService& instance, string& errorMessage); #endif /*OPENDRIM_SOFTWAREUPDATEHOSTEDSERVICEACCESS_H_*/ ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateHostedService/assocOpenDRIM_SoftwareUpdateHostedService.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateHostedService/assocOpenDRIM_SoftwareUpd0000644000175000017500000002134111401066772034542 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "assocOpenDRIM_SoftwareUpdateHostedService.h" int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_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 = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_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(SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_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(SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_associatorDependentToAntecedent(broker, ctx, knownInstance, properties, associatedInstances, errorMessage, dicriminant)); } _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_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(SoftwareUpdate_CIM_System_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareUpdate_CIM_System_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareUpdate_CIM_System_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_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; SoftwareUpdate_CIM_System_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareUpdate_CIM_System_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareUpdate_CIM_System_toCMPIInstance(broker, _instance)); */ _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_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(SoftwareUpdate_CIM_Service_retrieve(broker, ctx, _instances, properties, errorMessage, "ein")); } else { CF_assert(SoftwareUpdate_CIM_Service_retrieve(broker, ctx, _instances, properties, errorMessage, "ei")); } for (size_t i=0; i<_instances.size(); i++) instances.push_back(Instance(broker, SoftwareUpdate_CIM_Service_toCMPIInstance(broker, _instances[i]))); */ _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_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; SoftwareUpdate_CIM_Service_toCPP(broker, objectpath.getHdl(), _instance); CF_assert(SoftwareUpdate_CIM_Service_getInstance(broker, ctx, _instance, properties, errorMessage)); instance = Instance(broker, SoftwareUpdate_CIM_Service_toCMPIInstance(broker, _instance)); */ _L_; return OK; } ././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateHostedService/OpenDRIM_SoftwareUpdateHostedServiceProvider.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateHostedService/OpenDRIM_SoftwareUpdateHo0000644000175000017500000004427711401066772034507 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SoftwareUpdateHostedService.h" #include "OpenDRIM_SoftwareUpdateHostedServiceAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProviderSetInstance SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProviderModifyInstance #endif int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_init(const CMPIBroker* broker); int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProviderEnumInstances(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 = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareUpdateHostedService instance; SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProviderSetInstance(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_SoftwareUpdateHostedService newInstance, oldInstance; SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_toCPP(_broker, ci, newInstance); SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareUpdateHostedService instance; SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_toCPP(_broker, ci, instance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_SoftwareUpdateHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareUpdateHostedService instance; SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProviderExecQuery(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 SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProviderAssociationCleanup(CMPIAssociationMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProviderAssociatorNames(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 = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateHostedService_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 SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProviderAssociators(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 = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_associator(_broker, ctx, cop, known, assocClass, resultClass, role, resultRole, properties, associatedInstances, leftToRight, errorMessage, "a"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateHostedService_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 SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProviderReferenceNames(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 = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); else errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, NULL, errorMessage, "rn"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIObjectPath* op = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_toCMPIObjectPath(_broker, associationInstances[i]); CMReturnObjectPath(rslt, op); } _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProviderReferences(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 = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_associator(_broker, ctx, cop, known, assocClass, NULL, role, NULL, NULL, associatedInstances, leftToRight, errorMessage, "an"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } vector associationInstances; if (leftToRight) errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_referenceAntecedentToDependent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); else errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_referenceDependentToAntecedent(_broker, ctx, known, associatedInstances, associationInstances, properties, errorMessage, "r"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareUpdateHostedService_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < associationInstances.size(); i++) { CMPIInstance* inst = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_toCMPIInstance(_broker, associationInstances[i]); CMReturnInstance(rslt, inst); } _L_; return rc; } /* ---------------------------------------------------------------------------*/ /* End Of Association Provider Interface */ /* ---------------------------------------------------------------------------*/ /* ---------------------------------------------------------------------------*/ /* Provider Factory */ /* ---------------------------------------------------------------------------*/ int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_init FAILED: " + (string) OpenDRIM_SoftwareUpdateHostedService_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_unload(errorMessage); if (errorCode != OK) { errorMessage += "SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_unload FAILED: " + (string) OpenDRIM_SoftwareUpdateHostedService_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_INIT if (SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_init(_broker) < 0) return NULL CMInstanceMIStub(SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProvider, SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProvider, _broker, SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_INIT); CMAssociationMIStub(SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProvider, SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedServiceProvider, _broker, SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateHostedService/assocOpenDRIM_SoftwareUpdateHostedService.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareUpdateHostedService/assocOpenDRIM_SoftwareUpd0000644000175000017500000000647211401066772034552 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef ASSOCOPENDRIM_SOFTWAREUPDATEHOSTEDSERVICE_H_ #define ASSOCOPENDRIM_SOFTWAREUPDATEHOSTEDSERVICE_H_ #include "OpenDRIM_SoftwareUpdateHostedServiceAccess.h" int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_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 SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_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 SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_enumerateAntecedents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_getAntecedent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_enumerateDependents(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, bool onlyNames, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareUpdateHostedService_getDependent(const CMPIBroker* broker, const CMPIContext* ctx, const Objectpath& objectpath, Instance& instance, const char** properties, string& errorMessage); #endif /*ASSOCOPENDRIM_SOFTWAREUPDATEHOSTEDSERVICE_H_*/ opendrim-lmp-softwareupdate-1.0.0~ppa/LICENSE0000644000175000017500000000305411401066772021612 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### opendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationServiceCapabilities/0000755000175000017500000000000011401066772032247 5ustar guillaumeguillaume././@LongLink0000000000000000000000000000022000000000000011557 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationServiceCapabilities/OpenDRIM_SoftwareInstallationServiceCapabilitiesAccess.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationServiceCapabilities/OpenDRIM_Soft0000644000175000017500000000673011401066772034550 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SOFTWAREINSTALLATIONSERVICECAPABILITIESACCESS_H_ #define OPENDRIM_SOFTWAREINSTALLATIONSERVICECAPABILITIESACCESS_H_ #include "SoftwareUpdate_Common.h" #include "OpenDRIM_SoftwareInstallationServiceCapabilities.h" int SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_load(const CMPIBroker* broker, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_unload(string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& instances, const char** properties, string& errorMessage, const string& discriminant); int SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_SoftwareInstallationServiceCapabilities& instance, const char** properties, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationServiceCapabilities& newInstance, const OpenDRIM_SoftwareInstallationServiceCapabilities& oldInstance, const char** properties, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationServiceCapabilities& instance, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationServiceCapabilities& instance, string& errorMessage); int SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_populate(OpenDRIM_SoftwareInstallationServiceCapabilities& instance, string& errorMessage); #endif /*OPENDRIM_SOFTWAREINSTALLATIONSERVICECAPABILITIESACCESS_H_*/ ././@LongLink0000000000000000000000000000021200000000000011560 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationServiceCapabilities/OpenDRIM_SoftwareInstallationServiceCapabilities.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationServiceCapabilities/OpenDRIM_Soft0000644000175000017500000002416211401066772034547 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef OPENDRIM_SOFTWAREINSTALLATIONSERVICECAPABILITIES_H_ #define OPENDRIM_SOFTWAREINSTALLATIONSERVICECAPABILITIES_H_ #include const static char* OpenDRIM_SoftwareInstallationServiceCapabilities_classnames[] = {"OpenDRIM_SoftwareInstallationServiceCapabilities"}; static string OpenDRIM_SoftwareInstallationServiceCapabilities_NAMESPACE = _NAMESPACE; class OpenDRIM_SoftwareInstallationServiceCapabilities { public: string Caption; bool Caption_isNULL; string Description; bool Description_isNULL; string InstanceID; bool InstanceID_isNULL; string ElementName; bool ElementName_isNULL; vector SupportedAsynchronousActions; bool SupportedAsynchronousActions_isNULL; vector SupportedSynchronousActions; bool SupportedSynchronousActions_isNULL; vector SupportedTargetTypes; bool SupportedTargetTypes_isNULL; vector SupportedExtendedResourceTypes; bool SupportedExtendedResourceTypes_isNULL; bool CanAddToCollection; bool CanAddToCollection_isNULL; vector SupportedInstallOptions; bool SupportedInstallOptions_isNULL; vector OtherSupportedExtendedResourceTypeDescriptions; bool OtherSupportedExtendedResourceTypeDescriptions_isNULL; vector SupportedExtendedResourceTypesMajorVersions; bool SupportedExtendedResourceTypesMajorVersions_isNULL; vector SupportedExtendedResourceTypesMinorVersions; bool SupportedExtendedResourceTypesMinorVersions_isNULL; vector SupportedExtendedResourceTypesRevisionNumbers; bool SupportedExtendedResourceTypesRevisionNumbers_isNULL; vector SupportedExtendedResourceTypesBuildNumbers; bool SupportedExtendedResourceTypesBuildNumbers_isNULL; vector SupportedURISchemes; bool SupportedURISchemes_isNULL; OpenDRIM_SoftwareInstallationServiceCapabilities() { Caption_isNULL = true; Description_isNULL = true; InstanceID_isNULL = true; ElementName_isNULL = true; SupportedAsynchronousActions_isNULL = true; SupportedSynchronousActions_isNULL = true; SupportedTargetTypes_isNULL = true; SupportedExtendedResourceTypes_isNULL = true; CanAddToCollection_isNULL = true; SupportedInstallOptions_isNULL = true; OtherSupportedExtendedResourceTypeDescriptions_isNULL = true; SupportedExtendedResourceTypesMajorVersions_isNULL = true; SupportedExtendedResourceTypesMinorVersions_isNULL = true; SupportedExtendedResourceTypesRevisionNumbers_isNULL = true; SupportedExtendedResourceTypesBuildNumbers_isNULL = true; SupportedURISchemes_isNULL = true; } ~OpenDRIM_SoftwareInstallationServiceCapabilities() {} 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 getSupportedAsynchronousActions(vector& value) const { if (SupportedAsynchronousActions_isNULL==true) return NOT_FOUND; value = SupportedAsynchronousActions; return OK; } int setSupportedAsynchronousActions(const vector& newValue) { SupportedAsynchronousActions = newValue; SupportedAsynchronousActions_isNULL = false; return OK; } int getSupportedSynchronousActions(vector& value) const { if (SupportedSynchronousActions_isNULL==true) return NOT_FOUND; value = SupportedSynchronousActions; return OK; } int setSupportedSynchronousActions(const vector& newValue) { SupportedSynchronousActions = newValue; SupportedSynchronousActions_isNULL = false; return OK; } int getSupportedTargetTypes(vector& value) const { if (SupportedTargetTypes_isNULL==true) return NOT_FOUND; value = SupportedTargetTypes; return OK; } int setSupportedTargetTypes(const vector& newValue) { SupportedTargetTypes = newValue; SupportedTargetTypes_isNULL = false; return OK; } int getSupportedExtendedResourceTypes(vector& value) const { if (SupportedExtendedResourceTypes_isNULL==true) return NOT_FOUND; value = SupportedExtendedResourceTypes; return OK; } int setSupportedExtendedResourceTypes(const vector& newValue) { SupportedExtendedResourceTypes = newValue; SupportedExtendedResourceTypes_isNULL = false; return OK; } int getCanAddToCollection(bool& value) const { if (CanAddToCollection_isNULL==true) return NOT_FOUND; value = CanAddToCollection; return OK; } int setCanAddToCollection(const bool& newValue) { CanAddToCollection = newValue; CanAddToCollection_isNULL = false; return OK; } int getSupportedInstallOptions(vector& value) const { if (SupportedInstallOptions_isNULL==true) return NOT_FOUND; value = SupportedInstallOptions; return OK; } int setSupportedInstallOptions(const vector& newValue) { SupportedInstallOptions = newValue; SupportedInstallOptions_isNULL = false; return OK; } int getOtherSupportedExtendedResourceTypeDescriptions(vector& value) const { if (OtherSupportedExtendedResourceTypeDescriptions_isNULL==true) return NOT_FOUND; value = OtherSupportedExtendedResourceTypeDescriptions; return OK; } int setOtherSupportedExtendedResourceTypeDescriptions(const vector& newValue) { OtherSupportedExtendedResourceTypeDescriptions = newValue; OtherSupportedExtendedResourceTypeDescriptions_isNULL = false; return OK; } int getSupportedExtendedResourceTypesMajorVersions(vector& value) const { if (SupportedExtendedResourceTypesMajorVersions_isNULL==true) return NOT_FOUND; value = SupportedExtendedResourceTypesMajorVersions; return OK; } int setSupportedExtendedResourceTypesMajorVersions(const vector& newValue) { SupportedExtendedResourceTypesMajorVersions = newValue; SupportedExtendedResourceTypesMajorVersions_isNULL = false; return OK; } int getSupportedExtendedResourceTypesMinorVersions(vector& value) const { if (SupportedExtendedResourceTypesMinorVersions_isNULL==true) return NOT_FOUND; value = SupportedExtendedResourceTypesMinorVersions; return OK; } int setSupportedExtendedResourceTypesMinorVersions(const vector& newValue) { SupportedExtendedResourceTypesMinorVersions = newValue; SupportedExtendedResourceTypesMinorVersions_isNULL = false; return OK; } int getSupportedExtendedResourceTypesRevisionNumbers(vector& value) const { if (SupportedExtendedResourceTypesRevisionNumbers_isNULL==true) return NOT_FOUND; value = SupportedExtendedResourceTypesRevisionNumbers; return OK; } int setSupportedExtendedResourceTypesRevisionNumbers(const vector& newValue) { SupportedExtendedResourceTypesRevisionNumbers = newValue; SupportedExtendedResourceTypesRevisionNumbers_isNULL = false; return OK; } int getSupportedExtendedResourceTypesBuildNumbers(vector& value) const { if (SupportedExtendedResourceTypesBuildNumbers_isNULL==true) return NOT_FOUND; value = SupportedExtendedResourceTypesBuildNumbers; return OK; } int setSupportedExtendedResourceTypesBuildNumbers(const vector& newValue) { SupportedExtendedResourceTypesBuildNumbers = newValue; SupportedExtendedResourceTypesBuildNumbers_isNULL = false; return OK; } int getSupportedURISchemes(vector& value) const { if (SupportedURISchemes_isNULL==true) return NOT_FOUND; value = SupportedURISchemes; return OK; } int setSupportedURISchemes(const vector& newValue) { SupportedURISchemes = newValue; SupportedURISchemes_isNULL = false; return OK; } }; #endif /*OPENDRIM_SOFTWAREINSTALLATIONSERVICECAPABILITIES_H_*/ opendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationServiceCapabilities/Makefile.am0000644000175000017500000000455011401066772034307 0ustar guillaumeguillaume############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ############################################################################### providerdir = @PROVIDERDIR@ provider_LTLIBRARIES = libcmpiSoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilitiesProvider.la libcmpiSoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilitiesProvider_la_SOURCES = OpenDRIM_SoftwareInstallationServiceCapabilitiesAccess.cpp OpenDRIM_SoftwareInstallationServiceCapabilitiesProvider.cpp cmpiOpenDRIM_SoftwareInstallationServiceCapabilities.cpp libcmpiSoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilitiesProvider_la_LIBADD = ../Common/libcmpiSoftwareUpdate_Common.la libcmpiSoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilitiesProvider_la_LDFLAGS = -avoid-version noinst_HEADERS = cmpiOpenDRIM_SoftwareInstallationServiceCapabilities.h OpenDRIM_SoftwareInstallationServiceCapabilities.h OpenDRIM_SoftwareInstallationServiceCapabilitiesAccess.h ././@LongLink0000000000000000000000000000022000000000000011557 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationServiceCapabilities/cmpiOpenDRIM_SoftwareInstallationServiceCapabilities.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationServiceCapabilities/cmpiOpenDRIM_0000644000175000017500000001671311401066772034567 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SoftwareInstallationServiceCapabilities.h" CMPIObjectPath* SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_SoftwareInstallationServiceCapabilities& instance) { _E_; Objectpath op(broker, OpenDRIM_SoftwareInstallationServiceCapabilities_classnames[0], OpenDRIM_SoftwareInstallationServiceCapabilities_NAMESPACE); if (!instance.InstanceID_isNULL) op.addKey("InstanceID", instance.InstanceID); _L_; return op.getHdl(); } CMPIInstance* SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_SoftwareInstallationServiceCapabilities& instance) { _E_; Objectpath op(broker, SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_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.SupportedAsynchronousActions_isNULL) ci.setProperty("SupportedAsynchronousActions", instance.SupportedAsynchronousActions); if (!instance.SupportedSynchronousActions_isNULL) ci.setProperty("SupportedSynchronousActions", instance.SupportedSynchronousActions); if (!instance.SupportedTargetTypes_isNULL) ci.setProperty("SupportedTargetTypes", instance.SupportedTargetTypes); if (!instance.SupportedExtendedResourceTypes_isNULL) ci.setProperty("SupportedExtendedResourceTypes", instance.SupportedExtendedResourceTypes); if (!instance.CanAddToCollection_isNULL) ci.setProperty("CanAddToCollection", instance.CanAddToCollection); if (!instance.SupportedInstallOptions_isNULL) ci.setProperty("SupportedInstallOptions", instance.SupportedInstallOptions); if (!instance.OtherSupportedExtendedResourceTypeDescriptions_isNULL) ci.setProperty("OtherSupportedExtendedResourceTypeDescriptions", instance.OtherSupportedExtendedResourceTypeDescriptions); if (!instance.SupportedExtendedResourceTypesMajorVersions_isNULL) ci.setProperty("SupportedExtendedResourceTypesMajorVersions", instance.SupportedExtendedResourceTypesMajorVersions); if (!instance.SupportedExtendedResourceTypesMinorVersions_isNULL) ci.setProperty("SupportedExtendedResourceTypesMinorVersions", instance.SupportedExtendedResourceTypesMinorVersions); if (!instance.SupportedExtendedResourceTypesRevisionNumbers_isNULL) ci.setProperty("SupportedExtendedResourceTypesRevisionNumbers", instance.SupportedExtendedResourceTypesRevisionNumbers); if (!instance.SupportedExtendedResourceTypesBuildNumbers_isNULL) ci.setProperty("SupportedExtendedResourceTypesBuildNumbers", instance.SupportedExtendedResourceTypesBuildNumbers); if (!instance.SupportedURISchemes_isNULL) ci.setProperty("SupportedURISchemes", instance.SupportedURISchemes); _L_; return ci.getHdl(); } void SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_SoftwareInstallationServiceCapabilities& instance) { _E_; Objectpath op(broker, (CMPIObjectPath*) ref); if (op.getKey("InstanceID", instance.InstanceID) == OK) instance.InstanceID_isNULL = false; _L_; } void SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_SoftwareInstallationServiceCapabilities& 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("SupportedAsynchronousActions", instance.SupportedAsynchronousActions) == OK) instance.SupportedAsynchronousActions_isNULL = false; if (inst.getProperty("SupportedSynchronousActions", instance.SupportedSynchronousActions) == OK) instance.SupportedSynchronousActions_isNULL = false; if (inst.getProperty("SupportedTargetTypes", instance.SupportedTargetTypes) == OK) instance.SupportedTargetTypes_isNULL = false; if (inst.getProperty("SupportedExtendedResourceTypes", instance.SupportedExtendedResourceTypes) == OK) instance.SupportedExtendedResourceTypes_isNULL = false; if (inst.getProperty("CanAddToCollection", instance.CanAddToCollection) == OK) instance.CanAddToCollection_isNULL = false; if (inst.getProperty("SupportedInstallOptions", instance.SupportedInstallOptions) == OK) instance.SupportedInstallOptions_isNULL = false; if (inst.getProperty("OtherSupportedExtendedResourceTypeDescriptions", instance.OtherSupportedExtendedResourceTypeDescriptions) == OK) instance.OtherSupportedExtendedResourceTypeDescriptions_isNULL = false; if (inst.getProperty("SupportedExtendedResourceTypesMajorVersions", instance.SupportedExtendedResourceTypesMajorVersions) == OK) instance.SupportedExtendedResourceTypesMajorVersions_isNULL = false; if (inst.getProperty("SupportedExtendedResourceTypesMinorVersions", instance.SupportedExtendedResourceTypesMinorVersions) == OK) instance.SupportedExtendedResourceTypesMinorVersions_isNULL = false; if (inst.getProperty("SupportedExtendedResourceTypesRevisionNumbers", instance.SupportedExtendedResourceTypesRevisionNumbers) == OK) instance.SupportedExtendedResourceTypesRevisionNumbers_isNULL = false; if (inst.getProperty("SupportedExtendedResourceTypesBuildNumbers", instance.SupportedExtendedResourceTypesBuildNumbers) == OK) instance.SupportedExtendedResourceTypesBuildNumbers_isNULL = false; if (inst.getProperty("SupportedURISchemes", instance.SupportedURISchemes) == OK) instance.SupportedURISchemes_isNULL = false; _L_; } ././@LongLink0000000000000000000000000000022200000000000011561 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationServiceCapabilities/OpenDRIM_SoftwareInstallationServiceCapabilitiesAccess.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationServiceCapabilities/OpenDRIM_Soft0000644000175000017500000001155511401066772034551 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "OpenDRIM_SoftwareInstallationServiceCapabilitiesAccess.h" string InstanceID="OpenDRIM:SoftwareInstallationServiceCapabilities:"; int SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_load(const CMPIBroker* broker, string& errorMessage) { _E_; string name; CF_assert(CF_getSoftwareInstallationServiceName(name,errorMessage)); InstanceID+=name; _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_unload(string& errorMessage) { _E_; // TODO _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector& result, const char** properties, string& errorMessage, const string& discriminant) { _E_; OpenDRIM_SoftwareInstallationServiceCapabilities instance; instance.setInstanceID(InstanceID); if(discriminant=="ei") CF_assert(SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_populate(instance,errorMessage)); result.push_back(instance); _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_SoftwareInstallationServiceCapabilities& instance, const char** properties, string& errorMessage) { _E_; if(instance.InstanceID!=InstanceID) { errorMessage="No instance"; return NOT_FOUND; } CF_assert(SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_populate(instance,errorMessage)); _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationServiceCapabilities& newInstance, const OpenDRIM_SoftwareInstallationServiceCapabilities& oldInstance, const char** properties, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationServiceCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_SoftwareInstallationServiceCapabilities& instance, string& errorMessage) { _E_; // TODO _L_; return NOT_SUPPORTED; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_populate(OpenDRIM_SoftwareInstallationServiceCapabilities& instance, string& errorMessage) { _E_; /* * Properties to fill from profile * + Mandatory: * [X] InstanceID [KEY] * [X] SupportedInstallOptions * + Optional: * [X] SupportedExtendedResourceTypes */ vector resourceTypes; vector installOptions; if(instance.InstanceID.substr(49)=="apt") resourceTypes.push_back(8); // 8 value for Deb package else if(instance.InstanceID.substr(49)=="yum") resourceTypes.push_back(3);// 3 value for RPM package instance.setSupportedExtendedResourceTypes(resourceTypes); installOptions.push_back(4); // 4 - install installOptions.push_back(5); // 5 - update installOptions.push_back(9); // 9 - uninstall instance.setSupportedInstallOptions(installOptions); _L_; return OK; } ././@LongLink0000000000000000000000000000022400000000000011563 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationServiceCapabilities/OpenDRIM_SoftwareInstallationServiceCapabilitiesProvider.cppopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationServiceCapabilities/OpenDRIM_Soft0000644000175000017500000003103711401066772034546 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #include "cmpiOpenDRIM_SoftwareInstallationServiceCapabilities.h" #include "OpenDRIM_SoftwareInstallationServiceCapabilitiesAccess.h" static const CMPIBroker * _broker; #ifdef CMPI_VER_100 #define SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilitiesProviderSetInstance SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilitiesProviderModifyInstance #endif int SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_init(const CMPIBroker* broker); int SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_finalize(); /* ---------------------------------------------------------------------------*/ /* Instance Provider Interface */ /* ---------------------------------------------------------------------------*/ CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilitiesProviderCleanup(CMPIInstanceMI * mi, const CMPIContext* ctx, CMPIBoolean terminate) { _E_; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_finalize(); CMPIStatus rc; CMSetStatus(&rc, (CMPIrc) errorCode); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilitiesProviderEnumInstanceNames(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* ref) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; vector instances; string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_retrieve(_broker, ctx, instances, NULL, errorMessage, "ein"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIObjectPath* op = SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_toCMPIObjectPath(_broker, instances[i]); CMReturnObjectPath(rslt, op); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilitiesProviderEnumInstances(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 = SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_retrieve(_broker, ctx, instances, properties, errorMessage, "ei"); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } for (size_t i=0; i < instances.size(); i++) { CMPIInstance* ci = SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_toCMPIInstance(_broker, instances[i]); CMReturnInstance(rslt, ci); } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilitiesProviderGetInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const char** properties) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareInstallationServiceCapabilities instance; SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_getInstance(_broker, ctx, instance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIInstance* ci = SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_toCMPIInstance(_broker, instance); CMReturnInstance(rslt, ci); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilitiesProviderSetInstance(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_SoftwareInstallationServiceCapabilities newInstance, oldInstance; SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_toCPP(_broker, ci, newInstance); SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_toCPP(_broker, cop, oldInstance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_getInstance(_broker, ctx, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_setInstance(_broker, ctx, newInstance, oldInstance, properties, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilitiesProviderCreateInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop, const CMPIInstance* ci) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareInstallationServiceCapabilities instance; SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_toCPP(_broker, ci, instance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != NOT_FOUND) { if (errorCode == OK) errorCode = ALREADY_EXISTS; errorMessage = (string) OpenDRIM_SoftwareInstallationServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_createInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMPIObjectPath* _cop = SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_toCMPIObjectPath(_broker, instance); CMReturnObjectPath(rslt, _cop); CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilitiesProviderDeleteInstance(CMPIInstanceMI* mi, const CMPIContext* ctx, const CMPIResult* rslt, const CMPIObjectPath* cop) { _E_; CMPIStatus rc = {CMPI_RC_OK, NULL}; OpenDRIM_SoftwareInstallationServiceCapabilities instance; SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_toCPP(_broker, cop, instance); string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_getInstance(_broker, ctx, instance, NULL, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_deleteInstance(_broker, ctx, instance, errorMessage); if (errorCode != OK) { errorMessage = (string) OpenDRIM_SoftwareInstallationServiceCapabilities_classnames[0] + ": " + errorMessage; CMSetStatusWithChars(_broker, &rc, (CMPIrc) errorCode, errorMessage.c_str()); return rc; } CMReturnDone(rslt); _L_; return rc; } CMPIStatus SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilitiesProviderExecQuery(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 SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_init(const CMPIBroker* broker) { _E_; _broker = broker; static bool initialized = false; if (!initialized) { string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_load(broker, errorMessage); if (errorCode != OK) { errorMessage += "SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_init FAILED: " + (string) OpenDRIM_SoftwareInstallationServiceCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return -1; } initialized = true; } _L_; return OK; } int SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_finalize() { _E_; static bool finalized = false; if (!finalized) { string errorMessage; int errorCode = SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_unload(errorMessage); if (errorCode != OK) { errorMessage += "SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_unload FAILED: " + (string) OpenDRIM_SoftwareInstallationServiceCapabilities_classnames[0] + ": " + errorMessage; string cmd = "/bin/echo \"" + errorMessage + "\" >> cmpi_prov_debug.txt"; system(cmd.c_str()); return errorCode; } finalized = true; } _L_; return OK; } #define SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_INIT if (SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_init(_broker) < 0) return NULL CMInstanceMIStub(SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilitiesProvider, SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilitiesProvider, _broker, SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_INIT); /* ---------------------------------------------------------------------------*/ /* End of Provider Factory */ /* ---------------------------------------------------------------------------*/ ././@LongLink0000000000000000000000000000021600000000000011564 Lustar rootrootopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationServiceCapabilities/cmpiOpenDRIM_SoftwareInstallationServiceCapabilities.hopendrim-lmp-softwareupdate-1.0.0~ppa/OpenDRIM_SoftwareInstallationServiceCapabilities/cmpiOpenDRIM_0000644000175000017500000000505011401066772034557 0ustar guillaumeguillaume/*############################################################################### # Linux Management Providers (LMP), Software Update provider package # Copyright (C) 2009 Nazarov Nodir, TUIT # # This program is being developed under the "OpenDRIM" project. # The "OpenDRIM" project web page: http://opendrim.sourceforge.net # The "OpenDRIM" project mailing list: opendrim@googlegroups.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################# ################################################################################# # To contributors, please leave your contact information in this section # AND comment your changes in the source code. # # Modified by 2009 Shakhrom RUSTAMOV, TUIT # Modified by 2009 Guillaume BOTTEX, ETRI ###############################################################################*/ #ifndef CMPIOPENDRIM_SOFTWAREINSTALLATIONSERVICECAPABILITIES_H_ #define CMPIOPENDRIM_SOFTWAREINSTALLATIONSERVICECAPABILITIES_H_ #include "OpenDRIM_SoftwareInstallationServiceCapabilities.h" CMPIObjectPath* SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_SoftwareInstallationServiceCapabilities& instance); CMPIInstance* SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_SoftwareInstallationServiceCapabilities& instance); void SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_SoftwareInstallationServiceCapabilities& instance); void SoftwareUpdate_OpenDRIM_SoftwareInstallationServiceCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_SoftwareInstallationServiceCapabilities& instance); #endif /*CMPIOPENDRIM_SOFTWAREINSTALLATIONSERVICECAPABILITIES_H_*/ opendrim-lmp-softwareupdate-1.0.0~ppa/README0000644000175000017500000000103311401066772021460 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!