atraczyk | e9919eb | 2016-09-15 15:58:18 -0400 | [diff] [blame] | 1 | /**************************************************************************
|
Nicolas Jager | a92f131 | 2016-08-25 08:01:22 -0400 | [diff] [blame] | 2 | * Copyright (C) 2016 by Savoir-faire Linux *
|
| 3 | * Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com> *
|
atraczyk | e9919eb | 2016-09-15 15:58:18 -0400 | [diff] [blame] | 4 | * Author: Traczyk Andreas <andreas.traczyk@savoirfairelinux.com> *
|
Nicolas Jager | a92f131 | 2016-08-25 08:01:22 -0400 | [diff] [blame] | 5 | * *
|
| 6 | * This program is free software; you can redistribute it and/or modify *
|
| 7 | * it under the terms of the GNU General Public License as published by *
|
| 8 | * the Free Software Foundation; either version 3 of the License, or *
|
| 9 | * (at your option) any later version. *
|
| 10 | * *
|
| 11 | * This program is distributed in the hope that it will be useful, *
|
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
| 14 | * GNU General Public License for more details. *
|
| 15 | * *
|
| 16 | * You should have received a copy of the GNU General Public License *
|
| 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
| 18 | **************************************************************************/
|
| 19 | #include "pch.h"
|
| 20 |
|
| 21 | #include "CallsViewModel.h"
|
| 22 |
|
| 23 | using namespace RingClientUWP;
|
| 24 | using namespace ViewModel;
|
| 25 | using namespace Windows::UI::Core;
|
| 26 | using namespace Windows::ApplicationModel::Core;
|
| 27 |
|
| 28 | CallsViewModel::CallsViewModel()
|
| 29 | {
|
Nicolas Jager | 083b3ae | 2016-10-04 08:46:19 -0400 | [diff] [blame] | 30 | callIdsList_ = ref new Vector<String^>();
|
Nicolas Jager | a92f131 | 2016-08-25 08:01:22 -0400 | [diff] [blame] | 31 |
|
| 32 | /* connect to delegates. */
|
Nicolas Jager | d76940f | 2016-08-31 14:44:04 -0400 | [diff] [blame] | 33 |
|
Nicolas Jager | a92f131 | 2016-08-25 08:01:22 -0400 | [diff] [blame] | 34 | RingD::instance->incomingCall += ref new RingClientUWP::IncomingCall([&](
|
| 35 | String^ accountId, String^ callId, String^ from) {
|
Nicolas Jager | 083b3ae | 2016-10-04 08:46:19 -0400 | [diff] [blame] | 36 | callIdsList_->Append(callId); // TODO : check if the string is remove when the call ends.
|
Nicolas Jager | a92f131 | 2016-08-25 08:01:22 -0400 | [diff] [blame] | 37 | });
|
Nicolas Jager | c551c36 | 2016-10-01 19:24:50 -0400 | [diff] [blame] | 38 | }
|