]>
git.saurik.com Git - apple/mdnsresponder.git/blob - mDNSWindows/DNSServiceBrowser/Windows/Sources/LoginDialog.cpp
1 /* -*- Mode: C; tab-width: 4 -*-
3 * Copyright (c) 2003-2004 Apple Computer, Inc. All rights reserved.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 Change History (most recent first):
19 $Log: LoginDialog.cpp,v $
20 Revision 1.2 2006/08/14 23:25:49 cheshire
21 Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0
23 Revision 1.1 2004/06/18 04:04:36 rpantos
26 Revision 1.2 2004/01/30 02:56:32 bradley
27 Updated to support full Unicode display. Added support for all services on www.dns-sd.org.
29 Revision 1.1 2003/12/25 03:47:28 bradley
30 Login dialog to get the username/password from the user.
39 #include "LoginDialog.h"
44 static char THIS_FILE
[] = __FILE__
;
47 //===========================================================================================================================
49 //===========================================================================================================================
51 BEGIN_MESSAGE_MAP( LoginDialog
, CDialog
)
54 //===========================================================================================================================
56 //===========================================================================================================================
58 LoginDialog::LoginDialog( CWnd
*inParent
)
59 : CDialog( LoginDialog::IDD
, inParent
)
64 //===========================================================================================================================
66 //===========================================================================================================================
68 BOOL
LoginDialog::OnInitDialog( void )
70 CDialog::OnInitDialog();
74 //===========================================================================================================================
76 //===========================================================================================================================
78 void LoginDialog::DoDataExchange( CDataExchange
*inDX
)
80 CDialog::DoDataExchange( inDX
);
83 //===========================================================================================================================
85 //===========================================================================================================================
87 void LoginDialog::OnOK( void )
93 control
= GetDlgItem( IDC_LOGIN_USERNAME_TEXT
);
97 control
->GetWindowText( mUsername
);
102 control
= GetDlgItem( IDC_LOGIN_PASSWORD_TEXT
);
106 control
->GetWindowText( mPassword
);
112 //===========================================================================================================================
114 //===========================================================================================================================
116 BOOL
LoginDialog::GetLogin( CString
&outUsername
, CString
&outPassword
)
118 if( DoModal() == IDOK
)
120 outUsername
= mUsername
;
121 outPassword
= mPassword
;