LinphoneCore.cpp 17.2 KB
Newer Older
1
#include "LinphoneCore.h"
2 3 4
#include "LinphoneAddress.h"
#include "LinphoneAuthInfo.h"
#include "LinphoneCall.h"
5
#include "LinphoneCallLog.h"
6 7
#include "LinphoneCallParams.h"
#include "LinphoneProxyConfig.h"
8
#include "LinphoneCoreListener.h"
9 10
#include "LpConfig.h"
#include "PayloadType.h"
11
#include "Server.h"
12
#include "Enums.h"
13 14
#include "ApiLock.h"
#include <collection.h>
15

16
using namespace Platform;
17 18
using namespace Platform::Collections;
using namespace Windows::Foundation::Collections;
19

20
Linphone::Core::Transports::Transports()
21
{
22 23 24

}

25
Linphone::Core::Transports::Transports(Linphone::Core::Transports^ t) :
26 27 28 29 30 31 32
	udp(t->UDP),
	tcp(t->TCP),
	tls(t->TLS)
{

}

33
int Linphone::Core::Transports::UDP::get()
34 35 36 37
{
	return udp;
}

38
int Linphone::Core::Transports::TCP::get()
39 40 41 42
{
	return tcp;
}

43
int Linphone::Core::Transports::TLS::get()
44 45 46 47
{
	return tls;
}

48
Platform::String^ Linphone::Core::Transports::ToString()
49 50 51 52
{
	return "udp[" + udp + "] tcp[" + tcp + "] tls[" + tls + "]";
}

53

54
void Linphone::Core::LinphoneCore::SetContext(Platform::Object^ object)
55 56 57 58
{

}

59
void Linphone::Core::LinphoneCore::ClearProxyConfigs()
60
{
Sylvain Berfini's avatar
Sylvain Berfini committed
61
	std::lock_guard<std::recursive_mutex> lock(g_apiLock);
62
	linphone_core_clear_proxy_config(this->lc);
63 64
}

65
void Linphone::Core::LinphoneCore::AddProxyConfig(Linphone::Core::LinphoneProxyConfig^ proxyCfg)
66
{
Sylvain Berfini's avatar
Sylvain Berfini committed
67
	std::lock_guard<std::recursive_mutex> lock(g_apiLock);
68
	linphone_core_add_proxy_config(this->lc, proxyCfg->proxy_config);
69 70
}

71
void Linphone::Core::LinphoneCore::SetDefaultProxyConfig(Linphone::Core::LinphoneProxyConfig^ proxyCfg)
72
{
Sylvain Berfini's avatar
Sylvain Berfini committed
73 74
	std::lock_guard<std::recursive_mutex> lock(g_apiLock);
	linphone_core_set_default_proxy(this->lc, proxyCfg->proxy_config);
75 76
}

77
Linphone::Core::LinphoneProxyConfig^ Linphone::Core::LinphoneCore::GetDefaultProxyConfig()
78
{
Sylvain Berfini's avatar
Sylvain Berfini committed
79 80 81 82 83
	std::lock_guard<std::recursive_mutex> lock(g_apiLock);
	::LinphoneProxyConfig *proxy=NULL;
	linphone_core_get_default_proxy(this->lc,&proxy);
	Linphone::Core::LinphoneProxyConfig^ defaultProxy = reinterpret_cast<Linphone::Core::LinphoneProxyConfig^>(proxy);
	return defaultProxy;
84 85
}

86 87
Linphone::Core::LinphoneProxyConfig^ Linphone::Core::LinphoneCore::CreateEmptyProxyConfig()
{
Sylvain Berfini's avatar
Sylvain Berfini committed
88
	std::lock_guard<std::recursive_mutex> lock(g_apiLock);
89
	Linphone::Core::LinphoneProxyConfig^ proxyConfig = ref new Linphone::Core::LinphoneProxyConfig();
90 91 92
	return proxyConfig;
}

93
Windows::Foundation::Collections::IVector<Linphone::Core::LinphoneProxyConfig^>^ Linphone::Core::LinphoneCore::GetProxyConfigList() 
94 95 96 97
{
	return nullptr;
}

98
void Linphone::Core::LinphoneCore::ClearAuthInfos() 
99
{
Sylvain Berfini's avatar
Sylvain Berfini committed
100
	std::lock_guard<std::recursive_mutex> lock(g_apiLock);
101
	linphone_core_clear_all_auth_info(this->lc);
102 103
}

