linphone::PushNotificationConfig Class Reference

Object holding push notification config that will be set in the contact URI parameters of the Contact header in the REGISTER, if the AccountParams is configured to allow push notifications, see AccountParams::setPushNotificationAllowed(). More...

`#include <push_notification_config.hh>`

Inheritance diagram for linphone::PushNotificationConfig:

## Public Member Functions

LINPHONECXX_PUBLIC | PushNotificationConfig (void *ptr, bool takeRef=true)
LINPHONECXX_PUBLIC _LinphonePushNotificationConfig * | cPtr ()
LINPHONECXX_PUBLIC std::string | getBundleIdentifier () const
| Gets the app's bundle identifier for "contact uri parameter".
LINPHONECXX_PUBLIC void | setBundleIdentifier (const std::string &bundleIdentifier)
| Sets the bundle_identifier for "contact uri parameter".
LINPHONECXX_PUBLIC std::string | getCallSnd () const
| Gets the call_snd for "contact uri parameter".
LINPHONECXX_PUBLIC void | setCallSnd (const std::string &callSnd)
| Sets the call_snd for "contact uri parameter", specific for remote push notification.
LINPHONECXX_PUBLIC std::string | getCallStr () const
| Gets the call_str for "contact uri parameter".
LINPHONECXX_PUBLIC void | setCallStr (const std::string &callStr)
| Sets the call_str for "contact uri parameter", specific for remote push notification.
LINPHONECXX_PUBLIC std::string | getGroupChatStr () const
| Gets the groupchat_str for "contact uri parameter".
LINPHONECXX_PUBLIC void | setGroupChatStr (const std::string &groupChatStr)
| Sets the group_chat_str for "contact uri parameter", specific for remote push notification.
LINPHONECXX_PUBLIC std::string | getMsgSnd () const
| Gets the msg_snd for "contact uri parameter".
LINPHONECXX_PUBLIC void | setMsgSnd (const std::string &msgSnd)
| Sets the msg_snd for "contact uri parameter", specific for remote push notification.
LINPHONECXX_PUBLIC std::string | getMsgStr () const
| Gets the msg_str for "contact uri parameter".
LINPHONECXX_PUBLIC void | setMsgStr (const std::string &msgStr)
| Sets the msg_str for "contact uri parameter", specific for remote push notification.
LINPHONECXX_PUBLIC std::string | getParam () const
| Gets the param for "contact uri parameter".
LINPHONECXX_PUBLIC void | setParam (const std::string &param)
| Sets the param for "contact uri parameter".
LINPHONECXX_PUBLIC std::string | getPrid () const
| Gets the prid for "contact uri parameter".
LINPHONECXX_PUBLIC void | setPrid (const std::string &prid)
| Sets the prid for "contact uri parameter".
LINPHONECXX_PUBLIC std::string | getProvider () const
| Gets the provider for "contact uri parameter".
LINPHONECXX_PUBLIC void | setProvider (const std::string &provider)
| Sets the provider for "contact uri parameter".
LINPHONECXX_PUBLIC void | setRemotePushInterval (const std::string &remotePushInterval)
| Specifies the interval in seconds between to subsequent remote push notifications when remote push notifications are used to notify a call invite to clients that haven't published any token for VoIP and background push notifications.
LINPHONECXX_PUBLIC std::string | getRemoteToken () const
| Gets the remote token for "contact uri parameter".
LINPHONECXX_PUBLIC void | setRemoteToken (const std::string &remoteToken)
| Sets the remote_token for "contact uri parameter", specific for remote push notification.
LINPHONECXX_PUBLIC std::string | getTeamId () const
| Gets the team id for "contact uri parameter".
LINPHONECXX_PUBLIC void | setTeamId (const std::string &teamId)
| Sets the team id for "contact uri parameter".
LINPHONECXX_PUBLIC std::string | getVoipToken () const
| Gets the voip token for "contact uri parameter".
LINPHONECXX_PUBLIC void | setVoipToken (const std::string &voipToken)
| Sets the voip_token for "contact uri parameter", specific for voip push notification.
LINPHONECXX_PUBLIC std::shared_ptr< linphone::PushNotificationConfig > | clone () const
| Instantiate a new push notification parameters with values from source.
LINPHONECXX_PUBLIC bool | isEqual (const std::shared_ptr< const linphone::PushNotificationConfig > &otherConfig) const
| Checks if two Push Notification Configurations are identical.

