PortSIP VoIP SDK Manual for iOS  16.2
PortSIP features our newest, supported, quality-assured VoIP SDK used by Several hundred companies around the world for easy VoIP application develop and quality-assured code.
Functions
Presence events

Functions

(void) - <PortSIPEventDelegate >::onPresenceRecvSubscribe:fromDisplayName:from:subject:
 
(void) - <PortSIPEventDelegate >::onPresenceOnline:from:stateText:
 
(void) - <PortSIPEventDelegate >::onPresenceOffline:from:
 

Detailed Description

Function Documentation

◆ onPresenceRecvSubscribe:fromDisplayName:from:subject:()

- (void PortSIPEventDelegate) onPresenceRecvSubscribe: (long)  subscribeId
fromDisplayName: (char *)  fromDisplayName
from: (char *)  from
subject: (char *)  subject 

This event will be triggered when receiving the SUBSCRIBE request from a contact.

Parameters
subscribeIdThe ID of SUBSCRIBE request.
fromDisplayNameThe display name of contact.
fromThe contact who sends the SUBSCRIBE request.
subjectThe subject of the SUBSCRIBE request.

◆ onPresenceOnline:from:stateText:()

- (void PortSIPEventDelegate) onPresenceOnline: (char *)  fromDisplayName
from: (char *)  from
stateText: (char *)  stateText 

This event will be triggered when the contact is online or changes presence status.

Parameters
fromDisplayNameThe display name of contact.
fromThe contact who sends the SUBSCRIBE request.
stateTextThe presence status text.

◆ onPresenceOffline:from:()

- (void PortSIPEventDelegate) onPresenceOffline: (char *)  fromDisplayName
from: (char *)  from 

When the contact status is changed to offline, this event will be triggered.

Parameters
fromDisplayNameThe display name of contact.
fromThe contact who sends the SUBSCRIBE request