~zulcss/ubuntu/lucid/likewise-open/likewise-open-sru

« back to all changes in this revision

Viewing changes to domainjoin/domainjoin-gui/carbon/DomainJoin/DomainJoinWindow.h

  • Committer: Bazaar Package Importer
  • Author(s): Rick Clark
  • Date: 2008-08-27 08:56:20 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080827085620-5q0f58b9qtog9myq
Tags: 4.1.0.2956-0ubuntu1
* missing-likewise-logo.diff: removed
* fixed copyright notice
* updated Standards-Version to 3.8.0
* removed path from command in prerm
* removed stop in S runlevel

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 -*- */
 
4
 
 
5
/*
 
6
 * Copyright (C) Centeris Corporation 2004-2007
 
7
 * Copyright (C) Likewise Software    2007-2008
 
8
 * All rights reserved.
 
9
 * 
 
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.
 
14
 *
 
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.
 
19
 *
 
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/>.
 
22
 */
 
23
 
 
24
/*
 
25
 *  DomainJoinWindow.h
 
26
 *  DomainJoin
 
27
 *
 
28
 *  Created by Sriram Nambakam on 8/8/07.
 
29
 *  Copyright 2007 Centeris Corporation. All rights reserved.
 
30
 *
 
31
 */
 
32
#ifndef __DOMAINJOINWINDOW_H__
 
33
#define __DOMAINJOINWINDOW_H__
 
34
 
 
35
#include <Carbon/Carbon.h>
 
36
 
 
37
#include "TApplication.h"
 
38
#include "TWindow.h"
 
39
 
 
40
#include <string.h>
 
41
 
 
42
class DomainJoinWindow : public TWindow
 
43
{
 
44
    public:
 
45
                DomainJoinWindow(int inAppSignature);
 
46
        virtual ~DomainJoinWindow();
 
47
        
 
48
        protected:
 
49
            DomainJoinWindow(const DomainJoinWindow& other);
 
50
                DomainJoinWindow& operator=(const DomainJoinWindow& other);
 
51
                
 
52
        public:
 
53
 
 
54
                void SetComputerName(const std::string& name);
 
55
                void SetDomainName(const std::string& name);
 
56
        
 
57
                virtual void Close();
 
58
 
 
59
    protected:
 
60
    
 
61
        virtual Boolean     HandleCommand( const HICommandExtended& inCommand );
 
62
                
 
63
                std::string GetComputerName();
 
64
                std::string GetDomainName();
 
65
                std::string GetOUPath();
 
66
                
 
67
                void HandleJoinDomain();
 
68
                void GetCredentials();
 
69
                bool ValidateData();
 
70
                
 
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);
 
75
                
 
76
                void ShowDomainWelcomeDialog(const std::string& domainName);
 
77
                
 
78
                TWindow& GetCredentialsDialog();
 
79
                
 
80
        protected:
 
81
        
 
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;
 
89
                
 
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;
 
97
                
 
98
        private:
 
99
        
 
100
            std::string _originalComputerName;
 
101
            std::string _userName;
 
102
            std::string _password;
 
103
                
 
104
                TWindow*    _credentialsDialog;
 
105
};
 
106
 
 
107
#endif /* __DOMAINJOINWINDOW_H__ */
 
108
 
 
109