btrfs: Attempt to fix GCC2 build.
[haiku.git] / src / bin / network / ppp_up / ConnectionView.h
blob41cb10fdffa97df519d0b541fe7f900c197b945f
1 /*
2 * Copyright 2005, Waldemar Kornewald <wkornew@gmx.net>
3 * Distributed under the terms of the MIT License.
4 */
6 #ifndef CONNECTION_VIEW__H
7 #define CONNECTION_VIEW__H
9 #include <CheckBox.h>
10 #include <Message.h>
11 #include <TextControl.h>
13 #include <PPPInterfaceListener.h>
15 class BButton;
16 class BStringView;
19 class ConnectionView : public BView {
20 friend class ConnectionWindow;
22 public:
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(); }
35 private:
36 void Reload();
38 void Connect();
39 void Cancel();
40 void CleanUp();
42 BString AttemptString() const;
43 void HandleReportMessage(BMessage *message);
44 void UpdateStatus(int32 code);
45 void WatchInterface(ppp_interface_id ID);
47 private:
48 PPPInterfaceListener fListener;
49 BString fInterfaceName;
51 BTextControl *fUsername, *fPassword;
52 BCheckBox *fSavePassword;
53 BStringView *fAttemptView, *fStatusView;
54 BButton *fConnectButton, *fCancelButton;
56 BMessage fSettings;
57 bool fKeepLabel, fHasUsername, fHasPassword, fAskBeforeConnecting;
61 #endif