## Detailed Description

Object holding push notification config that will be set in the contact URI parameters of the Contact header in the REGISTER, if the AccountParams is configured to allow push notifications, see AccountParams::setPushNotificationAllowed().

This object can be accessed through the AccountParams object, which can be obtained from your Account object.

## Member Function Documentation

## clone()

LINPHONECXX_PUBLIC std::shared_ptr< linphone::PushNotificationConfig > linphone::PushNotificationConfig::clone | ( |  | ) | const

Instantiate a new push notification parameters with values from source.

Returns
  The newly created PushNotificationConfig object.

## getBundleIdentifier()

LINPHONECXX_PUBLIC std::string linphone::PushNotificationConfig::getBundleIdentifier | ( |  | ) | const

Gets the app's bundle identifier for "contact uri parameter".

Returns
  The app's bundle identifier if set, nullptr otherwise.

## getCallSnd()

LINPHONECXX_PUBLIC std::string linphone::PushNotificationConfig::getCallSnd | ( |  | ) | const

Gets the call_snd for "contact uri parameter".

Returns
  The call_snd, default value "notes_of_the_optimistic.caf".

## getCallStr()

LINPHONECXX_PUBLIC std::string linphone::PushNotificationConfig::getCallStr | ( |  | ) | const

Gets the call_str for "contact uri parameter".

Returns
  The call_str, default value "IC_MSG".

## getGroupChatStr()

LINPHONECXX_PUBLIC std::string linphone::PushNotificationConfig::getGroupChatStr | ( |  | ) | const

Gets the groupchat_str for "contact uri parameter".

Returns
  The groupchat_str, default value "GC_MSG".

## getMsgSnd()

LINPHONECXX_PUBLIC std::string linphone::PushNotificationConfig::getMsgSnd | ( |  | ) | const

Gets the msg_snd for "contact uri parameter".

Returns
  The msg_snd, default value "msg.caf".

## getMsgStr()

LINPHONECXX_PUBLIC std::string linphone::PushNotificationConfig::getMsgStr | ( |  | ) | const

Gets the msg_str for "contact uri parameter".

Returns
  The msg_str, default value "IM_MSG".

## getParam()

LINPHONECXX_PUBLIC std::string linphone::PushNotificationConfig::getParam | ( |  | ) | const

Gets the param for "contact uri parameter".

Returns
  The param if set, nullptr otherwise.

## getPrid()

LINPHONECXX_PUBLIC std::string linphone::PushNotificationConfig::getPrid | ( |  | ) | const

Gets the prid for "contact uri parameter".

Returns
  The prid if set, nullptr otherwise.

## getProvider()

LINPHONECXX_PUBLIC std::string linphone::PushNotificationConfig::getProvider | ( |  | ) | const

Gets the provider for "contact uri parameter".

Returns
  The provider if set, nullptr otherwise.

## getRemoteToken()

LINPHONECXX_PUBLIC std::string linphone::PushNotificationConfig::getRemoteToken | ( |  | ) | const

Gets the remote token for "contact uri parameter".

Returns
  The remote token if set, nullptr otherwise.

## getTeamId()

LINPHONECXX_PUBLIC std::string linphone::PushNotificationConfig::getTeamId | ( |  | ) | const

Gets the team id for "contact uri parameter".

Returns
  The team id if set, nullptr otherwise.

## getVoipToken()

LINPHONECXX_PUBLIC std::string linphone::PushNotificationConfig::getVoipToken | ( |  | ) | const

Gets the voip token for "contact uri parameter".

Returns
  The voip token if set, nullptr otherwise.

## isEqual()

LINPHONECXX_PUBLIC bool linphone::PushNotificationConfig::isEqual | ( | const std::shared_ptr< const linphone::PushNotificationConfig > & | otherConfig | ) | const

Checks if two Push Notification Configurations are identical.

Parameters

  otherConfig | The PushNotificationConfig object to compare to.

Returns
  True only if the two configurations are identical.

## setBundleIdentifier()

LINPHONECXX_PUBLIC void linphone::PushNotificationConfig::setBundleIdentifier | ( | const std::string & | bundleIdentifier | ) |

Sets the bundle_identifier for "contact uri parameter".

It's not necessary if param is set. See setParam().

