1 // AuthenticationPanel.h 2 3 #ifndef AUTHENTICATION_PANEL_H 4 #define AUTHENTICATION_PANEL_H 5 6 #include "Panel.h" 7 8 class BCheckBox; 9 class BTextControl; 10 11 class AuthenticationPanel : public Panel { 12 public: 13 AuthenticationPanel(BRect frame = BRect(-1000.0, -1000.0, -900.0, -900.0)); 14 virtual ~AuthenticationPanel(); 15 16 virtual bool QuitRequested(); 17 18 virtual void MessageReceived(BMessage *message); 19 20 // AuthenticationPanel 21 bool GetAuthentication(const char* server, 22 const char* share, 23 const char* previousUser, 24 const char* previousPass, 25 bool previousKeep, 26 bool badPassword, 27 char* user, 28 char* pass, 29 bool* askAgain); 30 31 virtual void Cancel(); 32 33 private: 34 BRect _CalculateFrame(BRect frame); 35 36 37 BTextControl* fNameTC; 38 BTextControl* fPassTC; 39 BCheckBox* fKeepUsingCB; 40 41 BButton* fOkB; 42 BButton* fCancelB; 43 44 bool fCancelled; 45 46 sem_id fExitSem; 47 }; 48 49 #endif // AUTHENTICATION_PANEL_H 50