1
/*################################################################################
2
# Linux Management Providers (LMP), Simple Identity Management provider package
3
# Copyright (C) 2007 Frederic Desmons, ETRI <desmons@etri.re.kr, desmons_frederic@yahoo.fr>
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 2009 Khahramon NURIDDINOV, TUIT <qahramon0786@gmail.com>
29
# Modified by 2009 Guillaume BOTTEX, ETRI <guillaumebottex@etri.re.kr>
30
################################################################################*/
32
#include "cmpiOpenDRIM_Group.h"
34
CMPIObjectPath* Simple_Identity_Management_OpenDRIM_Group_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_Group& instance) {
36
Objectpath op(broker, OpenDRIM_Group_classnames[0], OpenDRIM_Group_NAMESPACE);
38
if (!instance.CreationClassName_isNULL)
39
op.addKey("CreationClassName", instance.CreationClassName);
41
if (!instance.Name_isNULL)
42
op.addKey("Name", instance.Name);
48
CMPIInstance* Simple_Identity_Management_OpenDRIM_Group_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_Group& instance) {
50
Objectpath op(broker, Simple_Identity_Management_OpenDRIM_Group_toCMPIObjectPath(broker, instance));
51
Instance ci(broker, op);
53
if (!instance.Caption_isNULL)
54
ci.setProperty("Caption", instance.Caption);
56
if (!instance.Description_isNULL)
57
ci.setProperty("Description", instance.Description);
59
if (!instance.ElementName_isNULL)
60
ci.setProperty("ElementName", instance.ElementName);
62
if (!instance.BusinessCategory_isNULL)
63
ci.setProperty("BusinessCategory", instance.BusinessCategory);
65
if (!instance.CommonName_isNULL)
66
ci.setProperty("CommonName", instance.CommonName);
68
if (!instance.GroupID_isNULL)
69
ci.setProperty("GroupID", instance.GroupID);
75
void Simple_Identity_Management_OpenDRIM_Group_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_Group& instance) {
77
Objectpath op(broker, (CMPIObjectPath*) ref);
79
if (op.getKey("Name", instance.Name) == OK)
80
instance.Name_isNULL = false;
82
if (op.getKey("CreationClassName", instance.CreationClassName) == OK)
83
instance.CreationClassName_isNULL = false;
88
void Simple_Identity_Management_OpenDRIM_Group_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_Group& instance) {
90
Instance inst(broker, (CMPIInstance*) ci);
92
if (inst.getProperty("Caption", instance.Caption) == OK)
93
instance.Caption_isNULL = false;
95
if (inst.getProperty("Description", instance.Description) == OK)
96
instance.Description_isNULL = false;
98
if (inst.getProperty("ElementName", instance.ElementName) == OK)
99
instance.ElementName_isNULL = false;
101
if (inst.getProperty("CreationClassName", instance.CreationClassName) == OK)
102
instance.CreationClassName_isNULL = false;
104
if (inst.getProperty("Name", instance.Name) == OK)
105
instance.Name_isNULL = false;
107
if (inst.getProperty("BusinessCategory", instance.BusinessCategory) == OK)
108
instance.BusinessCategory_isNULL = false;
110
if (inst.getProperty("CommonName", instance.CommonName) == OK)
111
instance.CommonName_isNULL = false;
113
if (inst.getProperty("GroupID", instance.GroupID) == OK)
114
instance.GroupID_isNULL = false;