1
/*###############################################################################
2
# Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package
3
# Copyright (C) 2007 Ilsoo Byun, ETRI <widepis@etri.re.kr, widepis@empal.com>
5
# This program is being developed under the "OpenDRIM" project.
6
# The "OpenDRIM" project web page: http://opendrim.sourceforge.net
7
# The "OpenDRIM" project mailing list: opendrim@googlegroups.com
9
# This program is free software; you can redistribute it and/or
10
# modify it under the terms of the GNU General Public License
11
# as published by the Free Software Foundation; version 2
14
# This program is distributed in the hope that it will be useful,
15
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
# GNU General Public License for more details.
19
# You should have received a copy of the GNU General Public License
20
# along with this program; if not, write to the Free Software
21
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22
#################################################################################
24
#################################################################################
25
# To contributors, please leave your contact information in this section
26
# AND comment your changes in the source code.
28
# Modified by 2008 Guillaume BOTTEX, ETRI <guillaumebottex@etri.re.kr, guillaumebottex@gmail.com>
29
###############################################################################*/
31
#include "cmpiOpenDRIM_RecordLogCapabilities.h"
33
CMPIObjectPath* OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_RecordLogCapabilities& instance) {
35
Objectpath op(broker, OpenDRIM_RecordLogCapabilities_classnames[0], OpenDRIM_RecordLogCapabilities_NAMESPACE);
37
if (!instance.InstanceID_isNULL)
38
op.addKey("InstanceID", instance.InstanceID);
44
CMPIInstance* OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_RecordLogCapabilities& instance) {
46
Objectpath op(broker, OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCMPIObjectPath(broker, instance));
47
Instance ci(broker, op);
49
if (!instance.Caption_isNULL)
50
ci.setProperty("Caption", instance.Caption);
52
if (!instance.Description_isNULL)
53
ci.setProperty("Description", instance.Description);
55
if (!instance.ElementName_isNULL)
56
ci.setProperty("ElementName", instance.ElementName);
58
if (!instance.ElementNameEditSupported_isNULL)
59
ci.setProperty("ElementNameEditSupported", instance.ElementNameEditSupported);
61
if (!instance.MaxElementNameLen_isNULL)
62
ci.setProperty("MaxElementNameLen", instance.MaxElementNameLen);
64
if (!instance.RequestedStatesSupported_isNULL)
65
ci.setProperty("RequestedStatesSupported", instance.RequestedStatesSupported);
67
if (!instance.ElementNameMask_isNULL)
68
ci.setProperty("ElementNameMask", instance.ElementNameMask);
70
if (!instance.StateAwareness_isNULL)
71
ci.setProperty("StateAwareness", instance.StateAwareness);
77
void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_RecordLogCapabilities& instance) {
79
Objectpath op(broker, (CMPIObjectPath*) ref);
81
if (op.getKey("InstanceID", instance.InstanceID) == OK)
82
instance.InstanceID_isNULL = false;
87
void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_RecordLogCapabilities& instance) {
89
Instance inst(broker, (CMPIInstance*) ci);
91
if (inst.getProperty("Caption", instance.Caption) == OK)
92
instance.Caption_isNULL = false;
94
if (inst.getProperty("Description", instance.Description) == OK)
95
instance.Description_isNULL = false;
97
if (inst.getProperty("InstanceID", instance.InstanceID) == OK)
98
instance.InstanceID_isNULL = false;
100
if (inst.getProperty("ElementName", instance.ElementName) == OK)
101
instance.ElementName_isNULL = false;
103
if (inst.getProperty("ElementNameEditSupported", instance.ElementNameEditSupported) == OK)
104
instance.ElementNameEditSupported_isNULL = false;
106
if (inst.getProperty("MaxElementNameLen", instance.MaxElementNameLen) == OK)
107
instance.MaxElementNameLen_isNULL = false;
109
if (inst.getProperty("RequestedStatesSupported", instance.RequestedStatesSupported) == OK)
110
instance.RequestedStatesSupported_isNULL = false;
112
if (inst.getProperty("ElementNameMask", instance.ElementNameMask) == OK)
113
instance.ElementNameMask_isNULL = false;
115
if (inst.getProperty("StateAwareness", instance.StateAwareness) == OK)
116
instance.StateAwareness_isNULL = false;
121
void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCPP(const CMPIBroker* broker, const CMPIArgs* in, OpenDRIM_RecordLogCapabilities_CreateGoalSettings_In& args) {
126
vector<string> TemplateGoalSettings;
127
data = in->ft->getArg(in, "TemplateGoalSettings", &rc);
129
CT_ToC(data, TemplateGoalSettings);
130
args.setTemplateGoalSettings(TemplateGoalSettings);
133
vector<string> SupportedGoalSettings;
134
data = in->ft->getArg(in, "SupportedGoalSettings", &rc);
136
CT_ToC(data, SupportedGoalSettings);
137
args.setSupportedGoalSettings(SupportedGoalSettings);
143
void OpenDRIM_RecordLogPackage_OpenDRIM_RecordLogCapabilities_toCMPIArg(const CMPIBroker* broker, CMPIArgs* out, const OpenDRIM_RecordLogCapabilities_CreateGoalSettings_Out& args) {
148
vector<string> SupportedGoalSettings;
149
errorMessage = args.getSupportedGoalSettings(SupportedGoalSettings);
150
if (errorMessage == OK) {
151
value = CT_toCMPI(broker, SupportedGoalSettings);
152
out->ft->addArg(out, "SupportedGoalSettings", &value, CMPI_stringA);