104
void Linphone::Core::LinphoneCore::AddAuthInfo(Linphone::Core::LinphoneAuthInfo^ info) 
105
{
Sylvain Berfini's avatar
Sylvain Berfini committed
106
	std::lock_guard<std::recursive_mutex> lock(g_apiLock);
107 108
	linphone_core_add_auth_info(this->lc, info->auth_info);
}
109

110 111
Linphone::Core::LinphoneAuthInfo^ Linphone::Core::LinphoneCore::CreateAuthInfo(Platform::String^ username, Platform::String^ userid, Platform::String^ password, Platform::String^ ha1, Platform::String^ realm)
{
Sylvain Berfini's avatar
Sylvain Berfini committed
112
	std::lock_guard<std::recursive_mutex> lock(g_apiLock);
113 114
	Linphone::Core::LinphoneAuthInfo^ authInfo = ref new Linphone::Core::LinphoneAuthInfo(username, userid, password, ha1, realm);
	return authInfo;
115 116
}

117
void Linphone::Core::LinphoneCore::Iterate() 
118
{
119
	std::lock_guard<std::recursive_mutex> lock(g_apiLock);
120
	linphone_core_iterate(this->lc);
121 122
}

123
void Linphone::Core::LinphoneCore::Destroy() 
124 125 126 127
{

}

128
Linphone::Core::LinphoneAddress^ Linphone::Core::LinphoneCore::InterpretURL(Platform::String^ destination) 
129 130 131 132
{
	return nullptr;
}

133
Linphone::Core::LinphoneCall^ Linphone::Core::LinphoneCore::Invite(Platform::String^ destination) 
134
{
135 136 137 138 139 140 141 142
	std::lock_guard<std::recursive_mutex> lock(g_apiLock);

	const char *cc = Linphone::Core::Utils::pstoccs(destination);
	::LinphoneCall *call = linphone_core_invite(this->lc, cc);
	delete(cc);
	
	Linphone::Core::LinphoneCall^ lCall = reinterpret_cast<Linphone::Core::LinphoneCall^>(linphone_call_get_user_pointer(call));
	return lCall;
143 144
}

145
Linphone::Core::LinphoneCall^ Linphone::Core::LinphoneCore::InviteAddress(Linphone::Core::LinphoneAddress^ to) 
146 147 148 149
{
	return nullptr;
}

150
Linphone::Core::LinphoneCall^ Linphone::Core::LinphoneCore::InviteAddressWithParams(Linphone::Core::LinphoneAddress^ destination, LinphoneCallParams^ params) 
151 152 153 154
{
	return nullptr;
}

155
void Linphone::Core::LinphoneCore::TerminateCall(Linphone::Core::LinphoneCall^ call) 
156
{
157
	linphone_core_terminate_call(this->lc, call->call);
158 159
}

160
Linphone::Core::LinphoneCall^ Linphone::Core::LinphoneCore::GetCurrentCall() 
161
{
162 163 164
	::LinphoneCall *call = linphone_core_get_current_call(this->lc);
	Linphone::Core::LinphoneCall^ lCall = reinterpret_cast<Linphone::Core::LinphoneCall^>(linphone_call_get_user_pointer(call));
	return lCall;
165 166
}

167
Linphone::Core::LinphoneAddress^ Linphone::Core::LinphoneCore::GetRemoteAddress() 
168 169 170 171
{
	return nullptr;
}

172
Platform::Boolean Linphone::Core::LinphoneCore::IsInCall() 
173 174 175 176
{
	return false;
}

177
Platform::Boolean Linphone::Core::LinphoneCore::IsIncomingInvitePending() 
178 179 180 181
{
	return false;
}

182
void Linphone::Core::LinphoneCore::AcceptCall(Linphone::Core::LinphoneCall^ call) 
183
{
184
	
185 186
}

187
void Linphone::Core::LinphoneCore::AcceptCallWithParams(Linphone::Core::LinphoneCall^ call, Linphone::Core::LinphoneCallParams^ params) 
188 189 190 191
{

}

192
void Linphone::Core::LinphoneCore::AcceptCallUpdate(Linphone::Core::LinphoneCall^ call, LinphoneCallParams^ params) 
193 194 195 196
{

}

197
void Linphone::Core::LinphoneCore::DeferCallUpdate(Linphone::Core::LinphoneCall^ call) 
198 199 200 201
{

}

