ZDK
IAccount.h
1 #ifndef __IAccount__
2 #define __IAccount__
3 
4 #include "Types/AccountStatus.h"
5 #include "Types/ContactStateType.h"
6 #include "Types/SharedPointerTypes.h"
7 #include "IZHandle.h"
8 
9 namespace ZDK
10 {
11 
12 class ICall;
13 
14 class IMessageEventsHandler;
15 class IVideoEventsHandler;
16 
17 class IMSRPFileTransferHandler;
18 
19 //# @abi(all) documentation
22 class IAccount : public virtual ZDK::IZHandle
23 {
24 public:
25  //# @abi(all) documentation
32  //# @abi(all) property
33  virtual ZDK::ZDKHandle UserHandle() const = 0;
34 
35  //# @abi(all) documentation
44  //# @abi(all) property
45  virtual void Configuration(ZDK::Shared::AccountConfig value) = 0;
46 
47  //# @abi(all) documentation
56  //# @abi(all) property
57  virtual ZDK::Shared::AccountConfig Configuration() const = 0;
58 
59  //# @abi(all) documentation
69  virtual ZDK::Shared::Result RegisterAccount() = 0;
70 
71  //# @abi(all) documentation
82  virtual ZDK::Shared::Result UnRegister() = 0;
83 
84  //# @abi(all) documentation
95  virtual ZDK::Shared::Result CreateUser() = 0;
96 
97  //# @abi(all) documentation
109  virtual ZDK::Shared::Result RemoveUser() = 0;
110 
111  //# @abi(all) documentation
116  //# @abi(all) property
117  virtual ZDK::ZDKHandle AccountID() const = 0;
118 
119  //# @abi(all) documentation
124  //# @abi(all) property
125  //# @abi(all) @param(return) nullable
126  virtual ZDK::Shared::String AccountName() const = 0;
127 
128  //# @abi(all) documentation
133  //# @abi(all) property
134  //# @abi(all) @param(value) nullable
135  virtual void AccountName(ZDK::Shared::String value) = 0;
136 
137  //# @abi(all) documentation
144  //# @abi(all) property
145  virtual ZDK::AccountStatus RegistrationStatus() const = 0;
146 
147  //# @abi(all) documentation
154  virtual void ClearMediaCodecs() = 0;
155 
156  //# @abi(all) documentation
166  //# @abi(all) property
167  virtual ZDK::Shared::ItemList<ZDK::AudioVideoCodecs> MediaCodecs() const = 0;
168 
169  //# @abi(all) documentation
179  //# @abi(all) property
180  virtual void MediaCodecs(ZDK::Shared::ItemList<ZDK::AudioVideoCodecs> value) = 0;
181 
182  //# @abi(all) documentation
191  //# @abi(obj_c|jni) @param(value) delegate|register
192  virtual void SetStatusEventListener(ZDK::Shared::AccountEventsHandler value) = 0;
193 
194  //# @abi(all) documentation
203  //# @abi(obj_c|jni) @param(value) delegate|unregister
204  virtual void DropStatusEventListener(ZDK::Shared::AccountEventsHandler value) = 0;
205 
206  //# @abi(all) documentation
221  //# @abi(obj_c|jni) @param(return) nullable
222  virtual ZDK::Shared::Call CreateCall(ZDK::Shared::String calleeNumber, bool handlingVoipPhoneCallEvents, bool video) = 0;
223 
224  //# @abi(all) documentation
231  virtual ZDK::Shared::ItemList<ZDK::Shared::Call> GetActiveCalls() const = 0;
232 
233  //# @abi(all) documentation
242  virtual ZDK::Shared::Message CreateMessage(ZDK::MessageType type) = 0;
243 
244  //# @abi(all) documentation
253  virtual ZDK::Shared::Result ChatSessionEnd(ZDK::Shared::String pPeer) = 0;
254 
255  //# @abi(all) documentation
268  //# @abi(obj_c|jni) @param(message) nullable
269  virtual ZDK::Shared::Result SetPresenceStatus(ZDK::ContactStateType status, ZDK::Shared::String message) = 0;
270 
271  virtual ZDK::Shared::Result StartPush(bool shouldReregister, bool enableRtpMediaProxy) = 0;
272  virtual ZDK::Shared::Result StopPushAndUnregister(bool shouldRegister) = 0;
273  virtual ZDK::Shared::Result RelinquishCallOwnership(ZDK::Shared::Call call) = 0;
274 
275  //# @abi(all) documentation
278  //# @abi(obj_c|jni) @param(newPushURI) nullable
279  virtual void UpdatePushURI(ZDK::Shared::String newPushURI) = 0;
280 
281  //# @abi(all) documentation
284  //# @abi(obj_c|jni) @param(newPushToken) nullable
285  virtual void UpdatePushToken(ZDK::Shared::String newPushToken) = 0;
286 
287  //# @abi(all) documentation
290  //# @abi(obj_c|jni) @param(newPushType) nullable
291  virtual void UpdatePushType(ZDK::Shared::String newPushType) = 0;
292 
293  //# @abi(all) documentation
296  //# @abi(all) property
297  //# @abi(all) @param(return) nullable
298  virtual ZDK::Shared::String PushURI() const = 0;
299 
300  //# @abi(all) documentation
303  //# @abi(all) property
304  //# @abi(all) @param(value) nullable
305  virtual void PushURI(ZDK::Shared::String value) = 0;
306 
307  //# @abi(all) documentation
312  //# @abi(obj_c|jni) ignore
313  virtual ZDK::Shared::FileTransfer InitiateFileTransfer(/*IFileTransferEventsHandler* iFileTransferStatusListener*/) = 0;
314 
315  //# @abi(all) documentation
340  virtual ZDK::Shared::String GenerateUUID(bool noPrefix, int bufLen) = 0;
341 
342  //# @abi(all) documentation
365  virtual ZDK::Shared::Result ReplaceUserRegistration() = 0;
366 
376  //# @abi(all) property
377  virtual int ActualRegistrationExpiry() = 0;
378 
379  //# @abi(all) documentation
388  //# @abi(obj_c|jni) @param(value) delegate|register
389  virtual void SetProbeEventListener(ZDK::Shared::SIPProbeEventsHandler value) = 0;
390 
391  //# @abi(all) documentation
400  //# @abi(obj_c|jni) @param(value) delegate|unregister
401  virtual void DropProbeEventListener(ZDK::Shared::SIPProbeEventsHandler value) = 0;
402 
403  //# @abi(all) documentation
443  virtual ZDK::Shared::Result ProbeSipTransport(ZDK::Shared::String domain, ZDK::Shared::String outboundProxy,
444  ZDK::Shared::String username, ZDK::Shared::String authUsername,
445  ZDK::Shared::String password) = 0;
446 
447  //# @abi(all) documentation
457  virtual ZDK::Shared::Result TerminateConnection() = 0;
458 };
459 
460 } //namespace ZDK
461 
462 #endif //__IAccount__
virtual ZDK::Shared::Result RegisterAccount()=0
Registers the user to the configured service.
virtual ZDK::Shared::Call CreateCall(ZDK::Shared::String calleeNumber, bool handlingVoipPhoneCallEvents, bool video)=0
Creates and starts an outgoing call.
virtual ZDK::AccountStatus RegistrationStatus() const =0
Gets the current account registration status.
virtual ZDK::Shared::String AccountName() const =0
Gets the account name.
Definition: IZHandle.h:12
virtual int ActualRegistrationExpiry()=0
Get the user registration expiry time.
virtual void UpdatePushType(ZDK::Shared::String newPushType)=0
WILL BE MOVED IN IPushConfig!
virtual void UpdatePushToken(ZDK::Shared::String newPushToken)=0
WILL BE MOVED IN IPushConfig!
virtual void DropStatusEventListener(ZDK::Shared::AccountEventsHandler value)=0
Removes a specific already added account event listener.
virtual ZDK::ZDKHandle AccountID() const =0
Gets the ID of the account.
virtual void DropProbeEventListener(ZDK::Shared::SIPProbeEventsHandler value)=0
Removes a specific already added SIP probe event listener.
The main account class.
Definition: IAccount.h:22
virtual ZDK::Shared::String GenerateUUID(bool noPrefix, int bufLen)=0
Generate a random UUID.
virtual ZDK::Shared::Result UnRegister()=0
Cancels registration and/or unregisters the user.
virtual void SetProbeEventListener(ZDK::Shared::SIPProbeEventsHandler value)=0
Adds a new SIP probe event listener.
virtual ZDK::Shared::Result SetPresenceStatus(ZDK::ContactStateType status, ZDK::Shared::String message)=0
Start a presence publication for the user.
virtual ZDK::Shared::Result ChatSessionEnd(ZDK::Shared::String pPeer)=0
End a chat session.
virtual ZDK::ZDKHandle UserHandle() const =0
Gets the underlying user handler ID.
virtual ZDK::Shared::Result TerminateConnection()=0
Terminates user&#39;s TCP-based connection.
virtual ZDK::Shared::ItemList< ZDK::AudioVideoCodecs > MediaCodecs() const =0
Gets the account&#39;s codecs allowed to be used.
virtual void UpdatePushURI(ZDK::Shared::String newPushURI)=0
WILL BE MOVED IN IPushConfig!
Definition: IAccountConfig.h:10
virtual ZDK::Shared::FileTransfer InitiateFileTransfer()=0
Initiates a new file transfer.
virtual ZDK::Shared::Message CreateMessage(ZDK::MessageType type)=0
Creates a new EMPTY chat message with the given type.
virtual void ClearMediaCodecs()=0
Clears the account&#39;s codec list.
virtual ZDK::Shared::Result ReplaceUserRegistration()=0
Replace user registration.
virtual void SetStatusEventListener(ZDK::Shared::AccountEventsHandler value)=0
Adds a new account event listener.
virtual ZDK::Shared::Result RemoveUser()=0
Destroys an user account object.
virtual ZDK::Shared::Result CreateUser()=0
Creates a new user account.
virtual ZDK::Shared::AccountConfig Configuration() const =0
Gets a COPY of the account configuration.
virtual ZDK::Shared::ItemList< ZDK::Shared::Call > GetActiveCalls() const =0
Gets a list with all account&#39;s active/ongoing calls.
virtual ZDK::Shared::Result ProbeSipTransport(ZDK::Shared::String domain, ZDK::Shared::String outboundProxy, ZDK::Shared::String username, ZDK::Shared::String authUsername, ZDK::Shared::String password)=0
Probes for available transports for the given SIP settings.
virtual ZDK::Shared::String PushURI() const =0
WILL BE MOVED IN IPushConfig!