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

« back to all changes in this revision

Viewing changes to OpenDRIM_AccountAssociatedCapabilities/OpenDRIM_AccountAssociatedCapabilities.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_ACCOUNTASSOCIATEDCAPABILITIES_H_
 
33
#define OPENDRIM_ACCOUNTASSOCIATEDCAPABILITIES_H_
 
34
 
 
35
#include <Association.h>
 
36
 
 
37
// Direct Invocation includes, may have to be adjusted
 
38
/*
 
39
#include "cmpiCIM_Capabilities.h"
 
40
#include "CIM_CapabilitiesAccess.h"
 
41
#include "cmpiCIM_ManagedElement.h"
 
42
#include "CIM_ManagedElementAccess.h"
 
43
*/
 
44
 
 
45
const static char* OpenDRIM_AccountAssociatedCapabilities_classnames[] = {"OpenDRIM_AccountAssociatedCapabilities"};
 
46
static string OpenDRIM_AccountAssociatedCapabilities_NAMESPACE = _NAMESPACE;
 
47
const static string Capabilities_role = "Capabilities";
 
48
const static char* Capabilities_classnames[] = {"OpenDRIM_AccountCapabilities"};
 
49
const static string Capabilities_NAMESPACE = _NAMESPACE;
 
50
 
 
51
const static string ManagedElement_role = "ManagedElement";
 
52
const static char* ManagedElement_classnames[] = {"OpenDRIM_Account"};
 
53
const static string ManagedElement_NAMESPACE = _NAMESPACE;
 
54
 
 
55
class OpenDRIM_AccountAssociatedCapabilities {
 
56
 
 
57
public:
 
58
        
 
59
        Objectpath ManagedElement;
 
60
        bool ManagedElement_isNULL;
 
61
        
 
62
        Objectpath Capabilities;
 
63
        bool Capabilities_isNULL;
 
64
        
 
65
        vector<unsigned short> Characteristics;
 
66
        bool Characteristics_isNULL;
 
67
        
 
68
        OpenDRIM_AccountAssociatedCapabilities() {
 
69
                ManagedElement_isNULL = true;
 
70
                Capabilities_isNULL = true;
 
71
                Characteristics_isNULL = true;
 
72
        }
 
73
        
 
74
        ~OpenDRIM_AccountAssociatedCapabilities() {}
 
75
        
 
76
        string getKeys() const {
 
77
                return CF_toLowCase(".ManagedElement=\"" + CF_quoteString(ManagedElement.toString()) + "\""".Capabilities=\"" + CF_quoteString(Capabilities.toString()) + "\"");
 
78
        }
 
79
 
 
80
        int getManagedElement(Objectpath& value) const {
 
81
                if (ManagedElement_isNULL==true)
 
82
                        return NOT_FOUND;
 
83
                value = ManagedElement;
 
84
                return OK;
 
85
        }
 
86
        
 
87
        int setManagedElement(const Objectpath& newValue) {
 
88
                ManagedElement = newValue;
 
89
                ManagedElement.setNamespace(ManagedElement_NAMESPACE);
 
90
                ManagedElement_isNULL = false;
 
91
                return OK;
 
92
        }
 
93
 
 
94
        int getCapabilities(Objectpath& value) const {
 
95
                if (Capabilities_isNULL==true)
 
96
                        return NOT_FOUND;
 
97
                value = Capabilities;
 
98
                return OK;
 
99
        }
 
100
        
 
101
        int setCapabilities(const Objectpath& newValue) {
 
102
                Capabilities = newValue;
 
103
                Capabilities.setNamespace(Capabilities_NAMESPACE);
 
104
                Capabilities_isNULL = false;
 
105
                return OK;
 
106
        }
 
107
 
 
108
        int getCharacteristics(vector<unsigned short>& value) const {
 
109
                if (Characteristics_isNULL==true)
 
110
                        return NOT_FOUND;
 
111
                value = Characteristics;
 
112
                return OK;
 
113
        }
 
114
        
 
115
        int setCharacteristics(const vector<unsigned short>& newValue) {
 
116
                Characteristics = newValue;
 
117
                Characteristics_isNULL = false;
 
118
                return OK;
 
119
        }
 
120
 
 
121
};
 
122
 
 
123
#endif /*OPENDRIM_ACCOUNTASSOCIATEDCAPABILITIES_H_*/