202
void Linphone::Core::LinphoneCore::UpdateCall(Linphone::Core::LinphoneCall^ call, Linphone::Core::LinphoneCallParams^ params) 
203 204 205 206
{

}

207
Linphone::Core::LinphoneCallParams^ Linphone::Core::LinphoneCore::CreateDefaultCallParameters() 
208 209 210 211
{
	return nullptr;
}

212
IVector<Object^>^ Linphone::Core::LinphoneCore::GetCallLogs() 
213
{
214 215 216 217
	std::lock_guard<std::recursive_mutex> lock(g_apiLock);

	IVector<Object^>^ logs = ref new Vector<Object^>();

218
	Linphone::Core::LinphoneCallLog^ log = ref new Linphone::Core::LinphoneCallLog(L"sip:waouf@sip.linphone.org", L"sip:miaou@sip.linphone.org", Linphone::Core::LinphoneCallStatus::Missed, Linphone::Core::CallDirection::Incoming);
219
	logs->Append(log);
220
	log = ref new Linphone::Core::LinphoneCallLog(L"sip:waouf@sip.linphone.org", L"sip:miaou@sip.linphone.org", Linphone::Core::LinphoneCallStatus::Success, Linphone::Core::CallDirection::Outgoing);
221
	logs->Append(log);
222
	log = ref new Linphone::Core::LinphoneCallLog(L"sip:cotcot@sip.linphone.org", L"sip:miaou@sip.linphone.org", Linphone::Core::LinphoneCallStatus::Success, Linphone::Core::CallDirection::Incoming);
223 224 225
	logs->Append(log);

	return logs;
226 227
}

228
void Linphone::Core::LinphoneCore::ClearCallLogs() 
229 230 231 232
{

}

233
void Linphone::Core::LinphoneCore::RemoveCallLog(Linphone::Core::LinphoneCallLog^ log) 
234 235 236 237
{

}

238
void Linphone::Core::LinphoneCore::SetNetworkReachable(Platform::Boolean isReachable) 
239 240 241 242
{

}

243
Platform::Boolean Linphone::Core::LinphoneCore::IsNetworkReachable() 
244 245 246 247
{
	return false;
}

248
void Linphone::Core::LinphoneCore::SetPlaybackGain(float gain) 
249 250 251 252
{

}

253
float Linphone::Core::LinphoneCore::GetPlaybackGain() 
254 255 256 257
{
	return -1;
}

258
void Linphone::Core::LinphoneCore::SetPlayLevel(int level) 
259 260 261 262
{

}

263
int Linphone::Core::LinphoneCore::GetPlayLevel() 
264 265 266 267
{
	return -1;
}

268
void Linphone::Core::LinphoneCore::MuteMic(Platform::Boolean isMuted) 
269 270 271 272
{

}

273
Platform::Boolean Linphone::Core::LinphoneCore::IsMicMuted() 
274 275 276 277
{
	return false;
}

278
void Linphone::Core::LinphoneCore::EnableSpeaker(Platform::Boolean enable) 
279 280 281 282
{

}

283
Platform::Boolean Linphone::Core::LinphoneCore::IsSpeakerEnabled() 
284 285 286 287
{
	return false;
}

288
void Linphone::Core::LinphoneCore::SendDTMF(char16 number) 
289 290 291 292
{

}

293
void Linphone::Core::LinphoneCore::PlayDTMF(char16 number, int duration) 
294 295 296 297
{

}

298
void Linphone::Core::LinphoneCore::StopDTMF() 
299 300 301 302
{

}

303
Linphone::Core::PayloadType^ Linphone::Core::LinphoneCore::FindPayloadType(Platform::String^ mime, int clockRate, int channels) 
304 305 306 307
{
	return nullptr;
}

308
Linphone::Core::PayloadType^ Linphone::Core::LinphoneCore::FindPayloadType(Platform::String^ mime, int clockRate) 
309 310 311 312
{
	return nullptr;
}

313
void Linphone::Core::LinphoneCore::EnablePayloadType(PayloadType^ pt, Platform::Boolean enable) 
314 315 316 317
{

}

318
Windows::Foundation::Collections::IVector<Linphone::Core::PayloadType^>^ Linphone::Core::LinphoneCore::GetAudioCodecs() 
319 320 321 322
{
	return nullptr;
}

323
void Linphone::Core::LinphoneCore::EnableEchoCancellation(Platform::Boolean enable) 
324 325 326 327
{

}

