Liblinphone: linphone::CallLog Class Reference

Liblinphone 5.0.0

Public Member Functions | List of all members
linphone::CallLog Class Reference

Object used to keep track of all calls initiated, received or missed. More...

`#include <call_log.hh>`

Inheritance diagram for linphone::CallLog:

## Public Member Functions
| CallLog (void *ptr, bool takeRef=true)
LINPHONECXX_PUBLIC _LinphoneCallLog * | cPtr ()
LINPHONECXX_PUBLIC std::string | getCallId () const
| Get the call ID used by the call. More...
LINPHONECXX_PUBLIC linphone::Call::Dir | getDir () const
| Get the direction of the call. More...
LINPHONECXX_PUBLIC int | getDuration () const
| Get the duration of the call since connected. More...
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::ErrorInfo > | getErrorInfo () const
| When the call was failed, return an object describing the failure. More...
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::Address > | getFromAddress () const
| Get the origin address (ie from) of the call. More...
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::Address > | getLocalAddress () const
| Get the local address (that is from or to depending on call direction) More...
LINPHONECXX_PUBLIC float | getQuality () const
| Get the overall quality indication of the call. More...
LINPHONECXX_PUBLIC std::string | getRefKey () const
| Get the persistent reference key associated to the call log. More...
LINPHONECXX_PUBLIC void | setRefKey (const std::string &refkey)
| Associate a persistent reference key to the call log. More...
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::Address > | getRemoteAddress () const
| Get the remote address (that is from or to depending on call direction). More...
LINPHONECXX_PUBLIC time_t | getStartDate () const
| Get the start date of the call. More...
LINPHONECXX_PUBLIC linphone::Call::Status | getStatus () const
| Get the status of the call. More...
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::Address > | getToAddress () const
| Get the destination address (ie to) of the call. More...
LINPHONECXX_PUBLIC bool | videoEnabled () const
| Tell whether video was enabled at the end of the call or not. More...
LINPHONECXX_PUBLIC std::string | toStr () const
| Get a human readable string describing the call. More...
LINPHONECXX_PUBLIC bool | wasConference () const
| Tells whether that call was a call to a conference server. More...

## Detailed Description

Object used to keep track of all calls initiated, received or missed.

It contains the call ID, date & time at which the call took place and it's duration (0 if it wasn't answered). You can also know if video was enabled or not or if it was a conference, as well as it's average quality. If needed, you can also create a fake CallLog using Core::createCallLog(), otherwise use Core::getCallLogs() or even Call::getCallLog() to get the log of an ongoing call.

## Member Function Documentation

## ◆ getCallId()

LINPHONECXX_PUBLIC std::string linphone::CallLog::getCallId | ( |  | ) | const

Get the call ID used by the call.

Returns
  The call ID used by the call as a string.

## ◆ getDir()

LINPHONECXX_PUBLIC linphone::Call::Dir linphone::CallLog::getDir | ( |  | ) | const

Get the direction of the call.

Returns
  The Call::Dir of the call.

## ◆ getDuration()

LINPHONECXX_PUBLIC int linphone::CallLog::getDuration | ( |  | ) | const

Get the duration of the call since connected.

Returns
  The duration of the call in seconds.

## ◆ getErrorInfo()

LINPHONECXX_PUBLIC std::shared_ptr<const linphone::ErrorInfo> linphone::CallLog::getErrorInfo | ( |  | ) | const

When the call was failed, return an object describing the failure.

Returns
  ErrorInfo about the error encountered by the call associated with this call log or nullptr.

## ◆ getFromAddress()

LINPHONECXX_PUBLIC std::shared_ptr<const linphone::Address> linphone::CallLog::getFromAddress | ( |  | ) | const

Get the origin address (ie from) of the call.

Returns
  The origin Address (ie from) of the call.

## ◆ getLocalAddress()

LINPHONECXX_PUBLIC std::shared_ptr<const linphone::Address> linphone::CallLog::getLocalAddress | ( |  | ) | const

Get the local address (that is from or to depending on call direction)

Returns
  The local Address of the call

## ◆ getQuality()

LINPHONECXX_PUBLIC float linphone::CallLog::getQuality | ( |  | ) | const

Get the overall quality indication of the call.

Returns
  The overall quality indication of the call.

## ◆ getRefKey()

LINPHONECXX_PUBLIC std::string linphone::CallLog::getRefKey | ( |  | ) | const

Get the persistent reference key associated to the call log.

The reference key can be for example an id to an external database. It is stored in the config file, thus can survive to process exits/restarts.

Returns
  The reference key string that has been associated to the call log, or nullptr if none has been associated.

## ◆ getRemoteAddress()

LINPHONECXX_PUBLIC std::shared_ptr<const linphone::Address> linphone::CallLog::getRemoteAddress | ( |  | ) | const

Get the remote address (that is from or to depending on call direction).

Returns
  The remote Address of the call.

## ◆ getStartDate()

LINPHONECXX_PUBLIC time_t linphone::CallLog::getStartDate | ( |  | ) | const

Get the start date of the call.

Returns
  The date of the beginning of the call.

## ◆ getStatus()

LINPHONECXX_PUBLIC linphone::Call::Status linphone::CallLog::getStatus | ( |  | ) | const

Get the status of the call.

Returns
  The Call::Status of the call.

## ◆ getToAddress()

LINPHONECXX_PUBLIC std::shared_ptr<const linphone::Address> linphone::CallLog::getToAddress | ( |  | ) | const

Get the destination address (ie to) of the call.

Returns
  The destination Address (ie to) of the call.

## ◆ setRefKey()

LINPHONECXX_PUBLIC void linphone::CallLog::setRefKey | ( | const std::string & | refkey | ) |

Associate a persistent reference key to the call log.

The reference key can be for example an id to an external database. It is stored in the config file, thus can survive to process exits/restarts.

Parameters

  refkey | The reference key string to associate to the call log.

## ◆ toStr()

LINPHONECXX_PUBLIC std::string linphone::CallLog::toStr | ( |  | ) | const

Get a human readable string describing the call.

Note
  : the returned string must be freed by the application (use ms_free()).

Returns
  A human readable string describing the call.

## ◆ videoEnabled()

LINPHONECXX_PUBLIC bool linphone::CallLog::videoEnabled | ( |  | ) | const

Tell whether video was enabled at the end of the call or not.

Returns
  A boolean value telling whether video was enabled at the end of the call.

## ◆ wasConference()

LINPHONECXX_PUBLIC bool linphone::CallLog::wasConference | ( |  | ) | const

Tells whether that call was a call to a conference server.

Returns
  true if the call was a call to a conference server, false otherwise.

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

- call_log.hh