blob: 22fb0837171b36694478a929a182984af6a13ea1 [file] [log] [blame]
Alexandre Lision4dfcafc2015-08-20 12:43:23 -04001/*
Alexandre Lision9fe374b2016-01-06 10:17:31 -05002 * Copyright (C) 2015-2016 Savoir-faire Linux Inc.
Alexandre Lision4dfcafc2015-08-20 12:43:23 -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.
18 */
19
20#import <Cocoa/Cocoa.h>
Kateryna Kostiuk66150982020-09-18 15:14:36 -040021#include <qstring.h>
Alexandre Lision4dfcafc2015-08-20 12:43:23 -040022
Olivier Soldanod4311552017-11-20 15:09:53 -050023namespace lrc {
24 namespace api {
25 class ConversationModel;
Anthony Léonard9bebf1d2017-12-21 14:33:51 -050026
27 namespace conversation {
28 struct Info;
29 }
Olivier Soldanod4311552017-11-20 15:09:53 -050030 }
31}
32
Alexandre Lisionbf0385e2015-10-22 17:36:28 -040033@interface SmartViewVC : NSViewController <NSTextFieldDelegate>
Alexandre Lision4dfcafc2015-08-20 12:43:23 -040034
Kateryna Kostiuk882cbac2017-07-05 17:29:00 -040035@property (unsafe_unretained) IBOutlet NSTabView* tabbar;
36
Anthony Léonard9bebf1d2017-12-21 14:33:51 -050037- (BOOL)setConversationModel:(lrc::api::ConversationModel *)conversationModel;
Olivier Soldanod4311552017-11-20 15:09:53 -050038
Kateryna Kostiuk882cbac2017-07-05 17:29:00 -040039- (void)startCallForRow:(id)sender;
40
Anthony Léonard9bebf1d2017-12-21 14:33:51 -050041/**
42 * This method is meant to be used by RingWindowController to set selected conversation in case
43 * a selection is triggered not by user but by LRC signal. If conversation is already selected, this method
44 * returns immediatly without changing any state.
45 * @param conv selected conversation
46 * @param model model responsible for conversation
47 */
48-(void)selectConversation:(const lrc::api::conversation::Info&)conv model:(lrc::api::ConversationModel*)model;
49
Anthony Léonard8585cc02017-12-28 14:03:45 -050050/**
51 * Deselect any selected conversation
52 */
53-(void)deselect;
54
Anthony Léonard0a9904c2018-01-11 16:43:47 -050055/**
56 * Change list selection to Conversation
57 */
58-(void)selectConversationList;
59
Anthony Léonardd00cd182018-01-17 09:21:27 -050060/**
61 * Change list selection to Pending
62 */
63-(void)selectPendingList;
Kateryna Kostiukab499f42018-04-16 12:27:33 -040064/**
65 * clear conversation when account list is empty
66 */
67-(void) clearConversationModel;
Anthony Léonardd00cd182018-01-17 09:21:27 -050068
Kateryna Kostiuk133364b2018-10-31 11:36:08 -040069-(void) reloadConversationWithUid:(NSString *)uid;
Kateryna Kostiuk4db61092019-10-17 16:57:40 -040070-(void) reloadConversationWithURI:(NSString *)uri;
Kateryna Kostiuk66150982020-09-18 15:14:36 -040071-(QString)getSelectedUID;
Kateryna Kostiuk133364b2018-10-31 11:36:08 -040072
Alexandre Lision4dfcafc2015-08-20 12:43:23 -040073@end