-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathAgentSettings.cpp
149 lines (118 loc) · 2.9 KB
/
AgentSettings.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
//====================================================================================
// Open Computer and Software Inventory Next Generation
// Copyright (C) 2010 OCS Inventory NG Team. All rights reserved.
// Web: http://www.ocsinventory-ng.org
// This code is open source and may be copied and modified as long as the source
// code is always made freely available.
// Please refer to the General Public Licence V2 http://www.gnu.org/ or Licence.txt
//====================================================================================
// AgentSettings.cpp: implementation of the CAgentSettings class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "ocs_deploy_tool.h"
#include "AgentSettings.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CAgentSettings::CAgentSettings()
{
m_uOS = AGENT_OS_UNKNOWN;
m_csServer = DEFAULT_SERVER_ADDRESS;
}
CAgentSettings::~CAgentSettings()
{
}
LPCTSTR CAgentSettings::GetLoginName()
{
return m_csLoginName;
}
BOOL CAgentSettings::IsLoginNameAvailable()
{
return !m_csLoginName.IsEmpty();
}
LPCTSTR CAgentSettings::GetPassword()
{
return m_csPassword;
}
BOOL CAgentSettings::IsPasswordAvailable()
{
return !m_csPassword.IsEmpty();
}
LPCTSTR CAgentSettings::GetSshKey()
{
return m_csSshKey;
}
BOOL CAgentSettings::IsSshKeyAvailable()
{
return !m_csSshKey.IsEmpty();
}
UINT CAgentSettings::GetTargetOS()
{
return m_uOS;
}
CString CAgentSettings::GetAgentSetupFile()
{
return m_csAgentSetupFile;
}
CStringList * CAgentSettings::GetAgentOtherFiles()
{
return &m_AgentOtherFiles;
}
CStringList * CAgentSettings::GetPluginFiles()
{
return &m_PluginFiles;
}
CString CAgentSettings::GetInstallerOptions()
{
return m_csInstallerOptions;
}
CString CAgentSettings::GetServerAddress()
{
return m_csServer;
}
CString CAgentSettings::GetAgentSetupDirectory()
{
return m_csAgentDirectory;
}
CString CAgentSettings::GetAgentEtcDirectory()
{
return m_csAgentEtcDirectory;
}
void CAgentSettings::SetLoginName(CString csLogin)
{
m_csLoginName = csLogin;
}
void CAgentSettings::SetPassword(CString csPassword)
{
m_csPassword = csPassword;
}
void CAgentSettings::SetSshKey( CString csSshKeyFile)
{
m_csSshKey = csSshKeyFile;
}
void CAgentSettings::SetAgentSetupFile( CString csFile)
{
m_csAgentSetupFile = csFile;
}
void CAgentSettings::SetInstallerOptions( CString csOptions)
{
m_csInstallerOptions = csOptions;
}
void CAgentSettings::SetServerAddress( CString csServer)
{
m_csServer = csServer;
}
void CAgentSettings::SetAgentSetupDirectory( CString csDirectory)
{
m_csAgentDirectory = csDirectory;
}
void CAgentSettings::SetAgentEtcDirectory( CString csDirectory)
{
m_csAgentEtcDirectory = csDirectory;
}