~ubuntu-branches/ubuntu/quantal/opendrim-lmp-simpleidentitymanagement/quantal

« back to all changes in this revision

Viewing changes to OpenDRIM_HostedAccountManagementService/cmpiOpenDRIM_HostedAccountManagementService.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Guillaume BOTTEX
  • Date: 2010-06-21 15:54:00 UTC
  • Revision ID: james.westby@ubuntu.com-20100621155400-myesv5hd2f3s8x9y
Tags: upstream-1.0.0
ImportĀ upstreamĀ versionĀ 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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>
 
4
 
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
 
8
 
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
 
12
# of the License.
 
13
 
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.
 
18
 
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
#################################################################################
 
23
 
 
24
#################################################################################
 
25
# To contributors, please leave your contact information in this section
 
26
# AND comment your changes in the source code.
 
27
 
28
# Modified by 2009 Khahramon NURIDDINOV, TUIT <qahramon0786@gmail.com>
 
29
# Modified by 2009 Guillaume BOTTEX, ETRI <guillaumebottex@etri.re.kr>
 
30
################################################################################*/
 
31
 
 
32
#include "cmpiOpenDRIM_HostedAccountManagementService.h"
 
33
 
 
34
CMPIObjectPath* Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_toCMPIObjectPath(const CMPIBroker* broker, const OpenDRIM_HostedAccountManagementService& instance) {
 
35
        _E_;
 
36
        Objectpath op(broker, OpenDRIM_HostedAccountManagementService_classnames[0], OpenDRIM_HostedAccountManagementService_NAMESPACE);
 
37
 
 
38
        if (!instance.Antecedent_isNULL)
 
39
                op.addKey("Antecedent", instance.Antecedent);
 
40
 
 
41
        if (!instance.Dependent_isNULL)
 
42
                op.addKey("Dependent", instance.Dependent);
 
43
 
 
44
        _L_;
 
45
        return op.getHdl();
 
46
}
 
47
 
 
48
CMPIInstance* Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_toCMPIInstance(const CMPIBroker* broker, const OpenDRIM_HostedAccountManagementService& instance) {
 
49
        _E_;
 
50
        Objectpath op(broker, Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_toCMPIObjectPath(broker, instance));
 
51
        Instance ci(broker, op);
 
52
 
 
53
        _L_;
 
54
        return ci.getHdl();
 
55
}
 
56
 
 
57
void Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_toCPP(const CMPIBroker* broker, const CMPIObjectPath* ref, OpenDRIM_HostedAccountManagementService& instance) {
 
58
        _E_;
 
59
        Objectpath op(broker, (CMPIObjectPath*) ref);
 
60
 
 
61
        if (op.getKey("Antecedent", instance.Antecedent) == OK)
 
62
                instance.Antecedent_isNULL = false;
 
63
 
 
64
        if (op.getKey("Dependent", instance.Dependent) == OK)
 
65
                instance.Dependent_isNULL = false;
 
66
 
 
67
        _L_;
 
68
}
 
69
 
 
70
void Simple_Identity_Management_OpenDRIM_HostedAccountManagementService_toCPP(const CMPIBroker* broker, const CMPIInstance* ci, OpenDRIM_HostedAccountManagementService& instance) {
 
71
        _E_;
 
72
        Instance inst(broker, (CMPIInstance*) ci);
 
73
 
 
74
        if (inst.getProperty("Antecedent", instance.Antecedent) == OK)
 
75
                instance.Antecedent_isNULL = false;
 
76
 
 
77
        if (inst.getProperty("Dependent", instance.Dependent) == OK)
 
78
                instance.Dependent_isNULL = false;
 
79
 
 
80
        _L_;
 
81
}
 
82