blob: b454d2ef46b71be7e8212fcd1adea8e40beb219b [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>
Kateryna Kostiukecaa3952018-07-13 16:00:34 -040020#import "LrcModelsProtocol.h"
Kateryna Kostiuk1f8c1252018-07-30 18:18:57 -040021#import "ChooseAccountVC.h"
Kateryna Kostiuk133364b2018-10-31 11:36:08 -040022#import "CurrentCallVC.h"
Alexandre Lision5855b6a2015-02-03 11:31:05 -050023
Anthony Léonard9bebf1d2017-12-21 14:33:51 -050024namespace lrc {
25 namespace api {
26 namespace account {
27 struct Info;
28 }
29 }
30}
31
Kateryna Kostiuk5d90c3b2019-07-18 12:03:52 -040032@interface RingWindowController : NSWindowController <NSSharingServicePickerDelegate, ChooseAccountDelegate, LrcModelsProtocol, CallViewControllerDelegate,NSWindowDelegate> {
Alexandre Lision4a7b95e2015-02-20 10:06:43 -050033 IBOutlet NSView *currentView;
Alexandre Lision5855b6a2015-02-03 11:31:05 -050034}
35
Kateryna Kostiuka7248462017-04-18 16:15:31 -040036/**
37 * KVO to show or hide some UI elements in RingWindow:
38 * - Share button
39 * - QRCode
Kateryna Kostiuka7248462017-04-18 16:15:31 -040040 * - Explanatory label
41 */
Kateryna Kostiukab499f42018-04-16 12:27:33 -040042@property (nonatomic) BOOL notRingAccount;
43/**
44 * KVO to show or hide ringIDLabel
45 */
46@property (nonatomic) BOOL isSIPAccount;
47
Kateryna Kostiuka7248462017-04-18 16:15:31 -040048
Alexandre Lision4a7b95e2015-02-20 10:06:43 -050049- (IBAction)openPreferences:(id)sender;
Alexandre Lision5855b6a2015-02-03 11:31:05 -050050
Anthony Léonard9bebf1d2017-12-21 14:33:51 -050051/**
Anthony Léonard8585cc02017-12-28 14:03:45 -050052 * Method triggered when a panel on the right is closed by user action. It triggers any action needed
53 * on itself or other view controllers to react properly to this event.
54 */
55-(void) rightPanelClosed;
56
Anthony Léonard0a9904c2018-01-11 16:43:47 -050057/**
58 * Triggered by Conversation view when the current conversation is switching from pending state to
59 * trusted. It triggers conversation list change in SmartViewVC in order to keep current conversation
60 * visible in left list (to "follow it").
61 */
62-(void) currentConversationTrusted;
63
Anthony Léonardbee94cc2018-01-16 11:42:40 -050064/**
65 * Triggered by SmartView when list type is changed by user. It closes the right view as the selected conversation
66 * is not in filtered list anymore.
67 * @note This method is not to be used if list change is triggered by a left panel view.
68 */
69-(void) listTypeChanged;
70
Kateryna Kostiuke3503842018-12-12 16:39:45 -050071-(void) showConversation:(NSString* )conversationId forAccount:(NSString*)accountId;
72-(void) showCall:(NSString* )callId forAccount:(NSString*)accountId forConversation:(NSString*)conversationId;
73-(void) showContactRequestFor:(NSString* )accountId contactUri:(NSString*)uri;
74
Alexandre Lision5855b6a2015-02-03 11:31:05 -050075@end