blob: a1119c2acb1ebe2398c82aa187721568c7d8dc2a [file] [log] [blame]
Nicolas Jager7c409f32016-09-08 09:35:16 -04001#pragma once
2/**************************************************************************
3* Copyright (C) 2016 by Savoir-faire Linux *
4* Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com> *
5* Author: Traczyk Andreas <traczyk.andreas@savoirfairelinux.com> *
6* *
7* This program is free software; you can redistribute it and/or modify *
8* it under the terms of the GNU General Public License as published by *
9* the Free Software Foundation; either version 3 of the License, or *
10* (at your option) any later version. *
11* *
12* This program is distributed in the hope that it will be useful, *
13* but WITHOUT ANY WARRANTY; without even the implied warranty of *
14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15* GNU General Public License for more details. *
16* *
17* You should have received a copy of the GNU General Public License *
18* along with this program. If not, see <http://www.gnu.org/licenses/>. *
19**************************************************************************/
20using namespace Platform;
21using namespace Windows::Data::Json;
22using namespace Windows::UI::Xaml;
23using namespace Windows::UI::Xaml::Data;
24
25namespace RingClientUWP
26{
27namespace Controls {
28public ref class SmartPanelItem sealed : public INotifyPropertyChanged
29{
30public:
31 SmartPanelItem();
Nicolas Jager61e6f0e2016-11-04 15:12:08 -040032 void muteVideo(bool state);
Nicolas Jager7c409f32016-09-08 09:35:16 -040033
34 virtual event PropertyChangedEventHandler^ PropertyChanged;
Nicolas Jager7c409f32016-09-08 09:35:16 -040035 property Contact^ _contact;
Nicolas Jager083b3ae2016-10-04 08:46:19 -040036 /*property Call^ _call
Nicolas Jager7c409f32016-09-08 09:35:16 -040037 {
38 Call^ get()
39 {
40 return call_;
41 }
42 void set(Call^ value)
43 {
44 call_ = value;
45 PropertyChanged(this, ref new PropertyChangedEventArgs("_call"));
46 }
Nicolas Jager083b3ae2016-10-04 08:46:19 -040047 }*/
Nicolas Jagerc551c362016-10-01 19:24:50 -040048 property Visibility _hovered
49 {
50 Visibility get()
51 {
52 return hovered_;
53 }
54 void set(Visibility value)
55 {
56 hovered_ = value;
Nicolas Jagerd8e49592016-10-25 08:00:11 -040057 NotifyPropertyChanged("_hovered");
Nicolas Jagerc551c362016-10-01 19:24:50 -040058 }
59 }
Nicolas Jager7c409f32016-09-08 09:35:16 -040060
Nicolas Jager083b3ae2016-10-04 08:46:19 -040061 property String^ _callId; /*{
62 String^ get() {
63 return callId_;
64 }
65 void set(String^ value) {
66 _callId = value;
67 }
68 }*/
69 property CallStatus _callStatus {
70 CallStatus get() {
71 return callStatus_;
72 }
73 void set(CallStatus value) {
74 callStatus_ = value;
Nicolas Jagerd8e49592016-10-25 08:00:11 -040075 NotifyPropertyChanged("_callStatus");
Nicolas Jager083b3ae2016-10-04 08:46:19 -040076 }
77 }
Nicolas Jager61e6f0e2016-11-04 15:12:08 -040078 property bool _videoMuted
79 {
80 bool get()
81 {
82 return videoMuted_;
83 }
84 }
Nicolas Jager9edbea32016-10-03 09:13:53 -040085
Nicolas Jager32f301f2016-11-22 14:28:57 -050086 property Visibility _showMe
87 {
88 Visibility get()
89 {
90 return showMe_;
91 }
92 void set(Visibility value)
93 {
94 showMe_ = value;
95 NotifyPropertyChanged("_showMe");
96 }
97 }
98
Nicolas Jager7c409f32016-09-08 09:35:16 -040099protected:
100 void NotifyPropertyChanged(String^ propertyName);
101
102private:
Nicolas Jagerc551c362016-10-01 19:24:50 -0400103 Visibility hovered_ = Visibility::Collapsed;
Nicolas Jager32f301f2016-11-22 14:28:57 -0500104 Visibility showMe_ = Visibility::Visible;
Nicolas Jager083b3ae2016-10-04 08:46:19 -0400105 CallStatus callStatus_;
106 String^ callId_;
Nicolas Jager61e6f0e2016-11-04 15:12:08 -0400107 bool videoMuted_;
Nicolas Jagerc551c362016-10-01 19:24:50 -0400108
Nicolas Jager083b3ae2016-10-04 08:46:19 -0400109 void OncallPlaced(Platform::String ^callId);
Nicolas Jager7c409f32016-09-08 09:35:16 -0400110};
111}
112}
113