328
Platform::Boolean Linphone::Core::LinphoneCore::IsEchoCancellationEnabled() 
329 330 331 332
{
	return false;
}

333
Platform::Boolean Linphone::Core::LinphoneCore::IsEchoLimiterEnabled() 
334 335 336 337
{
	return false;
}

338
void Linphone::Core::LinphoneCore::StartEchoCalibration(Platform::Object^ data) 
339 340 341 342
{

}

343
void Linphone::Core::LinphoneCore::EnableEchoLimiter(Platform::Boolean enable) 
344 345 346 347
{

}

348
void Linphone::Core::LinphoneCore::SetSignalingTransportsPorts(Transports^ transports) 
349 350 351 352
{

}

353
Linphone::Core::Transports^ Linphone::Core::LinphoneCore::GetSignalingTransportsPorts() 
354 355 356 357
{
	return nullptr;
}

358
void Linphone::Core::LinphoneCore::EnableIPv6(Platform::Boolean enable) 
359 360 361 362
{

}

363
void Linphone::Core::LinphoneCore::SetPresenceInfo(int minuteAway, Platform::String^ alternativeContact, OnlineStatus status) 
364 365 366 367
{

}

368
void Linphone::Core::LinphoneCore::SetStunServer(Platform::String^ stun) 
369 370 371 372
{

}

373
Platform::String^ Linphone::Core::LinphoneCore::GetStunServer() 
374 375 376 377
{
	return nullptr;
}

378
void Linphone::Core::LinphoneCore::SetFirewallPolicy(FirewallPolicy policy) 
379 380 381 382
{

}

383
Linphone::Core::FirewallPolicy Linphone::Core::LinphoneCore::GetFirewallPolicy() 
384
{
385
	return FirewallPolicy::NoFirewall;
386 387
}

388
void Linphone::Core::LinphoneCore::SetRootCA(Platform::String^ path) 
389 390 391 392
{

}

393
void Linphone::Core::LinphoneCore::SetUploadBandwidth(int bw) 
394 395 396 397
{

}

398
void Linphone::Core::LinphoneCore::SetDownloadBandwidth(int bw) 
399 400 401 402
{

}

403
void Linphone::Core::LinphoneCore::SetDownloadPTime(int ptime) 
404 405 406 407
{

}

408
void Linphone::Core::LinphoneCore::SetUploadPTime(int ptime) 
409 410 411 412
{

}

413
void Linphone::Core::LinphoneCore::EnableKeepAlive(Platform::Boolean enable)
414 415 416 417
{

}

418
Platform::Boolean Linphone::Core::LinphoneCore::IsKeepAliveEnabled() 
419 420 421 422
{
	return false;
}

423
void Linphone::Core::LinphoneCore::SetPlayFile(Platform::String^ path) 
424 425 426 427
{

}

428
Platform::Boolean Linphone::Core::LinphoneCore::PauseCall(LinphoneCall^ call) 
429 430 431 432
{
	return false;
}

433
Platform::Boolean Linphone::Core::LinphoneCore::ResumeCall(LinphoneCall^ call) 
434 435 436 437
{
	return false;
}

438
Platform::Boolean Linphone::Core::LinphoneCore::PauseAllCalls() 
439 440 441 442
{
	return false;
}

443
Platform::Boolean Linphone::Core::LinphoneCore::IsInConference() 
444 445 446 447
{
	return false;
}

448
Platform::Boolean Linphone::Core::LinphoneCore::EnterConference() 
449 450 451 452
{
	return false;
}

453
void Linphone::Core::LinphoneCore::LeaveConference() 
454 455 456 457
{

}

458
void Linphone::Core::LinphoneCore::AddToConference(LinphoneCall^ call) 
459 460 461 462
{

}

463
void Linphone::Core::LinphoneCore::AddAllToConference() 
464 465 466 467
{

}

468
void Linphone::Core::LinphoneCore::RemoveFromConference() 
469 470 471 472
{

}

473
void Linphone::Core::LinphoneCore::TerminateConference() 
474 475 476 477
{

}

478
int Linphone::Core::LinphoneCore::GetConferenceSize() 
479 480 481 482
{
	return -1;
}

483
void Linphone::Core::LinphoneCore::TerminateAllCalls() 
484 485 486 487
{

}

