blob: baa61b627666df5aac0f5c05b15ee3b307cbd979 [file] [log] [blame]
Loïc Siret31d5cc02016-09-08 14:38:24 -04001/*
2 * Copyright (C) 2015-2016 Savoir-faire Linux Inc.
3 * Author: Loïc Siret <loic.siret@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#import "LoadingWCDelegate.h"
22#import "views/ITProgressIndicator.h"
23
24@interface AbstractLoadingWC : NSWindowController
25{
26@protected
27 __unsafe_unretained IBOutlet NSView* errorContainer;
28
29 __unsafe_unretained IBOutlet NSView* progressContainer;
30
31 __unsafe_unretained IBOutlet NSView* initialContainer;
32 __unsafe_unretained IBOutlet NSView* finalContainer;
33}
34
35/*
36 * Delegate to inform about completion of the linking process between
37 * a ContactMethod and a Person.
38 */
39@property (retain, nonatomic) id <LoadingWCDelegate> delegate;
40
41/*
42 * caller specific code to identify ongoing action
43 */
44@property (nonatomic) NSInteger actionCode;
45
46
47- (id)initWithWindowNibName:(NSString *)nibName
48 delegate:(id <LoadingWCDelegate>) del
49 actionCode:(NSInteger) code;
50
51- (id)initWithDelegate:(id <LoadingWCDelegate>) del
52 actionCode:(NSInteger) code;
53
54- (void)close;
55- (void)showLoading;
56- (void)showError;
57- (void)showFinal;
58
59@end