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

« back to all changes in this revision

Viewing changes to OpenDRIM_AccountManagementCapabilities/OpenDRIM_AccountManagementCapabilitiesAccess.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 "OpenDRIM_AccountManagementCapabilitiesAccess.h"
 
33
 
 
34
string InstanceID;
 
35
 
 
36
int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_load(const CMPIBroker* broker, string& errorMessage) {
 
37
        _E_;
 
38
        CF_assert(CF_getSystemName(InstanceID, errorMessage));
 
39
        _L_;
 
40
        return OK;
 
41
}
 
42
 
 
43
int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_unload(string& errorMessage) {
 
44
        _E_;
 
45
        // TODO
 
46
        _L_;
 
47
        return OK;
 
48
}
 
49
 
 
50
int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector<OpenDRIM_AccountManagementCapabilities>& result, const char** properties, string& errorMessage, const string& discriminant) {
 
51
        _E_;
 
52
        // Only one instance
 
53
        // The key properties are based on the system name
 
54
        OpenDRIM_AccountManagementCapabilities instance;
 
55
        instance.setInstanceID(InstanceID);
 
56
        
 
57
        if(discriminant=="ei")
 
58
                CF_assert(Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_populate(instance, errorMessage));
 
59
        
 
60
        result.push_back(instance);
 
61
        _L_;
 
62
        return OK;
 
63
}
 
64
 
 
65
int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_getInstance(const CMPIBroker* broker, const CMPIContext* ctx, OpenDRIM_AccountManagementCapabilities& instance, const char** properties, string& errorMessage) {
 
66
        _E_;
 
67
        // Only one instance
 
68
        // The key properties are based on the system name
 
69
        if (instance.InstanceID!=InstanceID)
 
70
        {
 
71
                errorMessage = "No instance";
 
72
                return NOT_FOUND;
 
73
        }
 
74
        
 
75
        CF_assert(Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_populate(instance, errorMessage));
 
76
        _L_;
 
77
        return OK;
 
78
}
 
79
 
 
80
int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_setInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementCapabilities& newInstance, const OpenDRIM_AccountManagementCapabilities& oldInstance, const char** properties, string& errorMessage) {
 
81
        _E_;
 
82
        // TODO
 
83
        _L_;
 
84
        return NOT_SUPPORTED;
 
85
}
 
86
 
 
87
int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_createInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementCapabilities& instance, string& errorMessage) {
 
88
        _E_;
 
89
        // TODO
 
90
        _L_;
 
91
        return NOT_SUPPORTED;
 
92
}
 
93
 
 
94
int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_deleteInstance(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementCapabilities& instance, string& errorMessage) {
 
95
        _E_;
 
96
        // TODO
 
97
        _L_;
 
98
        return NOT_SUPPORTED;
 
99
}
 
100
 
 
101
int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_CreateGoalSettings(const CMPIBroker* broker, const CMPIContext* ctx, const OpenDRIM_AccountManagementCapabilities& instance, unsigned short& returnValue, const OpenDRIM_AccountManagementCapabilities_CreateGoalSettings_In& in, OpenDRIM_AccountManagementCapabilities_CreateGoalSettings_Out& out, string& errorMessage) {
 
102
        _E_;
 
103
        // TODO
 
104
        _L_;
 
105
        return OK;
 
106
}
 
107
 
 
108
int Simple_Identity_Management_OpenDRIM_AccountManagementCapabilities_populate(OpenDRIM_AccountManagementCapabilities& instance, string& errorMessage) {
 
109
        _E_;
 
110
        instance.setElementName("Account Management Capabilities");     
 
111
        instance.setMaxElementNameLen(256);
 
112
        instance.setElementNameEditSupported(true);
 
113
        _L_;
 
114
        return OK;
 
115
}
 
116