488
IVector<Linphone::Core::LinphoneCall^>^ Linphone::Core::LinphoneCore::GetCalls() 
489
{
490 491
	std::lock_guard<std::recursive_mutex> lock(g_apiLock);
	
492
	Vector<Linphone::Core::LinphoneCall^>^ calls = ref new Vector<Linphone::Core::LinphoneCall^>();
493
	return calls;
494 495
}

496
int Linphone::Core::LinphoneCore::GetCallsNb() 
497
{
498
	return linphone_core_get_calls_nb(this->lc);
499 500
}

501
Linphone::Core::LinphoneCall^ Linphone::Core::LinphoneCore::FindCallFromUri(Platform::String^ uri) 
502 503 504 505
{
	return nullptr;
}

506
int Linphone::Core::LinphoneCore::GetMaxCalls() 
507 508 509 510
{
	return -1;
}

511
void Linphone::Core::LinphoneCore::SetMaxCalls(int max) 
512 513 514 515
{

}

516
Platform::Boolean Linphone::Core::LinphoneCore::IsMyself(Platform::String^ uri) 
517 518 519 520
{
	return false;
}

521
Platform::Boolean Linphone::Core::LinphoneCore::IsSoundResourcesLocked() 
522 523 524 525
{
	return false;
}

526
Platform::Boolean Linphone::Core::LinphoneCore::IsMediaEncryptionSupported(MediaEncryption menc) 
527 528 529 530
{
	return false;
}

531
void Linphone::Core::LinphoneCore::SetMediaEncryption(MediaEncryption menc) 
532 533 534 535
{

}

536
Linphone::Core::MediaEncryption Linphone::Core::LinphoneCore::GetMediaEncryption() 
537
{
538
	return MediaEncryption::None;
539 540
}

541
void Linphone::Core::LinphoneCore::SetMediaEncryptionMandatory(Platform::Boolean yesno) 
542 543 544 545
{

}

546
Platform::Boolean Linphone::Core::LinphoneCore::IsMediaEncryptionMandatory() 
547 548 549 550
{
	return false;
}

551
void Linphone::Core::LinphoneCore::EnableTunnel(Platform::Boolean enable) 
552 553 554 555
{

}

556
void Linphone::Core::LinphoneCore::TunnelAutoDetect() 
557 558 559 560
{

}

561
void Linphone::Core::LinphoneCore::TunnelCleanServers() 
562 563 564 565
{

}

566
void Linphone::Core::LinphoneCore::TunnelSetHttpProxy(Platform::String^ host, int port, Platform::String^ username, Platform::String^ password) 
567 568 569 570
{

}

571
void Linphone::Core::LinphoneCore::TunnelAddServerAndMirror(Platform::String^ host, int port, int udpMirrorPort, int roundTripDelay) 
572 573 574 575
{

}

576
Platform::Boolean Linphone::Core::LinphoneCore::IsTunnelAvailable() 
577 578 579 580
{
	return false;
}

581
void Linphone::Core::LinphoneCore::SetUserAgent(Platform::String^ name, Platform::String^ version) 
582 583 584 585
{

}

586
void Linphone::Core::LinphoneCore::SetCPUCount(int count) 
587 588 589 590
{

}

591
int Linphone::Core::LinphoneCore::GetMissedCallsCount() 
592 593 594 595
{
	return -1;
}

596
void Linphone::Core::LinphoneCore::ResetMissedCallsCount() 
597 598 599 600
{

}

601
void Linphone::Core::LinphoneCore::RefreshRegisters() 
602 603 604 605
{

}

606
Platform::String^ Linphone::Core::LinphoneCore::GetVersion() 
607 608 609 610
{
	return nullptr;
}

611
void Linphone::Core::LinphoneCore::SetAudioPort(int port) 
612 613 614 615
{

}

616
void Linphone::Core::LinphoneCore::SetAudioPortRange(int minP, int maxP) 
617 618 619 620
{

}

621
void Linphone::Core::LinphoneCore::SetIncomingTimeout(int timeout) 
622 623 624 625
{

}

626
void Linphone::Core::LinphoneCore::SetInCallTimeout(int timeout) 
627 628 629 630
{

}

631
void Linphone::Core::LinphoneCore::SetMicrophoneGain(float gain) 
632 633 634 635
{

}

636
void Linphone::Core::LinphoneCore::SetPrimaryContact(Platform::String^ displayName, Platform::String^ userName) 
637 638 639 640
{

}

641
void Linphone::Core::LinphoneCore::SetUseSipInfoForDTMFs(Platform::Boolean use) 
642 643 644 645
{

}

