mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-22 21:58:08 +00:00
Added project for tester + more linphonecore exports
This commit is contained in:
parent
1721fbd084
commit
ed4ef8a76c
10 changed files with 359 additions and 150 deletions
159
build/vsx/LibLinphoneTester/LibLinphoneTester.vcxproj
Normal file
159
build/vsx/LibLinphoneTester/LibLinphoneTester.vcxproj
Normal file
|
|
@ -0,0 +1,159 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|ARM">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{5e94a00b-b14a-4e42-8284-8cb0ef099534}</ProjectGuid>
|
||||
<RootNamespace>LibLinphoneTester</RootNamespace>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v110_wp80</PlatformToolset>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v110_wp80</PlatformToolset>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_USRDLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_WINRT_DLL;_CRT_SECURE_NO_WARNINGS;HAVE_CU_GET_SUITE;IN_LINPHONE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)..\..\..\..\belle-sip\include;$(ProjectDir)..\..\..\..\oRTP\include;$(ProjectDir)..\..\..\..\mediastreamer2\include;$(ProjectDIr)..\..\..\..\tunnel\include;$(ProjectDir)..\..\..\coreapi;$(ProjectDir)..\..\..\include;$(ProjectDir)..\..\..\..\cunit\build\windows\cunit\$(Platform)\$(Configuration);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\$(Configuration)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_USRDLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Windows" Condition="'$(Platform)'=='ARM'">
|
||||
<IsWinMDFile>true</IsWinMDFile>
|
||||
</Reference>
|
||||
<Reference Include="platform.winmd">
|
||||
<IsWinMDFile>true</IsWinMDFile>
|
||||
<Private>false</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\tester\call_tester.c" />
|
||||
<ClCompile Include="..\..\..\tester\liblinphone_tester.c" />
|
||||
<ClCompile Include="..\..\..\tester\message_tester.c" />
|
||||
<ClCompile Include="..\..\..\tester\presence_tester.c" />
|
||||
<ClCompile Include="..\..\..\tester\register_tester.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\tester\liblinphone_tester.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\cunit\build\windows\cunit\cunit.vcxproj">
|
||||
<Project>{902daf1d-ebf1-4d03-b598-143500a50ab4}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\mediastreamer2\build\vsx\mediastreamer2\mediastreamer2\mediastreamer2.vcxproj">
|
||||
<Project>{027bad0e-9179-48c1-9733-7aa7e2c2ec70}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\oRTP\build\vsx\oRTP\oRTP\oRTP.vcxproj">
|
||||
<Project>{ffc7b532-0502-4d88-ac98-9e89071cbc97}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\LibLinphone\LibLinphone.vcxproj">
|
||||
<Project>{08dd0d38-d9b5-4626-b60d-b4d76b571142}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsPhone\v$(TargetPlatformVersion)\Microsoft.Cpp.WindowsPhone.$(TargetPlatformVersion).targets" Condition="'$(Platform)'=='ARM'" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\tester\call_tester.c" />
|
||||
<ClCompile Include="..\..\..\tester\liblinphone_tester.c" />
|
||||
<ClCompile Include="..\..\..\tester\message_tester.c" />
|
||||
<ClCompile Include="..\..\..\tester\presence_tester.c" />
|
||||
<ClCompile Include="..\..\..\tester\register_tester.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\tester\liblinphone_tester.h" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -83,12 +83,12 @@ typedef struct SalAddress LinphoneAddress;
|
|||
#include "linphone/linphonefriend.h"
|
||||
#endif
|
||||
|
||||
LinphoneAddress * linphone_address_new(const char *uri);
|
||||
LINPHONE_PUBLIC LinphoneAddress * linphone_address_new(const char *uri);
|
||||
LinphoneAddress * linphone_address_clone(const LinphoneAddress *uri);
|
||||
const char *linphone_address_get_scheme(const LinphoneAddress *u);
|
||||
const char *linphone_address_get_display_name(const LinphoneAddress* u);
|
||||
const char *linphone_address_get_username(const LinphoneAddress *u);
|
||||
const char *linphone_address_get_domain(const LinphoneAddress *u);
|
||||
LINPHONE_PUBLIC const char *linphone_address_get_display_name(const LinphoneAddress* u);
|
||||
LINPHONE_PUBLIC const char *linphone_address_get_username(const LinphoneAddress *u);
|
||||
LINPHONE_PUBLIC const char *linphone_address_get_domain(const LinphoneAddress *u);
|
||||
/**
|
||||
* Get port number as an integer value.
|
||||
*
|
||||
|
|
@ -98,17 +98,17 @@ int linphone_address_get_port_int(const LinphoneAddress *u);
|
|||
* Get port number, null if not present.
|
||||
*/
|
||||
const char* linphone_address_get_port(const LinphoneAddress *u);
|
||||
void linphone_address_set_display_name(LinphoneAddress *u, const char *display_name);
|
||||
void linphone_address_set_username(LinphoneAddress *uri, const char *username);
|
||||
void linphone_address_set_domain(LinphoneAddress *uri, const char *host);
|
||||
LINPHONE_PUBLIC void linphone_address_set_display_name(LinphoneAddress *u, const char *display_name);
|
||||
LINPHONE_PUBLIC void linphone_address_set_username(LinphoneAddress *uri, const char *username);
|
||||
LINPHONE_PUBLIC void linphone_address_set_domain(LinphoneAddress *uri, const char *host);
|
||||
void linphone_address_set_port(LinphoneAddress *uri, const char *port);
|
||||
void linphone_address_set_port_int(LinphoneAddress *uri, int port);
|
||||
/*remove tags, params etc... so that it is displayable to the user*/
|
||||
void linphone_address_clean(LinphoneAddress *uri);
|
||||
char *linphone_address_as_string(const LinphoneAddress *u);
|
||||
LINPHONE_PUBLIC void linphone_address_clean(LinphoneAddress *uri);
|
||||
LINPHONE_PUBLIC char *linphone_address_as_string(const LinphoneAddress *u);
|
||||
char *linphone_address_as_string_uri_only(const LinphoneAddress *u);
|
||||
bool_t linphone_address_weak_equal(const LinphoneAddress *a1, const LinphoneAddress *a2);
|
||||
void linphone_address_destroy(LinphoneAddress *u);
|
||||
LINPHONE_PUBLIC bool_t linphone_address_weak_equal(const LinphoneAddress *a1, const LinphoneAddress *a2);
|
||||
LINPHONE_PUBLIC void linphone_address_destroy(LinphoneAddress *u);
|
||||
|
||||
struct _SipSetupContext;
|
||||
|
||||
|
|
@ -190,9 +190,9 @@ typedef struct _LinphoneCallParams LinphoneCallParams;
|
|||
|
||||
const PayloadType* linphone_call_params_get_used_audio_codec(const LinphoneCallParams *cp);
|
||||
const PayloadType* linphone_call_params_get_used_video_codec(const LinphoneCallParams *cp);
|
||||
LinphoneCallParams * linphone_call_params_copy(const LinphoneCallParams *cp);
|
||||
void linphone_call_params_enable_video(LinphoneCallParams *cp, bool_t enabled);
|
||||
bool_t linphone_call_params_video_enabled(const LinphoneCallParams *cp);
|
||||
LINPHONE_PUBLIC LinphoneCallParams * linphone_call_params_copy(const LinphoneCallParams *cp);
|
||||
LINPHONE_PUBLIC void linphone_call_params_enable_video(LinphoneCallParams *cp, bool_t enabled);
|
||||
LINPHONE_PUBLIC bool_t linphone_call_params_video_enabled(const LinphoneCallParams *cp);
|
||||
LinphoneMediaEncryption linphone_call_params_get_media_encryption(const LinphoneCallParams *cp);
|
||||
void linphone_call_params_set_media_encryption(LinphoneCallParams *cp, LinphoneMediaEncryption e);
|
||||
void linphone_call_params_enable_early_media_sending(LinphoneCallParams *cp, bool_t enabled);
|
||||
|
|
@ -372,28 +372,28 @@ typedef enum _LinphoneCallState{
|
|||
LinphoneCallReleased /**< The call object is no more retained by the core */
|
||||
} LinphoneCallState;
|
||||
|
||||
const char *linphone_call_state_to_string(LinphoneCallState cs);
|
||||
LINPHONE_PUBLIC const char *linphone_call_state_to_string(LinphoneCallState cs);
|
||||
|
||||
LinphoneCore *linphone_call_get_core(const LinphoneCall *call);
|
||||
LinphoneCallState linphone_call_get_state(const LinphoneCall *call);
|
||||
LINPHONE_PUBLIC LinphoneCallState linphone_call_get_state(const LinphoneCall *call);
|
||||
bool_t linphone_call_asked_to_autoanswer(LinphoneCall *call);
|
||||
const LinphoneAddress * linphone_core_get_current_call_remote_address(struct _LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC const LinphoneAddress * linphone_core_get_current_call_remote_address(struct _LinphoneCore *lc);
|
||||
const LinphoneAddress * linphone_call_get_remote_address(const LinphoneCall *call);
|
||||
char *linphone_call_get_remote_address_as_string(const LinphoneCall *call);
|
||||
LinphoneCallDir linphone_call_get_dir(const LinphoneCall *call);
|
||||
LinphoneCall * linphone_call_ref(LinphoneCall *call);
|
||||
void linphone_call_unref(LinphoneCall *call);
|
||||
LinphoneCallLog *linphone_call_get_call_log(const LinphoneCall *call);
|
||||
LINPHONE_PUBLIC LinphoneCall * linphone_call_ref(LinphoneCall *call);
|
||||
LINPHONE_PUBLIC void linphone_call_unref(LinphoneCall *call);
|
||||
LINPHONE_PUBLIC LinphoneCallLog *linphone_call_get_call_log(const LinphoneCall *call);
|
||||
const char *linphone_call_get_refer_to(const LinphoneCall *call);
|
||||
bool_t linphone_call_has_transfer_pending(const LinphoneCall *call);
|
||||
LinphoneCall *linphone_call_get_replaced_call(LinphoneCall *call);
|
||||
LINPHONE_PUBLIC LinphoneCall *linphone_call_get_replaced_call(LinphoneCall *call);
|
||||
int linphone_call_get_duration(const LinphoneCall *call);
|
||||
const LinphoneCallParams * linphone_call_get_current_params(LinphoneCall *call);
|
||||
LINPHONE_PUBLIC const LinphoneCallParams * linphone_call_get_current_params(LinphoneCall *call);
|
||||
const LinphoneCallParams * linphone_call_get_remote_params(LinphoneCall *call);
|
||||
void linphone_call_enable_camera(LinphoneCall *lc, bool_t enabled);
|
||||
bool_t linphone_call_camera_enabled(const LinphoneCall *lc);
|
||||
int linphone_call_take_video_snapshot(LinphoneCall *call, const char *file);
|
||||
LinphoneReason linphone_call_get_reason(const LinphoneCall *call);
|
||||
LINPHONE_PUBLIC LinphoneReason linphone_call_get_reason(const LinphoneCall *call);
|
||||
const char *linphone_call_get_remote_user_agent(LinphoneCall *call);
|
||||
const char *linphone_call_get_remote_contact(LinphoneCall *call);
|
||||
float linphone_call_get_play_volume(LinphoneCall *call);
|
||||
|
|
@ -403,10 +403,10 @@ float linphone_call_get_average_quality(LinphoneCall *call);
|
|||
const char* linphone_call_get_authentication_token(LinphoneCall *call);
|
||||
bool_t linphone_call_get_authentication_token_verified(LinphoneCall *call);
|
||||
void linphone_call_set_authentication_token_verified(LinphoneCall *call, bool_t verified);
|
||||
void linphone_call_send_vfu_request(LinphoneCall *call);
|
||||
void *linphone_call_get_user_pointer(LinphoneCall *call);
|
||||
LINPHONE_PUBLIC void linphone_call_send_vfu_request(LinphoneCall *call);
|
||||
LINPHONE_PUBLIC void *linphone_call_get_user_pointer(LinphoneCall *call);
|
||||
void linphone_call_set_user_pointer(LinphoneCall *call, void *user_pointer);
|
||||
void linphone_call_set_next_video_frame_decoded_callback(LinphoneCall *call, LinphoneCallCbFunc cb, void* user_data);
|
||||
LINPHONE_PUBLIC void linphone_call_set_next_video_frame_decoded_callback(LinphoneCall *call, LinphoneCallCbFunc cb, void* user_data);
|
||||
LinphoneCallState linphone_call_get_transfer_state(LinphoneCall *call);
|
||||
void linphone_call_zoom_video(LinphoneCall* call, float zoom_factor, float* cx, float* cy);
|
||||
void linphone_call_start_recording(LinphoneCall *call);
|
||||
|
|
@ -493,23 +493,23 @@ typedef enum _LinphoneRegistrationState{
|
|||
* Human readable version of the #LinphoneRegistrationState
|
||||
* @param cs sate
|
||||
*/
|
||||
const char *linphone_registration_state_to_string(LinphoneRegistrationState cs);
|
||||
LINPHONE_PUBLIC const char *linphone_registration_state_to_string(LinphoneRegistrationState cs);
|
||||
|
||||
LinphoneProxyConfig *linphone_proxy_config_new(void);
|
||||
int linphone_proxy_config_set_server_addr(LinphoneProxyConfig *obj, const char *server_addr);
|
||||
int linphone_proxy_config_set_identity(LinphoneProxyConfig *obj, const char *identity);
|
||||
int linphone_proxy_config_set_route(LinphoneProxyConfig *obj, const char *route);
|
||||
void linphone_proxy_config_expires(LinphoneProxyConfig *obj, int expires);
|
||||
LINPHONE_PUBLIC LinphoneProxyConfig *linphone_proxy_config_new(void);
|
||||
LINPHONE_PUBLIC int linphone_proxy_config_set_server_addr(LinphoneProxyConfig *obj, const char *server_addr);
|
||||
LINPHONE_PUBLIC int linphone_proxy_config_set_identity(LinphoneProxyConfig *obj, const char *identity);
|
||||
LINPHONE_PUBLIC int linphone_proxy_config_set_route(LinphoneProxyConfig *obj, const char *route);
|
||||
LINPHONE_PUBLIC void linphone_proxy_config_expires(LinphoneProxyConfig *obj, int expires);
|
||||
/**
|
||||
* Indicates either or not, REGISTRATION must be issued for this #LinphoneProxyConfig .
|
||||
* <br> In case this #LinphoneProxyConfig has been added to #LinphoneCore, follows the linphone_proxy_config_edit() rule.
|
||||
* @param obj object pointer
|
||||
* @param val if true, registration will be engaged
|
||||
*/
|
||||
void linphone_proxy_config_enable_register(LinphoneProxyConfig *obj, bool_t val);
|
||||
LINPHONE_PUBLIC void linphone_proxy_config_enable_register(LinphoneProxyConfig *obj, bool_t val);
|
||||
#define linphone_proxy_config_enableregister linphone_proxy_config_enable_register
|
||||
void linphone_proxy_config_edit(LinphoneProxyConfig *obj);
|
||||
int linphone_proxy_config_done(LinphoneProxyConfig *obj);
|
||||
LINPHONE_PUBLIC void linphone_proxy_config_edit(LinphoneProxyConfig *obj);
|
||||
LINPHONE_PUBLIC int linphone_proxy_config_done(LinphoneProxyConfig *obj);
|
||||
/**
|
||||
* Indicates either or not, PUBLISH must be issued for this #LinphoneProxyConfig .
|
||||
* <br> In case this #LinphoneProxyConfig has been added to #LinphoneCore, follows the linphone_proxy_config_edit() rule.
|
||||
|
|
@ -517,18 +517,18 @@ int linphone_proxy_config_done(LinphoneProxyConfig *obj);
|
|||
* @param val if true, publish will be engaged
|
||||
*
|
||||
*/
|
||||
void linphone_proxy_config_enable_publish(LinphoneProxyConfig *obj, bool_t val);
|
||||
LINPHONE_PUBLIC void linphone_proxy_config_enable_publish(LinphoneProxyConfig *obj, bool_t val);
|
||||
void linphone_proxy_config_set_dial_escape_plus(LinphoneProxyConfig *cfg, bool_t val);
|
||||
void linphone_proxy_config_set_dial_prefix(LinphoneProxyConfig *cfg, const char *prefix);
|
||||
|
||||
LinphoneRegistrationState linphone_proxy_config_get_state(const LinphoneProxyConfig *obj);
|
||||
bool_t linphone_proxy_config_is_registered(const LinphoneProxyConfig *obj);
|
||||
LINPHONE_PUBLIC bool_t linphone_proxy_config_is_registered(const LinphoneProxyConfig *obj);
|
||||
const char *linphone_proxy_config_get_domain(const LinphoneProxyConfig *cfg);
|
||||
|
||||
const char *linphone_proxy_config_get_route(const LinphoneProxyConfig *obj);
|
||||
const char *linphone_proxy_config_get_identity(const LinphoneProxyConfig *obj);
|
||||
LINPHONE_PUBLIC const char *linphone_proxy_config_get_identity(const LinphoneProxyConfig *obj);
|
||||
bool_t linphone_proxy_config_publish_enabled(const LinphoneProxyConfig *obj);
|
||||
const char *linphone_proxy_config_get_addr(const LinphoneProxyConfig *obj);
|
||||
LINPHONE_PUBLIC const char *linphone_proxy_config_get_addr(const LinphoneProxyConfig *obj);
|
||||
int linphone_proxy_config_get_expires(const LinphoneProxyConfig *obj);
|
||||
bool_t linphone_proxy_config_register_enabled(const LinphoneProxyConfig *obj);
|
||||
void linphone_proxy_config_refresh_register(LinphoneProxyConfig *obj);
|
||||
|
|
@ -617,7 +617,7 @@ struct _LinphoneAuthInfo;
|
|||
**/
|
||||
typedef struct _LinphoneAuthInfo LinphoneAuthInfo;
|
||||
|
||||
LinphoneAuthInfo *linphone_auth_info_new(const char *username, const char *userid,
|
||||
LINPHONE_PUBLIC LinphoneAuthInfo *linphone_auth_info_new(const char *username, const char *userid,
|
||||
const char *passwd, const char *ha1,const char *realm);
|
||||
void linphone_auth_info_set_passwd(LinphoneAuthInfo *info, const char *passwd);
|
||||
void linphone_auth_info_set_username(LinphoneAuthInfo *info, const char *username);
|
||||
|
|
@ -668,23 +668,23 @@ typedef enum _LinphoneChatMessageStates {
|
|||
*/
|
||||
typedef void (*LinphoneChatMessageStateChangeCb)(LinphoneChatMessage* msg,LinphoneChatMessageState state,void* ud);
|
||||
|
||||
LinphoneChatRoom * linphone_core_create_chat_room(LinphoneCore *lc, const char *to);
|
||||
LINPHONE_PUBLIC LinphoneChatRoom * linphone_core_create_chat_room(LinphoneCore *lc, const char *to);
|
||||
void linphone_chat_room_destroy(LinphoneChatRoom *cr);
|
||||
LinphoneChatMessage* linphone_chat_room_create_message(LinphoneChatRoom *cr,const char* message);
|
||||
LINPHONE_PUBLIC LinphoneChatMessage* linphone_chat_room_create_message(LinphoneChatRoom *cr,const char* message);
|
||||
const LinphoneAddress* linphone_chat_room_get_peer_address(LinphoneChatRoom *cr);
|
||||
void linphone_chat_room_send_message(LinphoneChatRoom *cr, const char *msg);
|
||||
void linphone_chat_room_send_message2(LinphoneChatRoom *cr, LinphoneChatMessage* msg,LinphoneChatMessageStateChangeCb status_cb,void* ud);
|
||||
LINPHONE_PUBLIC void linphone_chat_room_send_message(LinphoneChatRoom *cr, const char *msg);
|
||||
LINPHONE_PUBLIC void linphone_chat_room_send_message2(LinphoneChatRoom *cr, LinphoneChatMessage* msg,LinphoneChatMessageStateChangeCb status_cb,void* ud);
|
||||
LinphoneCore* linphone_chat_room_get_lc(LinphoneChatRoom *cr);
|
||||
void linphone_chat_room_set_user_data(LinphoneChatRoom *cr, void * ud);
|
||||
void * linphone_chat_room_get_user_data(LinphoneChatRoom *cr);
|
||||
|
||||
const char* linphone_chat_message_state_to_string(const LinphoneChatMessageState state);
|
||||
LINPHONE_PUBLIC const char* linphone_chat_message_state_to_string(const LinphoneChatMessageState state);
|
||||
LinphoneChatMessage* linphone_chat_message_clone(const LinphoneChatMessage* message);
|
||||
void linphone_chat_message_set_from(LinphoneChatMessage* message, const LinphoneAddress* from);
|
||||
LinphoneAddress* linphone_chat_message_get_from(const LinphoneChatMessage* message);
|
||||
const char* linphone_chat_message_get_external_body_url(const LinphoneChatMessage* message);
|
||||
void linphone_chat_message_set_external_body_url(LinphoneChatMessage* message,const char* url);
|
||||
const char * linphone_chat_message_get_text(const LinphoneChatMessage* message);
|
||||
LINPHONE_PUBLIC LinphoneAddress* linphone_chat_message_get_from(const LinphoneChatMessage* message);
|
||||
LINPHONE_PUBLIC const char* linphone_chat_message_get_external_body_url(const LinphoneChatMessage* message);
|
||||
LINPHONE_PUBLIC void linphone_chat_message_set_external_body_url(LinphoneChatMessage* message,const char* url);
|
||||
LINPHONE_PUBLIC const char * linphone_chat_message_get_text(const LinphoneChatMessage* message);
|
||||
time_t linphone_chat_message_get_time(const LinphoneChatMessage* message);
|
||||
void* linphone_chat_message_get_user_data(const LinphoneChatMessage* message);
|
||||
void linphone_chat_message_set_user_data(LinphoneChatMessage* message,void*);
|
||||
|
|
@ -847,7 +847,7 @@ typedef void * (*LinphoneWaitingCallback)(struct _LinphoneCore *lc, void *contex
|
|||
|
||||
/* THE main API */
|
||||
|
||||
void linphone_core_enable_logs(FILE *file);
|
||||
LINPHONE_PUBLIC void linphone_core_enable_logs(FILE *file);
|
||||
void linphone_core_enable_logs_with_cb(OrtpLogFunc logfunc);
|
||||
void linphone_core_disable_logs(void);
|
||||
const char *linphone_core_get_version(void);
|
||||
|
|
@ -859,7 +859,7 @@ LINPHONE_PUBLIC LinphoneCore *linphone_core_new(const LinphoneCoreVTable *vtable
|
|||
|
||||
/* function to be periodically called in a main loop */
|
||||
/* For ICE to work properly it should be called every 20ms */
|
||||
void linphone_core_iterate(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC void linphone_core_iterate(LinphoneCore *lc);
|
||||
#if 0 /*not implemented yet*/
|
||||
/**
|
||||
* @ingroup initializing
|
||||
|
|
@ -884,43 +884,43 @@ void linphone_core_set_user_agent(LinphoneCore *lc, const char *ua_name, const c
|
|||
|
||||
LinphoneAddress * linphone_core_interpret_url(LinphoneCore *lc, const char *url);
|
||||
|
||||
LinphoneCall * linphone_core_invite(LinphoneCore *lc, const char *url);
|
||||
LINPHONE_PUBLIC LinphoneCall * linphone_core_invite(LinphoneCore *lc, const char *url);
|
||||
|
||||
LinphoneCall * linphone_core_invite_address(LinphoneCore *lc, const LinphoneAddress *addr);
|
||||
LINPHONE_PUBLIC LinphoneCall * linphone_core_invite_address(LinphoneCore *lc, const LinphoneAddress *addr);
|
||||
|
||||
LinphoneCall * linphone_core_invite_with_params(LinphoneCore *lc, const char *url, const LinphoneCallParams *params);
|
||||
|
||||
LinphoneCall * linphone_core_invite_address_with_params(LinphoneCore *lc, const LinphoneAddress *addr, const LinphoneCallParams *params);
|
||||
|
||||
int linphone_core_transfer_call(LinphoneCore *lc, LinphoneCall *call, const char *refer_to);
|
||||
LINPHONE_PUBLIC int linphone_core_transfer_call(LinphoneCore *lc, LinphoneCall *call, const char *refer_to);
|
||||
|
||||
int linphone_core_transfer_call_to_another(LinphoneCore *lc, LinphoneCall *call, LinphoneCall *dest);
|
||||
LINPHONE_PUBLIC int linphone_core_transfer_call_to_another(LinphoneCore *lc, LinphoneCall *call, LinphoneCall *dest);
|
||||
|
||||
bool_t linphone_core_inc_invite_pending(LinphoneCore*lc);
|
||||
LINPHONE_PUBLIC bool_t linphone_core_inc_invite_pending(LinphoneCore*lc);
|
||||
|
||||
bool_t linphone_core_in_call(const LinphoneCore *lc);
|
||||
|
||||
LinphoneCall *linphone_core_get_current_call(const LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC LinphoneCall *linphone_core_get_current_call(const LinphoneCore *lc);
|
||||
|
||||
int linphone_core_accept_call(LinphoneCore *lc, LinphoneCall *call);
|
||||
LINPHONE_PUBLIC int linphone_core_accept_call(LinphoneCore *lc, LinphoneCall *call);
|
||||
|
||||
int linphone_core_accept_call_with_params(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params);
|
||||
|
||||
int linphone_core_terminate_call(LinphoneCore *lc, LinphoneCall *call);
|
||||
LINPHONE_PUBLIC int linphone_core_terminate_call(LinphoneCore *lc, LinphoneCall *call);
|
||||
|
||||
int linphone_core_redirect_call(LinphoneCore *lc, LinphoneCall *call, const char *redirect_uri);
|
||||
|
||||
int linphone_core_decline_call(LinphoneCore *lc, LinphoneCall * call, LinphoneReason reason);
|
||||
|
||||
int linphone_core_terminate_all_calls(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC int linphone_core_terminate_all_calls(LinphoneCore *lc);
|
||||
|
||||
int linphone_core_pause_call(LinphoneCore *lc, LinphoneCall *call);
|
||||
LINPHONE_PUBLIC int linphone_core_pause_call(LinphoneCore *lc, LinphoneCall *call);
|
||||
|
||||
int linphone_core_pause_all_calls(LinphoneCore *lc);
|
||||
|
||||
int linphone_core_resume_call(LinphoneCore *lc, LinphoneCall *call);
|
||||
LINPHONE_PUBLIC int linphone_core_resume_call(LinphoneCore *lc, LinphoneCall *call);
|
||||
|
||||
int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params);
|
||||
LINPHONE_PUBLIC int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params);
|
||||
|
||||
int linphone_core_defer_call_update(LinphoneCore *lc, LinphoneCall *call);
|
||||
|
||||
|
|
@ -964,7 +964,7 @@ void linphone_core_set_upload_ptime(LinphoneCore *lc, int ptime);
|
|||
int linphone_core_get_upload_ptime(LinphoneCore *lc);
|
||||
|
||||
/* returns a MSList of PayloadType */
|
||||
const MSList *linphone_core_get_audio_codecs(const LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC const MSList *linphone_core_get_audio_codecs(const LinphoneCore *lc);
|
||||
|
||||
int linphone_core_set_audio_codecs(LinphoneCore *lc, MSList *codecs);
|
||||
/* returns a MSList of PayloadType */
|
||||
|
|
@ -974,7 +974,7 @@ int linphone_core_set_video_codecs(LinphoneCore *lc, MSList *codecs);
|
|||
|
||||
bool_t linphone_core_payload_type_enabled(LinphoneCore *lc, const PayloadType *pt);
|
||||
|
||||
int linphone_core_enable_payload_type(LinphoneCore *lc, PayloadType *pt, bool_t enable);
|
||||
LINPHONE_PUBLIC int linphone_core_enable_payload_type(LinphoneCore *lc, PayloadType *pt, bool_t enable);
|
||||
|
||||
/**
|
||||
* Wildcard value used by #linphone_core_find_payload_type to ignore rate in search algirithm
|
||||
|
|
@ -996,7 +996,7 @@ int linphone_core_enable_payload_type(LinphoneCore *lc, PayloadType *pt, bool_t
|
|||
* @param channels number of channels, can be #LINPHONE_FIND_PAYLOAD_IGNORE_CHANNELS
|
||||
* @return Returns NULL if not found.
|
||||
*/
|
||||
PayloadType* linphone_core_find_payload_type(LinphoneCore* lc, const char* type, int rate, int channels) ;
|
||||
LINPHONE_PUBLIC PayloadType* linphone_core_find_payload_type(LinphoneCore* lc, const char* type, int rate, int channels) ;
|
||||
|
||||
int linphone_core_get_payload_type_number(LinphoneCore *lc, const PayloadType *pt);
|
||||
|
||||
|
|
@ -1012,21 +1012,21 @@ bool_t linphone_core_check_payload_type_usability(LinphoneCore *lc, PayloadType
|
|||
*/
|
||||
LinphoneProxyConfig * linphone_core_create_proxy_config(LinphoneCore *lc);
|
||||
|
||||
int linphone_core_add_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *config);
|
||||
LINPHONE_PUBLIC int linphone_core_add_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *config);
|
||||
|
||||
void linphone_core_clear_proxy_config(LinphoneCore *lc);
|
||||
|
||||
void linphone_core_remove_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *config);
|
||||
|
||||
const MSList *linphone_core_get_proxy_config_list(const LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC const MSList *linphone_core_get_proxy_config_list(const LinphoneCore *lc);
|
||||
|
||||
void linphone_core_set_default_proxy(LinphoneCore *lc, LinphoneProxyConfig *config);
|
||||
LINPHONE_PUBLIC void linphone_core_set_default_proxy(LinphoneCore *lc, LinphoneProxyConfig *config);
|
||||
|
||||
void linphone_core_set_default_proxy_index(LinphoneCore *lc, int index);
|
||||
|
||||
int linphone_core_get_default_proxy(LinphoneCore *lc, LinphoneProxyConfig **config);
|
||||
LINPHONE_PUBLIC int linphone_core_get_default_proxy(LinphoneCore *lc, LinphoneProxyConfig **config);
|
||||
|
||||
void linphone_core_add_auth_info(LinphoneCore *lc, const LinphoneAuthInfo *info);
|
||||
LINPHONE_PUBLIC void linphone_core_add_auth_info(LinphoneCore *lc, const LinphoneAuthInfo *info);
|
||||
|
||||
void linphone_core_remove_auth_info(LinphoneCore *lc, const LinphoneAuthInfo *info);
|
||||
|
||||
|
|
@ -1086,9 +1086,9 @@ void linphone_core_set_sip_port(LinphoneCore *lc, int port);
|
|||
|
||||
int linphone_core_get_sip_port(LinphoneCore *lc);
|
||||
|
||||
int linphone_core_set_sip_transports(LinphoneCore *lc, const LCSipTransports *transports);
|
||||
LINPHONE_PUBLIC int linphone_core_set_sip_transports(LinphoneCore *lc, const LCSipTransports *transports);
|
||||
|
||||
int linphone_core_get_sip_transports(LinphoneCore *lc, LCSipTransports *transports);
|
||||
LINPHONE_PUBLIC int linphone_core_get_sip_transports(LinphoneCore *lc, LCSipTransports *transports);
|
||||
/**
|
||||
*
|
||||
* Give access to the UDP sip socket. Can be useful to configure this socket as persistent I.E kCFStreamNetworkServiceType set to kCFStreamNetworkServiceTypeVoIP)
|
||||
|
|
@ -1181,13 +1181,13 @@ int linphone_core_set_playback_device(LinphoneCore *lc, const char * devid);
|
|||
int linphone_core_set_capture_device(LinphoneCore *lc, const char * devid);
|
||||
char linphone_core_get_sound_source(LinphoneCore *lc);
|
||||
void linphone_core_set_sound_source(LinphoneCore *lc, char source);
|
||||
void linphone_core_set_ring(LinphoneCore *lc, const char *path);
|
||||
LINPHONE_PUBLIC void linphone_core_set_ring(LinphoneCore *lc, const char *path);
|
||||
const char *linphone_core_get_ring(const LinphoneCore *lc);
|
||||
void linphone_core_verify_server_certificates(LinphoneCore *lc, bool_t yesno);
|
||||
void linphone_core_verify_server_cn(LinphoneCore *lc, bool_t yesno);
|
||||
void linphone_core_set_root_ca(LinphoneCore *lc, const char *path);
|
||||
const char *linphone_core_get_root_ca(LinphoneCore *lc);
|
||||
void linphone_core_set_ringback(LinphoneCore *lc, const char *path);
|
||||
LINPHONE_PUBLIC void linphone_core_set_ringback(LinphoneCore *lc, const char *path);
|
||||
const char * linphone_core_get_ringback(const LinphoneCore *lc);
|
||||
|
||||
void linphone_core_set_remote_ringback_tone(LinphoneCore *lc,const char *);
|
||||
|
|
@ -1226,9 +1226,9 @@ void linphone_core_remove_call_log(LinphoneCore *lc, LinphoneCallLog *call_log);
|
|||
|
||||
/* video support */
|
||||
bool_t linphone_core_video_supported(LinphoneCore *lc);
|
||||
void linphone_core_enable_video(LinphoneCore *lc, bool_t vcap_enabled, bool_t display_enabled);
|
||||
LINPHONE_PUBLIC void linphone_core_enable_video(LinphoneCore *lc, bool_t vcap_enabled, bool_t display_enabled);
|
||||
bool_t linphone_core_video_enabled(LinphoneCore *lc);
|
||||
void linphone_core_set_video_policy(LinphoneCore *lc, const LinphoneVideoPolicy *policy);
|
||||
LINPHONE_PUBLIC void linphone_core_set_video_policy(LinphoneCore *lc, const LinphoneVideoPolicy *policy);
|
||||
const LinphoneVideoPolicy *linphone_core_get_video_policy(LinphoneCore *lc);
|
||||
|
||||
typedef struct MSVideoSizeDef{
|
||||
|
|
@ -1296,7 +1296,7 @@ void linphone_core_set_mtu(LinphoneCore *lc, int mtu);
|
|||
* Calling this method with true trigger linphone to initiate a registration process for all proxies.
|
||||
* Calling this method disables the automatic network detection mode. It means you must call this method after each network state changes.
|
||||
*/
|
||||
void linphone_core_set_network_reachable(LinphoneCore* lc,bool_t value);
|
||||
LINPHONE_PUBLIC void linphone_core_set_network_reachable(LinphoneCore* lc,bool_t value);
|
||||
/**
|
||||
* @ingroup network_parameters
|
||||
* return network state either as positioned by the application or by linphone itself.
|
||||
|
|
@ -1314,8 +1314,8 @@ void linphone_core_enable_keep_alive(LinphoneCore* lc,bool_t enable);
|
|||
*/
|
||||
bool_t linphone_core_keep_alive_enabled(LinphoneCore* lc);
|
||||
|
||||
void *linphone_core_get_user_data(LinphoneCore *lc);
|
||||
void linphone_core_set_user_data(LinphoneCore *lc, void *userdata);
|
||||
LINPHONE_PUBLIC void *linphone_core_get_user_data(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC void linphone_core_set_user_data(LinphoneCore *lc, void *userdata);
|
||||
|
||||
/* returns LpConfig object to read/write to the config file: usefull if you wish to extend
|
||||
the config file with your own sections */
|
||||
|
|
@ -1327,7 +1327,7 @@ void linphone_core_set_waiting_callback(LinphoneCore *lc, LinphoneWaitingCallbac
|
|||
/*returns the list of registered SipSetup (linphonecore plugins) */
|
||||
const MSList * linphone_core_get_sip_setups(LinphoneCore *lc);
|
||||
|
||||
void linphone_core_destroy(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC void linphone_core_destroy(LinphoneCore *lc);
|
||||
|
||||
/*for advanced users:*/
|
||||
typedef RtpTransport * (*LinphoneRtpTransportFactoryFunc)(void *data, int port);
|
||||
|
|
@ -1349,7 +1349,7 @@ int linphone_core_get_current_call_stats(LinphoneCore *lc, rtp_stats_t *local, r
|
|||
|
||||
int linphone_core_get_calls_nb(const LinphoneCore *lc);
|
||||
|
||||
const MSList *linphone_core_get_calls(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC const MSList *linphone_core_get_calls(LinphoneCore *lc);
|
||||
|
||||
LinphoneGlobalState linphone_core_get_global_state(const LinphoneCore *lc);
|
||||
/**
|
||||
|
|
@ -1364,16 +1364,16 @@ const char *linphone_core_get_zrtp_secrets_file(LinphoneCore *lc);
|
|||
|
||||
const LinphoneCall* linphone_core_find_call_from_uri(LinphoneCore *lc, const char *uri);
|
||||
|
||||
int linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCall *call);
|
||||
LINPHONE_PUBLIC int linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCall *call);
|
||||
int linphone_core_add_all_to_conference(LinphoneCore *lc);
|
||||
int linphone_core_remove_from_conference(LinphoneCore *lc, LinphoneCall *call);
|
||||
bool_t linphone_core_is_in_conference(const LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC bool_t linphone_core_is_in_conference(const LinphoneCore *lc);
|
||||
int linphone_core_enter_conference(LinphoneCore *lc);
|
||||
int linphone_core_leave_conference(LinphoneCore *lc);
|
||||
float linphone_core_get_conference_local_input_volume(LinphoneCore *lc);
|
||||
|
||||
int linphone_core_terminate_conference(LinphoneCore *lc);
|
||||
int linphone_core_get_conference_size(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC int linphone_core_terminate_conference(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC int linphone_core_get_conference_size(LinphoneCore *lc);
|
||||
int linphone_core_start_conference_recording(LinphoneCore *lc, const char *path);
|
||||
int linphone_core_stop_conference_recording(LinphoneCore *lc);
|
||||
|
||||
|
|
@ -1387,8 +1387,8 @@ bool_t linphone_core_media_encryption_supported(const LinphoneCore *lc, Linphone
|
|||
/**
|
||||
* Choose media encryption policy to be used for RTP packets
|
||||
*/
|
||||
int linphone_core_set_media_encryption(LinphoneCore *lc, enum LinphoneMediaEncryption menc);
|
||||
LinphoneMediaEncryption linphone_core_get_media_encryption(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC int linphone_core_set_media_encryption(LinphoneCore *lc, enum LinphoneMediaEncryption menc);
|
||||
LINPHONE_PUBLIC LinphoneMediaEncryption linphone_core_get_media_encryption(LinphoneCore *lc);
|
||||
|
||||
bool_t linphone_core_is_media_encryption_mandatory(LinphoneCore *lc);
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ LinphoneFriend * linphone_friend_new();
|
|||
* @param addr a buddy address, must be a sip uri like sip:joe@sip.linphone.org
|
||||
* @return a new #LinphoneFriend with \link linphone_friend_get_address() address initialized \endlink
|
||||
*/
|
||||
LinphoneFriend *linphone_friend_new_with_addr(const char *addr);
|
||||
LINPHONE_PUBLIC LinphoneFriend *linphone_friend_new_with_addr(const char *addr);
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
|
|
@ -137,7 +137,7 @@ int linphone_friend_set_addr(LinphoneFriend *fr, const LinphoneAddress* address)
|
|||
* @param lf #LinphoneFriend object
|
||||
* @return #LinphoneAddress
|
||||
*/
|
||||
const LinphoneAddress *linphone_friend_get_address(const LinphoneFriend *lf);
|
||||
LINPHONE_PUBLIC const LinphoneAddress *linphone_friend_get_address(const LinphoneFriend *lf);
|
||||
/**
|
||||
* get subscription flag value
|
||||
* @param lf #LinphoneFriend object
|
||||
|
|
@ -153,7 +153,7 @@ bool_t linphone_friend_subscribes_enabled(const LinphoneFriend *lf);
|
|||
* @param val if TRUE this friend will receive subscription message
|
||||
*/
|
||||
|
||||
int linphone_friend_enable_subscribes(LinphoneFriend *fr, bool_t val);
|
||||
LINPHONE_PUBLIC int linphone_friend_enable_subscribes(LinphoneFriend *fr, bool_t val);
|
||||
|
||||
#define linphone_friend_send_subscribe linphone_friend_enable_subscribes
|
||||
/**
|
||||
|
|
@ -179,12 +179,12 @@ LinphoneSubscribePolicy linphone_friend_get_inc_subscribe_policy(const LinphoneF
|
|||
* Once the modifications are done, then the application must call
|
||||
* linphone_friend_done() to commit the changes.
|
||||
**/
|
||||
void linphone_friend_edit(LinphoneFriend *fr);
|
||||
LINPHONE_PUBLIC void linphone_friend_edit(LinphoneFriend *fr);
|
||||
/**
|
||||
* Commits modification made to the friend configuration.
|
||||
* @param fr #LinphoneFriend object
|
||||
**/
|
||||
void linphone_friend_done(LinphoneFriend *fr);
|
||||
LINPHONE_PUBLIC void linphone_friend_done(LinphoneFriend *fr);
|
||||
|
||||
|
||||
|
||||
|
|
@ -229,7 +229,7 @@ void linphone_core_interpret_friend_uri(LinphoneCore *lc, const char *uri, char
|
|||
* @param lc #LinphoneCore object
|
||||
* @param fr #LinphoneFriend to add
|
||||
*/
|
||||
void linphone_core_add_friend(LinphoneCore *lc, LinphoneFriend *fr);
|
||||
LINPHONE_PUBLIC void linphone_core_add_friend(LinphoneCore *lc, LinphoneFriend *fr);
|
||||
/**
|
||||
* remove a friend from the buddy list
|
||||
* @param lc #LinphoneCore object
|
||||
|
|
@ -246,7 +246,7 @@ void linphone_core_reject_subscriber(LinphoneCore *lc, LinphoneFriend *lf);
|
|||
* get Buddy list of LinphoneFriend
|
||||
* @param lc #LinphoneCore object
|
||||
* */
|
||||
const MSList * linphone_core_get_friend_list(const LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC const MSList * linphone_core_get_friend_list(const LinphoneCore *lc);
|
||||
/**
|
||||
* notify all friends that have subscribed
|
||||
* @param lc #LinphoneCore object
|
||||
|
|
|
|||
|
|
@ -29,6 +29,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include "mediastreamer2/mscommon.h"
|
||||
#include "ortp/ortp_srtp.h"
|
||||
|
||||
#ifdef LIBLINPHONE_EXPORTS
|
||||
#define LINPHONE_PUBLIC __declspec(dllexport)
|
||||
#else
|
||||
#define LINPHONE_PUBLIC __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
/*Dirty hack, keep in sync with mediastreamer2/include/mediastream.h */
|
||||
#ifndef PAYLOAD_TYPE_FLAG_CAN_RECV
|
||||
#define PAYLOAD_TYPE_FLAG_CAN_RECV PAYLOAD_TYPE_USER_FLAG_1
|
||||
|
|
@ -513,9 +519,9 @@ void __sal_op_free(SalOp *b);
|
|||
|
||||
/*test api*/
|
||||
/*0 for no error*/
|
||||
void sal_set_send_error(Sal *sal,int value);
|
||||
LINPHONE_PUBLIC void sal_set_send_error(Sal *sal,int value);
|
||||
/*1 for no error*/
|
||||
void sal_set_recv_error(Sal *sal,int value);
|
||||
LINPHONE_PUBLIC void sal_set_recv_error(Sal *sal,int value);
|
||||
/*enable contact fixing*/
|
||||
void sal_nat_helper_enable(Sal *sal,bool_t enable);
|
||||
bool_t sal_nat_helper_enabled(Sal *sal);
|
||||
|
|
|
|||
|
|
@ -32,11 +32,11 @@ static int uninit(void) {
|
|||
void call_state_changed(LinphoneCore *lc, LinphoneCall *call, LinphoneCallState cstate, const char *msg){
|
||||
char* to=linphone_address_as_string(linphone_call_get_call_log(call)->to);
|
||||
char* from=linphone_address_as_string(linphone_call_get_call_log(call)->from);
|
||||
|
||||
stats* counters;
|
||||
ms_message("call from [%s] to [%s], new state is [%s]",from,to,linphone_call_state_to_string(cstate));
|
||||
ms_free(to);
|
||||
ms_free(from);
|
||||
stats* counters = (stats*)linphone_core_get_user_data(lc);
|
||||
counters = (stats*)linphone_core_get_user_data(lc);
|
||||
switch (cstate) {
|
||||
case LinphoneCallIncomingReceived:counters->number_of_LinphoneCallIncomingReceived++;break;
|
||||
case LinphoneCallOutgoingInit :counters->number_of_LinphoneCallOutgoingInit++;break;
|
||||
|
|
@ -63,12 +63,12 @@ void call_state_changed(LinphoneCore *lc, LinphoneCall *call, LinphoneCallState
|
|||
void linphone_transfer_state_changed(LinphoneCore *lc, LinphoneCall *transfered, LinphoneCallState new_call_state) {
|
||||
char* to=linphone_address_as_string(linphone_call_get_call_log(transfered)->to);
|
||||
char* from=linphone_address_as_string(linphone_call_get_call_log(transfered)->from);
|
||||
|
||||
stats* counters;
|
||||
ms_message("Transferred call from [%s] to [%s], new state is [%s]",from,to,linphone_call_state_to_string(new_call_state));
|
||||
ms_free(to);
|
||||
ms_free(from);
|
||||
|
||||
stats* counters = (stats*)linphone_core_get_user_data(lc);
|
||||
counters = (stats*)linphone_core_get_user_data(lc);
|
||||
switch (new_call_state) {
|
||||
case LinphoneCallOutgoingInit :counters->number_of_LinphoneTransferCallOutgoingInit++;break;
|
||||
case LinphoneCallOutgoingProgress :counters->number_of_LinphoneTransfertCallOutgoingProgress++;break;
|
||||
|
|
@ -83,19 +83,21 @@ void linphone_transfer_state_changed(LinphoneCore *lc, LinphoneCall *transfered,
|
|||
static void linphone_call_cb(LinphoneCall *call,void * user_data) {
|
||||
char* to=linphone_address_as_string(linphone_call_get_call_log(call)->to);
|
||||
char* from=linphone_address_as_string(linphone_call_get_call_log(call)->from);
|
||||
stats* counters;
|
||||
LinphoneCore* lc=(LinphoneCore*)user_data;
|
||||
ms_message("call from [%s] to [%s] receive iFrame",from,to);
|
||||
ms_free(to);
|
||||
ms_free(from);
|
||||
stats* counters = (stats*)linphone_core_get_user_data(lc);
|
||||
counters = (stats*)linphone_core_get_user_data(lc);
|
||||
counters->number_of_IframeDecoded++;
|
||||
}
|
||||
static bool_t call(LinphoneCoreManager* caller_mgr,LinphoneCoreManager* callee_mgr) {
|
||||
LinphoneProxyConfig* proxy;
|
||||
linphone_core_get_default_proxy(callee_mgr->lc,&proxy);
|
||||
int retry=0;
|
||||
stats initial_caller=caller_mgr->stat;
|
||||
stats initial_callee=callee_mgr->stat;
|
||||
LinphoneAddress* identity;
|
||||
linphone_core_get_default_proxy(callee_mgr->lc,&proxy);
|
||||
|
||||
CU_ASSERT_PTR_NOT_NULL_FATAL(proxy);
|
||||
|
||||
|
|
@ -126,7 +128,7 @@ static bool_t call(LinphoneCoreManager* caller_mgr,LinphoneCoreManager* callee_m
|
|||
|
||||
linphone_core_get_default_proxy(caller_mgr->lc,&proxy);
|
||||
CU_ASSERT_PTR_NOT_NULL_FATAL(proxy);
|
||||
LinphoneAddress* identity = linphone_address_new(linphone_proxy_config_get_identity(proxy));
|
||||
identity = linphone_address_new(linphone_proxy_config_get_identity(proxy));
|
||||
CU_ASSERT_TRUE(linphone_address_weak_equal(identity,linphone_core_get_current_call_remote_address(callee_mgr->lc)));
|
||||
linphone_address_destroy(identity);
|
||||
|
||||
|
|
@ -148,7 +150,8 @@ static void simple_call() {
|
|||
LinphoneCore* lc_pauline=pauline->lc;
|
||||
stats* stat_marie=&marie->stat;
|
||||
stats* stat_pauline=&pauline->stat;
|
||||
|
||||
LinphoneProxyConfig* proxy;
|
||||
LinphoneAddress* identity;
|
||||
|
||||
|
||||
linphone_core_invite(lc_marie,"pauline");
|
||||
|
|
@ -158,10 +161,9 @@ static void simple_call() {
|
|||
CU_ASSERT_EQUAL(stat_marie->number_of_LinphoneCallOutgoingProgress,1);
|
||||
CU_ASSERT_TRUE_FATAL(wait_for(lc_pauline,lc_marie,&stat_marie->number_of_LinphoneCallOutgoingRinging,1));
|
||||
|
||||
LinphoneProxyConfig* proxy;
|
||||
linphone_core_get_default_proxy(lc_marie,&proxy);
|
||||
CU_ASSERT_PTR_NOT_NULL_FATAL(proxy);
|
||||
LinphoneAddress* identity = linphone_address_new(linphone_proxy_config_get_identity(proxy));
|
||||
identity = linphone_address_new(linphone_proxy_config_get_identity(proxy));
|
||||
CU_ASSERT_TRUE(linphone_address_weak_equal(identity,linphone_core_get_current_call_remote_address(lc_pauline)));
|
||||
linphone_address_destroy(identity);
|
||||
|
||||
|
|
@ -218,11 +220,11 @@ static void call_ringing_canceled() {
|
|||
static void call_early_declined() {
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new("./tester/marie_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new("./tester/pauline_rc");
|
||||
|
||||
LinphoneCall* in_call;
|
||||
LinphoneCall* out_call = linphone_core_invite(pauline->lc,"marie");
|
||||
linphone_call_ref(out_call);
|
||||
CU_ASSERT_TRUE_FATAL(wait_for(pauline->lc,marie->lc,&marie->stat.number_of_LinphoneCallIncomingReceived,1));
|
||||
LinphoneCall* in_call=linphone_core_get_current_call(marie->lc);
|
||||
in_call=linphone_core_get_current_call(marie->lc);
|
||||
linphone_call_ref(in_call);
|
||||
|
||||
linphone_core_terminate_call(marie->lc,in_call);
|
||||
|
|
@ -318,9 +320,9 @@ static void call_with_video_added() {
|
|||
LinphoneCoreManager* pauline = linphone_core_manager_new("./tester/pauline_rc");
|
||||
LinphoneCall* call_obj;
|
||||
LinphoneVideoPolicy pauline_policy;
|
||||
LinphoneCallParams* marie_params;
|
||||
pauline_policy.automatically_accept=TRUE;
|
||||
pauline_policy.automatically_initiate=TRUE;
|
||||
LinphoneCallParams* marie_params;
|
||||
|
||||
CU_ASSERT_TRUE(call(pauline,marie));
|
||||
|
||||
|
|
@ -363,14 +365,14 @@ static void simple_conference() {
|
|||
LinphoneCoreManager* pauline = linphone_core_manager_new("./tester/pauline_rc");
|
||||
LinphoneCoreManager* laure = linphone_core_manager_new("./tester/laure_rc");
|
||||
|
||||
MSList* lcs=ms_list_append(NULL,marie->lc);
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=ms_list_append(lcs,laure->lc);
|
||||
|
||||
LinphoneCall* marie_call_pauline;
|
||||
LinphoneCall* pauline_called_by_marie;
|
||||
LinphoneCall* marie_call_laure;
|
||||
|
||||
MSList* lcs=ms_list_append(NULL,marie->lc);
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=ms_list_append(lcs,laure->lc);
|
||||
|
||||
CU_ASSERT_TRUE(call(marie,pauline));
|
||||
marie_call_pauline=linphone_core_get_current_call(marie->lc);
|
||||
pauline_called_by_marie=linphone_core_get_current_call(pauline->lc);
|
||||
|
|
@ -457,14 +459,14 @@ static void simple_call_transfer() {
|
|||
LinphoneCoreManager* pauline = linphone_core_manager_new("./tester/pauline_rc");
|
||||
LinphoneCoreManager* laure = linphone_core_manager_new("./tester/laure_rc");
|
||||
|
||||
LinphoneCall* marie_call_pauline;
|
||||
LinphoneCall* pauline_called_by_marie;
|
||||
|
||||
char* laure_identity=linphone_address_as_string(laure->identity);
|
||||
MSList* lcs=ms_list_append(NULL,marie->lc);
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=ms_list_append(lcs,laure->lc);
|
||||
|
||||
LinphoneCall* marie_call_pauline;
|
||||
LinphoneCall* pauline_called_by_marie;
|
||||
|
||||
|
||||
CU_ASSERT_TRUE(call(marie,pauline));
|
||||
marie_call_pauline=linphone_core_get_current_call(marie->lc);
|
||||
|
|
@ -509,15 +511,16 @@ static void call_transfer_existing_call_outgoing_call() {
|
|||
LinphoneCoreManager* pauline = linphone_core_manager_new("./tester/pauline_rc");
|
||||
LinphoneCoreManager* laure = linphone_core_manager_new("./tester/laure_rc");
|
||||
|
||||
MSList* lcs=ms_list_append(NULL,marie->lc);
|
||||
const MSList* calls;
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=ms_list_append(lcs,laure->lc);
|
||||
|
||||
LinphoneCall* marie_call_pauline;
|
||||
LinphoneCall* pauline_called_by_marie;
|
||||
LinphoneCall* marie_call_laure;
|
||||
LinphoneCall* laure_called_by_marie;
|
||||
LinphoneCall* lcall;
|
||||
|
||||
MSList* lcs=ms_list_append(NULL,marie->lc);
|
||||
const MSList* calls;
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=ms_list_append(lcs,laure->lc);
|
||||
|
||||
/*marie call pauline*/
|
||||
CU_ASSERT_TRUE(call(marie,pauline));
|
||||
|
|
@ -553,10 +556,10 @@ static void call_transfer_existing_call_outgoing_call() {
|
|||
|
||||
/*laure accept call*/
|
||||
for(calls=linphone_core_get_calls(laure->lc);calls!=NULL;calls=calls->next) {
|
||||
LinphoneCall* call = (LinphoneCall*)calls->data;
|
||||
if (linphone_call_get_state(call) == LinphoneCallIncomingReceived) {
|
||||
CU_ASSERT_EQUAL(linphone_call_get_replaced_call(call),laure_called_by_marie);
|
||||
linphone_core_accept_call(laure->lc,call);
|
||||
lcall = (LinphoneCall*)calls->data;
|
||||
if (linphone_call_get_state(lcall) == LinphoneCallIncomingReceived) {
|
||||
CU_ASSERT_EQUAL(linphone_call_get_replaced_call(lcall),laure_called_by_marie);
|
||||
linphone_core_accept_call(laure->lc,lcall);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -606,9 +609,11 @@ int call_test_suite () {
|
|||
if (NULL == CU_add_test(pSuite, "call_srtp", call_srtp)) {
|
||||
return CU_get_error();
|
||||
}
|
||||
#ifdef VIDEO_ENABLED
|
||||
if (NULL == CU_add_test(pSuite, "call_with_video_added", call_with_video_added)) {
|
||||
return CU_get_error();
|
||||
}
|
||||
#endif
|
||||
if (NULL == CU_add_test(pSuite, "simple_conference", simple_conference)) {
|
||||
return CU_get_error();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,8 +35,9 @@ static int uninit(void) {
|
|||
}
|
||||
static void core_init_test(void) {
|
||||
LinphoneCoreVTable v_table;
|
||||
LinphoneCore* lc;
|
||||
memset (&v_table,0,sizeof(v_table));
|
||||
LinphoneCore* lc = linphone_core_new(&v_table,NULL,NULL,NULL);
|
||||
lc = linphone_core_new(&v_table,NULL,NULL,NULL);
|
||||
CU_ASSERT_PTR_NOT_NULL_FATAL(lc);
|
||||
linphone_core_destroy(lc);
|
||||
}
|
||||
|
|
@ -63,12 +64,14 @@ static stats global_stat;
|
|||
|
||||
|
||||
void auth_info_requested(LinphoneCore *lc, const char *realm, const char *username) {
|
||||
stats* counters;
|
||||
LinphoneAuthInfo *info;
|
||||
ms_message("Auth info requested for user id [%s] at realm [%s]\n"
|
||||
,username
|
||||
,realm);
|
||||
stats* counters = (stats*)linphone_core_get_user_data(lc);
|
||||
counters = (stats*)linphone_core_get_user_data(lc);
|
||||
counters->number_of_auth_info_requested++;
|
||||
LinphoneAuthInfo *info=linphone_auth_info_new(test_username,NULL,test_password,NULL,auth_domain); /*create authentication structure from identity*/
|
||||
info=linphone_auth_info_new(test_username,NULL,test_password,NULL,auth_domain); /*create authentication structure from identity*/
|
||||
linphone_core_add_auth_info(lc,info); /*add authentication info to LinphoneCore*/
|
||||
|
||||
}
|
||||
|
|
@ -93,9 +96,10 @@ void reset_counters( stats* counters) {
|
|||
LinphoneCore* configure_lc_from(LinphoneCoreVTable* v_table, const char* file,int proxy_count) {
|
||||
LinphoneCore* lc;
|
||||
int retry=0;
|
||||
lc = linphone_core_new(v_table,NULL,file,NULL);
|
||||
stats* counters;
|
||||
lc = linphone_core_new(v_table,NULL,file,NULL);
|
||||
linphone_core_set_user_data(lc,&global_stat);
|
||||
stats* counters = (stats*)linphone_core_get_user_data(lc);
|
||||
counters = (stats*)linphone_core_get_user_data(lc);
|
||||
linphone_core_set_ring(lc,"./share/rings/oldphone.wav");
|
||||
linphone_core_set_ringback(lc,"./share/ringback.wav");
|
||||
|
||||
|
|
@ -114,9 +118,9 @@ LinphoneCore* configure_lc_from(LinphoneCoreVTable* v_table, const char* file,in
|
|||
|
||||
bool_t wait_for(LinphoneCore* lc_1, LinphoneCore* lc_2,int* counter,int value) {
|
||||
MSList* lcs=NULL;
|
||||
bool_t result;
|
||||
if (lc_1)
|
||||
lcs=ms_list_append(lcs,lc_1);
|
||||
bool_t result;
|
||||
if (lc_2)
|
||||
lcs=ms_list_append(lcs,lc_2);
|
||||
result=wait_for_list(lcs,counter,value,2000);
|
||||
|
|
@ -138,10 +142,10 @@ bool_t wait_for_list(MSList* lcs,int* counter,int value,int timeout_ms) {
|
|||
static void enable_codec(LinphoneCore* lc,const char* type,int rate) {
|
||||
MSList* codecs=ms_list_copy(linphone_core_get_audio_codecs(lc));
|
||||
MSList* codecs_it;
|
||||
PayloadType* pt;
|
||||
for (codecs_it=codecs;codecs_it!=NULL;codecs_it=codecs_it->next) {
|
||||
linphone_core_enable_payload_type(lc,(PayloadType*)codecs_it->data,0);
|
||||
}
|
||||
PayloadType* pt;
|
||||
if((pt = linphone_core_find_payload_type(lc,type,rate,1))) {
|
||||
linphone_core_enable_payload_type(lc,pt, 1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,11 +27,12 @@ void text_message_received(LinphoneCore *lc, LinphoneChatRoom *room, const Linph
|
|||
}
|
||||
void message_received(LinphoneCore *lc, LinphoneChatRoom *room, LinphoneChatMessage* message) {
|
||||
char* from=linphone_address_as_string(linphone_chat_message_get_from(message));
|
||||
stats* counters;
|
||||
ms_message("Message from [%s] is [%s] , external URL [%s]",from
|
||||
,linphone_chat_message_get_text(message)
|
||||
,linphone_chat_message_get_external_body_url(message));
|
||||
ms_free(from);
|
||||
stats* counters = (stats*)linphone_core_get_user_data(lc);
|
||||
counters = (stats*)linphone_core_get_user_data(lc);
|
||||
counters->number_of_LinphoneMessageReceived++;
|
||||
if (linphone_chat_message_get_external_body_url(message))
|
||||
counters->number_of_LinphoneMessageExtBodyReceived++;
|
||||
|
|
|
|||
|
|
@ -24,18 +24,20 @@
|
|||
|
||||
void new_subscribtion_request(LinphoneCore *lc, LinphoneFriend *lf, const char *url){
|
||||
char* from=linphone_address_as_string(linphone_friend_get_address(lf));
|
||||
stats* counters;
|
||||
ms_message("New subscription request from [%s] url [%s]",from,url);
|
||||
ms_free(from);
|
||||
stats* counters = (stats*)linphone_core_get_user_data(lc);
|
||||
counters = (stats*)linphone_core_get_user_data(lc);
|
||||
counters->number_of_NewSubscriptionRequest++;
|
||||
linphone_core_add_friend(lc,lf); /*accept subscription*/
|
||||
|
||||
}
|
||||
void notify_presence_received(LinphoneCore *lc, LinphoneFriend * lf) {
|
||||
stats* counters;
|
||||
char* from=linphone_address_as_string(linphone_friend_get_address(lf));
|
||||
ms_message("New Notify request from [%s] ",from);
|
||||
ms_free(from);
|
||||
stats* counters = (stats*)linphone_core_get_user_data(lc);
|
||||
counters = (stats*)linphone_core_get_user_data(lc);
|
||||
counters->number_of_NotifyReceived++;
|
||||
}
|
||||
|
||||
|
|
@ -55,8 +57,9 @@ static void simple_subscribe() {
|
|||
LinphoneCoreManager* marie = linphone_core_manager_new("./tester/marie_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new("./tester/pauline_rc");
|
||||
const MSList* marie_friends = linphone_core_get_friend_list(marie->lc);
|
||||
LinphoneFriend* friend;
|
||||
CU_ASSERT_PTR_NOT_NULL_FATAL(marie_friends);
|
||||
LinphoneFriend* friend = (LinphoneFriend*) marie_friends->data;
|
||||
friend = (LinphoneFriend*) marie_friends->data;
|
||||
linphone_friend_edit(friend);
|
||||
linphone_friend_enable_subscribes(friend,TRUE);
|
||||
linphone_friend_done(friend);
|
||||
|
|
|
|||
|
|
@ -29,11 +29,12 @@ static LinphoneCore* create_lc() {
|
|||
|
||||
|
||||
void registration_state_changed(struct _LinphoneCore *lc, LinphoneProxyConfig *cfg, LinphoneRegistrationState cstate, const char *message){
|
||||
stats* counters;
|
||||
ms_message("New registration state %s for user id [%s] at proxy [%s]\n"
|
||||
,linphone_registration_state_to_string(cstate)
|
||||
,linphone_proxy_config_get_identity(cfg)
|
||||
,linphone_proxy_config_get_addr(cfg));
|
||||
stats* counters = (stats*)linphone_core_get_user_data(lc);
|
||||
counters = (stats*)linphone_core_get_user_data(lc);
|
||||
switch (cstate) {
|
||||
case LinphoneRegistrationNone:counters->number_of_LinphoneRegistrationNone++;break;
|
||||
case LinphoneRegistrationProgress:counters->number_of_LinphoneRegistrationProgress++;break;
|
||||
|
|
@ -49,19 +50,24 @@ static void register_with_refresh_base_2(LinphoneCore* lc, bool_t refresh,const
|
|||
int retry=0;
|
||||
LCSipTransports transport = {5070,5070,0,5071};
|
||||
char* addr;
|
||||
LinphoneProxyConfig* proxy_cfg;
|
||||
stats* counters;
|
||||
LinphoneAddress *from;
|
||||
const char* server_addr;
|
||||
LinphoneAuthInfo *info;
|
||||
|
||||
CU_ASSERT_PTR_NOT_NULL_FATAL(lc);
|
||||
stats* counters = (stats*)linphone_core_get_user_data(lc);
|
||||
counters = (stats*)linphone_core_get_user_data(lc);
|
||||
reset_counters(counters);
|
||||
linphone_core_set_sip_transports(lc,&transport);
|
||||
LinphoneProxyConfig* proxy_cfg;
|
||||
|
||||
proxy_cfg = linphone_proxy_config_new();
|
||||
|
||||
LinphoneAddress *from = create_linphone_address(domain);
|
||||
from = create_linphone_address(domain);
|
||||
|
||||
linphone_proxy_config_set_identity(proxy_cfg,addr=linphone_address_as_string(from));
|
||||
ms_free(addr);
|
||||
const char* server_addr = linphone_address_get_domain(from);
|
||||
server_addr = linphone_address_get_domain(from);
|
||||
|
||||
linphone_proxy_config_enable_register(proxy_cfg,TRUE);
|
||||
linphone_proxy_config_expires(proxy_cfg,1);
|
||||
|
|
@ -79,7 +85,7 @@ static void register_with_refresh_base_2(LinphoneCore* lc, bool_t refresh,const
|
|||
while (counters->number_of_LinphoneRegistrationOk<1+(refresh!=0) && retry++ <310) {
|
||||
linphone_core_iterate(lc);
|
||||
if (counters->number_of_auth_info_requested>0 && late_auth_info) {
|
||||
LinphoneAuthInfo *info=linphone_auth_info_new(test_username,NULL,test_password,NULL,auth_domain); /*create authentication structure from identity*/
|
||||
info=linphone_auth_info_new(test_username,NULL,test_password,NULL,auth_domain); /*create authentication structure from identity*/
|
||||
linphone_core_add_auth_info(lc,info); /*add authentication info to LinphoneCore*/
|
||||
}
|
||||
ms_usleep(100000);
|
||||
|
|
@ -149,22 +155,25 @@ static void simple_auth_register_with_refresh() {
|
|||
|
||||
static void simple_tcp_register(){
|
||||
char route[256];
|
||||
LinphoneCore* lc;
|
||||
sprintf(route,"sip:%s;transport=tcp",test_domain);
|
||||
LinphoneCore* lc = create_lc();
|
||||
lc = create_lc();
|
||||
register_with_refresh(lc,FALSE,NULL,route);
|
||||
}
|
||||
static void simple_tls_register(){
|
||||
char route[256];
|
||||
LinphoneCore* lc;
|
||||
sprintf(route,"sip:%s;transport=tls",test_domain);
|
||||
LinphoneCore* lc = create_lc();
|
||||
lc = create_lc();
|
||||
register_with_refresh(lc,FALSE,NULL,route);
|
||||
}
|
||||
|
||||
static void simple_authenticated_register(){
|
||||
stats* counters;
|
||||
LinphoneCore* lc = create_lc();
|
||||
LinphoneAuthInfo *info=linphone_auth_info_new(test_username,NULL,test_password,NULL,auth_domain); /*create authentication structure from identity*/
|
||||
linphone_core_add_auth_info(lc,info); /*add authentication info to LinphoneCore*/
|
||||
stats* counters = (stats*)linphone_core_get_user_data(lc);
|
||||
counters = (stats*)linphone_core_get_user_data(lc);
|
||||
register_with_refresh(lc,FALSE,auth_domain,NULL);
|
||||
CU_ASSERT_EQUAL(counters->number_of_auth_info_requested,0);
|
||||
}
|
||||
|
|
@ -173,21 +182,23 @@ static void authenticated_register_with_no_initial_credentials(){
|
|||
LinphoneCoreVTable v_table;
|
||||
LinphoneCore* lc;
|
||||
stats stat;
|
||||
stats* counters;
|
||||
memset (&v_table,0,sizeof(v_table));
|
||||
v_table.registration_state_changed=registration_state_changed;
|
||||
v_table.auth_info_requested=auth_info_requested;
|
||||
lc = linphone_core_new(&v_table,NULL,NULL,NULL);
|
||||
lc = linphone_core_new(&v_table,NULL,NULL,NULL);
|
||||
linphone_core_set_user_data(lc,&stat);
|
||||
stats* counters = (stats*)linphone_core_get_user_data(lc);
|
||||
counters= (stats*)linphone_core_get_user_data(lc);
|
||||
counters->number_of_auth_info_requested=0;
|
||||
register_with_refresh(lc,FALSE,auth_domain,NULL);
|
||||
CU_ASSERT_EQUAL(counters->number_of_auth_info_requested,1);
|
||||
}
|
||||
static void auth_info_requested2(LinphoneCore *lc, const char *realm, const char *username) {
|
||||
stats* counters;
|
||||
ms_message("Auth info requested for user id [%s] at realm [%s]\n"
|
||||
,username
|
||||
,realm);
|
||||
stats* counters = (stats*)linphone_core_get_user_data(lc);
|
||||
counters = (stats*)linphone_core_get_user_data(lc);
|
||||
counters->number_of_auth_info_requested++;
|
||||
}
|
||||
|
||||
|
|
@ -195,12 +206,13 @@ static void authenticated_register_with_late_credentials(){
|
|||
LinphoneCoreVTable v_table;
|
||||
LinphoneCore* lc;
|
||||
stats stat;
|
||||
stats* counters;
|
||||
memset (&v_table,0,sizeof(v_table));
|
||||
v_table.registration_state_changed=registration_state_changed;
|
||||
v_table.auth_info_requested=auth_info_requested2;
|
||||
lc = linphone_core_new(&v_table,NULL,NULL,NULL);
|
||||
linphone_core_set_user_data(lc,&stat);
|
||||
stats* counters = (stats*)linphone_core_get_user_data(lc);
|
||||
counters = (stats*)linphone_core_get_user_data(lc);
|
||||
register_with_refresh_base_2(lc,FALSE,auth_domain,NULL,TRUE);
|
||||
CU_ASSERT_EQUAL(counters->number_of_auth_info_requested,1);
|
||||
linphone_core_destroy(lc);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue