Nicolas Jager | 7c409f3 | 2016-09-08 09:35:16 -0400 | [diff] [blame] | 1 | #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 | **************************************************************************/
|
| 20 | using namespace Platform;
|
| 21 | using namespace Windows::Data::Json;
|
| 22 | using namespace Windows::UI::Xaml;
|
| 23 | using namespace Windows::UI::Xaml::Data;
|
| 24 |
|
| 25 | namespace RingClientUWP
|
| 26 | {
|
| 27 | namespace Controls {
|
| 28 | public ref class SmartPanelItem sealed : public INotifyPropertyChanged
|
| 29 | {
|
| 30 | public:
|
| 31 | SmartPanelItem();
|
Nicolas Jager | 61e6f0e | 2016-11-04 15:12:08 -0400 | [diff] [blame] | 32 | void muteVideo(bool state);
|
Nicolas Jager | 7c409f3 | 2016-09-08 09:35:16 -0400 | [diff] [blame] | 33 |
|
| 34 | virtual event PropertyChangedEventHandler^ PropertyChanged;
|
Nicolas Jager | 7c409f3 | 2016-09-08 09:35:16 -0400 | [diff] [blame] | 35 | property Contact^ _contact;
|
Nicolas Jager | 083b3ae | 2016-10-04 08:46:19 -0400 | [diff] [blame] | 36 | /*property Call^ _call
|
Nicolas Jager | 7c409f3 | 2016-09-08 09:35:16 -0400 | [diff] [blame] | 37 | {
|
| 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 Jager | 083b3ae | 2016-10-04 08:46:19 -0400 | [diff] [blame] | 47 | }*/
|
Nicolas Jager | c551c36 | 2016-10-01 19:24:50 -0400 | [diff] [blame] | 48 | property Visibility _hovered
|
| 49 | {
|
| 50 | Visibility get()
|
| 51 | {
|
| 52 | return hovered_;
|
| 53 | }
|
| 54 | void set(Visibility value)
|
| 55 | {
|
| 56 | hovered_ = value;
|
Nicolas Jager | d8e4959 | 2016-10-25 08:00:11 -0400 | [diff] [blame] | 57 | NotifyPropertyChanged("_hovered");
|
Nicolas Jager | c551c36 | 2016-10-01 19:24:50 -0400 | [diff] [blame] | 58 | }
|
| 59 | }
|
Nicolas Jager | 7c409f3 | 2016-09-08 09:35:16 -0400 | [diff] [blame] | 60 |
|
Nicolas Jager | 083b3ae | 2016-10-04 08:46:19 -0400 | [diff] [blame] | 61 | 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 Jager | d8e4959 | 2016-10-25 08:00:11 -0400 | [diff] [blame] | 75 | NotifyPropertyChanged("_callStatus");
|
Nicolas Jager | 083b3ae | 2016-10-04 08:46:19 -0400 | [diff] [blame] | 76 | }
|
| 77 | }
|
Nicolas Jager | 61e6f0e | 2016-11-04 15:12:08 -0400 | [diff] [blame] | 78 | property bool _videoMuted
|
| 79 | {
|
| 80 | bool get()
|
| 81 | {
|
| 82 | return videoMuted_;
|
| 83 | }
|
| 84 | }
|
Nicolas Jager | 9edbea3 | 2016-10-03 09:13:53 -0400 | [diff] [blame] | 85 |
|
Nicolas Jager | 32f301f | 2016-11-22 14:28:57 -0500 | [diff] [blame^] | 86 | 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 Jager | 7c409f3 | 2016-09-08 09:35:16 -0400 | [diff] [blame] | 99 | protected:
|
| 100 | void NotifyPropertyChanged(String^ propertyName);
|
| 101 |
|
| 102 | private:
|
Nicolas Jager | c551c36 | 2016-10-01 19:24:50 -0400 | [diff] [blame] | 103 | Visibility hovered_ = Visibility::Collapsed;
|
Nicolas Jager | 32f301f | 2016-11-22 14:28:57 -0500 | [diff] [blame^] | 104 | Visibility showMe_ = Visibility::Visible;
|
Nicolas Jager | 083b3ae | 2016-10-04 08:46:19 -0400 | [diff] [blame] | 105 | CallStatus callStatus_;
|
| 106 | String^ callId_;
|
Nicolas Jager | 61e6f0e | 2016-11-04 15:12:08 -0400 | [diff] [blame] | 107 | bool videoMuted_;
|
Nicolas Jager | c551c36 | 2016-10-01 19:24:50 -0400 | [diff] [blame] | 108 |
|
Nicolas Jager | 083b3ae | 2016-10-04 08:46:19 -0400 | [diff] [blame] | 109 | void OncallPlaced(Platform::String ^callId);
|
Nicolas Jager | 7c409f3 | 2016-09-08 09:35:16 -0400 | [diff] [blame] | 110 | };
|
| 111 | }
|
| 112 | }
|
| 113 |
|