1
/* Editor Settings: expandtabs and use 4 spaces for indentation
2
* ex: set softtabstop=4 tabstop=8 expandtab shiftwidth=4: *
3
* -*- mode: c, c-basic-offset: 4 -*- */
6
* Copyright (C) Centeris Corporation 2004-2007
7
* Copyright (C) Likewise Software 2007-2008
10
* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version.
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
20
* You should have received a copy of the GNU General Public License
21
* along with this program. If not, see <http://www.gnu.org/licenses/>.
28
* Created by Sriram Nambakam on 8/8/07.
29
* Copyright 2007 Centeris Corporation. All rights reserved.
32
#ifndef __DOMAINJOINWINDOW_H__
33
#define __DOMAINJOINWINDOW_H__
35
#include <Carbon/Carbon.h>
37
#include "TApplication.h"
42
class DomainJoinWindow : public TWindow
45
DomainJoinWindow(int inAppSignature);
46
virtual ~DomainJoinWindow();
49
DomainJoinWindow(const DomainJoinWindow& other);
50
DomainJoinWindow& operator=(const DomainJoinWindow& other);
54
void SetComputerName(const std::string& name);
55
void SetDomainName(const std::string& name);
61
virtual Boolean HandleCommand( const HICommandExtended& inCommand );
63
std::string GetComputerName();
64
std::string GetDomainName();
65
std::string GetOUPath();
67
void HandleJoinDomain();
68
void GetCredentials();
71
void ValidateDomainname(const std::string& domainName);
72
void ValidateUsername(const std::string& userName);
73
void ValidateHostname(const std::string& hostName);
74
void ValidateOUPath(const std::string& ouPath);
76
void ShowDomainWelcomeDialog(const std::string& domainName);
78
TWindow& GetCredentialsDialog();
82
static const int COMPUTER_NAME_ID;
83
static const int DOMAIN_NAME_ID;
84
static const int DEFAULT_OU_RADIO_ID;
85
static const int OU_PATH_RADIO_ID;
86
static const int OU_PATH_TEXT_ID;
87
static const int CANCEL_ID;
88
static const int JOIN_ID;
90
static const int COMPUTER_NAME_CMD_ID;
91
static const int DOMAIN_NAME_CMD_ID;
92
static const int DEFAULT_OU_CMD_ID;
93
static const int OU_PATH_RADIO_CMD_ID;
94
static const int OU_PATH_TEXT_CMD_ID;
95
static const int CANCEL_CMD_ID;
96
static const int JOIN_CMD_ID;
100
std::string _originalComputerName;
101
std::string _userName;
102
std::string _password;
104
TWindow* _credentialsDialog;
107
#endif /* __DOMAINJOINWINDOW_H__ */