6 #ifndef ZDK_NET_Account_h
7 #define ZDK_NET_Account_h
9 #include "native_shared_ptr.h"
10 #include "PublicInterfaces.h"
11 #include "AccountConfig.h"
12 #include "AccountStatus.h"
13 #include "AudioVideoCodecs.h"
14 #include "AccountEventsHandler.h"
15 #include "MessageType.h"
16 #include "ContactStateType.h"
18 #include "SIPProbeEventsHandler.h"
19 #include "SecureUserConfigType.h"
24 using namespace System::Collections::Generic;
28 ref class AccountConfig;
29 ref class AccountEventsHandler;
31 ref class SIPProbeEventsHandler;
44 static bool RegisterEventListeners()
46 std::shared_ptr<GeneralStatusEventListener> AccountEventsHandler_Listener_tmp = std::make_shared<GeneralStatusEventListener>();
47 AccountEventsHandler_Listener = AccountEventsHandler_Listener_tmp.get();
48 listenersMap->try_emplace(
reinterpret_cast<intptr_t
>(AccountEventsHandler_Listener), std::move(AccountEventsHandler_Listener_tmp));
49 std::shared_ptr<GeneralStatusEventListener> SIPProbeEventsHandler_Listener_tmp = std::make_shared<GeneralStatusEventListener>();
50 SIPProbeEventsHandler_Listener = SIPProbeEventsHandler_Listener_tmp.get();
51 listenersMap->try_emplace(
reinterpret_cast<intptr_t
>(SIPProbeEventsHandler_Listener), std::move(SIPProbeEventsHandler_Listener_tmp));
55 static bool RegisteredEventListeners = RegisterEventListeners();
57 ZDK::IAccount* cppRef =
nullptr;
59 Account(ZDK::Shared::Account src);
69 property long long UserHandle
92 property long long AccountID
101 property System::String^ AccountName
103 System::String^ get();
104 void set(System::String^ value);
113 property ZDK_NET::AccountStatus RegistrationStatus
115 ZDK_NET::AccountStatus get();
127 property List<ZDK_NET::AudioVideoCodecs>^ MediaCodecs
129 List<ZDK_NET::AudioVideoCodecs>^ get();
130 void set(List<ZDK_NET::AudioVideoCodecs>^ value);
133 property int ActualRegistrationExpiry
389 ZDK_NET::Result^
ProbeSipTransport(System::String^ domain, System::String^ outboundProxy, System::String^ username, System::String^ authUsername, System::String^ password);
442 virtual long long Handle()
override;
444 virtual void Initialize()
override;
446 virtual void ReleaseReference()
override;
API invocation status result.
Definition: Result.h:24
System::String ^ GenerateUUID(bool noPrefix, int bufLen)
Generate a random UUID.
Definition: SIPProbeEventsHandler.h:74
ZDK_NET::Result ^ RegisterAccount()
Registers the user to the configured service.
ZDK_NET::Result ^ ChatSessionEnd(System::String^ pPeer)
End a chat session.
void DropProbeEventListener(ZDK_NET::SIPProbeEventsHandler^ value)
Removes a specific already added SIP probe event listener.
void SetStatusEventListener(ZDK_NET::AccountEventsHandler^ value)
Adds a new account event listener.
ZDK_NET::Result ^ CreateUser()
Creates a new user account.
ZDK_NET::Message ^ CreateMessage(ZDK_NET::MessageType type)
Creates a new EMPTY chat message with the given type.
General account configuration.
Definition: AccountConfig.h:29
void ClearMediaCodecs()
Clears the account's codec list.
Definition: GeneralStatusEventListener.h:90
The main account class.
Definition: Account.h:38
ZDK_NET::Result ^ SetPresenceStatus(ZDK_NET::ContactStateType status, System::String^ message)
Start a presence publication for the user.
ZDK_NET::Result ^ ProbeSipTransport(System::String^ domain, System::String^ outboundProxy, System::String^ username, System::String^ authUsername, System::String^ password)
Probes for available transports for the given SIP settings.
Definition: AccountEventsHandler.h:162
void SetProbeEventListener(ZDK_NET::SIPProbeEventsHandler^ value)
Adds a new SIP probe event listener.
ZDK_NET::Result ^ UnRegister()
Cancels registration and/or unregisters the user.
ZDK_NET::Result ^ ReplaceUserRegistration()
Replace user registration.
ZDK_NET::Call ^ CreateCall(System::String^ calleeNumber, bool handlingVoipPhoneCallEvents, bool video)
Creates and starts an outgoing call.
List< Call^> ^ GetActiveCalls()
Gets a list with all account's active/ongoing calls.
void DropStatusEventListener(ZDK_NET::AccountEventsHandler^ value)
Removes a specific already added account event listener.
ZDK_NET::Result ^ RemoveUser()
Destroys an user account object.
ZDK_NET::Result ^ SetTlsConfig(ZDK_NET::SecureUserConfigType userConf, System::String^ fileName, System::String^ passPhrase)
Configure TLS for a user.
ZDK_NET::Result ^ TerminateConnection()
Terminates user's TCP-based connection.