~ubuntu-branches/ubuntu/trusty/opendrim-lmp-ssh/trusty

« back to all changes in this revision

Viewing changes to OpenDRIM_HostedSSHService/OpenDRIM_HostedSSHService.h

  • Committer: Bazaar Package Importer
  • Author(s): Guillaume BOTTEX
  • Date: 2010-07-07 11:04:10 UTC
  • Revision ID: james.westby@ubuntu.com-20100707110410-2bojrtqjp582wiy8
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), SSH provider package
 
3
# Copyright (C) 2010 Feng Zhanlei, REDFLAG <fengzhanlei@redflag-linux.com>
 
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 Guillaume BOTTEX <guillaumebottex@uxsystem.net>, UXSystem, 2010
 
29
###############################################################################*/
 
30
 
 
31
#ifndef OPENDRIM_HOSTEDSSHSERVICE_H_
 
32
#define OPENDRIM_HOSTEDSSHSERVICE_H_
 
33
 
 
34
#include <Association.h>
 
35
 
 
36
// Direct Invocation includes, may have to be adjusted
 
37
/*
 
38
#include "cmpiCIM_System.h"
 
39
#include "CIM_SystemAccess.h"
 
40
#include "cmpiCIM_Service.h"
 
41
#include "CIM_ServiceAccess.h"
 
42
*/
 
43
 
 
44
const static char* OpenDRIM_HostedSSHService_classnames[] = {"OpenDRIM_HostedSSHService"};
 
45
static string OpenDRIM_HostedSSHService_NAMESPACE = _NAMESPACE;
 
46
const static string Antecedent_role = "Antecedent";
 
47
const static char* Antecedent_classnames[] = {"OpenDRIM_ComputerSystem"};
 
48
const static string Antecedent_NAMESPACE = _NAMESPACE;
 
49
 
 
50
const static string Dependent_role = "Dependent";
 
51
const static char* Dependent_classnames[] = {"OpenDRIM_SSHProtocolService"};
 
52
const static string Dependent_NAMESPACE = _NAMESPACE;
 
53
 
 
54
class OpenDRIM_HostedSSHService {
 
55
 
 
56
public:
 
57
        
 
58
        Objectpath Antecedent;
 
59
        bool Antecedent_isNULL;
 
60
        
 
61
        Objectpath Dependent;
 
62
        bool Dependent_isNULL;
 
63
        
 
64
        OpenDRIM_HostedSSHService() {
 
65
                Antecedent_isNULL = true;
 
66
                Dependent_isNULL = true;
 
67
        }
 
68
        
 
69
        ~OpenDRIM_HostedSSHService() {}
 
70
        
 
71
        string getKeys() const {
 
72
                return CF_toLowCase(".Antecedent=\"" + CF_quoteString(Antecedent.toString()) + "\""".Dependent=\"" + CF_quoteString(Dependent.toString()) + "\"");
 
73
        }
 
74
 
 
75
        int getAntecedent(Objectpath& value) const {
 
76
                if (Antecedent_isNULL==true)
 
77
                        return NOT_FOUND;
 
78
                value = Antecedent;
 
79
                return OK;
 
80
        }
 
81
        
 
82
        int setAntecedent(const Objectpath& newValue) {
 
83
                Antecedent = newValue;
 
84
                Antecedent.setNamespace(Antecedent_NAMESPACE);
 
85
                Antecedent_isNULL = false;
 
86
                return OK;
 
87
        }
 
88
 
 
89
        int getDependent(Objectpath& value) const {
 
90
                if (Dependent_isNULL==true)
 
91
                        return NOT_FOUND;
 
92
                value = Dependent;
 
93
                return OK;
 
94
        }
 
95
        
 
96
        int setDependent(const Objectpath& newValue) {
 
97
                Dependent = newValue;
 
98
                Dependent.setNamespace(Dependent_NAMESPACE);
 
99
                Dependent_isNULL = false;
 
100
                return OK;
 
101
        }
 
102
 
 
103
};
 
104
 
 
105
#endif /*OPENDRIM_HOSTEDSSHSERVICE_H_*/