blob: 1bdb5a849f625e37f06c82d6c43a1e5fb32af149 [file] [log] [blame]
atraczyke9919eb2016-09-15 15:58:18 -04001/**************************************************************************
Nicolas Jagera92f1312016-08-25 08:01:22 -04002* Copyright (C) 2016 by Savoir-faire Linux *
3* Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com> *
atraczyke9919eb2016-09-15 15:58:18 -04004* Author: Traczyk Andreas <andreas.traczyk@savoirfairelinux.com> *
Nicolas Jagera92f1312016-08-25 08:01:22 -04005* *
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
23using namespace RingClientUWP;
24using namespace ViewModel;
25using namespace Windows::UI::Core;
26using namespace Windows::ApplicationModel::Core;
27
28CallsViewModel::CallsViewModel()
29{
Nicolas Jager083b3ae2016-10-04 08:46:19 -040030 callIdsList_ = ref new Vector<String^>();
Nicolas Jagera92f1312016-08-25 08:01:22 -040031
32 /* connect to delegates. */
Nicolas Jagerd76940f2016-08-31 14:44:04 -040033
Nicolas Jagera92f1312016-08-25 08:01:22 -040034 RingD::instance->incomingCall += ref new RingClientUWP::IncomingCall([&](
35 String^ accountId, String^ callId, String^ from) {
Nicolas Jager083b3ae2016-10-04 08:46:19 -040036 callIdsList_->Append(callId); // TODO : check if the string is remove when the call ends.
Nicolas Jagera92f1312016-08-25 08:01:22 -040037 });
Nicolas Jagerc551c362016-10-01 19:24:50 -040038}