2 * Copyright 2005, Waldemar Kornewald <wkornew@gmx.net>
3 * Distributed under the terms of the MIT License.
6 #ifndef CONNECTION_VIEW__H
7 #define CONNECTION_VIEW__H
11 #include <TextControl.h>
13 #include <PPPInterfaceListener.h>
19 class ConnectionView
: public BView
{
20 friend class ConnectionWindow
;
23 ConnectionView(BRect rect
, const BString
& interfaceName
);
25 virtual void AttachedToWindow();
26 virtual void MessageReceived(BMessage
*message
);
28 const char *Username() const
29 { return fUsername
->Text(); }
30 const char *Password() const
31 { return fPassword
->Text(); }
32 bool DoesSavePassword() const
33 { return fSavePassword
->Value(); }
42 BString
AttemptString() const;
43 void HandleReportMessage(BMessage
*message
);
44 void UpdateStatus(int32 code
);
45 void WatchInterface(ppp_interface_id ID
);
48 PPPInterfaceListener fListener
;
49 BString fInterfaceName
;
51 BTextControl
*fUsername
, *fPassword
;
52 BCheckBox
*fSavePassword
;
53 BStringView
*fAttemptView
, *fStatusView
;
54 BButton
*fConnectButton
, *fCancelButton
;
57 bool fKeepLabel
, fHasUsername
, fHasPassword
, fAskBeforeConnecting
;