Parameters

  bundleIdentifier | The new bundle_identifier set for push notification config.

## setCallSnd()

LINPHONECXX_PUBLIC void linphone::PushNotificationConfig::setCallSnd | ( | const std::string & | callSnd | ) |

Sets the call_snd for "contact uri parameter", specific for remote push notification.

Parameters

  callSnd | The new call_snd set for push notification config.

## setCallStr()

LINPHONECXX_PUBLIC void linphone::PushNotificationConfig::setCallStr | ( | const std::string & | callStr | ) |

Sets the call_str for "contact uri parameter", specific for remote push notification.

Parameters

  callStr | The new call_str set for push notification config.

## setGroupChatStr()

LINPHONECXX_PUBLIC void linphone::PushNotificationConfig::setGroupChatStr | ( | const std::string & | groupChatStr | ) |

Sets the group_chat_str for "contact uri parameter", specific for remote push notification.

Parameters

  groupChatStr | The new group_chat_str set for push notification config.

## setMsgSnd()

LINPHONECXX_PUBLIC void linphone::PushNotificationConfig::setMsgSnd | ( | const std::string & | msgSnd | ) |

Sets the msg_snd for "contact uri parameter", specific for remote push notification.

Parameters

  msgSnd | The new msg_snd set for push notification config.

## setMsgStr()

LINPHONECXX_PUBLIC void linphone::PushNotificationConfig::setMsgStr | ( | const std::string & | msgStr | ) |

Sets the msg_str for "contact uri parameter", specific for remote push notification.

Parameters

  msgStr | The new msg_str set for push notification config.

## setParam()

LINPHONECXX_PUBLIC void linphone::PushNotificationConfig::setParam | ( | const std::string & | param | ) |

Sets the param for "contact uri parameter".

If it's not set, "team_id.bundle_identifier.services" will be used.

Parameters

  param | The new param set for push notification config.

## setPrid()

LINPHONECXX_PUBLIC void linphone::PushNotificationConfig::setPrid | ( | const std::string & | prid | ) |

Sets the prid for "contact uri parameter".

If it's not set, "voip_token&remote_token" will be used.

Parameters

  prid | The new prid set for push notification config.

## setProvider()

LINPHONECXX_PUBLIC void linphone::PushNotificationConfig::setProvider | ( | const std::string & | provider | ) |

Sets the provider for "contact uri parameter".

If not set, the default value will be used for "contact uri parameter", "firebase" for android or "apns" for ios.

Parameters

  provider | The new provider set for push notification config.

## setRemotePushInterval()

LINPHONECXX_PUBLIC void linphone::PushNotificationConfig::setRemotePushInterval | ( | const std::string & | remotePushInterval | ) |

Specifies the interval in seconds between to subsequent remote push notifications when remote push notifications are used to notify a call invite to clients that haven't published any token for VoIP and background push notifications.

In that case, several PNs are sent subsequently until the call is picked up, declined or canceled. This parameter sets a value for 'pn-call-remote-push-interval' Contact header inside SIP REGISTER requests. A value of zero will cause the deactivation of push notification repetitions and the sending of the final notification. Thus, only the first push notification will be sent. If specified the value must be in [0;30] If not specified 'pn-call-remote-push-interval' will not be added to Contact header.

Parameters

  remotePushInterval | The new remote push interval set for push notification config.

## setRemoteToken()

LINPHONECXX_PUBLIC void linphone::PushNotificationConfig::setRemoteToken | ( | const std::string & | remoteToken | ) |

Sets the remote_token for "contact uri parameter", specific for remote push notification.

It's not necessary if prid is set. See setPrid().

Parameters

  remoteToken | The new remote_token set for push notification config.

## setTeamId()

LINPHONECXX_PUBLIC void linphone::PushNotificationConfig::setTeamId | ( | const std::string & | teamId | ) |

Sets the team id for "contact uri parameter".

It's not necessary if param is set. See setParam().

Parameters

  teamId | The new team id set for push notification config.

## setVoipToken()

LINPHONECXX_PUBLIC void linphone::PushNotificationConfig::setVoipToken | ( | const std::string & | voipToken | ) |

Sets the voip_token for "contact uri parameter", specific for voip push notification.

It's not necessary if prid is set. See setPrid().

Parameters

  voipToken | The new voip_token set for push notification config.

The documentation for this class was generated from the following file:

- push_notification_config.hh