Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linphone-windows10
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BC
public
linphone-windows10
Commits
daab5efd
Commit
daab5efd
authored
May 03, 2013
by
Ghislain MARY
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set LinphoneWP8 user-agent.
parent
01a5e8f5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
LinphoneManager.cs
Linphone/Model/LinphoneManager.cs
+5
-0
DefaultValues.Designer.cs
Linphone/Resources/DefaultValues.Designer.cs
+9
-0
DefaultValues.resx
Linphone/Resources/DefaultValues.resx
+4
-0
No files found.
Linphone/Model/LinphoneManager.cs
View file @
daab5efd
using
Linphone.Agents
;
using
Linphone.Core
;
using
Linphone.Core.OutOfProcess
;
using
Linphone.Resources
;
using
Microsoft.Phone.Net.NetworkInformation
;
using
Microsoft.Phone.Networking.Voip
;
using
System
;
...
...
@@ -9,6 +10,7 @@ using System.Diagnostics;
using
System.Linq
;
using
System.Runtime.InteropServices.WindowsRuntime
;
using
System.Threading
;
using
System.Xml.Linq
;
using
Windows.Phone.Media.Devices
;
using
Windows.Phone.Networking.Voip
;
...
...
@@ -246,6 +248,8 @@ namespace Linphone.Model
server
.
LinphoneCore
.
CoreListener
=
this
;
isLinphoneRunning
=
true
;
// Set user-agent because it is not set if coming back from background mode
server
.
LinphoneCore
.
SetUserAgent
(
DefaultValues
.
UserAgent
,
XDocument
.
Load
(
"WMAppManifest.xml"
).
Root
.
Element
(
"App"
).
Attribute
(
"Version"
).
Value
);
return
;
}
...
...
@@ -254,6 +258,7 @@ namespace Linphone.Model
LpConfig
config
=
server
.
LinphoneCoreFactory
.
CreateLpConfig
(
SettingsManager
.
GetConfigPath
(),
SettingsManager
.
GetFactoryConfigPath
());
ConfigureLogger
();
server
.
LinphoneCoreFactory
.
CreateLinphoneCore
(
this
,
config
);
server
.
LinphoneCore
.
SetUserAgent
(
DefaultValues
.
UserAgent
,
XDocument
.
Load
(
"WMAppManifest.xml"
).
Root
.
Element
(
"App"
).
Attribute
(
"Version"
).
Value
);
server
.
LinphoneCore
.
SetRootCA
(
"Assets/rootca.pem"
);
Logger
.
Msg
(
"[LinphoneManager] LinphoneCore created"
);
...
...
Linphone/Resources/DefaultValues.Designer.cs
View file @
daab5efd
...
...
@@ -68,5 +68,14 @@ namespace Linphone.Resources {
return
ResourceManager
.
GetString
(
"KeepAlive"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to LinphoneWP8.
/// </summary>
internal
static
string
UserAgent
{
get
{
return
ResourceManager
.
GetString
(
"UserAgent"
,
resourceCulture
);
}
}
}
}
Linphone/Resources/DefaultValues.resx
View file @
daab5efd
...
...
@@ -121,4 +121,8 @@
<value>
3600
</value>
<comment>
Seconds for keep-alive task
</comment>
</data>
<data
name=
"UserAgent"
xml:space=
"preserve"
>
<value>
LinphoneWP8
</value>
<comment>
User-agent to be sent in SIP messages
</comment>
</data>
</root>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment