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

Added licence on each code file

parent 9a6a163f
using Linphone.Core;
/*
AgentHost.cs
Copyright (C) 2015 Belledonne Communications, Grenoble, France
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 2
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, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
using Linphone.Core;
using Linphone.Core.OutOfProcess;
using Mediastreamer2.WP8Video;
using System;
......
using Microsoft.Phone.Networking.Voip;
/*
BackgroundManager.cs
Copyright (C) 2015 Belledonne Communications, Grenoble, France
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 2
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, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
using Microsoft.Phone.Networking.Voip;
using Linphone.Core;
using Linphone.Core.OutOfProcess;
using System;
......
using System;
/*
Customs.cs
Copyright (C) 2015 Belledonne Communications, Grenoble, France
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 2
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, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
......
using Linphone.Core;
/*
InitManager.cs
Copyright (C) 2015 Belledonne Communications, Grenoble, France
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 2
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, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
using Linphone.Core;
using System;
using System.IO;
using Windows.Storage;
......
using Microsoft.Phone.Networking.Voip;
/*
LinphoneCallInProgressAgent.cs
Copyright (C) 2015 Belledonne Communications, Grenoble, France
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 2
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, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
using Microsoft.Phone.Networking.Voip;
using Linphone.Core;
using Linphone.Core.OutOfProcess;
using System.Diagnostics;
namespace Linphone.Agents
{
public class LinphoneCallInProgressAgent : VoipCallInProgressAgent
{
public LinphoneCallInProgressAgent() : base()
{
}
using Linphone.Core.OutOfProcess;
using System.Diagnostics;
namespace Linphone.Agents
{
public class LinphoneCallInProgressAgent : VoipCallInProgressAgent
{
public LinphoneCallInProgressAgent() : base()
{
}
/// <summary>
/// Called when the first call has started.
/// </summary>
protected override void OnFirstCallStarting()
{
/// </summary>
protected override void OnFirstCallStarting()
{
Debug.WriteLine("[LinphoneCallInProgressAgent] The first call has started.");
AgentHost.OnAgentStarted();
}
}
/// <summary>
/// Called when the last call has ended.
/// </summary>
protected override void OnCancel()
{
Debug.WriteLine("[LinphoneCallInProgressAgent] The last call has ended. Calling NotifyComplete");
base.NotifyComplete();
}
}
/// </summary>
protected override void OnCancel()
{
Debug.WriteLine("[LinphoneCallInProgressAgent] The last call has ended. Calling NotifyComplete");
base.NotifyComplete();
}
}
}
\ No newline at end of file
using Microsoft.Phone.Networking.Voip;
/*
LinphoneForegroundLifeTimeAgent.cs
Copyright (C) 2015 Belledonne Communications, Grenoble, France
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 2
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, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
using Microsoft.Phone.Networking.Voip;
using System.Diagnostics;
using Linphone.Core;
using System.Threading;
......
using Linphone.Core;
/*
LinphoneScheduledAgent.cs
Copyright (C) 2015 Belledonne Communications, Grenoble, France
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 2
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, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
using Linphone.Core;
using Linphone.Core.OutOfProcess;
using Microsoft.Phone.Net.NetworkInformation;
using Microsoft.Phone.Networking.Voip;
......
using Linphone.Core;
/*
Logger.cs
Copyright (C) 2015 Belledonne Communications, Grenoble, France
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 2
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, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
using Linphone.Core;
using System;
......
using Microsoft.Phone.Shell;
/*
TileManager.cs
Copyright (C) 2015 Belledonne Communications, Grenoble, France
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 2
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, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
using Microsoft.Phone.Shell;
using System;
using System.Collections.Generic;
using System.IO.IsolatedStorage;
......
/*
ApiLock.cpp
Copyright (C) 2015 Belledonne Communications, Grenoble, France
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 2
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, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "ApiLock.h"
#include "mediastreamer2/mscommon.h"
......
/*
ApiLock.h
Copyright (C) 2015 Belledonne Communications, Grenoble, France
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 2
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, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#pragma once
// Do not treat doxygen documentation as XML
......
/*
BackgroundModeLogger.cpp
Copyright (C) 2015 Belledonne Communications, Grenoble, France
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 2
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, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "BackgroundModeLogger.h"
#include "Utils.h"
......
/*
BackgroundModeLogger.h
Copyright (C) 2015 Belledonne Communications, Grenoble, France
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 2
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, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#pragma once
#include "LinphoneCoreFactory.h"
......
/*
CallController.cpp
Copyright (C) 2015 Belledonne Communications, Grenoble, France
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 2
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, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "CallController.h"
#include "LinphoneCall.h"
#include "LinphoneCallParams.h"
......
/*
CallController.h
Copyright (C) 2015 Belledonne Communications, Grenoble, France
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 2
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, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#pragma once
#include <windows.phone.networking.voip.h>
......@@ -37,37 +53,37 @@ namespace Linphone
/// </summary>
/// <param name="number">The number of SIP URI to call</param>
/// <returns>The system VoipPhoneCall that has been initiated</returns>
Windows::Phone::Networking::Voip::VoipPhoneCall^ NewOutgoingCall(Platform::String^ number);
/// <summary>
/// Starts an incoming call for custom incoming call view.
/// </summary>
/// <param name="contactNumber">The number or SIP URI of the caller</param>
/// <returns>The system VoipPhoneCall that has been created</returns>
Windows::Phone::Networking::Voip::VoipPhoneCall^ NewIncomingCallForCustomIncomingCallView(Platform::String^ contactNumber);
/// <summary>
/// Notifies the system that the call needs to be muted/unmuted.
/// </summary>
/// <param name="isMuted">The new mute state</param>
void NotifyMute(bool isMuted);
/// <summary>
/// Changes the reason used when declining an incoming call.
/// </summary>
property Linphone::Core::Reason DeclineReason
{
Linphone::Core::Reason get();
void set(Linphone::Core::Reason cb);
}
Windows::Phone::Networking::Voip::VoipPhoneCall^ NewOutgoingCall(Platform::String^ number);
/// <summary>
/// Starts an incoming call for custom incoming call view.
/// </summary>
/// <param name="contactNumber">The number or SIP URI of the caller</param>
/// <returns>The system VoipPhoneCall that has been created</returns>
Windows::Phone::Networking::Voip::VoipPhoneCall^ NewIncomingCallForCustomIncomingCallView(Platform::String^ contactNumber);
/// <summary>
/// Notifies the system that the call needs to be muted/unmuted.
/// </summary>
/// <param name="isMuted">The new mute state</param>
void NotifyMute(bool isMuted);
/// <summary>
/// Changes the reason used when declining an incoming call.
/// </summary>
property Linphone::Core::Reason DeclineReason
{
Linphone::Core::Reason get();
void set(Linphone::Core::Reason cb);
}
/// <summary>
/// Callback to be called when the PushNotification Agent has to be dismissed, i.e. after a call has been accepted, denied or stopped by the caller.
/// </summary>
property IncomingCallViewDismissedCallback^ IncomingCallViewDismissed
{
IncomingCallViewDismissedCallback^ get();
void set(IncomingCallViewDismissedCallback^ cb);
/// </summary>
property IncomingCallViewDismissedCallback^ IncomingCallViewDismissed
{
IncomingCallViewDismissedCallback^ get();
void set(IncomingCallViewDismissedCallback^ cb);
}
/// <summary>
......
/*
Enums.h
Copyright (C) 2015 Belledonne Communications, Grenoble, France
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 2
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, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#pragma once
namespace Linphone
......
/*
Globals.cpp
Copyright (C) 2015 Belledonne Communications, Grenoble, France
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 2
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, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <hstring.h>
#include <memory>
#include <activation.h>
......
#pragma once
#include <roapi.h>
namespace Linphone
{
namespace Core
{
ref class CallController;
ref class LinphoneCoreFactory;
ref class LinphoneCore;
ref class BackgroundModeLogger;
/// <summary>
/// Singleton container used to hold global singletons and background process-wide objects.
/// Also used to start out of process server, allowing the UI process managed code to instantiate WinRT objects in this process.
/// </summary>
public ref class Globals sealed
{
public:
/// <summary>
/// Starts the out of process server, allowing the UI process to instantiate WinRT objects in this process.
/// </summary>
void StartServer(const Platform::Array<Platform::String^>^ outOfProcServerClassNames);
/// <summary>
///Returns the id of the background process (HeadlessHost)
/// </summary>
static unsigned int GetCurrentProcessId();
static Platform::String^ GetUiDisconnectedEventName(unsigned int backgroundProcessId);
static Platform::String^ GetBackgroundProcessReadyEventName(unsigned int backgroundProcessId);
/// <summary>
/// Gets the instance of the Globals class, used to directly access any C++/CX objects from C#
/// </summary>
static property Globals^ Instance
{
Globals^ get();
}
/// <summary>
/// Gets the current instance of LinphoneCoreFactory
/// </summary>
property LinphoneCoreFactory^ LinphoneCoreFactory
{
Linphone::Core::LinphoneCoreFactory^ get();
}
/// <summary>
/// Gets the current instance of LinphoneCore from LinphoneCoreFactory
/// </summary>
property LinphoneCore^ LinphoneCore
{
Linphone::Core::LinphoneCore^ get();
}
/// <summary>
/// Gets the current instance of the logger
/// </summary>
property BackgroundModeLogger^ BackgroundModeLogger
{
Linphone::Core::BackgroundModeLogger^ get();
/*
Globals.h
Copyright (C) 2015 Belledonne Communications, Grenoble, France
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 2
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, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#pragma once
#include <roapi.h>
namespace Linphone
{
namespace Core
{
ref class CallController;
ref class LinphoneCoreFactory;
ref class LinphoneCore;
ref class BackgroundModeLogger;
/// <summary>
/// Singleton container used to hold global singletons and background process-wide objects.
/// Also used to start out of process server, allowing the UI process managed code to instantiate WinRT objects in this process.
/// </summary>
public ref class Globals sealed
{
public:
/// <summary>
/// Starts the out of process server, allowing the UI process to instantiate WinRT objects in this process.
/// </summary>
void StartServer(const Platform::Array<Platform::String^>^ outOfProcServerClassNames);
/// <summary>
///Returns the id of the background process (HeadlessHost)
/// </summary>
static unsigned int GetCurrentProcessId();
static Platform::String^ GetUiDisconnectedEventName(unsigned int backgroundProcessId);
static Platform::String^ GetBackgroundProcessReadyEventName(unsigned int backgroundProcessId);
/// <summary>
/// Gets the instance of the Globals class, used to directly access any C++/CX objects from C#
/// </summary>
static property Globals^ Instance
{
Globals^ get();
}
/// <summary>
/// Gets the current instance of LinphoneCoreFactory
/// </summary>
property LinphoneCoreFactory^ LinphoneCoreFactory
{
Linphone::Core::LinphoneCoreFactory^ get();
}
/// <summary>
/// Gets the current instance of LinphoneCore from LinphoneCoreFactory
/// </summary>
property LinphoneCore^ LinphoneCore
{
Linphone::Core::LinphoneCore^ get();
}
/// <summary>
/// Gets the current instance of the logger
/// </summary>
property BackgroundModeLogger^ BackgroundModeLogger
{
Linphone::Core::BackgroundModeLogger^ get();
}
/// <summary>
/// Gets the current instance of the native call controller
/// <summary>
/// Gets the current instance of the native call controller
/// </summary>
property CallController^ CallController
{
Linphone::Core::CallController^ get();
}
/// <summary>
/// Access the video renderer instance
/// </summary>
property Mediastreamer2::WP8Video::IVideoRenderer^ VideoRenderer
{
Mediastreamer2::WP8Video::IVideoRenderer^ get();
void set(Mediastreamer2::WP8Video::IVideoRenderer^ value);
}
private:
Globals();
~Globals();
static const LPCWSTR noOtherBackgroundProcessEventName;
static const LPCWSTR uiDisconnectedEventName;
static const LPCWSTR backgroundProcessReadyEventName;
static Globals^ singleton;
bool started;
// A cookie that is used to unregister remotely activatable objects in this process
RO_REGISTRATION_COOKIE serverRegistrationCookie;
HANDLE noOtherBackgroundProcessEvent;
HANDLE backgroundReadyEvent;
Linphone::Core::LinphoneCoreFactory^ linphoneCoreFactory;
}
/// <summary>
/// Access the video renderer instance
/// </summary>
property Mediastreamer2::WP8Video::IVideoRenderer^ VideoRenderer
{
Mediastreamer2::WP8Video::IVideoRenderer^ get();
void set(Mediastreamer2::WP8Video::IVideoRenderer^ value);
}
private:
Globals();
~Globals();
static const LPCWSTR noOtherBackgroundProcessEventName;
static const LPCWSTR uiDisconnectedEventName;
static const LPCWSTR backgroundProcessReadyEventName;
static Globals^ singleton;
bool started;
// A cookie that is used to unregister remotely activatable objects in this process
RO_REGISTRATION_COOKIE serverRegistrationCookie;
HANDLE noOtherBackgroundProcessEvent;
HANDLE backgroundReadyEvent;
Linphone::Core::LinphoneCoreFactory^ linphoneCoreFactory;
Linphone::Core::BackgroundModeLogger^ backgroundModeLogger;
Linphone::Core::CallController^ callController;
Mediastreamer2::WP8Video::IVideoRenderer^ videoRenderer;
};
}
}
Linphone::Core::CallController^ callController;