blob: bbf8b4882163260fdb03d77706358be07a30bf99 [file] [log] [blame]
Alexandre Lision8521baa2015-03-13 11:08:00 -04001/*
Alexandre Lision9fe374b2016-01-06 10:17:31 -05002 * Copyright (C) 2015-2016 Savoir-faire Linux Inc.
Alexandre Lision8521baa2015-03-13 11:08:00 -04003 * 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.
Alexandre Lision8521baa2015-03-13 11:08:00 -040018 */
Alexandre Lision5855b6a2015-02-03 11:31:05 -050019#import <Cocoa/Cocoa.h>
Alexandre Lision5855b6a2015-02-03 11:31:05 -050020
Anthony Léonard9bebf1d2017-12-21 14:33:51 -050021namespace lrc {
22 namespace api {
23 namespace account {
24 struct Info;
25 }
26 }
27}
28
Alexandre Lisionfd0d6c82016-03-29 17:06:54 -040029@interface RingWindowController : NSWindowController <NSSharingServicePickerDelegate> {
Alexandre Lision4a7b95e2015-02-20 10:06:43 -050030 IBOutlet NSView *currentView;
Alexandre Lision5855b6a2015-02-03 11:31:05 -050031}
32
Kateryna Kostiuka7248462017-04-18 16:15:31 -040033/**
34 * KVO to show or hide some UI elements in RingWindow:
35 * - Share button
36 * - QRCode
Kateryna Kostiuka7248462017-04-18 16:15:31 -040037 * - Explanatory label
38 */
Kateryna Kostiukab499f42018-04-16 12:27:33 -040039@property (nonatomic) BOOL notRingAccount;
40/**
41 * KVO to show or hide ringIDLabel
42 */
43@property (nonatomic) BOOL isSIPAccount;
44
Kateryna Kostiuka7248462017-04-18 16:15:31 -040045
Alexandre Lision4a7b95e2015-02-20 10:06:43 -050046- (IBAction)openPreferences:(id)sender;
Alexandre Lision5855b6a2015-02-03 11:31:05 -050047
Anthony Léonard9bebf1d2017-12-21 14:33:51 -050048/**
49 * This method is intended to be used by the ChooseAccountVC to signal the fact that
50 * the selected account has been changed by user. It will then forward this information
51 * to relevant controllers and views.
52 * @param accInfo reference to selected account
53 */
54- (void) selectAccount:(const lrc::api::account::Info&)accInfo;
55
Anthony Léonard8585cc02017-12-28 14:03:45 -050056/**
57 * Method triggered when a panel on the right is closed by user action. It triggers any action needed
58 * on itself or other view controllers to react properly to this event.
59 */
60-(void) rightPanelClosed;
61
Anthony Léonard0a9904c2018-01-11 16:43:47 -050062/**
63 * Triggered by Conversation view when the current conversation is switching from pending state to
64 * trusted. It triggers conversation list change in SmartViewVC in order to keep current conversation
65 * visible in left list (to "follow it").
66 */
67-(void) currentConversationTrusted;
68
Anthony Léonardbee94cc2018-01-16 11:42:40 -050069/**
70 * Triggered by SmartView when list type is changed by user. It closes the right view as the selected conversation
71 * is not in filtered list anymore.
72 * @note This method is not to be used if list change is triggered by a left panel view.
73 */
74-(void) listTypeChanged;
75
Kateryna Kostiukab499f42018-04-16 12:27:33 -040076/**
77 * Triggered by Choosen account VC when all accounts deleted
78 */
79-(void)allAccountsDeleted;
80
Alexandre Lision5855b6a2015-02-03 11:31:05 -050081@end