Nicolas Jager | e069c41 | 2016-08-15 15:00:17 -0400 | [diff] [blame] | 1 | #pragma once
|
atraczyk | e9919eb | 2016-09-15 15:58:18 -0400 | [diff] [blame] | 2 | /**************************************************************************
|
| 3 | * Copyright (C) 2016 by Savoir-faire Linux *
|
| 4 | * Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com> *
|
| 5 | * Author: Traczyk Andreas <andreas.traczyk@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 | **************************************************************************/
|
Nicolas Jager | e069c41 | 2016-08-15 15:00:17 -0400 | [diff] [blame] | 20 | #include "VideoPage.g.h"
|
atraczyk | 5c395ea | 2016-09-20 17:28:09 -0400 | [diff] [blame] | 21 | #include "MessageTextPage.xaml.h"
|
Nicolas Jager | e069c41 | 2016-08-15 15:00:17 -0400 | [diff] [blame] | 22 |
|
| 23 | using namespace Windows::Media::Capture;
|
| 24 | using namespace Windows::UI::Xaml::Navigation;
|
| 25 |
|
atraczyk | 14ba30c | 2016-09-22 18:31:59 -0400 | [diff] [blame] | 26 | using namespace Windows::UI::Xaml;
|
| 27 | using namespace Windows::ApplicationModel::Core;
|
| 28 | using namespace Windows::Devices::Enumeration;
|
| 29 |
|
| 30 |
|
Nicolas Jager | e069c41 | 2016-08-15 15:00:17 -0400 | [diff] [blame] | 31 | namespace RingClientUWP
|
| 32 | {
|
| 33 | /* delegate */
|
| 34 | delegate void PressHangUpCall();
|
| 35 | delegate void PauseCall();
|
| 36 | delegate void ChatPanelCall();
|
| 37 | delegate void AddContactCall();
|
| 38 | delegate void TransferCall();
|
| 39 | delegate void SwitchMicrophoneStateCall();
|
| 40 | delegate void SwitchVideoStateCall();
|
| 41 | delegate void ReccordVideoCall();
|
| 42 | delegate void QualityVideoLevelCall();
|
| 43 |
|
| 44 | namespace Views
|
| 45 | {
|
| 46 |
|
| 47 | public ref class VideoPage sealed
|
| 48 | {
|
| 49 | public:
|
| 50 | VideoPage();
|
atraczyk | e9919eb | 2016-09-15 15:58:18 -0400 | [diff] [blame] | 51 | void updatePageContent();
|
| 52 |
|
Nicolas Jager | e069c41 | 2016-08-15 15:00:17 -0400 | [diff] [blame] | 53 | property bool barFading
|
| 54 | {
|
| 55 | bool get()
|
| 56 | {
|
| 57 | return barFading_;
|
| 58 | }
|
| 59 | void set(bool value)
|
| 60 | {
|
| 61 | barFading_ = value;
|
| 62 | }
|
| 63 | }
|
| 64 |
|
atraczyk | 5c395ea | 2016-09-20 17:28:09 -0400 | [diff] [blame] | 65 | property bool chatOpen
|
| 66 | {
|
| 67 | bool get()
|
| 68 | {
|
| 69 | return chatOpen_;
|
| 70 | }
|
| 71 | void set(bool value)
|
| 72 | {
|
| 73 | chatOpen_ = value;
|
| 74 | }
|
| 75 | }
|
| 76 |
|
| 77 | void scrollDown();
|
| 78 |
|
Nicolas Jager | e069c41 | 2016-08-15 15:00:17 -0400 | [diff] [blame] | 79 | protected:
|
Nicolas Jager | e069c41 | 2016-08-15 15:00:17 -0400 | [diff] [blame] | 80 | virtual void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e) override;
|
Nicolas Jager | e069c41 | 2016-08-15 15:00:17 -0400 | [diff] [blame] | 81 |
|
| 82 | internal:
|
| 83 | /* events */
|
| 84 | event PressHangUpCall^ pressHangUpCall;
|
| 85 | event PauseCall^ pauseCall;
|
| 86 | event ChatPanelCall^ chatPanelCall;
|
| 87 | event AddContactCall^ addContactCall;
|
| 88 | event TransferCall^ transferCall;
|
| 89 | event SwitchMicrophoneStateCall^ switchMicrophoneStateCall;
|
| 90 | event SwitchVideoStateCall^ switchVideoStateCall;
|
| 91 | event ReccordVideoCall^ reccordVideoCall;
|
| 92 | event QualityVideoLevelCall^ qualityVideoLevelCall;
|
| 93 |
|
| 94 | private:
|
| 95 | bool barFading_;
|
atraczyk | 5c395ea | 2016-09-20 17:28:09 -0400 | [diff] [blame] | 96 | bool chatOpen_;
|
| 97 |
|
| 98 | void _sendBtn__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
|
| 99 | void _messageTextBox__KeyDown(Platform::Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e);
|
| 100 | void sendMessage();
|
Nicolas Jager | e069c41 | 2016-08-15 15:00:17 -0400 | [diff] [blame] | 101 |
|
atraczyk | 14ba30c | 2016-09-22 18:31:59 -0400 | [diff] [blame] | 102 | Concurrency::task<void> WriteFrameAsSoftwareBitmapAsync(String^ id, uint8_t* buf, int width, int height);
|
| 103 |
|
Nicolas Jager | e069c41 | 2016-08-15 15:00:17 -0400 | [diff] [blame] | 104 | void Button_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
|
| 105 | void _btnCancel__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
|
| 106 | void _btnHangUp__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e);
|
| 107 | void _btnPause__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e);
|
| 108 | void _btnChat__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e);
|
| 109 | void _btnAddFriend__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e);
|
| 110 | void _btnSwitch__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e);
|
| 111 | void _btnMicrophone__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e);
|
| 112 | void _btnMemo__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e);
|
| 113 | void _btnHQ__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e);
|
| 114 | void _btnVideo__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e);
|
| 115 | void _videoControl__PointerMoved(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e);
|
| 116 | void btnAny_entered(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e);
|
| 117 | void btnAny_exited(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e);
|
Nicolas Jager | d57809f | 2016-10-06 11:31:55 -0400 | [diff] [blame] | 118 | void OnincomingMessage(Platform::String ^callId, Platform::String ^payload);
|
Nicolas Jager | e069c41 | 2016-08-15 15:00:17 -0400 | [diff] [blame] | 119 | };
|
| 120 | }
|
| 121 | } |