~ubuntu-branches/ubuntu/trusty/opendrim-lmp-simpleidentitymanagement/trusty-proposed

« back to all changes in this revision

Viewing changes to OpenDRIM_HostedAccountManagementService/OpenDRIM_HostedAccountManagementService.h

  • 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
#ifndef OPENDRIM_HOSTEDACCOUNTMANAGEMENTSERVICE_H_
 
33
#define OPENDRIM_HOSTEDACCOUNTMANAGEMENTSERVICE_H_
 
34
 
 
35
#include <Association.h>
 
36
 
 
37
// Direct Invocation includes, may have to be adjusted
 
38
/*
 
39
#include "cmpiCIM_System.h"
 
40
#include "CIM_SystemAccess.h"
 
41
#include "cmpiCIM_Service.h"
 
42
#include "CIM_ServiceAccess.h"
 
43
*/
 
44
 
 
45
const static char* OpenDRIM_HostedAccountManagementService_classnames[] = {"OpenDRIM_HostedAccountManagementService"};
 
46
static string OpenDRIM_HostedAccountManagementService_NAMESPACE = _NAMESPACE;
 
47
const static string Antecedent_role = "Antecedent";
 
48
const static char* Antecedent_classnames[] = {"OpenDRIM_ComputerSystem"};
 
49
const static string Antecedent_NAMESPACE = _NAMESPACE;
 
50
 
 
51
const static string Dependent_role = "Dependent";
 
52
const static char* Dependent_classnames[] = {"OpenDRIM_AccountManagementService"};
 
53
const static string Dependent_NAMESPACE = _NAMESPACE;
 
54
 
 
55
class OpenDRIM_HostedAccountManagementService {
 
56
 
 
57
public:
 
58
        
 
59
        Objectpath Antecedent;
 
60
        bool Antecedent_isNULL;
 
61
        
 
62
        Objectpath Dependent;
 
63
        bool Dependent_isNULL;
 
64
        
 
65
        OpenDRIM_HostedAccountManagementService() {
 
66
                Antecedent_isNULL = true;
 
67
                Dependent_isNULL = true;
 
68
        }
 
69
        
 
70
        ~OpenDRIM_HostedAccountManagementService() {}
 
71
        
 
72
        string getKeys() const {
 
73
                return CF_toLowCase(".Antecedent=\"" + CF_quoteString(Antecedent.toString()) + "\""".Dependent=\"" + CF_quoteString(Dependent.toString()) + "\"");
 
74
        }
 
75
 
 
76
        int getAntecedent(Objectpath& value) const {
 
77
                if (Antecedent_isNULL==true)
 
78
                        return NOT_FOUND;
 
79
                value = Antecedent;
 
80
                return OK;
 
81
        }
 
82
        
 
83
        int setAntecedent(const Objectpath& newValue) {
 
84
                Antecedent = newValue;
 
85
                Antecedent.setNamespace(Antecedent_NAMESPACE);
 
86
                Antecedent_isNULL = false;
 
87
                return OK;
 
88
        }
 
89
 
 
90
        int getDependent(Objectpath& value) const {
 
91
                if (Dependent_isNULL==true)
 
92
                        return NOT_FOUND;
 
93
                value = Dependent;
 
94
                return OK;
 
95
        }
 
96
        
 
97
        int setDependent(const Objectpath& newValue) {
 
98
                Dependent = newValue;
 
99
                Dependent.setNamespace(Dependent_NAMESPACE);
 
100
                Dependent_isNULL = false;
 
101
                return OK;
 
102
        }
 
103
 
 
104
};
 
105
 
 
106
#endif /*OPENDRIM_HOSTEDACCOUNTMANAGEMENTSERVICE_H_*/