Commit dd215e31 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Stubs almost finished (need exceptions)

parent cafc6964
...@@ -145,7 +145,6 @@ popd</Command> ...@@ -145,7 +145,6 @@ popd</Command>
<ItemGroup> <ItemGroup>
<ClCompile Include="ApiLock.cpp" /> <ClCompile Include="ApiLock.cpp" />
<ClCompile Include="CallController.cpp" /> <ClCompile Include="CallController.cpp" />
<ClCompile Include="CallDirection.cpp" />
<ClCompile Include="Globals.cpp" /> <ClCompile Include="Globals.cpp" />
<ClCompile Include="LinphoneAddress.cpp" /> <ClCompile Include="LinphoneAddress.cpp" />
<ClCompile Include="LinphoneAuthInfo.cpp" /> <ClCompile Include="LinphoneAuthInfo.cpp" />
...@@ -157,7 +156,6 @@ popd</Command> ...@@ -157,7 +156,6 @@ popd</Command>
<ClCompile Include="LinphoneCoreFactory.cpp" /> <ClCompile Include="LinphoneCoreFactory.cpp" />
<ClCompile Include="LinphoneProxyConfig.cpp" /> <ClCompile Include="LinphoneProxyConfig.cpp" />
<ClCompile Include="LpConfig.cpp" /> <ClCompile Include="LpConfig.cpp" />
<ClCompile Include="OnlineStatus.cpp" />
<ClCompile Include="PayloadType.cpp" /> <ClCompile Include="PayloadType.cpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
......
#include "CallDirection.h"
#include "Server.h"
using namespace Linphone::BackEnd;
\ No newline at end of file
...@@ -4,9 +4,10 @@ namespace Linphone ...@@ -4,9 +4,10 @@ namespace Linphone
{ {
namespace BackEnd namespace BackEnd
{ {
public ref class CallDirection sealed public enum class CallDirection : int
{ {
Outgoing,
Incoming
}; };
} }
} }
\ No newline at end of file
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
using namespace Linphone::BackEnd; using namespace Linphone::BackEnd;
LinphoneCallState^ LinphoneCall::GetState() LinphoneCallState LinphoneCall::GetState()
{ {
return nullptr; return LinphoneCallState::Error;
} }
LinphoneAddress^ LinphoneCall::GetRemoteAddress() LinphoneAddress^ LinphoneCall::GetRemoteAddress()
...@@ -18,9 +18,9 @@ LinphoneAddress^ LinphoneCall::GetRemoteAddress() ...@@ -18,9 +18,9 @@ LinphoneAddress^ LinphoneCall::GetRemoteAddress()
return nullptr; return nullptr;
} }
CallDirection^ LinphoneCall::GetDirection() CallDirection LinphoneCall::GetDirection()
{ {
return nullptr; return CallDirection::Incoming;
} }
LinphoneCallLog^ LinphoneCall::GetCallLog() LinphoneCallLog^ LinphoneCall::GetCallLog()
......
#pragma once #pragma once
#include "CallDirection.h"
namespace Linphone namespace Linphone
{ {
namespace BackEnd namespace BackEnd
{ {
ref class LinphoneAddress; ref class LinphoneAddress;
ref class CallDirection;
ref class LinphoneCallLog; ref class LinphoneCallLog;
ref class LinphoneCallStats; ref class LinphoneCallStats;
ref class LinphoneCallParams; ref class LinphoneCallParams;
public ref class LinphoneCallState sealed public enum class LinphoneCallState : int
{ {
Idle = 0,
IncomingReceived = 1,
OutgoingInit = 2,
OutgoingProgress = 3,
OutgoingRinging = 4,
OutgoingEarlyMedia = 5,
Connected = 6,
StreamsRunning = 7,
Pausing = 8,
Paused = 9,
Resuming = 10,
Refered = 11,
Error = 12,
CallEnd = 13,
PausedByRemote = 14,
UpdatedByRemote = 15,
IncomingEarlyMedia = 16,
Udating = 17,
Released = 18
}; };
public ref class LinphoneCall sealed public ref class LinphoneCall sealed
{ {
public: public:
LinphoneCallState^ GetState(); LinphoneCallState GetState();
LinphoneAddress^ GetRemoteAddress(); LinphoneAddress^ GetRemoteAddress();
CallDirection^ GetDirection(); CallDirection GetDirection();
LinphoneCallLog^ GetCallLog(); LinphoneCallLog^ GetCallLog();
LinphoneCallStats^ GetAudioStats(); LinphoneCallStats^ GetAudioStats();
LinphoneCallParams^ GetRemoteParams(); LinphoneCallParams^ GetRemoteParams();
......
...@@ -15,14 +15,14 @@ LinphoneAddress^ LinphoneCallLog::GetTo() ...@@ -15,14 +15,14 @@ LinphoneAddress^ LinphoneCallLog::GetTo()
return nullptr; return nullptr;
} }
CallDirection^ LinphoneCallLog::GetDirection() CallDirection LinphoneCallLog::GetDirection()
{ {
return nullptr; return CallDirection::Incoming;
} }
LinphoneCallStatus^ LinphoneCallLog::GetStatus() LinphoneCallStatus LinphoneCallLog::GetStatus()
{ {
return nullptr; return LinphoneCallStatus::Aborted;
} }
Platform::String^ LinphoneCallLog::GetStartDate() Platform::String^ LinphoneCallLog::GetStartDate()
......
#pragma once #pragma once
#include "CallDirection.h"
namespace Linphone namespace Linphone
{ {
namespace BackEnd namespace BackEnd
{ {
ref class LinphoneAddress; ref class LinphoneAddress;
ref class CallDirection;
public ref class LinphoneCallStatus sealed public enum class LinphoneCallStatus : int
{ {
Success = 0,
Aborted = 1,
Missed = 2,
Declined = 3
}; };
public ref class LinphoneCallLog sealed public ref class LinphoneCallLog sealed
...@@ -17,8 +21,8 @@ namespace Linphone ...@@ -17,8 +21,8 @@ namespace Linphone
public: public:
LinphoneAddress^ GetFrom(); LinphoneAddress^ GetFrom();
LinphoneAddress^ GetTo(); LinphoneAddress^ GetTo();
CallDirection^ GetDirection(); CallDirection GetDirection();
LinphoneCallStatus^ GetStatus(); LinphoneCallStatus GetStatus();
Platform::String^ GetStartDate(); Platform::String^ GetStartDate();
int64 GetTimestamp(); int64 GetTimestamp();
int GetCallDuration(); int GetCallDuration();
......
...@@ -10,12 +10,12 @@ void LinphoneCallParams::SetAudioBandwidth() ...@@ -10,12 +10,12 @@ void LinphoneCallParams::SetAudioBandwidth()
} }
MediaEncryption^ LinphoneCallParams::GetMediaEncryption() MediaEncryption LinphoneCallParams::GetMediaEncryption()
{ {
return nullptr; return MediaEncryption::None;
} }
void LinphoneCallParams::SetMediaEncryption(MediaEncryption^ menc) void LinphoneCallParams::SetMediaEncryption(MediaEncryption menc)
{ {
} }
......
#pragma once #pragma once
#include "LinphoneCore.h"
namespace Linphone namespace Linphone
{ {
namespace BackEnd namespace BackEnd
{ {
ref class MediaEncryption;
ref class PayloadType; ref class PayloadType;
public ref class LinphoneCallParams sealed public ref class LinphoneCallParams sealed
{ {
public: public:
void SetAudioBandwidth(); void SetAudioBandwidth();
MediaEncryption^ GetMediaEncryption(); MediaEncryption GetMediaEncryption();
void SetMediaEncryption(MediaEncryption^ menc); void SetMediaEncryption(MediaEncryption menc);
PayloadType^ GetUsedAudioCodec(); PayloadType^ GetUsedAudioCodec();
void EnableLowBandwidth(Platform::Boolean enable); void EnableLowBandwidth(Platform::Boolean enable);
Platform::Boolean IsLowBandwidthEnabled(); Platform::Boolean IsLowBandwidthEnabled();
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
using namespace Linphone::BackEnd; using namespace Linphone::BackEnd;
MediaType^ LinphoneCallStats::GetMediaType() MediaType LinphoneCallStats::GetMediaType()
{ {
return nullptr; return MediaType::Audio;
} }
IceState^ LinphoneCallStats::GetIceState() IceState LinphoneCallStats::GetIceState()
{ {
return nullptr; return IceState::Failed;
} }
float LinphoneCallStats::GetDownloadBandwidth() float LinphoneCallStats::GetDownloadBandwidth()
......
...@@ -4,19 +4,27 @@ namespace Linphone ...@@ -4,19 +4,27 @@ namespace Linphone
{ {
namespace BackEnd namespace BackEnd
{ {
public ref class MediaType sealed public enum class MediaType : int
{ {
Audio = 0,
Video = 1
}; };
public ref class IceState sealed public enum class IceState : int
{ {
NotActivated = 0,
Failed = 1,
InProgress = 2,
HostConnection = 3,
ReflexiveConnection = 4,
RelayConnection = 5
}; };
public ref class LinphoneCallStats sealed public ref class LinphoneCallStats sealed
{ {
public: public:
MediaType^ GetMediaType(); MediaType GetMediaType();
IceState^ GetIceState(); IceState GetIceState();
float GetDownloadBandwidth(); float GetDownloadBandwidth();
float GetUploadBandwidth(); float GetUploadBandwidth();
float GetSenderLossRate(); float GetSenderLossRate();
......
...@@ -165,7 +165,7 @@ LinphoneCallParams^ LinphoneCore::CreateDefaultCallParameters() ...@@ -165,7 +165,7 @@ LinphoneCallParams^ LinphoneCore::CreateDefaultCallParameters()
return nullptr; return nullptr;
} }
Windows::Foundation::Collections::IVector<LinphoneCallLog^>^ LinphoneCore::GetCallLOgs() Windows::Foundation::Collections::IVector<LinphoneCallLog^>^ LinphoneCore::GetCallLogs()
{ {
return nullptr; return nullptr;
} }
...@@ -305,7 +305,7 @@ void LinphoneCore::EnableIPv6(Platform::Boolean enable) ...@@ -305,7 +305,7 @@ void LinphoneCore::EnableIPv6(Platform::Boolean enable)
} }
void LinphoneCore::SetPresenceInfo(int minuteAway, Platform::String^ alternativeContact, OnlineStatus^ status) void LinphoneCore::SetPresenceInfo(int minuteAway, Platform::String^ alternativeContact, OnlineStatus status)
{ {
} }
...@@ -320,14 +320,14 @@ Platform::String^ LinphoneCore::GetStunServer() ...@@ -320,14 +320,14 @@ Platform::String^ LinphoneCore::GetStunServer()
return nullptr; return nullptr;
} }
void LinphoneCore::SetFirewallPolicy(FirewallPolicy^ policy) void LinphoneCore::SetFirewallPolicy(FirewallPolicy policy)
{ {
} }
FirewallPolicy^ LinphoneCore::GetFirewallPolicy() FirewallPolicy LinphoneCore::GetFirewallPolicy()
{ {
return nullptr; return FirewallPolicy::NoFirewall;
} }
void LinphoneCore::SetRootCA(Platform::String^ path) void LinphoneCore::SetRootCA(Platform::String^ path)
...@@ -465,19 +465,19 @@ Platform::Boolean LinphoneCore::IsSoundResourcesLocked() ...@@ -465,19 +465,19 @@ Platform::Boolean LinphoneCore::IsSoundResourcesLocked()
return false; return false;
} }
Platform::Boolean LinphoneCore::IsMediaEncryptionSupported(MediaEncryption^ menc) Platform::Boolean LinphoneCore::IsMediaEncryptionSupported(MediaEncryption menc)
{ {
return false; return false;
} }
void LinphoneCore::SetMediaEncryption(MediaEncryption^ menc) void LinphoneCore::SetMediaEncryption(MediaEncryption menc)
{ {
} }
MediaEncryption^ LinphoneCore::GetMediaEncryption() MediaEncryption LinphoneCore::GetMediaEncryption()
{ {
return nullptr; return MediaEncryption::None;
} }
void LinphoneCore::SetMediaEncryptionMandatory(Platform::Boolean yesno) void LinphoneCore::SetMediaEncryptionMandatory(Platform::Boolean yesno)
......
#pragma once #pragma once
#include "OnlineStatus.h"
namespace Linphone namespace Linphone
{ {
namespace BackEnd namespace BackEnd
...@@ -12,19 +14,46 @@ namespace Linphone ...@@ -12,19 +14,46 @@ namespace Linphone
ref class LinphoneCallParams; ref class LinphoneCallParams;
ref class LinphoneCallLog; ref class LinphoneCallLog;
ref class PayloadType; ref class PayloadType;
ref class OnlineStatus;
ref class LpConfig; ref class LpConfig;
public ref class RegistrationState sealed public enum class GlobalState : int
{
GlobalOff = 0,
GlobalStartup = 1,
GlobalOn = 2,
GlobalShutdown = 3
};
public enum class RegistrationState : int
{
RegistrationNone = 0,
RegistrationInProgress = 1,
RegistrationOk = 2,
RegistrationCleared = 3,
RegistrationFailed = 4
};
public enum class MediaEncryption : int
{ {
None = 0,
SRTP = 1,
ZRTP = 2
}; };
public ref class MediaEncryption sealed public enum class FirewallPolicy : int
{ {
NoFirewall = 0,
UseNatAddress = 1,
UseStun = 2,
UseIce = 3
}; };
public ref class FirewallPolicy sealed public enum class EcCalibratorStatus : int
{ {
InProgress = 0,
Done = 1,
Failed = 2,
DoneNoEcho = 3
}; };
public ref class Transports sealed public ref class Transports sealed
...@@ -83,7 +112,7 @@ namespace Linphone ...@@ -83,7 +112,7 @@ namespace Linphone
void UpdateCall(LinphoneCall^ call, LinphoneCallParams^ params); void UpdateCall(LinphoneCall^ call, LinphoneCallParams^ params);
LinphoneCallParams^ CreateDefaultCallParameters(); LinphoneCallParams^ CreateDefaultCallParameters();
Windows::Foundation::Collections::IVector<LinphoneCallLog^>^ GetCallLOgs(); Windows::Foundation::Collections::IVector<LinphoneCallLog^>^ GetCallLogs();
void ClearCallLogs(); void ClearCallLogs();
void RemoveCallLog(LinphoneCallLog^ log); void RemoveCallLog(LinphoneCallLog^ log);
...@@ -118,13 +147,13 @@ namespace Linphone ...@@ -118,13 +147,13 @@ namespace Linphone
Transports^ GetSignalingTransportsPorts(); Transports^ GetSignalingTransportsPorts();
void EnableIPv6(Platform::Boolean enable); void EnableIPv6(Platform::Boolean enable);
void SetPresenceInfo(int minuteAway, Platform::String^ alternativeContact, OnlineStatus^ status); void SetPresenceInfo(int minuteAway, Platform::String^ alternativeContact, OnlineStatus status);
void SetStunServer(Platform::String^ stun); void SetStunServer(Platform::String^ stun);
Platform::String^ GetStunServer(); Platform::String^ GetStunServer();
void SetFirewallPolicy(FirewallPolicy^ policy); void SetFirewallPolicy(FirewallPolicy policy);
FirewallPolicy^ GetFirewallPolicy(); FirewallPolicy GetFirewallPolicy();
void SetRootCA(Platform::String^ path); void SetRootCA(Platform::String^ path);
void SetUploadBandwidth(int bw); void SetUploadBandwidth(int bw);
...@@ -157,9 +186,9 @@ namespace Linphone ...@@ -157,9 +186,9 @@ namespace Linphone
Platform::Boolean IsMyself(Platform::String^ uri); Platform::Boolean IsMyself(Platform::String^ uri);
Platform::Boolean IsSoundResourcesLocked(); Platform::Boolean IsSoundResourcesLocked();
Platform::Boolean IsMediaEncryptionSupported(MediaEncryption^ menc); Platform::Boolean IsMediaEncryptionSupported(MediaEncryption menc);
void SetMediaEncryption(MediaEncryption^ menc); void SetMediaEncryption(MediaEncryption menc);
MediaEncryption^ GetMediaEncryption(); MediaEncryption GetMediaEncryption();
void SetMediaEncryptionMandatory(Platform::Boolean yesno); void SetMediaEncryptionMandatory(Platform::Boolean yesno);
Platform::Boolean IsMediaEncryptionMandatory(); Platform::Boolean IsMediaEncryptionMandatory();
......
#pragma once #pragma once
#include "ApiLock.h" #include "ApiLock.h"
#include "LinphoneCoreListener.h"
namespace Linphone namespace Linphone
{ {
...@@ -10,7 +11,6 @@ namespace Linphone ...@@ -10,7 +11,6 @@ namespace Linphone
ref class LinphoneCore; ref class LinphoneCore;
ref class LinphoneAuthInfo; ref class LinphoneAuthInfo;
ref class LinphoneAddress; ref class LinphoneAddress;
ref class LinphoneCoreListener;
public ref class LinphoneCoreFactory sealed public ref class LinphoneCoreFactory sealed
{ {
......
#pragma once #pragma once
#include "LinphoneCore.h"
#include "LinphoneCall.h"
namespace Linphone namespace Linphone
{ {
namespace BackEnd namespace BackEnd
{ {
public ref class LinphoneCoreListener sealed public interface class LinphoneCoreListener
{ {
void GlobalState(GlobalState state, Platform::String^ message);
void CallState(LinphoneCall^ call, LinphoneCallState state);
void RegistrationState(LinphoneProxyConfig^ config, RegistrationState state, Platform::String^ message);
void DTMFReceived(LinphoneCall^ call, int dtmf);
void EcCalibrationStatus(EcCalibratorStatus status, int delay_ms, Platform::Object^ data);
void CallEncryptionChanged(LinphoneCall^ call, Platform::Boolean encrypted, Platform::String^ authenticationToken);
void CallStatsUpdated(LinphoneCall^ call, LinphoneCallStats^ stats);
}; };
} }
} }
\ No newline at end of file
...@@ -84,9 +84,9 @@ Platform::Boolean LinphoneProxyConfig::IsPublishEnabled() ...@@ -84,9 +84,9 @@ Platform::Boolean LinphoneProxyConfig::IsPublishEnabled()
return false; return false;
} }
RegistrationState^ LinphoneProxyConfig::GetState() RegistrationState LinphoneProxyConfig::GetState()
{ {
return nullptr; return RegistrationState::RegistrationNone;
} }
void LinphoneProxyConfig::SetExpires(int delay) void LinphoneProxyConfig::SetExpires(int delay)
......
#pragma once #pragma once
#include "LinphoneCore.h"
namespace Linphone namespace Linphone
{ {
namespace BackEnd namespace BackEnd
{ {
ref class RegistrationState;
public ref class LinphoneProxyConfig sealed public ref class LinphoneProxyConfig sealed
{ {
public: public:
...@@ -25,7 +25,7 @@ namespace Linphone ...@@ -25,7 +25,7 @@ namespace Linphone
Platform::String^ GetRoute(); Platform::String^ GetRoute();
void EnablePublish(Platform::Boolean enable); void EnablePublish(Platform::Boolean enable);
Platform::Boolean IsPublishEnabled(); Platform::Boolean IsPublishEnabled();
RegistrationState^ GetState(); RegistrationState GetState();
void SetExpires(int delay); void SetExpires(int delay);
void SetContactParameters(Platform::String^ params); void SetContactParameters(Platform::String^ params);
int LookupCCCFromIso(Platform::String^ iso); int LookupCCCFromIso(Platform::String^ iso);
......
#include "OnlineStatus.h"
#include "Server.h"
using namespace Linphone::BackEnd;
\ No newline at end of file
...@@ -4,8 +4,19 @@ namespace Linphone ...@@ -4,8 +4,19 @@ namespace Linphone
{ {
namespace BackEnd namespace BackEnd
{ {
public ref class OnlineStatus sealed public enum class OnlineStatus : int
{ {
Offline = 0,
Online = 1,
Busy = 2,
BeRightBack = 3,
Away = 4,
OnThePhone = 5,
OutToLunch = 6,
DoNotDisturb = 7,
StatusMoved = 8,
StatusAltService = 9,
Pending = 10
}; };
} }
} }
\ No newline at end of file
No preview for this file type
...@@ -38,6 +38,19 @@ namespace Linphone.Model ...@@ -38,6 +38,19 @@ namespace Linphone.Model
private static BitmapImage _outgoingIcon = new BitmapImage(new Uri("/Assets/call_status_outgoing.png", UriKind.Relative)); private static BitmapImage _outgoingIcon = new BitmapImage(new Uri("/Assets/call_status_outgoing.png", UriKind.Relative));
private static BitmapImage _missedIcon = new BitmapImage(new Uri("/Assets/call_status_missed.png", UriKind.Relative)); private static BitmapImage _missedIcon = new BitmapImage(new Uri("/Assets/call_status_missed.png", UriKind.Relative));
private Object _nativeLog;
public Object NativeLog
{
get
{
return _nativeLog;
}
set
{
_nativeLog = value;
}
}
private String _from; private String _from;
public String From public String From
{ {
...@@ -117,8 +130,9 @@ namespace Linphone.Model ...@@ -117,8 +130,9 @@ namespace Linphone.Model
} }
} }
public CallLog(String from, String to, bool isIncoming, bool isMissed)