87 Commits

Author SHA1 Message Date
Jehan Monnier
2a1b1aaa56 premier commentaires 2021-08-18 15:12:23 +02:00
QuentinArguillere
3f09bddbf5 Add RemoteNotification tutorial 2021-07-29 11:42:54 +02:00
QuentinArguillere
d064fb5712 Ignore build files in git 2021-07-29 11:42:43 +02:00
QuentinArguillere
b2bc5b1b12 Update createAndInitializeAccount common function for easier push settings understanding 2021-07-29 11:28:46 +02:00
QuentinArguillere
a63960ab0b Delegate refactoring, and enable audio route selection in CallTutorial 2021-05-28 16:09:56 +02:00
QuentinArguillere
f543236284 Update tutorials to sdk 5.0 2021-05-27 15:03:06 +02:00
QuentinArguillere
1ad34aaaf0 Add separate view once the chatroom is instantiated. If in a group chatroom, allow to add or remove participants. 2020-10-19 17:32:24 +02:00
QuentinArguillere
8de8c30812 Add animation and wait for callback to confirm download 2020-10-16 15:59:15 +02:00
QuentinArguillere
a625d12c10 Chatroom tutorial rework : add encryption, sending and receiving of files 2020-10-15 16:10:41 +02:00
QuentinArguillere
6f2684a0c1 Expose audio output selection 2020-10-08 17:24:47 +02:00
QuentinArguillere
def8aefef6 Allow to reset the chatroom, and add delegates even to basic chatroom messages 2020-10-08 17:23:57 +02:00
QuentinArguillere
095492356c Generic default values 2020-10-07 15:50:08 +02:00
QuentinArguillere
ae825689a2 Completely rework the chatroom tutorial to make it more intuitive : you now interact with an existing Linphone on a second phone 2020-10-07 15:49:17 +02:00
QuentinArguillere
3db5eb4912 Update delegates, remove settings not really relevant to CallKit 2020-10-07 14:18:14 +02:00
QuentinArguillere
c0a5b0fb17 Update videocall delegates, remove audio device selection 2020-10-07 11:49:25 +02:00
QuentinArguillere
56f49244f9 Fix registration delegate 2020-10-07 11:38:30 +02:00
QuentinArguillere
dfbe6e2d55 Put all callbacks in a single delegate, fix registration callback, reset call state when an error occurs (such as, call is not answered) 2020-10-07 11:35:14 +02:00
QuentinArguillere
d2f9cf7557 Fix build 2020-09-29 13:38:35 +02:00
QuentinArguillere
6acd6f25dc Push for some testing on audio routes 2020-09-29 13:37:29 +02:00
QuentinArguillere
964e1d87a1 Remove typo 2020-09-24 15:00:33 +02:00
QuentinArguillere
68bd403073 Fix build, use new variable for SwiftUI view display of videos 2020-09-01 12:09:55 +02:00
QuentinArguillere
cc14ab9a00 New, cleaner GUI. Refactor the implementation to limit the code duplication between basic and flexisip chatrooms 2020-08-31 16:03:33 +02:00
QuentinArguillere
db4fb58bbb Remove old HelloLinphone tutorial 2020-08-28 17:00:33 +02:00
QuentinArguillere
8b4eda1eed Pointer management is now done inside the Core’s WindowID variables 2020-08-28 12:11:50 +02:00
QuentinArguillere
263a245a69 Use TutorialCommons, and host data in the AppDelegate 2020-08-27 17:29:10 +02:00
QuentinArguillere
637353467c Move data hosting from the view to the AppDelegate 2020-08-27 14:06:10 +02:00
QuentinArguillere
94754575cd Use the new LinphoneVideoViewHolder to display call video & call preview 2020-08-27 14:00:00 +02:00
QuentinArguillere
f10d7065b0 Add video preview. Move all video display intelligence to the GUI part 2020-08-26 11:10:48 +02:00
QuentinArguillere
8d234d6634 Remove video-related parts of the CallTutorial 2020-08-25 15:37:59 +02:00
QuentinArguillere
69fd064dd4 Slightly cleaner video GUI 2020-08-25 15:18:01 +02:00
QuentinArguillere
46f60df8f7 Delete unwanted file 2020-08-25 15:17:51 +02:00
QuentinArguillere
76444d3442 Remove unused variables from VideoCall example 2020-08-25 15:05:07 +02:00
QuentinArguillere
0ab2f9db7a Switch spaces for tabs in indentation 2020-08-25 15:03:41 +02:00
QuentinArguillere
50560956d7 Create VideoCallTutorial project 2020-08-25 14:47:07 +02:00
QuentinArguillere
b77e35c7fc Use TutorialCommons 2020-08-17 12:09:21 +02:00
QuentinArguillere
9a35475c3c Use TutorialCommons in CallTutorial 2020-08-17 11:59:37 +02:00
QuentinArguillere
ffb3647975 Delete empty file 2020-08-17 11:59:18 +02:00
QuentinArguillere
a562f6b37c Add mute microphone toggle 2020-08-17 11:31:38 +02:00
QuentinArguillere
e5ec19d1ae Update delegates to match new signature 2020-08-17 11:30:39 +02:00
QuentinArguillere
d76ef9ea16 Refactoring : use TutorialCommons tools 2020-08-17 10:57:44 +02:00
QuentinArguillere
6d386756a1 Added TutorialCommons folder, containing tools that will be used in all other tutorials 2020-08-17 10:57:29 +02:00
QuentinArguillere
cc895c57b0 Add configuration file to the push tutorial, in order to have have the incoming calls work even if the app was terminated and is launch by the push notification 2020-08-13 11:22:56 +02:00
QuentinArguillere
0f086498e4 Move CallExampleContext ownership to the AppDelegate. When receiving a PushIncoming call, register (else call won’t work) 2020-08-12 16:43:26 +02:00
QuentinArguillere
2c9ab954e1 Update push tutorial to work with the incoming push_notification_branch of the Linphone-sdk. Most of the push-intelligence implementation is now done in the core, and there are less things the user has to do to configure it 2020-08-12 15:22:11 +02:00
QuentinArguillere
f9530878d6 Explicit the use of the app bundle ID in the push credentials 2020-08-11 09:26:42 +02:00
QuentinArguillere
469894d944 fix bug where “update call” button wouldn’t work when answering an incoming call 2020-08-10 18:12:08 +02:00
QuentinArguillere
375337498b Move outgoing call intelligence to CallKit delegate 2020-08-10 18:12:00 +02:00
QuentinArguillere
6704c0fdcb Use appropriate certificate 2020-08-10 17:56:45 +02:00
QuentinArguillere
fac345747d Properly setup new CallKitTutorial directory, rename/remove old CallTutorial related files 2020-08-10 17:06:27 +02:00
QuentinArguillere
62e6bcd40c Remove all CallKit // PushKit related code from CallTutorial 2020-08-10 16:49:45 +02:00
QuentinArguillere
55e93d7053 Duplicate CallTutorial in order to have one specifically for CallKit / PushKit integration 2020-08-10 16:44:52 +02:00
QuentinArguillere
9974108511 Change incoming call detection, use push notification instead. TODO : use appropriate certificate (currently recycling the one from linphone-swift-tutorial app) 2020-08-10 16:40:24 +02:00
QuentinArguillere
b0b6f29e99 Added example of how to log out, and log back in, in login tutorial 2020-08-07 10:10:51 +02:00
QuentinArguillere
106d89acb1 Update call kit provider configuration to support only 1 call 2020-08-06 16:20:43 +02:00
QuentinArguillere
ee36a24700 Move the all the call-related flag (isRunning, isCallIncoming) to be done in CallState delegate 2020-08-06 15:51:21 +02:00
QuentinArguillere
59b3f0d688 Remove useless line pasted by mistake, added extra comments 2020-08-06 15:32:06 +02:00
QuentinArguillere
69b7a7f447 Properly handle CallKit termination when calls end 2020-08-06 15:14:49 +02:00
QuentinArguillere
f723655265 Add CallKit basic integration for outgoing/incoming calls 2020-08-06 13:58:26 +02:00
QuentinArguillere
4830d38167 Added registration code for incoming calls, add incoming call actions to the UI 2020-08-04 17:54:59 +02:00
QuentinArguillere
24e23aaf59 Update login tutorial to use delegates rather than hard-coded flag 2020-08-04 17:37:43 +02:00
QuentinArguillere
3c1f685690 Remove unused function 2020-08-04 17:28:46 +02:00
QuentinArguillere
99d4325888 Add registration code on start, start working to accept incoming calls in this example 2020-08-04 14:49:35 +02:00
QuentinArguillere
b15a87f24b Copied ChatRoom tutorial code from HelloLinphone to a separate stand alone project 2020-08-04 10:51:22 +02:00
QuentinArguillere
a9db9356ab Copied registration code from HelloLinphone to standalone tutorial 2020-07-31 16:52:07 +02:00
QuentinArguillere
4fabbb1ab6 Remove accidental double initialisation of mVideoDevice 2020-07-31 16:45:09 +02:00
QuentinArguillere
4a51bee890 Copied from HelloLinphone all code related to the Call tutorials 2020-07-31 16:10:06 +02:00
QuentinArguillere
f880ce85e9 Added audioEnabled toggle 2020-07-31 16:09:29 +02:00
QuentinArguillere
5154a3f916 Add option to change which camera is used to capture the video in chat 2020-07-31 14:18:03 +02:00
QuentinArguillere
ed9241b22d Added option to make a video call, and to redirect sound output to speaker 2020-07-31 13:52:47 +02:00
QuentinArguillere
f6eaaeb726 Add reply chat action 2020-07-30 15:51:57 +02:00
QuentinArguillere
715d00f08f Add logs control to the GUI 2020-07-30 15:32:00 +02:00
QuentinArguillere
f35d3d4f2e Light refactoring for clarity. Added option to create a Basic chatroom as well as a Flexisip one 2020-07-30 15:17:09 +02:00
QuentinArguillere
2fb5d14ea8 Added simple text exchange through FlexiSIP chatroom 2020-07-29 18:01:11 +02:00
QuentinArguillere
3a3fc41250 Tidying up for visibility, extra comments 2020-07-29 17:06:09 +02:00
QuentinArguillere
9f147836a8 Light Refactor : move some example values to new LinphoneTutorialContext variables 2020-07-29 16:58:56 +02:00
QuentinArguillere
6bdfe1c70e Send a test message when the chatroom is fully created 2020-07-29 16:18:00 +02:00
QuentinArguillere
00dcfd490f Renamed LinphoneCoreHolder to LinphoneTutorialContext. Instead of using a singleton, pass the context to delegate when required. 2020-07-29 16:17:18 +02:00
QuentinArguillere
d1a7ccc4a5 Added flexisip chatroom creation 2020-07-29 13:11:36 +02:00
QuentinArguillere
91436a9981 LinphoneCoreHolder is now a singleton in order to have a more convenient access to flags from delegates. Also, light improvement to GUI and registration method. 2020-07-29 13:06:43 +02:00
QuentinArguillere
6385741ad9 Add clearer instructions to disable/enable logs 2020-07-28 11:01:00 +02:00
QuentinArguillere
147a9c0697 Rework GUI in order to have more feedback, and use ObservableObjects to bind on some state variables 2020-07-28 10:55:37 +02:00
QuentinArguillere
2c9a5ea18d Add simple outgoing call code and GUI 2020-07-27 18:18:07 +02:00
QuentinArguillere
0177553d4f Move registration example from SceneDelegate to ContentView, add a simple GUI 2020-07-27 18:16:52 +02:00
QuentinArguillere
d88f43c47c Add access to microphone to info.plist 2020-07-27 18:16:04 +02:00
QuentinArguillere
982d165518 Added registration example, directly inspired by linphone-swift-tutorial repository 2020-07-24 16:03:12 +02:00
QuentinArguillere
2232c85380 Use linphone-sdk version 4.5.0-alpha 2020-07-24 15:55:28 +02:00
Danmei Chen
b5769d5ee4 init HelloLinphone 2020-06-23 15:16:00 +02:00
175 changed files with 7293 additions and 15630 deletions

20
.gitignore vendored
View File

@@ -7,20 +7,14 @@ java/.idea/modules.xml
java/.idea/workspace.xml
java/.idea/navEditor.xml
java/.idea/assetWizardSettings.xml
java/.DS_Store
.DS_Store
java/build
java/captures
java/.externalNativeBuild
java/.cxx
# C# / UWP Files / VS Specifiq files
.vs/
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
[Oo]bj/
[Bb]in/
swift/*/Podfile.lock
swift/*/Pods/
swift/*/*.xcodeproj/project.xcworkspace/xcuserdata/
swift/*/*.xcodeproj/xcuserdata/
swift/*/*.xcworkspace/xcuserdata/
swift/*/build

View File

@@ -1,171 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{4EDDB112-127A-42C3-81BE-5BA16151E67F}</ProjectGuid>
<OutputType>AppContainerExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>_00_hello_world</RootNamespace>
<AssemblyName>00_hello_world</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.18362.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
<OutputPath>bin\ARM\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>ARM64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM64'">
<OutputPath>bin\ARM64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
</PropertyGroup>
<ItemGroup>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
</ItemGroup>
<ItemGroup>
<Content Include="Properties\Default.rd.xml" />
<Content Include="Assets\LockScreenLogo.scale-200.png" />
<Content Include="Assets\SplashScreen.scale-200.png" />
<Content Include="Assets\Square150x150Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
<Content Include="Assets\StoreLogo.png" />
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="MainPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<PackageReference Include="LinphoneSDK">
<Version>4.5.0-alpha.290</Version>
</PackageReference>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>6.2.11</Version>
</PackageReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -1,51 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30804.86
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "00_hello_world", "00_hello_world.csproj", "{E275B25F-D5C2-495C-9B6E-9B90C3617E98}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|ARM = Release|ARM
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|ARM.ActiveCfg = Debug|ARM
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|ARM.Build.0 = Debug|ARM
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|ARM.Deploy.0 = Debug|ARM
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|ARM64.ActiveCfg = Debug|ARM64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|ARM64.Build.0 = Debug|ARM64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|ARM64.Deploy.0 = Debug|ARM64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|x64.ActiveCfg = Debug|x64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|x64.Build.0 = Debug|x64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|x64.Deploy.0 = Debug|x64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|x86.ActiveCfg = Debug|x86
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|x86.Build.0 = Debug|x86
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|x86.Deploy.0 = Debug|x86
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|ARM.ActiveCfg = Release|ARM
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|ARM.Build.0 = Release|ARM
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|ARM.Deploy.0 = Release|ARM
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|ARM64.ActiveCfg = Release|ARM64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|ARM64.Build.0 = Release|ARM64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|ARM64.Deploy.0 = Release|ARM64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|x64.ActiveCfg = Release|x64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|x64.Build.0 = Release|x64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|x64.Deploy.0 = Release|x64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|x86.ActiveCfg = Release|x86
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|x86.Build.0 = Release|x86
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8DD112E1-466B-4282-B9CE-E247D96F82EE}
EndGlobalSection
EndGlobal

View File

@@ -1,7 +0,0 @@
<Application
x:Class="_00_hello_world.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:_00_hello_world">
</Application>

View File

@@ -1,109 +0,0 @@
/*
* Copyright (c) 2010-2020 Belledonne Communications SARL.
*
* This file is part of mediastreamer2.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;
namespace _00_hello_world
{
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
sealed partial class App : Application
{
/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
this.InitializeComponent();
this.Suspending += OnSuspending;
}
/// <summary>
/// Invoked when the application is launched normally by the end user. Other entry points
/// will be used such as when the application is launched to open a specific file.
/// </summary>
/// <param name="e">Details about the launch request and process.</param>
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
Frame rootFrame = Window.Current.Content as Frame;
// Do not repeat app initialization when the Window already has content,
// just ensure that the window is active
if (rootFrame == null)
{
// Create a Frame to act as the navigation context and navigate to the first page
rootFrame = new Frame();
rootFrame.NavigationFailed += OnNavigationFailed;
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
{
//TODO: Load state from previously suspended application
}
// Place the frame in the current Window
Window.Current.Content = rootFrame;
}
if (e.PrelaunchActivated == false)
{
if (rootFrame.Content == null)
{
// When the navigation stack isn't restored navigate to the first page,
// configuring the new page by passing required information as a navigation
// parameter
rootFrame.Navigate(typeof(MainPage), e.Arguments);
}
// Ensure the current window is active
Window.Current.Activate();
}
}
/// <summary>
/// Invoked when Navigation to a certain page fails
/// </summary>
/// <param name="sender">The Frame which failed navigation</param>
/// <param name="e">Details about the navigation failure</param>
void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
{
throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
}
/// <summary>
/// Invoked when application execution is being suspended. Application state is saved
/// without knowing whether the application will be terminated or resumed with the contents
/// of memory still intact.
/// </summary>
/// <param name="sender">The source of the suspend request.</param>
/// <param name="e">Details about the suspend request.</param>
private void OnSuspending(object sender, SuspendingEventArgs e)
{
var deferral = e.SuspendingOperation.GetDeferral();
//TODO: Save application state and stop any background activity
deferral.Complete();
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -1,14 +0,0 @@
<Page
x:Class="_00_hello_world.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:_00_hello_world"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid>
<TextBlock Text="{x:Bind HelloText}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Grid>
</Page>

View File

@@ -1,112 +0,0 @@
/*
* Copyright (c) 2010-2020 Belledonne Communications SARL.
*
* This file is part of mediastreamer2.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using Linphone;
using System;
using System.Diagnostics;
using System.IO;
using Windows.UI.Xaml.Controls;
namespace _00_hello_world
{
/// <summary>
/// A really simple page to do a "HelloWorld" with LinphoneSDK x UWP
/// </summary>
public sealed partial class MainPage : Page
{
private Core StoredCore { get; set; }
private LoggingService LoggingService { get; set; }
public string HelloText { get; set; } = "Hello world, Linphone core version is ";
public MainPage()
{
this.InitializeComponent();
// Core is the main object of the SDK. You can't do much without it
// Some configuration can be done before the Core is created, for example enable debug logs.
LoggingService = LoggingService.Instance;
LoggingService.LogLevel = LogLevel.Debug;
// And here you set the implementation of the delegate method called every time the Linphone SDK log something, see OnLog.
LoggingService.Listener.OnLogMessageWritten = OnLog;
// To create a Core, we need the instance of the Factory.
Factory factory = Factory.Instance;
// Some configuration can be done on the factory before the Core is created, for example enable setting resources Path. This
// one can be mandatory
string assetsPath = Path.Combine(Windows.ApplicationModel.Package.Current.InstalledLocation.Path, "Assets");
factory.TopResourcesDir = assetsPath;
factory.DataResourcesDir = assetsPath;
factory.SoundResourcesDir = assetsPath;
factory.RingResourcesDir = assetsPath;
factory.ImageResourcesDir = assetsPath;
factory.MspluginsDir = ".";
// Your Core can use up to 2 configuration files, but that isn't mandatory.
// The third parameter is the application context, he isn't mandatory when working
// with UWP, he is mandatory in an Android context for example.
// You can now create your Core object :
Core core = factory.CreateCore("", "", IntPtr.Zero);
// Once you got your core you can start to do a lot of things.
HelloText += Core.Version;
// You should store the Core to keep a reference on it at all times while your app is alive.
// A good solution for that is either subclass the Application object or create a Service.
StoredCore = core;
}
/// <summary>
/// Simple function to console log everything the Linphone SDK logs.
/// You should modify this method to match your logging habits.
/// </summary>
private void OnLog(LoggingService logService, string domain, LogLevel lev, string message)
{
string now = DateTime.Now.ToString("hh:mm:ss");
string log = now + " [";
switch (lev)
{
case LogLevel.Debug:
log += "DEBUG";
break;
case LogLevel.Error:
log += "ERROR";
break;
case LogLevel.Message:
log += "MESSAGE";
break;
case LogLevel.Warning:
log += "WARNING";
break;
case LogLevel.Fatal:
log += "FATAL";
break;
default:
break;
}
log += "] (" + domain + ") " + message;
Debug.WriteLine(log);
}
}
}

View File

@@ -1,49 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
IgnorableNamespaces="uap mp">
<Identity
Name="d6678921-9c3b-4627-987b-93115e4243a2"
Publisher="CN=Anthony"
Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="d6678921-9c3b-4627-987b-93115e4243a2" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<Properties>
<DisplayName>00_hello_world</DisplayName>
<PublisherDisplayName>Anthony</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate"/>
</Resources>
<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="_00_hello_world.App">
<uap:VisualElements
DisplayName="00_hello_world"
Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png"
Description="00_hello_world"
BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>

View File

@@ -1,29 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("00_hello_world")]
[assembly: AssemblyDescription("Hello world C# tutorial with LinphoneSDK")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Belledonne Communications")]
[assembly: AssemblyProduct("Linphone")]
[assembly: AssemblyCopyright("Copyright © 2020 Belledonne Communications")]
[assembly: AssemblyTrademark("Linphone")]
[assembly: AssemblyCulture("")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: ComVisible(false)]

View File

@@ -1,31 +0,0 @@
<!--
This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
developers. However, you can modify these parameters to modify the behavior of the .NET Native
optimizer.
Runtime Directives are documented at https://go.microsoft.com/fwlink/?LinkID=391919
To fully enable reflection for App1.MyClass and all of its public/private members
<Type Name="App1.MyClass" Dynamic="Required All"/>
To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
-->
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Application>
<!--
An Assembly element with Name="*Application*" applies to all assemblies in
the application package. The asterisks are not wildcards.
-->
<Assembly Name="*Application*" Dynamic="Required All" />
<!-- Add your application specific runtime directives here. -->
</Application>
</Directives>

View File

@@ -1,174 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{E275B25F-D5C2-495C-9B6E-9B90C3617E98}</ProjectGuid>
<OutputType>AppContainerExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>_00_hello_world</RootNamespace>
<AssemblyName>00_hello_world</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.18362.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
<OutputPath>bin\ARM\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>ARM64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM64'">
<OutputPath>bin\ARM64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
</PropertyGroup>
<ItemGroup>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
</ItemGroup>
<ItemGroup>
<Content Include="Properties\Default.rd.xml" />
<Content Include="Assets\LockScreenLogo.scale-200.png" />
<Content Include="Assets\SplashScreen.scale-200.png" />
<Content Include="Assets\Square150x150Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
<Content Include="Assets\StoreLogo.png" />
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="MainPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<PackageReference Include="LinphoneSDK">
<Version>4.5.0-alpha.290</Version>
</PackageReference>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>6.2.11</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Content Include="Assets\rootca.pem" />
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -1,51 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30804.86
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "01_login", "01_login.csproj", "{E275B25F-D5C2-495C-9B6E-9B90C3617E98}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|ARM = Release|ARM
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|ARM.ActiveCfg = Debug|ARM
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|ARM.Build.0 = Debug|ARM
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|ARM.Deploy.0 = Debug|ARM
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|ARM64.ActiveCfg = Debug|ARM64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|ARM64.Build.0 = Debug|ARM64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|ARM64.Deploy.0 = Debug|ARM64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|x64.ActiveCfg = Debug|x64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|x64.Build.0 = Debug|x64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|x64.Deploy.0 = Debug|x64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|x86.ActiveCfg = Debug|x86
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|x86.Build.0 = Debug|x86
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|x86.Deploy.0 = Debug|x86
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|ARM.ActiveCfg = Release|ARM
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|ARM.Build.0 = Release|ARM
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|ARM.Deploy.0 = Release|ARM
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|ARM64.ActiveCfg = Release|ARM64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|ARM64.Build.0 = Release|ARM64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|ARM64.Deploy.0 = Release|ARM64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|x64.ActiveCfg = Release|x64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|x64.Build.0 = Release|x64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|x64.Deploy.0 = Release|x64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|x86.ActiveCfg = Release|x86
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|x86.Build.0 = Release|x86
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8DD112E1-466B-4282-B9CE-E247D96F82EE}
EndGlobalSection
EndGlobal

View File

@@ -1,7 +0,0 @@
<Application
x:Class="_01_login.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:_00_hello_world">
</Application>

View File

@@ -1,109 +0,0 @@
/*
* Copyright (c) 2010-2020 Belledonne Communications SARL.
*
* This file is part of mediastreamer2.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;
namespace _01_login
{
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
sealed partial class App : Application
{
/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
this.InitializeComponent();
this.Suspending += OnSuspending;
}
/// <summary>
/// Invoked when the application is launched normally by the end user. Other entry points
/// will be used such as when the application is launched to open a specific file.
/// </summary>
/// <param name="e">Details about the launch request and process.</param>
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
Frame rootFrame = Window.Current.Content as Frame;
// Do not repeat app initialization when the Window already has content,
// just ensure that the window is active
if (rootFrame == null)
{
// Create a Frame to act as the navigation context and navigate to the first page
rootFrame = new Frame();
rootFrame.NavigationFailed += OnNavigationFailed;
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
{
//TODO: Load state from previously suspended application
}
// Place the frame in the current Window
Window.Current.Content = rootFrame;
}
if (e.PrelaunchActivated == false)
{
if (rootFrame.Content == null)
{
// When the navigation stack isn't restored navigate to the first page,
// configuring the new page by passing required information as a navigation
// parameter
rootFrame.Navigate(typeof(MainPage), e.Arguments);
}
// Ensure the current window is active
Window.Current.Activate();
}
}
/// <summary>
/// Invoked when Navigation to a certain page fails
/// </summary>
/// <param name="sender">The Frame which failed navigation</param>
/// <param name="e">Details about the navigation failure</param>
void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
{
throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
}
/// <summary>
/// Invoked when application execution is being suspended. Application state is saved
/// without knowing whether the application will be terminated or resumed with the contents
/// of memory still intact.
/// </summary>
/// <param name="sender">The source of the suspend request.</param>
/// <param name="e">Details about the suspend request.</param>
private void OnSuspending(object sender, SuspendingEventArgs e)
{
var deferral = e.SuspendingOperation.GetDeferral();
//TODO: Save application state and stop any background activity
deferral.Complete();
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -1,35 +0,0 @@
<Page
x:Class="_01_login.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:_01_login"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid KeyUp="GridKeyUp">
<StackPanel Grid.Row="0" VerticalAlignment="Center" >
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="Identity :"/>
<TextBox x:Name="Identity" Width="350" MinWidth="350" MaxWidth="350"></TextBox>
</StackPanel>
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="Password :"/>
<PasswordBox x:Name="Password" Width="350" MinWidth="350" MaxWidth="350"/>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button x:Name="LogIn" Content="Login" Click="LogInClick"/>
<Button x:Name="LogOut" Content="Logout" Click="LogOutClick"/>
</StackPanel>
<StackPanel Orientation="Vertical">
<TextBlock x:Name="LoginText" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Orientation="Vertical">
<TextBlock x:Name="RegistrationText" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</StackPanel>
</StackPanel>
</Grid>
</Page>

View File

@@ -1,264 +0,0 @@
/*
* Copyright (c) 2010-2020 Belledonne Communications SARL.
*
* This file is part of mediastreamer2.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using Linphone;
using System;
using System.Diagnostics;
using System.IO;
using System.Threading;
using Windows.Storage;
using Windows.System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Input;
namespace _01_login
{
/// <summary>
/// A really simple page for a first Login with LinphoneSDK x UWP
/// </summary>
public sealed partial class MainPage : Page
{
private Core StoredCore { get; set; }
LoggingService LoggingService { get; set; }
private Timer Timer;
public MainPage()
{
this.InitializeComponent();
// Core is the main object of the SDK. You can't do much without it
// If you're not familiar with Linphone Core creation, see the 00_hello_world project.
LoggingService = LoggingService.Instance;
LoggingService.LogLevel = LogLevel.Debug;
LoggingService.Listener.OnLogMessageWritten = OnLog;
Factory factory = Factory.Instance;
string assetsPath = Path.Combine(Windows.ApplicationModel.Package.Current.InstalledLocation.Path, "Assets");
factory.TopResourcesDir = assetsPath;
factory.DataResourcesDir = assetsPath;
factory.SoundResourcesDir = assetsPath;
factory.RingResourcesDir = assetsPath;
factory.ImageResourcesDir = assetsPath;
factory.MspluginsDir = ".";
Core core = factory.CreateCore("", "", IntPtr.Zero);
StoredCore = core;
// We need to indicate to the core where are stored the root ans user certificates, for future TLS exchange.
StoredCore.RootCa = Path.Combine(Windows.ApplicationModel.Package.Current.InstalledLocation.Path, "Assets", "rootca.pem");
StoredCore.UserCertificatesPath = ApplicationData.Current.LocalFolder.Path;
// In this tutorials we are going to log in and our registration state will change.
// Here we show you how to register a delegate method called every time the
// on OnRegistrationStateChanged callback is triggered.
StoredCore.Listener.OnRegistrationStateChanged += OnRegistrationStateChanged;
// Start the core after setup, and before everything else.
StoredCore.Start();
// The method Iterate must be permanently called on our core.
// The Iterate method runs all the waiting backgrounds tasks and poll networks notifications.
// Here how to setup a function called every 50ms, 50ms after the Timer object instantiation.
// See OnTimedEvent for more informations.
Timer = new Timer(OnTimedEvent, null, 20, 20);
// Setup GUI
Identity.Text = "sip:anthony.gauchy@sip.linphone.org";
Password.PlaceholderText = "myPasswd";
LogoutGuiChanges();
// Now use the GUI to log in, and see LogInClick to see how to handle login.
}
/// <summary>
/// Here we scheduled a callback to the Iterate method on the UI thread. While the
/// Linphone API calls are note thread safe, we ensure all our callbacks are done on the UI thread.
/// Doing this, we allow callbacks to manipulate UI without dispatcher.
/// </summary>
private async void OnTimedEvent(object state)
{
await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
{
StoredCore.Iterate();
});
}
/// <summary>
/// Called when you click on the "Login" button.
/// </summary>
private void LogInClick(object sender, RoutedEventArgs e)
{
if (LogIn.IsEnabled)
{
LogIn.IsEnabled = false;
// Here we are creating an AuthInfo object from the identity Address and password provided by the user.
Address address = Factory.Instance.CreateAddress(Identity.Text);
AuthInfo authInfo = Factory.Instance.CreateAuthInfo(address.Username, "", Password.Password, "", "", address.Domain);
// And we add it to the Core
StoredCore.AddAuthInfo(authInfo);
// Then we create a ProxyConfig object.
// It contains the connection information for the core
ProxyConfig proxyConfig = StoredCore.CreateProxyConfig();
proxyConfig.IdentityAddress = address;
string serverAddr = "sip:" + address.Domain + ";transport=tls";
proxyConfig.ServerAddr = serverAddr;
// If RegisterEnabled is set to true, when this configuration will be added to the core it will
// automatically try to connect.
proxyConfig.RegisterEnabled = true;
// And now we add it to the core, launching the connection process.
StoredCore.AddProxyConfig(proxyConfig);
StoredCore.DefaultProxyConfig = proxyConfig;
}
}
/// <summary>
/// Called when a key is pressed and released on the login page.
/// If you pressed "Enter", simulate a login click.
/// </summary>
void GridKeyUp(object sender, KeyRoutedEventArgs e)
{
if (VirtualKey.Enter.Equals(e.Key))
{
LogInClick(null, null);
}
}
/// <summary>
/// Called when you click on the "Logout" button.
/// </summary>
private void LogOutClick(object sender, RoutedEventArgs e)
{
if (LogOut.IsEnabled)
{
LogOut.IsEnabled = false;
// Setting RegisterEnabled to false on a connected ProxyConfig object will
// launch the logout action.
ProxyConfig proxyConfig = StoredCore.DefaultProxyConfig;
if (proxyConfig != null)
{
// You should call Edit() on a ProxyConfig before editing it.
proxyConfig.Edit();
proxyConfig.RegisterEnabled = false;
// And Done() after.
proxyConfig.Done();
}
}
}
/// <summary>
/// This method is called every time the RegistrationState is updated by background core's actions.
/// In this example we use this to update the GUI.
/// </summary>
private void OnRegistrationStateChanged(Core core, ProxyConfig proxyConfig, RegistrationState state, string message)
{
RegistrationText.Text = "You're registration state is : " + state.ToString();
switch (state)
{
// If the ProxyConfig was logged out, we clear the Core.
case RegistrationState.Cleared:
case RegistrationState.None:
StoredCore.ClearAllAuthInfo();
StoredCore.ClearProxyConfig();
LogoutGuiChanges();
break;
case RegistrationState.Ok:
LoginGuiChanges();
break;
case RegistrationState.Progress:
LoginInProgressGuiChanges();
break;
case RegistrationState.Failed:
LoginFailedChanges();
break;
default:
break;
}
}
private void LogoutGuiChanges()
{
LogIn.IsEnabled = true;
LogOut.IsEnabled = false;
LoginText.Text = "You are logged out";
}
private void LoginFailedChanges()
{
LogIn.IsEnabled = true;
LogOut.IsEnabled = false;
LoginText.Text = "Login failed, try again";
}
private void LoginGuiChanges()
{
LogIn.IsEnabled = false;
LogOut.IsEnabled = true;
LoginText.Text = "You are logged in, with identity " + StoredCore.Identity + ".";
}
private void LoginInProgressGuiChanges()
{
LogIn.IsEnabled = false;
LogOut.IsEnabled = false;
LoginText.Text = "Login in progress, with identity " + StoredCore.Identity + ".";
}
/// <summary>
/// Simple function to console log everything the Linphone SDK logs.
/// You should modify this method to match your logging habits.
/// </summary>
private void OnLog(LoggingService logService, string domain, LogLevel lev, string message)
{
string now = DateTime.Now.ToString("hh:mm:ss");
string log = now + " [";
switch (lev)
{
case LogLevel.Debug:
log += "DEBUG";
break;
case LogLevel.Error:
log += "ERROR";
break;
case LogLevel.Message:
log += "MESSAGE";
break;
case LogLevel.Warning:
log += "WARNING";
break;
case LogLevel.Fatal:
log += "FATAL";
break;
default:
break;
}
log += "] (" + domain + ") " + message;
Debug.WriteLine(log);
}
}
}

View File

@@ -1,49 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
IgnorableNamespaces="uap mp">
<Identity
Name="d6678921-9c3b-4627-987b-93115e4243a2"
Publisher="CN=Anthony"
Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="d6678921-9c3b-4627-987b-93115e4243a2" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<Properties>
<DisplayName>01_login</DisplayName>
<PublisherDisplayName>Anthony</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate"/>
</Resources>
<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="_01_login.App">
<uap:VisualElements
DisplayName="01_login"
Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png"
Description="01_login"
BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>

View File

@@ -1,29 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("01_login")]
[assembly: AssemblyDescription("Login C# tutorial with LinphoneSDK")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Belledonne Communications")]
[assembly: AssemblyProduct("Linphone")]
[assembly: AssemblyCopyright("Copyright © 2020 Belledonne Communications")]
[assembly: AssemblyTrademark("Linphone")]
[assembly: AssemblyCulture("")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: ComVisible(false)]

View File

@@ -1,31 +0,0 @@
<!--
This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
developers. However, you can modify these parameters to modify the behavior of the .NET Native
optimizer.
Runtime Directives are documented at https://go.microsoft.com/fwlink/?LinkID=391919
To fully enable reflection for App1.MyClass and all of its public/private members
<Type Name="App1.MyClass" Dynamic="Required All"/>
To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
-->
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Application>
<!--
An Assembly element with Name="*Application*" applies to all assemblies in
the application package. The asterisks are not wildcards.
-->
<Assembly Name="*Application*" Dynamic="Required All" />
<!-- Add your application specific runtime directives here. -->
</Application>
</Directives>

View File

@@ -1,186 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{63E0D306-E3A3-49A2-8CD6-ADF2A91127BA}</ProjectGuid>
<OutputType>AppContainerExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>_02_outgoing_call</RootNamespace>
<AssemblyName>02_outgoing_call</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.19041.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
<OutputPath>bin\ARM\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>ARM64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM64'">
<OutputPath>bin\ARM64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
</PropertyGroup>
<ItemGroup>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="Service\VideoService.cs" />
<Compile Include="Views\OutgoingCallsPage.xaml.cs">
<DependentUpon>OutgoingCallsPage.xaml</DependentUpon>
</Compile>
<Compile Include="Service\CoreService.cs" />
<Compile Include="Views\LoginPage.xaml.cs">
<DependentUpon>LoginPage.xaml</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
</ItemGroup>
<ItemGroup>
<Content Include="Properties\Default.rd.xml" />
<Content Include="Assets\LockScreenLogo.scale-200.png" />
<Content Include="Assets\SplashScreen.scale-200.png" />
<Content Include="Assets\Square150x150Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
<Content Include="Assets\StoreLogo.png" />
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="Views\LoginPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Views\OutgoingCallsPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<PackageReference Include="ANGLE.WindowsStore">
<Version>2.1.13</Version>
</PackageReference>
<PackageReference Include="LinphoneSDK">
<Version>4.5.0-alpha.290</Version>
</PackageReference>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>6.2.11</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Content Include="Assets\rootca.pem" />
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -1,7 +0,0 @@
<Application
x:Class="_02_outgoing_call.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:_02_outgoing_call">
</Application>

View File

@@ -1,121 +0,0 @@
/*
* Copyright (c) 2010-2020 Belledonne Communications SARL.
*
* This file is part of mediastreamer2.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using _02_outgoing_call.Service;
using _02_outgoing_call.Views;
using Linphone;
using System;
using System.Diagnostics;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;
namespace _02_outgoing_call
{
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
sealed partial class App : Application
{
private CoreService CoreService { get; } = CoreService.Instance;
/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
this.InitializeComponent();
this.Suspending += OnSuspending;
}
/// <summary>
/// Invoked when the application is launched normally by the end user. Other entry points
/// will be used such as when the application is launched to open a specific file.
/// </summary>
/// <param name="e">Details about the launch request and process.</param>
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
Frame rootFrame = Window.Current.Content as Frame;
// Start Linphone
LoggingService.Instance.LogLevel = LogLevel.Debug;
CoreService.CoreStart(Windows.ApplicationModel.Core.CoreApplication.GetCurrentView().CoreWindow.Dispatcher);
// Do not repeat app initialization when the Window already has content,
// just ensure that the window is active
if (rootFrame == null)
{
// Create a Frame to act as the navigation context and navigate to the first page
rootFrame = new Frame();
rootFrame.NavigationFailed += OnNavigationFailed;
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
{
//TODO: Load state from previously suspended application
}
// Place the frame in the current Window
Window.Current.Content = rootFrame;
}
if (e.PrelaunchActivated == false)
{
if (rootFrame.Content == null)
{
// When the navigation stack isn't restored navigate to the first page,
// configuring the new page by passing required information as a navigation
// parameter
rootFrame.Navigate(typeof(LoginPage), e.Arguments);
}
// Ensure the current window is active
Window.Current.Activate();
}
}
/// <summary>
/// Invoked when Navigation to a certain page fails
/// </summary>
/// <param name="sender">The Frame which failed navigation</param>
/// <param name="e">Details about the navigation failure</param>
void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
{
throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
}
/// <summary>
/// Invoked when application execution is being suspended. Application state is saved
/// without knowing whether the application will be terminated or resumed with the contents
/// of memory still intact.
/// </summary>
/// <param name="sender">The source of the suspend request.</param>
/// <param name="e">Details about the suspend request.</param>
private void OnSuspending(object sender, SuspendingEventArgs e)
{
var deferral = e.SuspendingOperation.GetDeferral();
//TODO: Save application state and stop any background activity
deferral.Complete();
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -1,55 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
IgnorableNamespaces="uap mp">
<Identity
Name="754c9d43-0820-475a-b433-8a1be86b241c"
Publisher="CN=Anthony"
Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="754c9d43-0820-475a-b433-8a1be86b241c" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<Properties>
<DisplayName>02_outgoing_call</DisplayName>
<PublisherDisplayName>Anthony</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate"/>
</Resources>
<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="_02_outgoing_call.App">
<uap:VisualElements
DisplayName="02_outgoing_call"
Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png"
Description="02_outgoing_call"
BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
<uap:Capability Name="voipCall"/>
<Capability Name="codeGeneration"/>
<uap:Capability Name="picturesLibrary"/>
<uap:Capability Name="removableStorage"/>
<DeviceCapability Name="microphone"/>
<DeviceCapability Name="webcam"/>
</Capabilities>
</Package>

View File

@@ -1,29 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("02_outgoing_call")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("02_outgoing_call")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: ComVisible(false)]

View File

@@ -1,31 +0,0 @@
<!--
This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
developers. However, you can modify these parameters to modify the behavior of the .NET Native
optimizer.
Runtime Directives are documented at https://go.microsoft.com/fwlink/?LinkID=391919
To fully enable reflection for App1.MyClass and all of its public/private members
<Type Name="App1.MyClass" Dynamic="Required All"/>
To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
-->
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Application>
<!--
An Assembly element with Name="*Application*" applies to all assemblies in
the application package. The asterisks are not wildcards.
-->
<Assembly Name="*Application*" Dynamic="Required All" />
<!-- Add your application specific runtime directives here. -->
</Application>
</Directives>

View File

@@ -1,203 +0,0 @@
/*
* Copyright (c) 2010-2020 Belledonne Communications SARL.
*
* This file is part of mediastreamer2.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using Linphone;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Windows.Media.Audio;
using Windows.Media.Capture;
using Windows.Storage;
using Windows.UI.Core;
using static Linphone.CoreListener;
namespace _02_outgoing_call.Service
{
class CoreService
{
private Timer Timer;
private static readonly CoreService instance = new CoreService();
public static CoreService Instance
{
get
{
return instance;
}
}
private Core core;
public Core Core
{
get
{
if (core == null)
{
Factory factory = Factory.Instance;
string assetsPath = Path.Combine(Windows.ApplicationModel.Package.Current.InstalledLocation.Path, "Assets");
factory.TopResourcesDir = assetsPath;
factory.DataResourcesDir = assetsPath;
factory.SoundResourcesDir = assetsPath;
factory.RingResourcesDir = assetsPath;
factory.ImageResourcesDir = assetsPath;
factory.MspluginsDir = ".";
core = factory.CreateCore("", "", IntPtr.Zero);
core.AudioPort = 7666;
core.VideoPort = 9666;
core.RootCa = Path.Combine(Windows.ApplicationModel.Package.Current.InstalledLocation.Path, "Assets", "rootca.pem");
core.UserCertificatesPath = ApplicationData.Current.LocalFolder.Path;
VideoActivationPolicy videoActivationPolicy = factory.CreateVideoActivationPolicy();
videoActivationPolicy.AutomaticallyAccept = true;
videoActivationPolicy.AutomaticallyInitiate = false;
core.VideoActivationPolicy = videoActivationPolicy;
if (Core.VideoSupported())
{
Core.VideoDisplayFilter = "MSOGL";
Core.VideoCaptureEnabled = true;
}
Core.UsePreviewWindow(true);
}
return core;
}
}
public void CoreStart(CoreDispatcher dispatcher)
{
Core.Start();
Timer = new Timer(OnTimedEvent, dispatcher, 20, 20);
}
private async void OnTimedEvent(object state)
{
await ((CoreDispatcher)state).RunIdleAsync((args) =>
{
Core.Iterate();
});
}
public void AddOnRegistrationStateChangedDelegate(OnRegistrationStateChangedDelegate myDelegate)
{
Core.Listener.OnRegistrationStateChanged += myDelegate;
}
public void AddOnCallStateChangedDelegate(OnCallStateChangedDelegate myDelegate)
{
Core.Listener.OnCallStateChanged += myDelegate;
}
public void LogIn(string identity, string password)
{
Address address = Factory.Instance.CreateAddress(identity);
AuthInfo authInfo = Factory.Instance.CreateAuthInfo(address.Username, "", password, "", "", address.Domain);
Core.AddAuthInfo(authInfo);
ProxyConfig proxyConfig = core.CreateProxyConfig();
proxyConfig.IdentityAddress = address;
string serverAddr = "sip:" + address.Domain + ";transport=tls";
proxyConfig.ServerAddr = serverAddr;
proxyConfig.RegisterEnabled = true;
Core.AddProxyConfig(proxyConfig);
Core.DefaultProxyConfig = proxyConfig;
}
public void LogOut()
{
ProxyConfig proxyConfig = Core.DefaultProxyConfig;
if (proxyConfig != null)
{
proxyConfig.Edit();
proxyConfig.RegisterEnabled = false;
proxyConfig.Done();
}
}
public void ClearCoreAfterLogOut()
{
Core.ClearAllAuthInfo();
Core.ClearProxyConfig();
}
public async void Call(string uriToCall)
{
await OpenMicrophonePopup();
Address address = Core.InterpretUrl(uriToCall);
Core.InviteAddress(address);
}
public bool MicEnabledSwitch()
{
return Core.MicEnabled = !Core.MicEnabled;
}
public bool SpeakerMutedSwitch()
{
return Core.CurrentCall.SpeakerMuted = !Core.CurrentCall.SpeakerMuted;
}
public async Task<bool> CameraEnabledSwitchAsync()
{
await OpenCameraPopup();
Call call = Core.CurrentCall;
CallParams param = core.CreateCallParams(call);
bool newValue = !param.VideoEnabled;
param.VideoEnabled = newValue;
call.Update(param);
return newValue;
}
private async Task OpenMicrophonePopup()
{
AudioGraphSettings settings = new AudioGraphSettings(Windows.Media.Render.AudioRenderCategory.Media);
CreateAudioGraphResult result = await AudioGraph.CreateAsync(settings);
AudioGraph audioGraph = result.Graph;
CreateAudioDeviceInputNodeResult resultNode = await audioGraph.CreateDeviceInputNodeAsync(Windows.Media.Capture.MediaCategory.Media);
AudioDeviceInputNode deviceInputNode = resultNode.DeviceInputNode;
deviceInputNode.Dispose();
audioGraph.Dispose();
}
private async Task OpenCameraPopup()
{
MediaCapture mediaCapture = new Windows.Media.Capture.MediaCapture();
await mediaCapture.InitializeAsync(new MediaCaptureInitializationSettings
{
StreamingCaptureMode = StreamingCaptureMode.Video
});
mediaCapture.Dispose();
}
}
}

View File

@@ -1,110 +0,0 @@
using System;
using System.Runtime.InteropServices;
using System.Threading;
using Windows.UI.Core;
using Windows.UI.Xaml.Controls;
using EGLNativeWindowType = System.IntPtr;
using OpenGlFunctions = System.IntPtr;
namespace _02_outgoing_call.Service
{
class VideoService
{
private static readonly VideoService instance = new VideoService();
public static VideoService Instance
{
get
{
return instance;
}
}
private CoreService CoreService { get; } = CoreService.Instance;
private bool AlearadyStartedOnce { get; set; }
private bool AlearadyStartedOncePreview { get; set; }
private Timer Timer { get; set; }
public struct ContextInfo
{
public EGLNativeWindowType window;
public OpenGlFunctions functions;
}
public void StartVideoStream(SwapChainPanel main, SwapChainPanel preview, CoreDispatcher dispatcher)
{
CreateRenderSurface(preview, true);
CreateRenderSurface(main, false);
Timer = new Timer(OnTimedEvent, dispatcher, 40, 40);
}
private async void OnTimedEvent(object state)
{
await ((CoreDispatcher)state).RunIdleAsync((args) =>
{
CoreService.Core.PreviewOglRender();
if (CoreService.Core.CurrentCall != null)
CoreService.Core.CurrentCall.OglRender();
});
}
public void StopVideoStream()
{
AlearadyStartedOnce = true;
if (Timer != null)
{
Timer.Dispose();
}
}
public void CreateRenderSurface(SwapChainPanel panel, bool isPreview)
{// Need to convert C# object into C++. Warning to memory leak
IntPtr oldData;// Used to release memory after assignation
ContextInfo c;
if (panel != null)
{
c.window = Marshal.GetIUnknownForObject(panel);
}
else
{
c.window = IntPtr.Zero;
}
c.functions = IntPtr.Zero;
IntPtr pnt = Marshal.AllocHGlobal(Marshal.SizeOf(c));
Marshal.StructureToPtr(c, pnt, false);
if (isPreview)
{
oldData = CoreService.Core.NativePreviewWindowId;
CoreService.Core.NativePreviewWindowId = pnt;
if (AlearadyStartedOncePreview)
{
CleanMemory(oldData);
}
AlearadyStartedOncePreview = true;
}
else
{
if (CoreService.Core.CurrentCall != null)
{
oldData = CoreService.Core.CurrentCall.NativeVideoWindowId;
CoreService.Core.CurrentCall.NativeVideoWindowId = pnt;
if (AlearadyStartedOnce)
{
CleanMemory(oldData);
}
AlearadyStartedOnce = true;
}
}
}
private void CleanMemory(IntPtr context)
{
if (context != IntPtr.Zero)
Marshal.FreeHGlobal(context);
}
}
}

View File

@@ -1,32 +0,0 @@
<Page
x:Class="_02_outgoing_call.Views.LoginPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:_02_outgoing_call"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid KeyUp="GridKeyUp">
<StackPanel Grid.Row="0" VerticalAlignment="Center" >
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="Identity :"/>
<TextBox x:Name="Identity" Width="350" MinWidth="350" MaxWidth="350" Text="sip:anthony.test@sip.linphone.org"></TextBox>
</StackPanel>
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="Password :"/>
<PasswordBox x:Name="Password" Width="350" MinWidth="350" MaxWidth="350" PlaceholderText="myPasswd"/>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button x:Name="LogIn" Content="Login" Click="LogInClick"/>
</StackPanel>
<StackPanel Orientation="Vertical">
<TextBlock x:Name="RegistrationText" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</StackPanel>
</StackPanel>
</Grid>
</Page>

View File

@@ -1,101 +0,0 @@
/*
* Copyright (c) 2010-2020 Belledonne Communications SARL.
*
* This file is part of mediastreamer2.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using _02_outgoing_call.Service;
using Linphone;
using Windows.System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Navigation;
namespace _02_outgoing_call.Views
{
/// <summary>
/// A really simple app for a first Login with LinphoneSDK x UWP
/// </summary>
public sealed partial class LoginPage : Page
{
private CoreService CoreService { get; } = CoreService.Instance;
public LoginPage()
{
this.InitializeComponent();
CoreService.AddOnRegistrationStateChangedDelegate(OnRegistrationStateChanged);
}
/// <summary>
/// Called when you click on the "Login" button.
/// </summary>
private void LogInClick(object sender, RoutedEventArgs e)
{
if (LogIn.IsEnabled)
{
LogIn.IsEnabled = false;
CoreService.LogIn(Identity.Text, Password.Password);
}
}
/// <summary>
/// Called when a key is pressed and released on the login page.
/// If you pressed "Enter", simulate a login click.
/// </summary>
void GridKeyUp(object sender, KeyRoutedEventArgs e)
{
if (VirtualKey.Enter.Equals(e.Key))
{
LogInClick(null, null);
}
}
/// <summary>
/// This method is called every time the RegistrationState is updated by background core's actions.
/// In this example we use this to update the GUI.
/// </summary>
private void OnRegistrationStateChanged(Core core, ProxyConfig proxyConfig, RegistrationState state, string message)
{
RegistrationText.Text = "You're registration state is : " + state.ToString();
switch (state)
{
case RegistrationState.Cleared:
case RegistrationState.None:
CoreService.ClearCoreAfterLogOut();
LogIn.IsEnabled = true;
break;
case RegistrationState.Ok:
LogIn.IsEnabled = false;
this.Frame.Navigate(typeof(OutgoingCallsPage));
break;
case RegistrationState.Progress:
LogIn.IsEnabled = false;
break;
case RegistrationState.Failed:
LogIn.IsEnabled = true;
break;
default:
break;
}
}
}
}

View File

@@ -1,47 +0,0 @@
<Page
x:Class="_02_outgoing_call.Views.OutgoingCallsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:_02_outgoing_call"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid >
<StackPanel Grid.Row="0" VerticalAlignment="Center">
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock x:Name="HelloText" Text="Hello "/>
<TextBlock Text="You are now on the Outgoing calls Page !"/>
</StackPanel>
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="URI to call : "/>
<TextBox x:Name="UriToCall" Width="350" MinWidth="350" MaxWidth="350" Text="sip:anthony.gauchy@sip.linphone.org"/>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button x:Name="CallButton" Content="Call" Click="CallClick"/>
<Button x:Name="LogOut" Content="Logout" Click="LogOutClick"/>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock x:Name="CallText" />
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button x:Name="HangOut" Content="Hang out" Click="HangOutClick" IsEnabled="False"/>
<Button x:Name="Sound" Content="Switch off Sound" Click="SoundClick" IsEnabled="False"/>
<Button x:Name="Camera" Content="Switch on Camera" Click="CameraClick" IsEnabled="False"/>
<Button x:Name="Mic" Content="Mute" Click="MicClick" IsEnabled="False"/>
</StackPanel>
<StackPanel x:Name="WebcamsStackPanel" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed">
<TextBlock Text="Video : "/>
<SwapChainPanel x:Name="VideoSwapChainPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="342" Width="608"/>
<TextBlock Text="Preview : "/>
<SwapChainPanel x:Name="PreviewSwapChainPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="171" Width="304"/>
</StackPanel>
</StackPanel>
</Grid>
</Page>

View File

@@ -1,156 +0,0 @@
using _02_outgoing_call.Service;
using Linphone;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;
namespace _02_outgoing_call.Views
{
public sealed partial class OutgoingCallsPage : Page
{
private CoreService CoreService { get; } = CoreService.Instance;
private VideoService VideoService { get; } = VideoService.Instance;
public OutgoingCallsPage()
{
this.InitializeComponent();
HelloText.Text += CoreService.Core.DefaultProxyConfig.FindAuthInfo().Username;
CoreService.AddOnCallStateChangedDelegate(OnCallStateChanged);
}
protected override void OnNavigatedFrom(NavigationEventArgs e)
{
VideoService.StopVideoStream();
}
private void CallClick(object sender, RoutedEventArgs e)
{
CoreService.Call(UriToCall.Text);
}
private void LogOutClick(object sender, RoutedEventArgs e)
{
if (LogOut.IsEnabled)
{
IsEnabled = false;
CoreService.Core.TerminateAllCalls();
CoreService.LogOut();
this.Frame.Navigate(typeof(LoginPage));
}
}
private void HangOutClick(object sender, RoutedEventArgs e)
{
CoreService.Core.TerminateAllCalls();
}
private void SoundClick(object sender, RoutedEventArgs e)
{
if (CoreService.SpeakerMutedSwitch())
{
Sound.Content = "Switch on Sound";
}
else
{
Sound.Content = "Switch off Sound";
}
}
private async void CameraClick(object sender, RoutedEventArgs e)
{
await CoreService.CameraEnabledSwitchAsync();
Camera.Content = "Waiting for accept ...";
Camera.IsEnabled = false;
}
private void MicClick(object sender, RoutedEventArgs e)
{
if (CoreService.MicEnabledSwitch())
{
Mic.Content = "Mute";
}
else
{
Mic.Content = "Unmute";
}
}
private void OnCallStateChanged(Core core, Call call, CallState state, string message)
{
CallText.Text = "You're call state is : " + state.ToString();
switch (state)
{
case CallState.OutgoingInit:
case CallState.OutgoingProgress:
case CallState.OutgoingRinging:
HangOut.IsEnabled = true;
break;
case CallState.StreamsRunning:
case CallState.UpdatedByRemote:
CallInProgressGuiUpdates();
if (call.Params.VideoEnabled)
{
StartVideoAndUpdateGui();
}
else
{
StopVideoAndUpdateGui();
}
break;
case CallState.Error:
case CallState.End:
case CallState.Released:
EndingCallGuiUpdates();
VideoService.StopVideoStream();
break;
}
}
private void StopVideoAndUpdateGui()
{
Camera.Content = "Switch on Camera";
Camera.IsEnabled = true;
WebcamsStackPanel.Visibility = Visibility.Collapsed;
VideoService.StopVideoStream();
}
private void StartVideoAndUpdateGui()
{
VideoService.StartVideoStream(VideoSwapChainPanel, PreviewSwapChainPanel, Dispatcher);
WebcamsStackPanel.Visibility = Visibility.Visible;
Camera.Content = "Switch off Camera";
Camera.IsEnabled = true;
}
private void EndingCallGuiUpdates()
{
CallButton.IsEnabled = true;
HangOut.IsEnabled = false;
Sound.IsEnabled = false;
Camera.IsEnabled = false;
Mic.IsEnabled = false;
WebcamsStackPanel.Visibility = Visibility.Collapsed;
Camera.Content = "Switch on Camera";
Mic.Content = "Mute";
Sound.Content = "Switch off Sound";
}
private void CallInProgressGuiUpdates()
{
CallButton.IsEnabled = false;
HangOut.IsEnabled = true;
Sound.IsEnabled = true;
Camera.IsEnabled = true;
Mic.IsEnabled = true;
}
}
}

View File

@@ -1,186 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{8C3B09A6-CD10-4F83-8EF1-6BF2002C6339}</ProjectGuid>
<OutputType>AppContainerExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>_03_incoming_call</RootNamespace>
<AssemblyName>03_incoming_call</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.19041.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
<OutputPath>bin\ARM\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>ARM64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM64'">
<OutputPath>bin\ARM64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
</PropertyGroup>
<ItemGroup>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="Service\VideoService.cs" />
<Compile Include="Views\CallsPage.xaml.cs">
<DependentUpon>CallsPage.xaml</DependentUpon>
</Compile>
<Compile Include="Service\CoreService.cs" />
<Compile Include="Views\LoginPage.xaml.cs">
<DependentUpon>LoginPage.xaml</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
</ItemGroup>
<ItemGroup>
<Content Include="Properties\Default.rd.xml" />
<Content Include="Assets\LockScreenLogo.scale-200.png" />
<Content Include="Assets\SplashScreen.scale-200.png" />
<Content Include="Assets\Square150x150Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
<Content Include="Assets\StoreLogo.png" />
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="Views\LoginPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Views\CallsPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<PackageReference Include="ANGLE.WindowsStore">
<Version>2.1.13</Version>
</PackageReference>
<PackageReference Include="LinphoneSDK">
<Version>4.5.0-alpha.290</Version>
</PackageReference>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>6.2.11</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Content Include="Assets\rootca.pem" />
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -1,7 +0,0 @@
<Application
x:Class="_03_incoming_call.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:_03_incoming_call">
</Application>

View File

@@ -1,121 +0,0 @@
/*
* Copyright (c) 2010-2020 Belledonne Communications SARL.
*
* This file is part of mediastreamer2.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using _03_incoming_call.Service;
using _03_incoming_call.Views;
using Linphone;
using System;
using System.Diagnostics;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;
namespace _03_incoming_call
{
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
sealed partial class App : Application
{
private CoreService CoreService { get; } = CoreService.Instance;
/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
this.InitializeComponent();
this.Suspending += OnSuspending;
}
/// <summary>
/// Invoked when the application is launched normally by the end user. Other entry points
/// will be used such as when the application is launched to open a specific file.
/// </summary>
/// <param name="e">Details about the launch request and process.</param>
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
Frame rootFrame = Window.Current.Content as Frame;
// Start Linphone
LoggingService.Instance.LogLevel = LogLevel.Debug;
CoreService.CoreStart(Windows.ApplicationModel.Core.CoreApplication.GetCurrentView().CoreWindow.Dispatcher);
// Do not repeat app initialization when the Window already has content,
// just ensure that the window is active
if (rootFrame == null)
{
// Create a Frame to act as the navigation context and navigate to the first page
rootFrame = new Frame();
rootFrame.NavigationFailed += OnNavigationFailed;
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
{
//TODO: Load state from previously suspended application
}
// Place the frame in the current Window
Window.Current.Content = rootFrame;
}
if (e.PrelaunchActivated == false)
{
if (rootFrame.Content == null)
{
// When the navigation stack isn't restored navigate to the first page,
// configuring the new page by passing required information as a navigation
// parameter
rootFrame.Navigate(typeof(LoginPage), e.Arguments);
}
// Ensure the current window is active
Window.Current.Activate();
}
}
/// <summary>
/// Invoked when Navigation to a certain page fails
/// </summary>
/// <param name="sender">The Frame which failed navigation</param>
/// <param name="e">Details about the navigation failure</param>
void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
{
throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
}
/// <summary>
/// Invoked when application execution is being suspended. Application state is saved
/// without knowing whether the application will be terminated or resumed with the contents
/// of memory still intact.
/// </summary>
/// <param name="sender">The source of the suspend request.</param>
/// <param name="e">Details about the suspend request.</param>
private void OnSuspending(object sender, SuspendingEventArgs e)
{
var deferral = e.SuspendingOperation.GetDeferral();
//TODO: Save application state and stop any background activity
deferral.Complete();
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -1,55 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
IgnorableNamespaces="uap mp">
<Identity
Name="754c9d43-0820-475a-b433-8a1be86b241c"
Publisher="CN=Anthony"
Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="754c9d43-0820-475a-b433-8a1be86b241c" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<Properties>
<DisplayName>03_incoming_call</DisplayName>
<PublisherDisplayName>Anthony</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate"/>
</Resources>
<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="_03_incoming_call.App">
<uap:VisualElements
DisplayName="03_incoming_call"
Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png"
Description="03_incoming_call"
BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
<uap:Capability Name="voipCall"/>
<Capability Name="codeGeneration"/>
<uap:Capability Name="picturesLibrary"/>
<uap:Capability Name="removableStorage"/>
<DeviceCapability Name="microphone"/>
<DeviceCapability Name="webcam"/>
</Capabilities>
</Package>

View File

@@ -1,29 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("03_incoming_call")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("03_incoming_call")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: ComVisible(false)]

View File

@@ -1,31 +0,0 @@
<!--
This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
developers. However, you can modify these parameters to modify the behavior of the .NET Native
optimizer.
Runtime Directives are documented at https://go.microsoft.com/fwlink/?LinkID=391919
To fully enable reflection for App1.MyClass and all of its public/private members
<Type Name="App1.MyClass" Dynamic="Required All"/>
To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
-->
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Application>
<!--
An Assembly element with Name="*Application*" applies to all assemblies in
the application package. The asterisks are not wildcards.
-->
<Assembly Name="*Application*" Dynamic="Required All" />
<!-- Add your application specific runtime directives here. -->
</Application>
</Directives>

View File

@@ -1,219 +0,0 @@
/*
* Copyright (c) 2010-2020 Belledonne Communications SARL.
*
* This file is part of mediastreamer2.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using Linphone;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Windows.Media.Audio;
using Windows.Media.Capture;
using Windows.Storage;
using Windows.UI.Core;
using static Linphone.CoreListener;
namespace _03_incoming_call.Service
{
class CoreService
{
private Timer Timer;
private static readonly CoreService instance = new CoreService();
public static CoreService Instance
{
get
{
return instance;
}
}
private Core core;
public Core Core
{
get
{
if (core == null)
{
Factory factory = Factory.Instance;
string assetsPath = Path.Combine(Windows.ApplicationModel.Package.Current.InstalledLocation.Path, "Assets");
factory.TopResourcesDir = assetsPath;
factory.DataResourcesDir = assetsPath;
factory.SoundResourcesDir = assetsPath;
factory.RingResourcesDir = assetsPath;
factory.ImageResourcesDir = assetsPath;
factory.MspluginsDir = ".";
core = factory.CreateCore("", "", IntPtr.Zero);
core.AudioPort = 7666;
core.VideoPort = 9666;
core.RootCa = Path.Combine(Windows.ApplicationModel.Package.Current.InstalledLocation.Path, "Assets", "rootca.pem");
core.UserCertificatesPath = ApplicationData.Current.LocalFolder.Path;
VideoActivationPolicy videoActivationPolicy = factory.CreateVideoActivationPolicy();
videoActivationPolicy.AutomaticallyAccept = true;
videoActivationPolicy.AutomaticallyInitiate = false;
core.VideoActivationPolicy = videoActivationPolicy;
if (Core.VideoSupported())
{
Core.VideoDisplayFilter = "MSOGL";
Core.VideoCaptureEnabled = true;
}
Core.UsePreviewWindow(true);
}
return core;
}
}
public void CoreStart(CoreDispatcher dispatcher)
{
Core.Start();
Timer = new Timer(OnTimedEvent, dispatcher, 20, 20);
}
private async void OnTimedEvent(object state)
{
await ((CoreDispatcher)state).RunIdleAsync((args) =>
{
Core.Iterate();
});
}
public void AddOnRegistrationStateChangedDelegate(OnRegistrationStateChangedDelegate myDelegate)
{
Core.Listener.OnRegistrationStateChanged += myDelegate;
}
public void AddOnCallStateChangedDelegate(OnCallStateChangedDelegate myDelegate)
{
Core.Listener.OnCallStateChanged += myDelegate;
}
public void LogIn(string identity, string password)
{
Address address = Factory.Instance.CreateAddress(identity);
AuthInfo authInfo = Factory.Instance.CreateAuthInfo(address.Username, "", password, "", "", address.Domain);
Core.AddAuthInfo(authInfo);
ProxyConfig proxyConfig = core.CreateProxyConfig();
proxyConfig.IdentityAddress = address;
string serverAddr = "sip:" + address.Domain + ";transport=tls";
proxyConfig.ServerAddr = serverAddr;
proxyConfig.RegisterEnabled = true;
Core.AddProxyConfig(proxyConfig);
Core.DefaultProxyConfig = proxyConfig;
}
public void LogOut()
{
ProxyConfig proxyConfig = Core.DefaultProxyConfig;
if (proxyConfig != null)
{
proxyConfig.Edit();
proxyConfig.RegisterEnabled = false;
proxyConfig.Done();
}
}
public void ClearCoreAfterLogOut()
{
Core.ClearAllAuthInfo();
Core.ClearProxyConfig();
}
public async void Call(string uriToCall)
{
await OpenMicrophonePopup();
Address address = Core.InterpretUrl(uriToCall);
Core.InviteAddress(address);
}
public bool MicEnabledSwitch()
{
return Core.MicEnabled = !Core.MicEnabled;
}
public bool SpeakerMutedSwitch()
{
return Core.CurrentCall.SpeakerMuted = !Core.CurrentCall.SpeakerMuted;
}
public async Task<bool> CameraEnabledSwitchAsync()
{
await OpenCameraPopup();
Call call = Core.CurrentCall;
CallParams param = core.CreateCallParams(call);
bool newValue = !param.VideoEnabled;
param.VideoEnabled = newValue;
call.Update(param);
return newValue;
}
public void DeclineIncomingCall()
{
if (Core.CurrentCall != null && Core.CurrentCall.State == CallState.IncomingReceived)
{
Core.CurrentCall.Decline(Reason.Declined);
}
}
public void AcceptIncomingCall()
{
if (Core.CurrentCall != null && Core.CurrentCall.State == CallState.IncomingReceived)
{
Core.CurrentCall.Accept();
}
}
private async Task OpenMicrophonePopup()
{
AudioGraphSettings settings = new AudioGraphSettings(Windows.Media.Render.AudioRenderCategory.Media);
CreateAudioGraphResult result = await AudioGraph.CreateAsync(settings);
AudioGraph audioGraph = result.Graph;
CreateAudioDeviceInputNodeResult resultNode = await audioGraph.CreateDeviceInputNodeAsync(Windows.Media.Capture.MediaCategory.Media);
AudioDeviceInputNode deviceInputNode = resultNode.DeviceInputNode;
deviceInputNode.Dispose();
audioGraph.Dispose();
}
private async Task OpenCameraPopup()
{
MediaCapture mediaCapture = new Windows.Media.Capture.MediaCapture();
await mediaCapture.InitializeAsync(new MediaCaptureInitializationSettings
{
StreamingCaptureMode = StreamingCaptureMode.Video
});
mediaCapture.Dispose();
}
}
}

View File

@@ -1,110 +0,0 @@
using System;
using System.Runtime.InteropServices;
using System.Threading;
using Windows.UI.Core;
using Windows.UI.Xaml.Controls;
using EGLNativeWindowType = System.IntPtr;
using OpenGlFunctions = System.IntPtr;
namespace _03_incoming_call.Service
{
class VideoService
{
private static readonly VideoService instance = new VideoService();
public static VideoService Instance
{
get
{
return instance;
}
}
private CoreService CoreService { get; } = CoreService.Instance;
private bool AlearadyStartedOnce { get; set; }
private bool AlearadyStartedOncePreview { get; set; }
private Timer Timer { get; set; }
public struct ContextInfo
{
public EGLNativeWindowType window;
public OpenGlFunctions functions;
}
public void StartVideoStream(SwapChainPanel main, SwapChainPanel preview, CoreDispatcher dispatcher)
{
CreateRenderSurface(preview, true);
CreateRenderSurface(main, false);
Timer = new Timer(OnTimedEvent, dispatcher, 40, 40);
}
private async void OnTimedEvent(object state)
{
await ((CoreDispatcher)state).RunIdleAsync((args) =>
{
CoreService.Core.PreviewOglRender();
if (CoreService.Core.CurrentCall != null)
CoreService.Core.CurrentCall.OglRender();
});
}
public void StopVideoStream()
{
AlearadyStartedOnce = true;
if (Timer != null)
{
Timer.Dispose();
}
}
public void CreateRenderSurface(SwapChainPanel panel, bool isPreview)
{// Need to convert C# object into C++. Warning to memory leak
IntPtr oldData;// Used to release memory after assignation
ContextInfo c;
if (panel != null)
{
c.window = Marshal.GetIUnknownForObject(panel);
}
else
{
c.window = IntPtr.Zero;
}
c.functions = IntPtr.Zero;
IntPtr pnt = Marshal.AllocHGlobal(Marshal.SizeOf(c));
Marshal.StructureToPtr(c, pnt, false);
if (isPreview)
{
oldData = CoreService.Core.NativePreviewWindowId;
CoreService.Core.NativePreviewWindowId = pnt;
if (AlearadyStartedOncePreview)
{
CleanMemory(oldData);
}
AlearadyStartedOncePreview = true;
}
else
{
if (CoreService.Core.CurrentCall != null)
{
oldData = CoreService.Core.CurrentCall.NativeVideoWindowId;
CoreService.Core.CurrentCall.NativeVideoWindowId = pnt;
if (AlearadyStartedOnce)
{
CleanMemory(oldData);
}
AlearadyStartedOnce = true;
}
}
}
private void CleanMemory(IntPtr context)
{
if (context != IntPtr.Zero)
Marshal.FreeHGlobal(context);
}
}
}

View File

@@ -1,58 +0,0 @@
<Page
x:Class="_03_incoming_call.Views.CallsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:_03_incoming_call"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid >
<StackPanel Grid.Row="0" VerticalAlignment="Center">
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10">
<TextBlock x:Name="HelloText" Text="Hello "/>
<TextBlock Text="You are now on the Outgoing calls Page !"/>
</StackPanel>
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10">
<TextBlock Text="URI to call : "/>
<TextBox x:Name="UriToCall" Width="350" MinWidth="350" MaxWidth="350" Text="sip:anthony.gauchy@sip.linphone.org"/>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="5">
<Button x:Name="CallButton" Content="Call" Click="CallClick"/>
<Button x:Name="LogOut" Content="Logout" Click="LogOutClick"/>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10">
<TextBlock x:Name="CallText" Text="You're call state is : Idle"/>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10">
<Button x:Name="HangOut" Content="Hang out" Click="HangOutClick" IsEnabled="False"/>
<Button x:Name="Sound" Content="Switch off Sound" Click="SoundClick" IsEnabled="False"/>
<Button x:Name="Camera" Content="Switch on Camera" Click="CameraClick" IsEnabled="False"/>
<Button x:Name="Mic" Content="Mute" Click="MicClick" IsEnabled="False"/>
</StackPanel>
<StackPanel x:Name="WebcamsStackPanel" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed" Margin="10">
<TextBlock Text="Video : "/>
<SwapChainPanel x:Name="VideoSwapChainPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="342" Width="608"/>
<TextBlock Text="Preview : "/>
<SwapChainPanel x:Name="PreviewSwapChainPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="171" Width="304"/>
</StackPanel>
<StackPanel x:Name="IncomingCallStackPanel" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed" Margin="100">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="You have a call from :"/>
<TextBlock x:Name="IncommingCallText" Text=""/>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button x:Name="Answer" Content="Answer" Click="AnswerClick"/>
<Button x:Name="Decline" Content="Decline" Click="DeclineClick"/>
</StackPanel>
</StackPanel>
</StackPanel>
</Grid>
</Page>

View File

@@ -1,172 +0,0 @@
using _03_incoming_call.Service;
using Linphone;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;
namespace _03_incoming_call.Views
{
public sealed partial class CallsPage : Page
{
private CoreService CoreService { get; } = CoreService.Instance;
private VideoService VideoService { get; } = VideoService.Instance;
public CallsPage()
{
this.InitializeComponent();
HelloText.Text += CoreService.Core.DefaultProxyConfig.FindAuthInfo().Username;
CoreService.AddOnCallStateChangedDelegate(OnCallStateChanged);
}
protected override void OnNavigatedFrom(NavigationEventArgs e)
{
VideoService.StopVideoStream();
}
private void CallClick(object sender, RoutedEventArgs e)
{
CoreService.Call(UriToCall.Text);
}
private void LogOutClick(object sender, RoutedEventArgs e)
{
if (LogOut.IsEnabled)
{
IsEnabled = false;
CoreService.Core.TerminateAllCalls();
CoreService.LogOut();
this.Frame.Navigate(typeof(LoginPage));
}
}
private void HangOutClick(object sender, RoutedEventArgs e)
{
CoreService.Core.TerminateAllCalls();
}
private void SoundClick(object sender, RoutedEventArgs e)
{
if (CoreService.SpeakerMutedSwitch())
{
Sound.Content = "Switch on Sound";
}
else
{
Sound.Content = "Switch off Sound";
}
}
private async void CameraClick(object sender, RoutedEventArgs e)
{
await CoreService.CameraEnabledSwitchAsync();
Camera.Content = "Waiting for accept ...";
Camera.IsEnabled = false;
}
private void MicClick(object sender, RoutedEventArgs e)
{
if (CoreService.MicEnabledSwitch())
{
Mic.Content = "Mute";
}
else
{
Mic.Content = "Unmute";
}
}
private void AnswerClick(object sender, RoutedEventArgs e)
{
CoreService.AcceptIncomingCall();
}
private void DeclineClick(object sender, RoutedEventArgs e)
{
CoreService.DeclineIncomingCall();
}
private void OnCallStateChanged(Core core, Call call, CallState state, string message)
{
CallText.Text = "You're call state is : " + state.ToString();
switch (state)
{
case CallState.IncomingReceived:
IncomingCallStackPanel.Visibility = Visibility.Visible;
IncommingCallText.Text = " " + call.RemoteAddress.AsString();
break;
case CallState.OutgoingInit:
case CallState.OutgoingProgress:
case CallState.OutgoingRinging:
HangOut.IsEnabled = true;
break;
case CallState.StreamsRunning:
case CallState.UpdatedByRemote:
CallInProgressGuiUpdates();
if (call.CurrentParams.VideoEnabled)
{
StartVideoAndUpdateGui();
}
else
{
StopVideoAndUpdateGui();
}
break;
case CallState.Error:
case CallState.End:
case CallState.Released:
EndingCallGuiUpdates();
VideoService.StopVideoStream();
break;
}
}
private void StopVideoAndUpdateGui()
{
Camera.Content = "Switch on Camera";
Camera.IsEnabled = true;
WebcamsStackPanel.Visibility = Visibility.Collapsed;
VideoService.StopVideoStream();
}
private void StartVideoAndUpdateGui()
{
VideoService.StartVideoStream(VideoSwapChainPanel, PreviewSwapChainPanel, Dispatcher);
WebcamsStackPanel.Visibility = Visibility.Visible;
Camera.Content = "Switch off Camera";
Camera.IsEnabled = true;
}
private void EndingCallGuiUpdates()
{
IncomingCallStackPanel.Visibility = Visibility.Collapsed;
CallButton.IsEnabled = true;
HangOut.IsEnabled = false;
Sound.IsEnabled = false;
Camera.IsEnabled = false;
Mic.IsEnabled = false;
WebcamsStackPanel.Visibility = Visibility.Collapsed;
Camera.Content = "Switch on Camera";
Mic.Content = "Mute";
Sound.Content = "Switch off Sound";
}
private void CallInProgressGuiUpdates()
{
IncomingCallStackPanel.Visibility = Visibility.Collapsed;
CallButton.IsEnabled = false;
HangOut.IsEnabled = true;
Sound.IsEnabled = true;
Camera.IsEnabled = true;
Mic.IsEnabled = true;
}
}
}

View File

@@ -1,32 +0,0 @@
<Page
x:Class="_03_incoming_call.Views.LoginPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:_03_incoming_call"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid KeyUp="GridKeyUp">
<StackPanel Grid.Row="0" VerticalAlignment="Center" >
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="Identity :"/>
<TextBox x:Name="Identity" Width="350" MinWidth="350" MaxWidth="350" Text="sip:anthony.test@sip.linphone.org"></TextBox>
</StackPanel>
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="Password :"/>
<PasswordBox x:Name="Password" Width="350" MinWidth="350" MaxWidth="350" PlaceholderText="myPasswd"/>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button x:Name="LogIn" Content="Login" Click="LogInClick"/>
</StackPanel>
<StackPanel Orientation="Vertical">
<TextBlock x:Name="RegistrationText" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</StackPanel>
</StackPanel>
</Grid>
</Page>

View File

@@ -1,101 +0,0 @@
/*
* Copyright (c) 2010-2020 Belledonne Communications SARL.
*
* This file is part of mediastreamer2.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using _03_incoming_call.Service;
using Linphone;
using Windows.System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Navigation;
namespace _03_incoming_call.Views
{
/// <summary>
/// A really simple app for a first Login with LinphoneSDK x UWP
/// </summary>
public sealed partial class LoginPage : Page
{
private CoreService CoreService { get; } = CoreService.Instance;
public LoginPage()
{
this.InitializeComponent();
CoreService.AddOnRegistrationStateChangedDelegate(OnRegistrationStateChanged);
}
/// <summary>
/// Called when you click on the "Login" button.
/// </summary>
private void LogInClick(object sender, RoutedEventArgs e)
{
if (LogIn.IsEnabled)
{
LogIn.IsEnabled = false;
CoreService.LogIn(Identity.Text, Password.Password);
}
}
/// <summary>
/// Called when a key is pressed and released on the login page.
/// If you pressed "Enter", simulate a login click.
/// </summary>
void GridKeyUp(object sender, KeyRoutedEventArgs e)
{
if (VirtualKey.Enter.Equals(e.Key))
{
LogInClick(null, null);
}
}
/// <summary>
/// This method is called every time the RegistrationState is updated by background core's actions.
/// In this example we use this to update the GUI.
/// </summary>
private void OnRegistrationStateChanged(Core core, ProxyConfig proxyConfig, RegistrationState state, string message)
{
RegistrationText.Text = "You're registration state is : " + state.ToString();
switch (state)
{
case RegistrationState.Cleared:
case RegistrationState.None:
CoreService.ClearCoreAfterLogOut();
LogIn.IsEnabled = true;
break;
case RegistrationState.Ok:
LogIn.IsEnabled = false;
this.Frame.Navigate(typeof(CallsPage));
break;
case RegistrationState.Progress:
LogIn.IsEnabled = false;
break;
case RegistrationState.Failed:
LogIn.IsEnabled = true;
break;
default:
break;
}
}
}
}

View File

@@ -1,129 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30804.86
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "00_hello_world", "00_hello_world\00_hello_world.csproj", "{4EDDB112-127A-42C3-81BE-5BA16151E67F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "01_login", "01_login\01_login.csproj", "{E275B25F-D5C2-495C-9B6E-9B90C3617E98}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "02_outgoing_call", "02_outgoing_call\02_outgoing_call.csproj", "{63E0D306-E3A3-49A2-8CD6-ADF2A91127BA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "03_incoming_call", "03_incoming_call\03_incoming_call.csproj", "{8C3B09A6-CD10-4F83-8EF1-6BF2002C6339}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|ARM = Release|ARM
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4EDDB112-127A-42C3-81BE-5BA16151E67F}.Debug|ARM.ActiveCfg = Debug|ARM
{4EDDB112-127A-42C3-81BE-5BA16151E67F}.Debug|ARM.Build.0 = Debug|ARM
{4EDDB112-127A-42C3-81BE-5BA16151E67F}.Debug|ARM.Deploy.0 = Debug|ARM
{4EDDB112-127A-42C3-81BE-5BA16151E67F}.Debug|ARM64.ActiveCfg = Debug|ARM64
{4EDDB112-127A-42C3-81BE-5BA16151E67F}.Debug|ARM64.Build.0 = Debug|ARM64
{4EDDB112-127A-42C3-81BE-5BA16151E67F}.Debug|ARM64.Deploy.0 = Debug|ARM64
{4EDDB112-127A-42C3-81BE-5BA16151E67F}.Debug|x64.ActiveCfg = Debug|x64
{4EDDB112-127A-42C3-81BE-5BA16151E67F}.Debug|x64.Build.0 = Debug|x64
{4EDDB112-127A-42C3-81BE-5BA16151E67F}.Debug|x64.Deploy.0 = Debug|x64
{4EDDB112-127A-42C3-81BE-5BA16151E67F}.Debug|x86.ActiveCfg = Debug|x86
{4EDDB112-127A-42C3-81BE-5BA16151E67F}.Debug|x86.Build.0 = Debug|x86
{4EDDB112-127A-42C3-81BE-5BA16151E67F}.Debug|x86.Deploy.0 = Debug|x86
{4EDDB112-127A-42C3-81BE-5BA16151E67F}.Release|ARM.ActiveCfg = Release|ARM
{4EDDB112-127A-42C3-81BE-5BA16151E67F}.Release|ARM.Build.0 = Release|ARM
{4EDDB112-127A-42C3-81BE-5BA16151E67F}.Release|ARM.Deploy.0 = Release|ARM
{4EDDB112-127A-42C3-81BE-5BA16151E67F}.Release|ARM64.ActiveCfg = Release|ARM64
{4EDDB112-127A-42C3-81BE-5BA16151E67F}.Release|ARM64.Build.0 = Release|ARM64
{4EDDB112-127A-42C3-81BE-5BA16151E67F}.Release|ARM64.Deploy.0 = Release|ARM64
{4EDDB112-127A-42C3-81BE-5BA16151E67F}.Release|x64.ActiveCfg = Release|x64
{4EDDB112-127A-42C3-81BE-5BA16151E67F}.Release|x64.Build.0 = Release|x64
{4EDDB112-127A-42C3-81BE-5BA16151E67F}.Release|x64.Deploy.0 = Release|x64
{4EDDB112-127A-42C3-81BE-5BA16151E67F}.Release|x86.ActiveCfg = Release|x86
{4EDDB112-127A-42C3-81BE-5BA16151E67F}.Release|x86.Build.0 = Release|x86
{4EDDB112-127A-42C3-81BE-5BA16151E67F}.Release|x86.Deploy.0 = Release|x86
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|ARM.ActiveCfg = Debug|ARM
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|ARM.Build.0 = Debug|ARM
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|ARM.Deploy.0 = Debug|ARM
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|ARM64.ActiveCfg = Debug|ARM64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|ARM64.Build.0 = Debug|ARM64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|ARM64.Deploy.0 = Debug|ARM64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|x64.ActiveCfg = Debug|x64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|x64.Build.0 = Debug|x64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|x64.Deploy.0 = Debug|x64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|x86.ActiveCfg = Debug|x86
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|x86.Build.0 = Debug|x86
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Debug|x86.Deploy.0 = Debug|x86
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|ARM.ActiveCfg = Release|ARM
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|ARM.Build.0 = Release|ARM
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|ARM.Deploy.0 = Release|ARM
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|ARM64.ActiveCfg = Release|ARM64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|ARM64.Build.0 = Release|ARM64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|ARM64.Deploy.0 = Release|ARM64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|x64.ActiveCfg = Release|x64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|x64.Build.0 = Release|x64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|x64.Deploy.0 = Release|x64
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|x86.ActiveCfg = Release|x86
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|x86.Build.0 = Release|x86
{E275B25F-D5C2-495C-9B6E-9B90C3617E98}.Release|x86.Deploy.0 = Release|x86
{63E0D306-E3A3-49A2-8CD6-ADF2A91127BA}.Debug|ARM.ActiveCfg = Debug|ARM
{63E0D306-E3A3-49A2-8CD6-ADF2A91127BA}.Debug|ARM.Build.0 = Debug|ARM
{63E0D306-E3A3-49A2-8CD6-ADF2A91127BA}.Debug|ARM.Deploy.0 = Debug|ARM
{63E0D306-E3A3-49A2-8CD6-ADF2A91127BA}.Debug|ARM64.ActiveCfg = Debug|ARM64
{63E0D306-E3A3-49A2-8CD6-ADF2A91127BA}.Debug|ARM64.Build.0 = Debug|ARM64
{63E0D306-E3A3-49A2-8CD6-ADF2A91127BA}.Debug|ARM64.Deploy.0 = Debug|ARM64
{63E0D306-E3A3-49A2-8CD6-ADF2A91127BA}.Debug|x64.ActiveCfg = Debug|x64
{63E0D306-E3A3-49A2-8CD6-ADF2A91127BA}.Debug|x64.Build.0 = Debug|x64
{63E0D306-E3A3-49A2-8CD6-ADF2A91127BA}.Debug|x64.Deploy.0 = Debug|x64
{63E0D306-E3A3-49A2-8CD6-ADF2A91127BA}.Debug|x86.ActiveCfg = Debug|x86
{63E0D306-E3A3-49A2-8CD6-ADF2A91127BA}.Debug|x86.Build.0 = Debug|x86
{63E0D306-E3A3-49A2-8CD6-ADF2A91127BA}.Debug|x86.Deploy.0 = Debug|x86
{63E0D306-E3A3-49A2-8CD6-ADF2A91127BA}.Release|ARM.ActiveCfg = Release|ARM
{63E0D306-E3A3-49A2-8CD6-ADF2A91127BA}.Release|ARM.Build.0 = Release|ARM
{63E0D306-E3A3-49A2-8CD6-ADF2A91127BA}.Release|ARM.Deploy.0 = Release|ARM
{63E0D306-E3A3-49A2-8CD6-ADF2A91127BA}.Release|ARM64.ActiveCfg = Release|ARM64
{63E0D306-E3A3-49A2-8CD6-ADF2A91127BA}.Release|ARM64.Build.0 = Release|ARM64
{63E0D306-E3A3-49A2-8CD6-ADF2A91127BA}.Release|ARM64.Deploy.0 = Release|ARM64
{63E0D306-E3A3-49A2-8CD6-ADF2A91127BA}.Release|x64.ActiveCfg = Release|x64
{63E0D306-E3A3-49A2-8CD6-ADF2A91127BA}.Release|x64.Build.0 = Release|x64
{63E0D306-E3A3-49A2-8CD6-ADF2A91127BA}.Release|x64.Deploy.0 = Release|x64
{63E0D306-E3A3-49A2-8CD6-ADF2A91127BA}.Release|x86.ActiveCfg = Release|x86
{63E0D306-E3A3-49A2-8CD6-ADF2A91127BA}.Release|x86.Build.0 = Release|x86
{63E0D306-E3A3-49A2-8CD6-ADF2A91127BA}.Release|x86.Deploy.0 = Release|x86
{8C3B09A6-CD10-4F83-8EF1-6BF2002C6339}.Debug|ARM.ActiveCfg = Debug|ARM
{8C3B09A6-CD10-4F83-8EF1-6BF2002C6339}.Debug|ARM.Build.0 = Debug|ARM
{8C3B09A6-CD10-4F83-8EF1-6BF2002C6339}.Debug|ARM.Deploy.0 = Debug|ARM
{8C3B09A6-CD10-4F83-8EF1-6BF2002C6339}.Debug|ARM64.ActiveCfg = Debug|ARM64
{8C3B09A6-CD10-4F83-8EF1-6BF2002C6339}.Debug|ARM64.Build.0 = Debug|ARM64
{8C3B09A6-CD10-4F83-8EF1-6BF2002C6339}.Debug|ARM64.Deploy.0 = Debug|ARM64
{8C3B09A6-CD10-4F83-8EF1-6BF2002C6339}.Debug|x64.ActiveCfg = Debug|x64
{8C3B09A6-CD10-4F83-8EF1-6BF2002C6339}.Debug|x64.Build.0 = Debug|x64
{8C3B09A6-CD10-4F83-8EF1-6BF2002C6339}.Debug|x64.Deploy.0 = Debug|x64
{8C3B09A6-CD10-4F83-8EF1-6BF2002C6339}.Debug|x86.ActiveCfg = Debug|x86
{8C3B09A6-CD10-4F83-8EF1-6BF2002C6339}.Debug|x86.Build.0 = Debug|x86
{8C3B09A6-CD10-4F83-8EF1-6BF2002C6339}.Debug|x86.Deploy.0 = Debug|x86
{8C3B09A6-CD10-4F83-8EF1-6BF2002C6339}.Release|ARM.ActiveCfg = Release|ARM
{8C3B09A6-CD10-4F83-8EF1-6BF2002C6339}.Release|ARM.Build.0 = Release|ARM
{8C3B09A6-CD10-4F83-8EF1-6BF2002C6339}.Release|ARM.Deploy.0 = Release|ARM
{8C3B09A6-CD10-4F83-8EF1-6BF2002C6339}.Release|ARM64.ActiveCfg = Release|ARM64
{8C3B09A6-CD10-4F83-8EF1-6BF2002C6339}.Release|ARM64.Build.0 = Release|ARM64
{8C3B09A6-CD10-4F83-8EF1-6BF2002C6339}.Release|ARM64.Deploy.0 = Release|ARM64
{8C3B09A6-CD10-4F83-8EF1-6BF2002C6339}.Release|x64.ActiveCfg = Release|x64
{8C3B09A6-CD10-4F83-8EF1-6BF2002C6339}.Release|x64.Build.0 = Release|x64
{8C3B09A6-CD10-4F83-8EF1-6BF2002C6339}.Release|x64.Deploy.0 = Release|x64
{8C3B09A6-CD10-4F83-8EF1-6BF2002C6339}.Release|x86.ActiveCfg = Release|x86
{8C3B09A6-CD10-4F83-8EF1-6BF2002C6339}.Release|x86.Build.0 = Release|x86
{8C3B09A6-CD10-4F83-8EF1-6BF2002C6339}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C6C912AD-1E23-48B5-AE70-D12A292C5124}
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,442 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objects = {
/* Begin PBXBuildFile section */
577005D03F6821591475FBF9 /* Pods_CallKitTutorial.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 454830E9C41DBBF20AF2BD05 /* Pods_CallKitTutorial.framework */; };
6608A96624E197D5006E6C68 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6608A96524E197D5006E6C68 /* AppDelegate.swift */; };
6608A96824E197D5006E6C68 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6608A96724E197D5006E6C68 /* SceneDelegate.swift */; };
6608A96A24E197D5006E6C68 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6608A96924E197D5006E6C68 /* ContentView.swift */; };
6608A96C24E197D5006E6C68 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6608A96B24E197D5006E6C68 /* Assets.xcassets */; };
6608A96F24E197D5006E6C68 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6608A96E24E197D5006E6C68 /* Preview Assets.xcassets */; };
6608A97224E197D5006E6C68 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6608A97024E197D5006E6C68 /* LaunchScreen.storyboard */; };
6608A97A24E19817006E6C68 /* CallExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6608A97924E19817006E6C68 /* CallExample.swift */; };
6608A97C24E1981E006E6C68 /* CallKitProviderDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6608A97B24E1981E006E6C68 /* CallKitProviderDelegate.swift */; };
66FEF91A24EA8CF2008B4067 /* commons.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66FEF91924EA8CF2008B4067 /* commons.swift */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
018936DA8FE1500B9E181610 /* Pods-CallKitTutorial.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CallKitTutorial.debug.xcconfig"; path = "Target Support Files/Pods-CallKitTutorial/Pods-CallKitTutorial.debug.xcconfig"; sourceTree = "<group>"; };
454830E9C41DBBF20AF2BD05 /* Pods_CallKitTutorial.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CallKitTutorial.framework; sourceTree = BUILT_PRODUCTS_DIR; };
6608A96224E197D5006E6C68 /* CallKitTutorial.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CallKitTutorial.app; sourceTree = BUILT_PRODUCTS_DIR; };
6608A96524E197D5006E6C68 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
6608A96724E197D5006E6C68 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
6608A96924E197D5006E6C68 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
6608A96B24E197D5006E6C68 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
6608A96E24E197D5006E6C68 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
6608A97124E197D5006E6C68 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
6608A97324E197D5006E6C68 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
6608A97924E19817006E6C68 /* CallExample.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallExample.swift; sourceTree = "<group>"; };
6608A97B24E1981E006E6C68 /* CallKitProviderDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallKitProviderDelegate.swift; sourceTree = "<group>"; };
6608A97D24E19852006E6C68 /* CallKitTutorial.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = CallKitTutorial.entitlements; sourceTree = "<group>"; };
66FEF91924EA8CF2008B4067 /* commons.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = commons.swift; sourceTree = "<group>"; };
C87B170DFD4D3072825B25EF /* Pods-CallKitTutorial.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CallKitTutorial.release.xcconfig"; path = "Target Support Files/Pods-CallKitTutorial/Pods-CallKitTutorial.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
6608A95F24E197D5006E6C68 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
577005D03F6821591475FBF9 /* Pods_CallKitTutorial.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
319770E3ECD19EBD7557F82B /* Frameworks */ = {
isa = PBXGroup;
children = (
454830E9C41DBBF20AF2BD05 /* Pods_CallKitTutorial.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
38284A71627D413A7ACC2F07 /* Pods */ = {
isa = PBXGroup;
children = (
018936DA8FE1500B9E181610 /* Pods-CallKitTutorial.debug.xcconfig */,
C87B170DFD4D3072825B25EF /* Pods-CallKitTutorial.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
};
6608A95924E197D5006E6C68 = {
isa = PBXGroup;
children = (
66FEF91824EA8CDA008B4067 /* TutorialCommons */,
6608A96424E197D5006E6C68 /* CallKitTutorial */,
6608A96324E197D5006E6C68 /* Products */,
38284A71627D413A7ACC2F07 /* Pods */,
319770E3ECD19EBD7557F82B /* Frameworks */,
);
sourceTree = "<group>";
};
6608A96324E197D5006E6C68 /* Products */ = {
isa = PBXGroup;
children = (
6608A96224E197D5006E6C68 /* CallKitTutorial.app */,
);
name = Products;
sourceTree = "<group>";
};
6608A96424E197D5006E6C68 /* CallKitTutorial */ = {
isa = PBXGroup;
children = (
6608A97D24E19852006E6C68 /* CallKitTutorial.entitlements */,
6608A96524E197D5006E6C68 /* AppDelegate.swift */,
6608A96724E197D5006E6C68 /* SceneDelegate.swift */,
6608A97B24E1981E006E6C68 /* CallKitProviderDelegate.swift */,
6608A97924E19817006E6C68 /* CallExample.swift */,
6608A96924E197D5006E6C68 /* ContentView.swift */,
6608A96B24E197D5006E6C68 /* Assets.xcassets */,
6608A97024E197D5006E6C68 /* LaunchScreen.storyboard */,
6608A97324E197D5006E6C68 /* Info.plist */,
6608A96D24E197D5006E6C68 /* Preview Content */,
);
path = CallKitTutorial;
sourceTree = "<group>";
};
6608A96D24E197D5006E6C68 /* Preview Content */ = {
isa = PBXGroup;
children = (
6608A96E24E197D5006E6C68 /* Preview Assets.xcassets */,
);
path = "Preview Content";
sourceTree = "<group>";
};
66FEF91824EA8CDA008B4067 /* TutorialCommons */ = {
isa = PBXGroup;
children = (
66FEF91924EA8CF2008B4067 /* commons.swift */,
);
name = TutorialCommons;
path = ../TutorialCommons;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
6608A96124E197D5006E6C68 /* CallKitTutorial */ = {
isa = PBXNativeTarget;
buildConfigurationList = 6608A97624E197D5006E6C68 /* Build configuration list for PBXNativeTarget "CallKitTutorial" */;
buildPhases = (
D642DC4C3C74BB17FF5A3E9F /* [CP] Check Pods Manifest.lock */,
6608A95E24E197D5006E6C68 /* Sources */,
6608A95F24E197D5006E6C68 /* Frameworks */,
6608A96024E197D5006E6C68 /* Resources */,
640A5744B5ABBA6A3EDBFDB1 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = CallKitTutorial;
productName = CallKitTutorial;
productReference = 6608A96224E197D5006E6C68 /* CallKitTutorial.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
6608A95A24E197D5006E6C68 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1160;
LastUpgradeCheck = 1160;
ORGANIZATIONNAME = BelledonneCommunications;
TargetAttributes = {
6608A96124E197D5006E6C68 = {
CreatedOnToolsVersion = 11.6;
};
};
};
buildConfigurationList = 6608A95D24E197D5006E6C68 /* Build configuration list for PBXProject "CallKitTutorial" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 6608A95924E197D5006E6C68;
productRefGroup = 6608A96324E197D5006E6C68 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
6608A96124E197D5006E6C68 /* CallKitTutorial */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
6608A96024E197D5006E6C68 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
6608A97224E197D5006E6C68 /* LaunchScreen.storyboard in Resources */,
6608A96F24E197D5006E6C68 /* Preview Assets.xcassets in Resources */,
6608A96C24E197D5006E6C68 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
640A5744B5ABBA6A3EDBFDB1 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-CallKitTutorial/Pods-CallKitTutorial-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-CallKitTutorial/Pods-CallKitTutorial-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CallKitTutorial/Pods-CallKitTutorial-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
D642DC4C3C74BB17FF5A3E9F /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-CallKitTutorial-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
6608A95E24E197D5006E6C68 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
6608A97A24E19817006E6C68 /* CallExample.swift in Sources */,
6608A96624E197D5006E6C68 /* AppDelegate.swift in Sources */,
66FEF91A24EA8CF2008B4067 /* commons.swift in Sources */,
6608A96824E197D5006E6C68 /* SceneDelegate.swift in Sources */,
6608A96A24E197D5006E6C68 /* ContentView.swift in Sources */,
6608A97C24E1981E006E6C68 /* CallKitProviderDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
6608A97024E197D5006E6C68 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
6608A97124E197D5006E6C68 /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
6608A97424E197D5006E6C68 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.6;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
6608A97524E197D5006E6C68 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.6;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
6608A97724E197D5006E6C68 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 018936DA8FE1500B9E181610 /* Pods-CallKitTutorial.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = CallKitTutorial/CallKitTutorial.entitlements;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_ASSET_PATHS = "\"CallKitTutorial/Preview Content\"";
DEVELOPMENT_TEAM = Z2V957B3D6;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = CallKitTutorial/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = org.linphone.tutorials.callkit;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
6608A97824E197D5006E6C68 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = C87B170DFD4D3072825B25EF /* Pods-CallKitTutorial.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = CallKitTutorial/CallKitTutorial.entitlements;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_ASSET_PATHS = "\"CallKitTutorial/Preview Content\"";
DEVELOPMENT_TEAM = Z2V957B3D6;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = CallKitTutorial/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = org.linphone.tutorials.callkit;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
6608A95D24E197D5006E6C68 /* Build configuration list for PBXProject "CallKitTutorial" */ = {
isa = XCConfigurationList;
buildConfigurations = (
6608A97424E197D5006E6C68 /* Debug */,
6608A97524E197D5006E6C68 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
6608A97624E197D5006E6C68 /* Build configuration list for PBXNativeTarget "CallKitTutorial" */ = {
isa = XCConfigurationList;
buildConfigurations = (
6608A97724E197D5006E6C68 /* Debug */,
6608A97824E197D5006E6C68 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 6608A95A24E197D5006E6C68 /* Project object */;
}

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:CallKitTutorial.xcodeproj">
</FileRef>
</Workspace>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:CallKitTutorial.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@@ -0,0 +1,38 @@
//
// AppDelegate.swift
// CallKitTutorial
//
// Created by QuentinArguillere on 10/08/2020.
// Copyright © 2020 BelledonneCommunications. All rights reserved.
//
import UIKit
import SwiftUI
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
@ObservedObject var tutorialContext = CallKitExampleContext()
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
// MARK: UISceneSession Lifecycle
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
}

View File

@@ -0,0 +1,98 @@
{
"images" : [
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>

View File

@@ -0,0 +1,165 @@
//
// CallExample.swift
// CallTutorial
//
// Created by QuentinArguillere on 31/07/2020.
// Copyright © 2020 BelledonneCommunications. All rights reserved.
//
import linphonesw
import AVFoundation
class CallKitExampleContext : ObservableObject
{
var mCore: Core! // We need a Core for... anything, basically
@Published var coreVersion: String = Core.getVersion
/*------------ Logs related variables ------------------------*/
var loggingUnit = LoggingUnit()
/*------------ Call tutorial related variables ---------------*/
let mCallKitTutorialDelegate = CallKitTutorialDelegate()
var mCall: Call!
var account : Account!
var mVideoDevices : [String] = []
var mUsedVideoDeviceId : Int = 0
var callAlreadyStopped = false;
@Published var speakerEnabled : Bool = false
@Published var callRunning : Bool = false
@Published var isCallIncoming : Bool = false
@Published var dest : String = "sip:calldest@sip.linphone.org"
@Published var id : String = "sip:youraccount@sip.linphone.org"
@Published var passwd : String = "yourpassword"
@Published var loggedIn: Bool = false
var mProviderDelegate : CallKitProviderDelegate!
let outgoingCallName = "Outgoing call example"
let incomingCallName = "Incoming call example"
init()
{
mProviderDelegate = CallKitProviderDelegate(context : self)
let factory = Factory.Instance // Instanciate
// Initialize Linphone Core.
// IMPORTANT : In this tutorial, we require the use of a core configuration file.
// This way, once the registration is done, and until it is cleared, it will return to the LoggedIn state on launch.
// This allows us to have a functional call when the app was closed and is started by a VOIP push notification (incoming call)
let configDir = factory.getConfigDir(context: nil)
try? mCore = factory.createCore(configPath: "\(configDir)/MyConfig", factoryConfigPath: "", systemContext: nil)
// main loop for receiving notifications and doing background linphonecore work:
mCore.autoIterateEnabled = true
mCore.callkitEnabled = true
mCore.pushNotificationEnabled = true
try? mCore.start()
// Callbacks on registration and call events
mCallKitTutorialDelegate.tutorialContext = self
mCore.addDelegate(delegate: mCallKitTutorialDelegate)
}
func createAccountAndRegister() {
if (!loggedIn) {
do {
account = try createAndInitializeAccount(core : mCore, identity: id, password: passwd, withVoipPush: true)
try mCore.addAccount(account: account!)
if ( mCore.defaultAccount == nil) {
// IMPORTANT : default account setting MUST be done AFTER adding the config to the core !
mCore.defaultAccount = account
}
} catch {
print(error)
}
}
}
func clearRegistrations()
{
mCore.clearAccounts()
loggedIn = false
}
// Initiate a call
func outgoingCallExample()
{
do {
if (!callRunning) {
mProviderDelegate.outgoingCall()
}
else {
try mCall.update(params: mCore.createCallParams(call: nil))
}
} catch {
print(error)
}
}
// Terminate a call
func stopCall()
{
if ((callRunning || isCallIncoming) && mCall.state != Call.State.End) {
callAlreadyStopped = true;
// terminate the call
print("Terminating the call...\n")
mProviderDelegate.stopCall()
}
}
}
// Callback for actions when a change in the Registration State happens
class CallKitTutorialDelegate: CoreDelegate {
var tutorialContext : CallKitExampleContext!
func onAccountRegistrationStateChanged(core: Core, account: Account, state: RegistrationState, message: String) {
print("New registration state \(state) for user id \( String(describing: account.params?.identityAddress?.asString()))\n")
if (state == .Ok) {
tutorialContext.loggedIn = true
}
}
func onCallStateChanged(core lc: Core, call: Call, state cstate: Call.State, message: String) {
print("CallTrace - \(cstate)")
let initIncomingCall = {
self.tutorialContext.mCall = call
self.tutorialContext.isCallIncoming = true
self.tutorialContext.mProviderDelegate.incomingCall()
}
if (cstate == .PushIncomingReceived){
// We're being called by someone (and app is in background)
initIncomingCall()
}
else if (cstate == .IncomingReceived && !tutorialContext.isCallIncoming) {
// We're being called by someone (and app is in foreground, so call hasn't been initialized yet)
initIncomingCall()
} else if (cstate == .OutgoingRinging) {
// We're calling someone
tutorialContext.callRunning = true
} else if (cstate == .End || cstate == .Error) {
// Call has been terminated by any side
if (!tutorialContext.callAlreadyStopped)
{
// Report to CallKit that the call is over, if the terminate action was initiated by other end of the call
tutorialContext.mProviderDelegate.stopCall()
tutorialContext.callAlreadyStopped = false
}
tutorialContext.callRunning = false
tutorialContext.isCallIncoming = false
} else if (cstate == .StreamsRunning)
{
// Call has successfully began
tutorialContext.callRunning = true
}
}
}

View File

@@ -0,0 +1,141 @@
//
// ProviderDelegate.swift
// CallTutorial
//
// Created by QuentinArguillere on 05/08/2020.
// Copyright © 2020 BelledonneCommunications. All rights reserved.
//
import Foundation
import CallKit
import linphonesw
import AVFoundation
class CallKitProviderDelegate : NSObject
{
private let provider: CXProvider
let mCallController = CXCallController()
var tutorialContext : CallKitExampleContext!
var incomingCallUUID : UUID!
var outgoingCallUUID : UUID!
init(context: CallKitExampleContext)
{
tutorialContext = context
let providerConfiguration = CXProviderConfiguration(localizedName: Bundle.main.infoDictionary!["CFBundleName"] as! String)
providerConfiguration.supportsVideo = true
providerConfiguration.supportedHandleTypes = [.generic]
providerConfiguration.maximumCallsPerCallGroup = 1
providerConfiguration.maximumCallGroups = 1
provider = CXProvider(configuration: providerConfiguration)
super.init()
provider.setDelegate(self, queue: nil) // The CXProvider delegate will trigger CallKit related callbacks
}
func outgoingCall()
{
outgoingCallUUID = UUID()
let handle = CXHandle(type: .generic, value: tutorialContext.outgoingCallName)
let startCallAction = CXStartCallAction(call: outgoingCallUUID, handle: handle)
let transaction = CXTransaction(action: startCallAction)
provider.reportOutgoingCall(with: outgoingCallUUID, startedConnectingAt: nil) // Report to CallKit a call is starting
mCallController.request(transaction, completion: { error in })
}
func incomingCall()
{
incomingCallUUID = UUID()
let update = CXCallUpdate()
update.remoteHandle = CXHandle(type:.generic, value: tutorialContext.incomingCallName)
provider.reportNewIncomingCall(with: incomingCallUUID, update: update, completion: { error in }) // Report to CallKit a call is incoming
}
func stopCall()
{
var callId = UUID();
if (tutorialContext.isCallIncoming) {
callId = incomingCallUUID
} else if (tutorialContext.callRunning) {
callId = outgoingCallUUID
}
let endCallAction = CXEndCallAction(call: callId)
let transaction = CXTransaction(action: endCallAction)
mCallController.request(transaction, completion: { error in }) // Report to CallKit a call is incoming
}
}
// In this extension, we implement the action we want to be done when CallKit is notified of something.
// This can happen through the CallKit GUI in the app, or directly in the code (see outgoingCall(), incomingCall(), stopCall() functions above)
extension CallKitProviderDelegate: CXProviderDelegate {
func provider(_ provider: CXProvider, perform action: CXEndCallAction) {
if (tutorialContext.mCall.state != Call.State.End)
{
try? tutorialContext.mCall.terminate()
}
action.fulfill()
}
func provider(_ provider: CXProvider, perform action: CXAnswerCallAction) {
do {
try tutorialContext.mCall.accept()
tutorialContext.callRunning = true
} catch {
print(error)
}
action.fulfill()
}
func provider(_ provider: CXProvider, perform action: CXSetHeldCallAction) {
}
func provider(_ provider: CXProvider, perform action: CXStartCallAction) {
do {
let callDest = try Factory.Instance.createAddress(addr: tutorialContext.dest)
// Place an outgoing call
tutorialContext.mCall = tutorialContext.mCore.inviteAddressWithParams(addr: callDest, params: try tutorialContext.mCore.createCallParams(call: nil))
} catch {
print(error)
}
action.fulfill()
}
func provider(_ provider: CXProvider, perform action: CXSetMutedCallAction) {
}
func provider(_ provider: CXProvider, perform action: CXPlayDTMFCallAction) {
}
func provider(_ provider: CXProvider, timedOutPerforming action: CXAction) {
}
func providerDidReset(_ provider: CXProvider) {
}
func provider(_ provider: CXProvider, didActivate audioSession: AVAudioSession) {
tutorialContext.mCore.activateAudioSession(actived: true)
}
func provider(_ provider: CXProvider, didDeactivate audioSession: AVAudioSession) {
tutorialContext.mCore.activateAudioSession(actived: false)
}
}

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
</dict>
</plist>

View File

@@ -0,0 +1,137 @@
//
// ContentView.swift
// CallTutorial
//
// Created by QuentinArguillere on 31/07/2020.
// Copyright © 2020 BelledonneCommunications. All rights reserved.
//
import SwiftUI
struct ContentView: View {
@ObservedObject var tutorialContext : CallKitExampleContext
func getCallButtonText() -> String
{
if (tutorialContext.callRunning) {
return "Update Call"
}
else if (tutorialContext.isCallIncoming) {
return "Answer"
}
else {
return "Call"
}
}
func callStateString() -> String
{
if (tutorialContext.callRunning) {
return "Call running"
}
else if (tutorialContext.isCallIncoming) {
return "Incoming call"
}
else {
return "No Call"
}
}
var body: some View {
VStack(alignment: .leading) {
Group {
HStack {
Text("Identity :")
.font(.subheadline)
TextField("", text : $tutorialContext.id)
.textFieldStyle(RoundedBorderTextFieldStyle())
}
HStack {
Text("Password :")
.font(.subheadline)
TextField("", text : $tutorialContext.passwd)
.textFieldStyle(RoundedBorderTextFieldStyle())
}
HStack {
Button(action: tutorialContext.createAccountAndRegister)
{
Text("Login")
.font(.largeTitle)
.foregroundColor(Color.white)
.frame(width: 90.0, height: 42.0)
.background(Color.gray)
}
Spacer()
Text("Login State :")
.font(.footnote)
Text(tutorialContext.loggedIn ? "Logged in" : "Unregistered")
.font(.footnote)
.foregroundColor(tutorialContext.loggedIn ? Color.green : Color.black)
Spacer()
Button(action: tutorialContext.clearRegistrations)
{
Text("Clear")
.font(.largeTitle)
.foregroundColor(Color.white)
.frame(width: 90.0, height: 42.0)
.background(Color.gray)
}
}
}
VStack(spacing: 0.0) {
Text("Call Settings")
.font(.largeTitle)
.padding(.top, 5)
HStack {
Text("Call destination :")
TextField("", text : $tutorialContext.dest)
.textFieldStyle(RoundedBorderTextFieldStyle())
}
.padding(.top, 5)
}
Spacer()
VStack {
HStack {
Button(action: tutorialContext.outgoingCallExample)
{
Text(getCallButtonText())
.font(.largeTitle)
.foregroundColor(Color.white)
.frame(width: 180.0, height: 42.0)
.background(Color.green)
}
Button(action: tutorialContext.stopCall) {
Text("Stop Call")
.font(.largeTitle)
.foregroundColor(Color.white)
.frame(width: 180.0, height: 42.0)
.background(Color.red)
}
}
HStack {
Text(callStateString())
.font(.footnote)
.foregroundColor(tutorialContext.callRunning || tutorialContext.isCallIncoming ? Color.green : Color.black)
}
.padding(.top)
}
Spacer()
Group {
Toggle(isOn: $tutorialContext.loggingUnit.logsEnabled.value) {
Text("Logs collection")
.multilineTextAlignment(.trailing)
}
Text("Core Version is \(tutorialContext.coreVersion)")
.font(.footnote)
}
}
.padding()
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView(tutorialContext: CallKitExampleContext())
}
}

View File

@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSApplicationCategoryType</key>
<string></string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>Camera access</string>
<key>NSMicrophoneUsageDescription</key>
<string>Microphone access</string>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
</dict>
</array>
</dict>
</dict>
<key>UIBackgroundModes</key>
<array>
<string>voip</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>

View File

@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@@ -0,0 +1,66 @@
//
// SceneDelegate.swift
// CallKitTutorial
//
// Created by QuentinArguillere on 10/08/2020.
// Copyright © 2020 BelledonneCommunications. All rights reserved.
//
import UIKit
import SwiftUI
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
// This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
// Create the SwiftUI view that provides the window contents.
let delegate = UIApplication.shared.delegate as! AppDelegate
let contentView = ContentView(tutorialContext: delegate.tutorialContext)
// Use a UIHostingController as window root view controller.
if let windowScene = scene as? UIWindowScene {
let window = UIWindow(windowScene: windowScene)
window.rootViewController = UIHostingController(rootView: contentView)
self.window = window
window.makeKeyAndVisible()
}
}
func sceneDidDisconnect(_ scene: UIScene) {
// Called as the scene is being released by the system.
// This occurs shortly after the scene enters the background, or when its session is discarded.
// Release any resources associated with this scene that can be re-created the next time the scene connects.
// The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead).
}
func sceneDidBecomeActive(_ scene: UIScene) {
// Called when the scene has moved from an inactive state to an active state.
// Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
}
func sceneWillResignActive(_ scene: UIScene) {
// Called when the scene will move from an active state to an inactive state.
// This may occur due to temporary interruptions (ex. an incoming phone call).
}
func sceneWillEnterForeground(_ scene: UIScene) {
// Called as the scene transitions from the background to the foreground.
// Use this method to undo the changes made on entering the background.
}
func sceneDidEnterBackground(_ scene: UIScene) {
// Called as the scene transitions from the foreground to the background.
// Use this method to save data, release shared resources, and store enough scene-specific state information
// to restore the scene back to its current state.
}
}

View File

@@ -0,0 +1,24 @@
# Uncomment the next line to define a global platform for your project
platform :ios, '11.0'
source "https://gitlab.linphone.org/BC/public/podspec.git"
#source "https://github.com/CocoaPods/Specs.git"
def basic_pods
if ENV['PODFILE_PATH'].nil?
pod 'linphone-sdk', '~> 5.0.0-alpha'
else
pod 'linphone-sdk', :path => ENV['PODFILE_PATH'] # local sdk
end
end
target 'CallKitTutorial' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for HelloLinphone
basic_pods
end

View File

@@ -0,0 +1,438 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objects = {
/* Begin PBXBuildFile section */
6604165724D451F10064FC6C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6604165624D451F10064FC6C /* AppDelegate.swift */; };
6604165924D451F10064FC6C /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6604165824D451F10064FC6C /* SceneDelegate.swift */; };
6604165B24D451F10064FC6C /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6604165A24D451F10064FC6C /* ContentView.swift */; };
6604165D24D451F40064FC6C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6604165C24D451F40064FC6C /* Assets.xcassets */; };
6604166024D451F40064FC6C /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6604165F24D451F40064FC6C /* Preview Assets.xcassets */; };
6604166324D451F40064FC6C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6604166124D451F40064FC6C /* LaunchScreen.storyboard */; };
6604166B24D453240064FC6C /* CallExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6604166A24D453240064FC6C /* CallExample.swift */; };
66E0FEE324EA8734008264FB /* commons.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66E0FEE224EA8734008264FB /* commons.swift */; };
E1569C6E0564D0FD3FF9B4AF /* Pods_CallTutorial.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DC1D5CBF786F45B5E0D811F /* Pods_CallTutorial.framework */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
1DC1D5CBF786F45B5E0D811F /* Pods_CallTutorial.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CallTutorial.framework; sourceTree = BUILT_PRODUCTS_DIR; };
6604165324D451F10064FC6C /* CallTutorial.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CallTutorial.app; sourceTree = BUILT_PRODUCTS_DIR; };
6604165624D451F10064FC6C /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
6604165824D451F10064FC6C /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
6604165A24D451F10064FC6C /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
6604165C24D451F40064FC6C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
6604165F24D451F40064FC6C /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
6604166224D451F40064FC6C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
6604166424D451F40064FC6C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
6604166A24D453240064FC6C /* CallExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CallExample.swift; sourceTree = "<group>"; };
66A3B37A24E138ED00E94540 /* CallTutorial.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = CallTutorial.entitlements; sourceTree = "<group>"; };
66E0FEE224EA8734008264FB /* commons.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = commons.swift; sourceTree = "<group>"; };
79CE65CD0070AF94E21BFCE7 /* Pods-CallTutorial.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CallTutorial.debug.xcconfig"; path = "Target Support Files/Pods-CallTutorial/Pods-CallTutorial.debug.xcconfig"; sourceTree = "<group>"; };
C26219FCE26251F1C3C2E96E /* Pods-CallTutorial.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CallTutorial.release.xcconfig"; path = "Target Support Files/Pods-CallTutorial/Pods-CallTutorial.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
6604165024D451F10064FC6C /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
E1569C6E0564D0FD3FF9B4AF /* Pods_CallTutorial.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
45BF82DCB7DE5ABEFF54FFB8 /* Pods */ = {
isa = PBXGroup;
children = (
79CE65CD0070AF94E21BFCE7 /* Pods-CallTutorial.debug.xcconfig */,
C26219FCE26251F1C3C2E96E /* Pods-CallTutorial.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
};
5AB8CB6ACCE63B169851E447 /* Frameworks */ = {
isa = PBXGroup;
children = (
1DC1D5CBF786F45B5E0D811F /* Pods_CallTutorial.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
6604164A24D451F10064FC6C = {
isa = PBXGroup;
children = (
66E0FEE124EA86EF008264FB /* TutorialCommons */,
6604165524D451F10064FC6C /* CallTutorial */,
6604165424D451F10064FC6C /* Products */,
45BF82DCB7DE5ABEFF54FFB8 /* Pods */,
5AB8CB6ACCE63B169851E447 /* Frameworks */,
);
sourceTree = "<group>";
};
6604165424D451F10064FC6C /* Products */ = {
isa = PBXGroup;
children = (
6604165324D451F10064FC6C /* CallTutorial.app */,
);
name = Products;
sourceTree = "<group>";
};
6604165524D451F10064FC6C /* CallTutorial */ = {
isa = PBXGroup;
children = (
66A3B37A24E138ED00E94540 /* CallTutorial.entitlements */,
6604165624D451F10064FC6C /* AppDelegate.swift */,
6604165824D451F10064FC6C /* SceneDelegate.swift */,
6604166A24D453240064FC6C /* CallExample.swift */,
6604165A24D451F10064FC6C /* ContentView.swift */,
6604165C24D451F40064FC6C /* Assets.xcassets */,
6604166124D451F40064FC6C /* LaunchScreen.storyboard */,
6604166424D451F40064FC6C /* Info.plist */,
6604165E24D451F40064FC6C /* Preview Content */,
);
path = CallTutorial;
sourceTree = "<group>";
};
6604165E24D451F40064FC6C /* Preview Content */ = {
isa = PBXGroup;
children = (
6604165F24D451F40064FC6C /* Preview Assets.xcassets */,
);
path = "Preview Content";
sourceTree = "<group>";
};
66E0FEE124EA86EF008264FB /* TutorialCommons */ = {
isa = PBXGroup;
children = (
66E0FEE224EA8734008264FB /* commons.swift */,
);
name = TutorialCommons;
path = ../TutorialCommons;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
6604165224D451F10064FC6C /* CallTutorial */ = {
isa = PBXNativeTarget;
buildConfigurationList = 6604166724D451F40064FC6C /* Build configuration list for PBXNativeTarget "CallTutorial" */;
buildPhases = (
5CB594802811F76FF54C79AA /* [CP] Check Pods Manifest.lock */,
6604164F24D451F10064FC6C /* Sources */,
6604165024D451F10064FC6C /* Frameworks */,
6604165124D451F10064FC6C /* Resources */,
01F8A055DBD8B3D5345AD62E /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = CallTutorial;
productName = CallTutorial;
productReference = 6604165324D451F10064FC6C /* CallTutorial.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
6604164B24D451F10064FC6C /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1150;
LastUpgradeCheck = 1150;
ORGANIZATIONNAME = BelledonneCommunications;
TargetAttributes = {
6604165224D451F10064FC6C = {
CreatedOnToolsVersion = 11.5;
};
};
};
buildConfigurationList = 6604164E24D451F10064FC6C /* Build configuration list for PBXProject "CallTutorial" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 6604164A24D451F10064FC6C;
productRefGroup = 6604165424D451F10064FC6C /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
6604165224D451F10064FC6C /* CallTutorial */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
6604165124D451F10064FC6C /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
6604166324D451F40064FC6C /* LaunchScreen.storyboard in Resources */,
6604166024D451F40064FC6C /* Preview Assets.xcassets in Resources */,
6604165D24D451F40064FC6C /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
01F8A055DBD8B3D5345AD62E /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-CallTutorial/Pods-CallTutorial-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-CallTutorial/Pods-CallTutorial-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CallTutorial/Pods-CallTutorial-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
5CB594802811F76FF54C79AA /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-CallTutorial-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
6604164F24D451F10064FC6C /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
6604166B24D453240064FC6C /* CallExample.swift in Sources */,
6604165724D451F10064FC6C /* AppDelegate.swift in Sources */,
6604165924D451F10064FC6C /* SceneDelegate.swift in Sources */,
66E0FEE324EA8734008264FB /* commons.swift in Sources */,
6604165B24D451F10064FC6C /* ContentView.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
6604166124D451F40064FC6C /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
6604166224D451F40064FC6C /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
6604166524D451F40064FC6C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.5;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
6604166624D451F40064FC6C /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.5;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
6604166824D451F40064FC6C /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 79CE65CD0070AF94E21BFCE7 /* Pods-CallTutorial.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = CallTutorial/CallTutorial.entitlements;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_ASSET_PATHS = "\"CallTutorial/Preview Content\"";
DEVELOPMENT_TEAM = Z2V957B3D6;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = CallTutorial/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = BC.CallTutorial;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
6604166924D451F40064FC6C /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = C26219FCE26251F1C3C2E96E /* Pods-CallTutorial.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = CallTutorial/CallTutorial.entitlements;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_ASSET_PATHS = "\"CallTutorial/Preview Content\"";
DEVELOPMENT_TEAM = Z2V957B3D6;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = CallTutorial/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = BC.CallTutorial;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
6604164E24D451F10064FC6C /* Build configuration list for PBXProject "CallTutorial" */ = {
isa = XCConfigurationList;
buildConfigurations = (
6604166524D451F40064FC6C /* Debug */,
6604166624D451F40064FC6C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
6604166724D451F40064FC6C /* Build configuration list for PBXNativeTarget "CallTutorial" */ = {
isa = XCConfigurationList;
buildConfigurations = (
6604166824D451F40064FC6C /* Debug */,
6604166924D451F40064FC6C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 6604164B24D451F10064FC6C /* Project object */;
}

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:CallTutorial.xcodeproj">
</FileRef>
</Workspace>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>CallTutorial.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>2</integer>
</dict>
</dict>
</dict>
</plist>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:CallTutorial.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@@ -0,0 +1,35 @@
//
// AppDelegate.swift
// CallTutorial
//
// Created by QuentinArguillere on 31/07/2020.
// Copyright © 2020 BelledonneCommunications. All rights reserved.
//
import UIKit
import SwiftUI
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
@ObservedObject var tutorialContext = CallExampleContext()
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
// MARK: UISceneSession Lifecycle
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
}

Some files were not shown because too many files have changed in this diff Show More