blob: d8f4d36cc73354cdfd58cfa3b15bb032d23c1d96 [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
37 * - RingID field
38 * - Explanatory label
39 */
40@property (nonatomic) BOOL hideRingID;
41
Alexandre Lision4a7b95e2015-02-20 10:06:43 -050042- (IBAction)openPreferences:(id)sender;
Alexandre Lision5855b6a2015-02-03 11:31:05 -050043
Anthony Léonard9bebf1d2017-12-21 14:33:51 -050044/**
45 * This method is intended to be used by the ChooseAccountVC to signal the fact that
46 * the selected account has been changed by user. It will then forward this information
47 * to relevant controllers and views.
48 * @param accInfo reference to selected account
49 */
50- (void) selectAccount:(const lrc::api::account::Info&)accInfo;
51
Anthony Léonard8585cc02017-12-28 14:03:45 -050052/**
53 * Method triggered when a panel on the right is closed by user action. It triggers any action needed
54 * on itself or other view controllers to react properly to this event.
55 */
56-(void) rightPanelClosed;
57
Anthony Léonard0a9904c2018-01-11 16:43:47 -050058/**
59 * Triggered by Conversation view when the current conversation is switching from pending state to
60 * trusted. It triggers conversation list change in SmartViewVC in order to keep current conversation
61 * visible in left list (to "follow it").
62 */
63-(void) currentConversationTrusted;
64
Anthony Léonardbee94cc2018-01-16 11:42:40 -050065/**
66 * Triggered by SmartView when list type is changed by user. It closes the right view as the selected conversation
67 * is not in filtered list anymore.
68 * @note This method is not to be used if list change is triggered by a left panel view.
69 */
70-(void) listTypeChanged;
71
Alexandre Lision5855b6a2015-02-03 11:31:05 -050072@end