Alexandre Lision | 34079c2 | 2016-10-31 16:14:02 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2016 Savoir-faire Linux Inc. |
| 3 | * Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com> |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 3 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 18 | */ |
| 19 | |
| 20 | #import <Cocoa/Cocoa.h> |
| 21 | |
| 22 | #import "AbstractLoadingWC.h" |
| 23 | #import "LoadingWCDelegate.h" |
| 24 | |
| 25 | @protocol RegisterNameDelegate <LoadingWCDelegate> |
| 26 | |
| 27 | @optional |
| 28 | |
| 29 | - (void) didRegisterNameWithSuccess; |
| 30 | |
| 31 | @end |
| 32 | |
| 33 | @interface RegisterNameWC : AbstractLoadingWC |
| 34 | |
| 35 | - (id)initWithDelegate:(id <LoadingWCDelegate>) del; |
| 36 | |
| 37 | @property (nonatomic, weak) NSWindowController <RegisterNameDelegate>* delegate; |
| 38 | |
| 39 | /** |
| 40 | * KVO with the registeredNameField |
| 41 | */ |
| 42 | @property (nonatomic, weak)NSString* registeredName; |
| 43 | |
| 44 | /** |
| 45 | * KVO with the passwordField |
| 46 | */ |
| 47 | @property (nonatomic, weak)NSString* password; |
| 48 | |
| 49 | /** |
| 50 | * KVO validators for the UI |
| 51 | */ |
| 52 | @property (readonly)BOOL isPasswordValid; |
| 53 | @property (assign)BOOL isUserNameAvailable; |
| 54 | |
| 55 | @end |