646
void Linphone::Core::LinphoneCore::SetUseRFC2833ForDTMFs(Platform::Boolean use) 
647 648 649 650
{

}

651
Linphone::Core::LpConfig^ Linphone::Core::LinphoneCore::GetConfig() 
652 653
{
	return nullptr;
654
}
655

656
Linphone::Core::LinphoneCoreListener^ Linphone::Core::LinphoneCore::CoreListener::get()
657
{
658
	return this->listener;
659 660
}

661 662
void call_state_changed(::LinphoneCore *lc, ::LinphoneCall *call, ::LinphoneCallState cstate, const char *msg) 
{
663
	Linphone::Core::LinphoneCoreListener^ listener = Linphone::Core::Globals::Instance->LinphoneCore->CoreListener;
664 665
	if (listener != nullptr)
	{
666 667 668 669 670 671 672 673
		Linphone::Core::LinphoneCallState state = (Linphone::Core::LinphoneCallState) cstate;
		Linphone::Core::LinphoneCall^ lCall = reinterpret_cast<Linphone::Core::LinphoneCall^>(linphone_call_get_user_pointer(call));
		if (lCall == nullptr)  
		{
			lCall = (Linphone::Core::LinphoneCall^)Linphone::Core::Utils::CreateLinphoneCall(call);
		}
		listener->CallState(lCall, state);
	}
674 675
}

676
void registration_state_changed(::LinphoneCore *lc, ::LinphoneProxyConfig *cfg, ::LinphoneRegistrationState cstate, const char *msg)
677
{
Sylvain Berfini's avatar
Sylvain Berfini committed
678
	Linphone::Core::LinphoneCoreListener^ listener = Linphone::Core::Globals::Instance->LinphoneCore->CoreListener;
679 680
	if (listener != nullptr)
	{
Sylvain Berfini's avatar
Sylvain Berfini committed
681 682 683 684
		Linphone::Core::RegistrationState state = (Linphone::Core::RegistrationState) cstate;
		Linphone::Core::LinphoneProxyConfig^ config = reinterpret_cast<Linphone::Core::LinphoneProxyConfig^>(linphone_proxy_config_get_user_data(cfg));
		listener->RegistrationState(config, state, Linphone::Core::Utils::cctops(msg));
	}
685 686 687 688
}

void global_state_changed(::LinphoneCore *lc, ::LinphoneGlobalState gstate, const char *msg)
{
689 690 691 692 693 694
	Linphone::Core::LinphoneCoreListener^ listener = Linphone::Core::Globals::Instance->LinphoneCore->CoreListener;
	if (listener != nullptr)
	{
		Linphone::Core::GlobalState state = (Linphone::Core::GlobalState) gstate;
		listener->GlobalState(state, Linphone::Core::Utils::cctops(msg));
	}
695 696
}

Sylvain Berfini's avatar
Sylvain Berfini committed
697 698 699 700 701 702 703 704 705
void auth_info_requested(LinphoneCore *lc, const char *realm, const char *username) 
{
	Linphone::Core::LinphoneCoreListener^ listener = Linphone::Core::Globals::Instance->LinphoneCore->CoreListener;
	if (listener != nullptr)
	{
		listener->AuthInfoRequested(Linphone::Core::Utils::cctops(realm), Linphone::Core::Utils::cctops(username));
	}
}

706
Linphone::Core::LinphoneCore::LinphoneCore(LinphoneCoreListener^ coreListener) :
707 708
	listener(coreListener),
	lc(nullptr)
709 710 711 712 713
{

}

void Linphone::Core::LinphoneCore::Init()
714
{
715 716 717 718 719
	LinphoneCoreVTable *vtable = (LinphoneCoreVTable*) malloc(sizeof(LinphoneCoreVTable));
	memset (vtable, 0, sizeof(LinphoneCoreVTable));
	vtable->global_state_changed = global_state_changed;
	vtable->registration_state_changed = registration_state_changed;
	vtable->call_state_changed = call_state_changed;
Sylvain Berfini's avatar
Sylvain Berfini committed
720
	vtable->auth_info_requested = auth_info_requested;
721

722
	this->lc = linphone_core_new(vtable, NULL, "Assets/linphone_rc", NULL);
723 724
}

725
Linphone::Core::LinphoneCore::~LinphoneCore()
726
{
Sylvain Berfini's avatar
Sylvain Berfini committed
727
	
728
}