home *** CD-ROM | disk | FTP | other *** search
- /*
- NILoginPanel.h
- Copyright 1989, NeXT, Inc.
- Responsibility: Lee Tucker
- */
-
- #import <netinfo/ni.h>
- #import <appkit/Panel.h>
-
- #define NI_USERTESTMODE 0
- #define NI_NETINFOTESTMODE 1
-
- @interface NILoginPanel : Panel
- {
- id panel;
- id userField;
- id passwordField;
- id instructionText;
- BOOL validLogin;
- BOOL loginSuccess;
- int bootMode;
- char currentUser[16];
- char currentPassword[16];
- id iconButton;
- int _reservedSpace1;
- int _reservedSpace2;
- int _reservedSpace3;
- }
-
- + new; /* Loads the NIB section if not already loaded */
- - setIconButton:anObject;
-
- - (BOOL)runModal:sender inDomain:(void *) domainID;
- /* Runs the login dialog modally with the default user "root" */
-
- - (BOOL)runModal:sender inDomain:(void *)domainID withUser:(const char *)userName withInstruction:(const char *)whatWarning allowChange:(BOOL)disableUser;
- /* Runs the login dialog modally with the user as specified */
-
- - (BOOL)runModalWithValidation:sender inDomain:(void *) domainID withUser:(const char *)userName withInstruction:(const char *)whatWarning allowChange:(BOOL)enableUser;
-
- /* Target methods */
-
- - ok:sender; /* Target method of the Login button. If you override this
- method be careful, it zero's the password value before it completes! */
- - cancel:sender; /* Target method of the Cancel button */
-
- /* Data extraction methods */
-
- - (BOOL)isValidLogin:sender;
- - (const char *)getPassword:sender; /* This method only will return the
- correct password if the method is called during an authenticateUser call
- to the delegate. It will return NULL at all other times. */
- - (const char *)getUser:sender;
-
-
- @end
-
- @interface NILoginPanelDelegate: Object
- - (BOOL)panel:thePanel authenticateUser:(const char *)username withPassword:(const char *)password inDomain:(const void *)domain;
-
- @end
-