<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.9.1">
  <compounddef id="call__log_8c" kind="file" language="C++">
    <compoundname>call_log.c</compoundname>
    <includes local="no">time.h</includes>
    <includes refid="private_8h" local="yes">private.h</includes>
    <incdepgraph>
      <node id="18">
        <label>time.h</label>
      </node>
      <node id="17">
        <label>call_log.c</label>
        <link refid="call_log.c"/>
        <childnode refid="18" relation="include">
        </childnode>
      </node>
    </incdepgraph>
      <sectiondef kind="define">
      <memberdef kind="define" id="call__log_8c_1a78c99ffd76a7bb3c8c74db76207e9ab4" prot="public" static="no">
        <name>_XOPEN_SOURCE</name>
        <initializer>700 /*required for strptime of GNU libc*/</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="20" column="9" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="20" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="func">
      <memberdef kind="function" id="call__log_8c_1a8618e723fdaed2bb3a96872c6c7f1752" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>size_t</type>
        <definition>static size_t my_strftime</definition>
        <argsstring>(char *s, size_t max, const char *fmt, const struct tm *tm)</argsstring>
        <name>my_strftime</name>
        <param>
          <type>char *</type>
          <declname>s</declname>
        </param>
        <param>
          <type>size_t</type>
          <declname>max</declname>
        </param>
        <param>
          <type>const char *</type>
          <declname>fmt</declname>
        </param>
        <param>
          <type>const struct tm *</type>
          <declname>tm</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="45" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="45" bodyend="47"/>
      </memberdef>
      <memberdef kind="function" id="call__log_8c_1aaf8d851b226f7c2e5c3315b60c7ff45f" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>time_t</type>
        <definition>static time_t string_to_time</definition>
        <argsstring>(const char *date)</argsstring>
        <name>string_to_time</name>
        <param>
          <type>const char *</type>
          <declname>date</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="49" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="49" bodyend="57"/>
      </memberdef>
      <memberdef kind="function" id="call__log_8c_1a2bf4b92be4095e58a966b052059fa3c6" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void set_call_log_date</definition>
        <argsstring>(LinphoneCallLog *cl, time_t start_time)</argsstring>
        <name>set_call_log_date</name>
        <param>
          <type><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
          <declname>cl</declname>
        </param>
        <param>
          <type>time_t</type>
          <declname>start_time</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="59" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="59" bodyend="70"/>
      </memberdef>
      <memberdef kind="function" id="call__log_8c_1a9b28a072072e0af27cec46183986f6ed" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void call_logs_write_to_config_file</definition>
        <argsstring>(LinphoneCore *lc)</argsstring>
        <name>call_logs_write_to_config_file</name>
        <param>
          <type><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref> *</type>
          <declname>lc</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="76" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="76" bodyend="110"/>
      </memberdef>
      <memberdef kind="function" id="call__log_8c_1acaef47b31ff3e1849aafd6b160ad0dff" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void call_logs_read_from_config_file</definition>
        <argsstring>(LinphoneCore *lc)</argsstring>
        <name>call_logs_read_from_config_file</name>
        <param>
          <type><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref> *</type>
          <declname>lc</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="112" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="112" bodyend="153"/>
      </memberdef>
      <memberdef kind="function" id="group__call__logs_1gae2a190bb030970e723f0c8d8505b83a7" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>const char *</type>
        <definition>const char* linphone_call_log_get_call_id</definition>
        <argsstring>(const LinphoneCallLog *cl)</argsstring>
        <name>linphone_call_log_get_call_id</name>
        <param>
          <type>const <ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
          <declname>cl</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get the call ID used by the call. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">cl</parametername>
</parameternamelist>
<parameterdescription>
<para>LinphoneCallLog object </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>The call ID used by the call as a string. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="160" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="160" bodyend="162"/>
      </memberdef>
      <memberdef kind="function" id="group__call__logs_1ga847aa4ed07183ce7fdd69814683de953" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__call__logs_1ga779ac636d8b652c5130da18827c13e5a" kindref="member">LinphoneCallDir</ref></type>
        <definition>LinphoneCallDir linphone_call_log_get_dir</definition>
        <argsstring>(LinphoneCallLog *cl)</argsstring>
        <name>linphone_call_log_get_dir</name>
        <param>
          <type><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
          <declname>cl</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get the direction of the call. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">cl</parametername>
</parameternamelist>
<parameterdescription>
<para>LinphoneCallLog object </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>The direction of the call. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="164" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="164" bodyend="166"/>
      </memberdef>
      <memberdef kind="function" id="group__call__logs_1gad44b7d604092e48ab3b329d651176a09" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int linphone_call_log_get_duration</definition>
        <argsstring>(LinphoneCallLog *cl)</argsstring>
        <name>linphone_call_log_get_duration</name>
        <param>
          <type><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
          <declname>cl</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get the duration of the call since connected. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">cl</parametername>
</parameternamelist>
<parameterdescription>
<para>LinphoneCallLog object </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>The duration of the call in seconds. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="168" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="168" bodyend="170"/>
      </memberdef>
      <memberdef kind="function" id="group__call__logs_1gaaafe867bd6bc91436b0064be70813151" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref> *</type>
        <definition>LinphoneAddress* linphone_call_log_get_from_address</definition>
        <argsstring>(LinphoneCallLog *cl)</argsstring>
        <name>linphone_call_log_get_from_address</name>
        <param>
          <type><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
          <declname>cl</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get the origin address (ie from) of the call. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">cl</parametername>
</parameternamelist>
<parameterdescription>
<para>LinphoneCallLog object </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>The origin address (ie from) of the call. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="172" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="172" bodyend="174"/>
      </memberdef>
      <memberdef kind="function" id="group__call__logs_1gafc32d586c890fb39c5486586366376e7" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>const rtp_stats_t *</type>
        <definition>const rtp_stats_t* linphone_call_log_get_local_stats</definition>
        <argsstring>(const LinphoneCallLog *cl)</argsstring>
        <name>linphone_call_log_get_local_stats</name>
        <param>
          <type>const <ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
          <declname>cl</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get the RTP statistics computed locally regarding the call. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">cl</parametername>
</parameternamelist>
<parameterdescription>
<para>LinphoneCallLog object </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>The RTP statistics that have been computed locally for the call. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="176" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="176" bodyend="178"/>
      </memberdef>
      <memberdef kind="function" id="group__call__logs_1ga9ddfd1fbcf4d04ec845ea60fd3bec40c" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>float</type>
        <definition>float linphone_call_log_get_quality</definition>
        <argsstring>(LinphoneCallLog *cl)</argsstring>
        <name>linphone_call_log_get_quality</name>
        <param>
          <type><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
          <declname>cl</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get the overall quality indication of the call. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">cl</parametername>
</parameternamelist>
<parameterdescription>
<para>LinphoneCallLog object </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>The overall quality indication of the call. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="180" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="180" bodyend="182"/>
      </memberdef>
      <memberdef kind="function" id="group__call__logs_1ga5f7543296ee65b188d1fbf8b534ebff3" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>const char *</type>
        <definition>const char* linphone_call_log_get_ref_key</definition>
        <argsstring>(const LinphoneCallLog *cl)</argsstring>
        <name>linphone_call_log_get_ref_key</name>
        <param>
          <type>const <ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
          <declname>cl</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get the persistent reference key associated to the call log.</para><para>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.</para><para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">cl</parametername>
</parameternamelist>
<parameterdescription>
<para>LinphoneCallLog object </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>The reference key string that has been associated to the call log, or NULL if none has been associated. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="184" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="184" bodyend="186"/>
      </memberdef>
      <memberdef kind="function" id="group__call__logs_1ga6c4eaeeb10d59d7a63fcc6e6be42a5c8" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref> *</type>
        <definition>LinphoneAddress* linphone_call_log_get_remote_address</definition>
        <argsstring>(LinphoneCallLog *cl)</argsstring>
        <name>linphone_call_log_get_remote_address</name>
        <param>
          <type><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
          <declname>cl</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get the remote address (that is from or to depending on call direction). <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">cl</parametername>
</parameternamelist>
<parameterdescription>
<para>LinphoneCallLog object </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>The remote address of the call. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="188" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="188" bodyend="190"/>
      </memberdef>
      <memberdef kind="function" id="group__call__logs_1gaebb6a63bab5d3271107227acae94d531" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>const rtp_stats_t *</type>
        <definition>const rtp_stats_t* linphone_call_log_get_remote_stats</definition>
        <argsstring>(const LinphoneCallLog *cl)</argsstring>
        <name>linphone_call_log_get_remote_stats</name>
        <param>
          <type>const <ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
          <declname>cl</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get the RTP statistics computed by the remote end and sent back via RTCP. <simplesect kind="note"><para>Not implemented yet. </para></simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">cl</parametername>
</parameternamelist>
<parameterdescription>
<para>LinphoneCallLog object </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>The RTP statistics that have been computed by the remote end for the call. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="192" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="192" bodyend="194"/>
      </memberdef>
      <memberdef kind="function" id="group__call__logs_1gadc9c4a4551352805dcf2b187541db22b" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>time_t</type>
        <definition>time_t linphone_call_log_get_start_date</definition>
        <argsstring>(LinphoneCallLog *cl)</argsstring>
        <name>linphone_call_log_get_start_date</name>
        <param>
          <type><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
          <declname>cl</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get the start date of the call. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">cl</parametername>
</parameternamelist>
<parameterdescription>
<para>LinphoneCallLog object </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>The date of the beginning of the call. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="196" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="196" bodyend="198"/>
      </memberdef>
      <memberdef kind="function" id="group__call__logs_1ga09169074d242befc7b1739c6a975aad8" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__call__logs_1gafd125fb704d3254856f4a826a6e60a11" kindref="member">LinphoneCallStatus</ref></type>
        <definition>LinphoneCallStatus linphone_call_log_get_status</definition>
        <argsstring>(LinphoneCallLog *cl)</argsstring>
        <name>linphone_call_log_get_status</name>
        <param>
          <type><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
          <declname>cl</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get the status of the call. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">cl</parametername>
</parameternamelist>
<parameterdescription>
<para>LinphoneCallLog object </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>The status of the call. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="200" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="200" bodyend="202"/>
      </memberdef>
      <memberdef kind="function" id="group__call__logs_1ga0105f29d6ade6835acd1cf6ae570ca91" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref> *</type>
        <definition>LinphoneAddress* linphone_call_log_get_to_address</definition>
        <argsstring>(LinphoneCallLog *cl)</argsstring>
        <name>linphone_call_log_get_to_address</name>
        <param>
          <type><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
          <declname>cl</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get the destination address (ie to) of the call. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">cl</parametername>
</parameternamelist>
<parameterdescription>
<para>LinphoneCallLog object </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>The destination address (ie to) of the call. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="204" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="204" bodyend="206"/>
      </memberdef>
      <memberdef kind="function" id="group__call__logs_1gac12aee1a611bcb6a899582a8d4705be1" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_log_set_ref_key</definition>
        <argsstring>(LinphoneCallLog *cl, const char *refkey)</argsstring>
        <name>linphone_call_log_set_ref_key</name>
        <param>
          <type><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
          <declname>cl</declname>
        </param>
        <param>
          <type>const char *</type>
          <declname>refkey</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Associate a persistent reference key to the call log.</para><para>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.</para><para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">cl</parametername>
</parameternamelist>
<parameterdescription>
<para>LinphoneCallLog object </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">refkey</parametername>
</parameternamelist>
<parameterdescription>
<para>The reference key string to associate to the call log. </para></parameterdescription>
</parameteritem>
</parameterlist>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="208" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="208" bodyend="214"/>
      </memberdef>
      <memberdef kind="function" id="group__call__logs_1ga0710ace4194a6a8923014922c5f93b3d" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>char *</type>
        <definition>char* linphone_call_log_to_str</definition>
        <argsstring>(LinphoneCallLog *cl)</argsstring>
        <name>linphone_call_log_to_str</name>
        <param>
          <type><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
          <declname>cl</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get a human readable string describing the call. <simplesect kind="note"><para>: the returned string must be freed by the application (use ms_free()). </para></simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">cl</parametername>
</parameternamelist>
<parameterdescription>
<para>LinphoneCallLog object </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>A human readable string describing the call. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="216" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="216" bodyend="245"/>
      </memberdef>
      <memberdef kind="function" id="group__call__logs_1ga5787f07ce7705433f11f571809ba8066" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>bool_t</type>
        <definition>bool_t linphone_call_log_video_enabled</definition>
        <argsstring>(LinphoneCallLog *cl)</argsstring>
        <name>linphone_call_log_video_enabled</name>
        <param>
          <type><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
          <declname>cl</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Tell whether video was enabled at the end of the call or not. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">cl</parametername>
</parameternamelist>
<parameterdescription>
<para>LinphoneCallLog object </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>A boolean value telling whether video was enabled at the end of the call. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="247" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="247" bodyend="249"/>
      </memberdef>
      <memberdef kind="function" id="group__call__logs_1ga7739aef07704316d9d92d50262ddd767" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void *</type>
        <definition>void* linphone_call_log_get_user_data</definition>
        <argsstring>(const LinphoneCallLog *cl)</argsstring>
        <name>linphone_call_log_get_user_data</name>
        <param>
          <type>const <ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
          <declname>cl</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get the user data associated with the call log. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">cl</parametername>
</parameternamelist>
<parameterdescription>
<para>LinphoneCallLog object </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>The user data associated with the call log. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="256" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="256" bodyend="258"/>
      </memberdef>
      <memberdef kind="function" id="group__call__logs_1gadb77bcb2b2beb031bcbf6f0bcc62652a" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_log_set_user_data</definition>
        <argsstring>(LinphoneCallLog *cl, void *ud)</argsstring>
        <name>linphone_call_log_set_user_data</name>
        <param>
          <type><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
          <declname>cl</declname>
        </param>
        <param>
          <type>void *</type>
          <declname>ud</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Assign a user data to the call log. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">cl</parametername>
</parameternamelist>
<parameterdescription>
<para>LinphoneCallLog object </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">ud</parametername>
</parameternamelist>
<parameterdescription>
<para>The user data to associate with the call log. </para></parameterdescription>
</parameteritem>
</parameterlist>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="260" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="260" bodyend="262"/>
      </memberdef>
      <memberdef kind="function" id="group__call__logs_1ga2f3af8bb19866a4bbeebefa17bf2b806" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
        <definition>LinphoneCallLog* linphone_call_log_ref</definition>
        <argsstring>(LinphoneCallLog *cl)</argsstring>
        <name>linphone_call_log_ref</name>
        <param>
          <type><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
          <declname>cl</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Acquire a reference to the call log. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">cl</parametername>
</parameternamelist>
<parameterdescription>
<para>LinphoneCallLog object </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>The same LinphoneCallLog object </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="264" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="264" bodyend="267"/>
      </memberdef>
      <memberdef kind="function" id="group__call__logs_1ga802bbd28cc29824d80a70ad33e5b8ea6" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_log_unref</definition>
        <argsstring>(LinphoneCallLog *cl)</argsstring>
        <name>linphone_call_log_unref</name>
        <param>
          <type><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
          <declname>cl</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Release a reference to the call log. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">cl</parametername>
</parameternamelist>
<parameterdescription>
<para>LinphoneCallLog object </para></parameterdescription>
</parameteritem>
</parameterlist>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="269" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="269" bodyend="271"/>
      </memberdef>
      <memberdef kind="function" id="call__log_8c_1a249e0aed08813b95b1a9abeebeae8cdc" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void _linphone_call_log_destroy</definition>
        <argsstring>(LinphoneCallLog *cl)</argsstring>
        <name>_linphone_call_log_destroy</name>
        <param>
          <type><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
          <declname>cl</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="277" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="277" bodyend="285"/>
      </memberdef>
      <memberdef kind="function" id="call__log_8c_1abc1b46a0d656c692226b0baad6d6ca2a" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
        <definition>LinphoneCallLog* linphone_call_log_new</definition>
        <argsstring>(LinphoneCallDir dir, LinphoneAddress *from, LinphoneAddress *to)</argsstring>
        <name>linphone_call_log_new</name>
        <param>
          <type><ref refid="group__call__logs_1ga779ac636d8b652c5130da18827c13e5a" kindref="member">LinphoneCallDir</ref></type>
          <declname>dir</declname>
        </param>
        <param>
          <type><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref> *</type>
          <declname>from</declname>
        </param>
        <param>
          <type><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref> *</type>
          <declname>to</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="287" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="287" bodyend="303"/>
      </memberdef>
      <memberdef kind="function" id="group__call__logs_1ga786a33811a183f5891e997495914fb3f" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_call_log_destroy</definition>
        <argsstring>(LinphoneCallLog *cl)</argsstring>
        <name>linphone_call_log_destroy</name>
        <param>
          <type><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
          <declname>cl</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Destroy a LinphoneCallLog. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>cl</parametername>
</parameternamelist>
<parameterdescription>
<para>LinphoneCallLog object </para></parameterdescription>
</parameteritem>
</parameterlist>
<xrefsect id="deprecated_1_deprecated000007"><xreftitle>Deprecated</xreftitle><xrefdescription><para>Use <ref refid="group__call__logs_1ga802bbd28cc29824d80a70ad33e5b8ea6" kindref="member">linphone_call_log_unref()</ref> instead. </para></xrefdescription></xrefsect></para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="306" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="306" bodyend="308"/>
      </memberdef>
      <memberdef kind="function" id="call__log_8c_1ae2e20249a4087c83f9427e0bd1e1c1ca" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type></type>
        <definition>BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES</definition>
        <argsstring>(LinphoneCallLog)</argsstring>
        <name>BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES</name>
        <param>
          <type><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref></type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="310" column="1"/>
      </memberdef>
      <memberdef kind="function" id="call__log_8c_1aec3019a7f85c1567a784b82769c364f1" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type></type>
        <definition>BELLE_SIP_INSTANCIATE_VPTR</definition>
        <argsstring>(LinphoneCallLog, belle_sip_object_t,(belle_sip_object_destroy_t) _linphone_call_log_destroy, NULL, NULL, FALSE)</argsstring>
        <name>BELLE_SIP_INSTANCIATE_VPTR</name>
        <param>
          <type><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref></type>
        </param>
        <param>
          <type>belle_sip_object_t</type>
        </param>
        <param>
          <type>(belle_sip_object_destroy_t)</type>
          <declname>_linphone_call_log_destroy</declname>
        </param>
        <param>
          <type>NULL</type>
        </param>
        <param>
          <type>NULL</type>
        </param>
        <param>
          <type>FALSE</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="312" column="1"/>
      </memberdef>
      <memberdef kind="function" id="call__log_8c_1a61f53f02df43b5a4411a7d30c6ffb291" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_core_call_log_storage_init</definition>
        <argsstring>(LinphoneCore *lc)</argsstring>
        <name>linphone_core_call_log_storage_init</name>
        <param>
          <type><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref> *</type>
          <declname>lc</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="670" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="670" bodyend="671"/>
      </memberdef>
      <memberdef kind="function" id="call__log_8c_1a2c43ac064168ab6264d870b3e1391705" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_core_call_log_storage_close</definition>
        <argsstring>(LinphoneCore *lc)</argsstring>
        <name>linphone_core_call_log_storage_close</name>
        <param>
          <type><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref> *</type>
          <declname>lc</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="673" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="673" bodyend="674"/>
      </memberdef>
      <memberdef kind="function" id="call__log_8c_1a1e349673fc937d17e06cd02fc34770e6" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_core_store_call_log</definition>
        <argsstring>(LinphoneCore *lc, LinphoneCallLog *log)</argsstring>
        <name>linphone_core_store_call_log</name>
        <param>
          <type><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref> *</type>
          <declname>lc</declname>
        </param>
        <param>
          <type><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
          <declname>log</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="676" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="676" bodyend="677"/>
      </memberdef>
      <memberdef kind="function" id="call__log_8c_1a3906440a354c2d65afca6e2029b708dd" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>const MSList *</type>
        <definition>const MSList* linphone_core_get_call_history</definition>
        <argsstring>(LinphoneCore *lc)</argsstring>
        <name>linphone_core_get_call_history</name>
        <param>
          <type><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref> *</type>
          <declname>lc</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="679" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="679" bodyend="681"/>
      </memberdef>
      <memberdef kind="function" id="call__log_8c_1ad35143a4ea8d8f4d7b523ca53147406c" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_core_delete_call_history</definition>
        <argsstring>(LinphoneCore *lc)</argsstring>
        <name>linphone_core_delete_call_history</name>
        <param>
          <type><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref> *</type>
          <declname>lc</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="683" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="683" bodyend="684"/>
      </memberdef>
      <memberdef kind="function" id="call__log_8c_1a8100acb8a74ec4b8465187275249f0d1" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_core_delete_call_log</definition>
        <argsstring>(LinphoneCore *lc, LinphoneCallLog *log)</argsstring>
        <name>linphone_core_delete_call_log</name>
        <param>
          <type><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref> *</type>
          <declname>lc</declname>
        </param>
        <param>
          <type><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
          <declname>log</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="686" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="686" bodyend="687"/>
      </memberdef>
      <memberdef kind="function" id="call__log_8c_1a30fe49fbc5431320282ed06f4500fd2e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int linphone_core_get_call_history_size</definition>
        <argsstring>(LinphoneCore *lc)</argsstring>
        <name>linphone_core_get_call_history_size</name>
        <param>
          <type><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref> *</type>
          <declname>lc</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="689" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="689" bodyend="691"/>
      </memberdef>
      <memberdef kind="function" id="group__call__logs_1gac9f96ef8721da7b73157d29d34712f1c" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>MSList *</type>
        <definition>MSList* linphone_core_get_call_history_for_address</definition>
        <argsstring>(LinphoneCore *lc, const LinphoneAddress *addr)</argsstring>
        <name>linphone_core_get_call_history_for_address</name>
        <param>
          <type><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref> *</type>
          <declname>lc</declname>
        </param>
        <param>
          <type>const <ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref> *</type>
          <declname>addr</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get the list of call logs (past calls) that matches the given <ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref>. At the contrary of linphone_core_get_call_logs, it is your responsability to unref the logs and free this list once you are done using it. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">lc</parametername>
</parameternamelist>
<parameterdescription>
<para>LinphoneCore object </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>A list of <ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> objects. <mslist>LinphoneCallLog</mslist>  </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="693" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="693" bodyend="695"/>
      </memberdef>
      <memberdef kind="function" id="group__call__logs_1ga60dfe039e374675b32f78859909d0a4f" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref> *</type>
        <definition>LinphoneCallLog* linphone_core_get_last_outgoing_call_log</definition>
        <argsstring>(LinphoneCore *lc)</argsstring>
        <name>linphone_core_get_last_outgoing_call_log</name>
        <param>
          <type><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref> *</type>
          <declname>lc</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Get the latest outgoing call log. <parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">lc</parametername>
</parameternamelist>
<parameterdescription>
<para>LinphoneCore object </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>{LinphoneCallLog} </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" line="697" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c" bodystart="697" bodyend="699"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="comment">/*</highlight></codeline>
<codeline lineno="2"><highlight class="comment">linphone</highlight></codeline>
<codeline lineno="3"><highlight class="comment">Copyright<sp/>(C)<sp/>2010-2014<sp/><sp/>Belledonne<sp/>Communications<sp/>SARL</highlight></codeline>
<codeline lineno="4"><highlight class="comment"></highlight></codeline>
<codeline lineno="5"><highlight class="comment">This<sp/>program<sp/>is<sp/>free<sp/>software;<sp/>you<sp/>can<sp/>redistribute<sp/>it<sp/>and/or</highlight></codeline>
<codeline lineno="6"><highlight class="comment">modify<sp/>it<sp/>under<sp/>the<sp/>terms<sp/>of<sp/>the<sp/>GNU<sp/>General<sp/>Public<sp/>License</highlight></codeline>
<codeline lineno="7"><highlight class="comment">as<sp/>published<sp/>by<sp/>the<sp/>Free<sp/>Software<sp/>Foundation;<sp/>either<sp/>version<sp/>2</highlight></codeline>
<codeline lineno="8"><highlight class="comment">of<sp/>the<sp/>License,<sp/>or<sp/>(at<sp/>your<sp/>option)<sp/>any<sp/>later<sp/>version.</highlight></codeline>
<codeline lineno="9"><highlight class="comment"></highlight></codeline>
<codeline lineno="10"><highlight class="comment">This<sp/>program<sp/>is<sp/>distributed<sp/>in<sp/>the<sp/>hope<sp/>that<sp/>it<sp/>will<sp/>be<sp/>useful,</highlight></codeline>
<codeline lineno="11"><highlight class="comment">but<sp/>WITHOUT<sp/>ANY<sp/>WARRANTY;<sp/>without<sp/>even<sp/>the<sp/>implied<sp/>warranty<sp/>of</highlight></codeline>
<codeline lineno="12"><highlight class="comment">MERCHANTABILITY<sp/>or<sp/>FITNESS<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE.<sp/><sp/>See<sp/>the</highlight></codeline>
<codeline lineno="13"><highlight class="comment">GNU<sp/>General<sp/>Public<sp/>License<sp/>for<sp/>more<sp/>details.</highlight></codeline>
<codeline lineno="14"><highlight class="comment"></highlight></codeline>
<codeline lineno="15"><highlight class="comment">You<sp/>should<sp/>have<sp/>received<sp/>a<sp/>copy<sp/>of<sp/>the<sp/>GNU<sp/>General<sp/>Public<sp/>License</highlight></codeline>
<codeline lineno="16"><highlight class="comment">along<sp/>with<sp/>this<sp/>program;<sp/>if<sp/>not,<sp/>write<sp/>to<sp/>the<sp/>Free<sp/>Software</highlight></codeline>
<codeline lineno="17"><highlight class="comment">Foundation,<sp/>Inc.,<sp/>59<sp/>Temple<sp/>Place<sp/>-<sp/>Suite<sp/>330,<sp/>Boston,<sp/>MA<sp/><sp/>02111-1307,<sp/>USA.</highlight></codeline>
<codeline lineno="18"><highlight class="comment">*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="19"><highlight class="normal"></highlight></codeline>
<codeline lineno="20"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>_XOPEN_SOURCE<sp/>700<sp/></highlight><highlight class="comment">/*required<sp/>for<sp/>strptime<sp/>of<sp/>GNU<sp/>libc*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="21"><highlight class="normal"></highlight></codeline>
<codeline lineno="22"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;time.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="23"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;private.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="24"><highlight class="normal"></highlight></codeline>
<codeline lineno="25"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>CALL_LOGS_STORAGE_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="26"><highlight class="normal"></highlight><highlight class="preprocessor">#ifndef<sp/>_WIN32</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="27"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>!defined(ANDROID)<sp/>&amp;&amp;<sp/>!defined(__QNXNTO__)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="28"><highlight class="normal"></highlight><highlight class="preprocessor">#<sp/><sp/><sp/><sp/><sp/><sp/><sp/>include<sp/>&lt;langinfo.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="29"><highlight class="normal"></highlight><highlight class="preprocessor">#<sp/><sp/><sp/><sp/><sp/><sp/><sp/>include<sp/>&lt;iconv.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="30"><highlight class="normal"></highlight><highlight class="preprocessor">#<sp/><sp/><sp/><sp/><sp/><sp/><sp/>include<sp/>&lt;string.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="32"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="33"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;Windows.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="34"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="35"><highlight class="normal"></highlight></codeline>
<codeline lineno="36"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>MAX_PATH_SIZE<sp/>1024</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="37"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;sqlite3.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="39"><highlight class="normal"></highlight></codeline>
<codeline lineno="40"><highlight class="normal"></highlight><highlight class="comment">/*******************************************************************************</highlight></codeline>
<codeline lineno="41"><highlight class="comment"><sp/>*<sp/>Internal<sp/>functions<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*</highlight></codeline>
<codeline lineno="42"><highlight class="comment"><sp/>******************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="43"><highlight class="normal"></highlight></codeline>
<codeline lineno="44"><highlight class="normal"></highlight><highlight class="comment">/*prevent<sp/>a<sp/>gcc<sp/>bug<sp/>with<sp/>%c*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="45"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>my_strftime(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*s,<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>max,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/><sp/>*fmt,<sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>tm<sp/>*tm){</highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>strftime(s,<sp/>max,<sp/>fmt,<sp/>tm);</highlight></codeline>
<codeline lineno="47"><highlight class="normal">}</highlight></codeline>
<codeline lineno="48"><highlight class="normal"></highlight></codeline>
<codeline lineno="49"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>time_t<sp/>string_to_time(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*date){</highlight></codeline>
<codeline lineno="50"><highlight class="normal"></highlight><highlight class="preprocessor">#ifndef<sp/>_WIN32</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="51"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">tm<sp/>tmtime={0};</highlight></codeline>
<codeline lineno="52"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strptime(date,</highlight><highlight class="stringliteral">&quot;%c&quot;</highlight><highlight class="normal">,&amp;tmtime);</highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>mktime(&amp;tmtime);</highlight></codeline>
<codeline lineno="54"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="55"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="56"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="57"><highlight class="normal">}</highlight></codeline>
<codeline lineno="58"><highlight class="normal"></highlight></codeline>
<codeline lineno="59"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>set_call_log_date(<ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*cl,<sp/>time_t<sp/>start_time){</highlight></codeline>
<codeline lineno="60"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">tm<sp/>loctime;</highlight></codeline>
<codeline lineno="61"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>_WIN32</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="62"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>!defined(_WIN32_WCE)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="63"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>loctime=*localtime(&amp;start_time);</highlight></codeline>
<codeline lineno="64"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*FIXME*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="65"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*_WIN32_WCE*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="66"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>localtime_r(&amp;start_time,&amp;loctime);</highlight></codeline>
<codeline lineno="68"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>my_strftime(cl-&gt;start_date,</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(cl-&gt;start_date),</highlight><highlight class="stringliteral">&quot;%c&quot;</highlight><highlight class="normal">,&amp;loctime);</highlight></codeline>
<codeline lineno="70"><highlight class="normal">}</highlight></codeline>
<codeline lineno="71"><highlight class="normal"></highlight></codeline>
<codeline lineno="72"><highlight class="normal"></highlight><highlight class="comment">/*******************************************************************************</highlight></codeline>
<codeline lineno="73"><highlight class="comment"><sp/>*<sp/>Private<sp/>functions<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*</highlight></codeline>
<codeline lineno="74"><highlight class="comment"><sp/>******************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="75"><highlight class="normal"></highlight></codeline>
<codeline lineno="76"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>call_logs_write_to_config_file(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc){</highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSList<sp/>*elem;</highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>logsection[32];</highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*tmp;</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__misc_1ga047b6550aab7dd244268e695fab98fd6" kindref="member">LpConfig</ref><sp/>*cfg=lc-&gt;config;</highlight></codeline>
<codeline lineno="82"><highlight class="normal"></highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(linphone_core_get_global_state<sp/>(lc)==LinphoneGlobalStartup)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="84"><highlight class="normal"></highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(i=0,elem=lc-&gt;call_logs;elem!=NULL;elem=elem-&gt;next,++i){</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*cl=(<ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref>*)elem-&gt;data;</highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>snprintf(logsection,</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(logsection),</highlight><highlight class="stringliteral">&quot;call_log_%i&quot;</highlight><highlight class="normal">,i);</highlight></codeline>
<codeline lineno="88"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__misc_1ga8ea8060c147dd9584644c52d4cd59a17" kindref="member">lp_config_clean_section</ref>(cfg,logsection);</highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__misc_1gab7608c4c6b40a734eb00a4b398e47ba5" kindref="member">lp_config_set_int</ref>(cfg,logsection,</highlight><highlight class="stringliteral">&quot;dir&quot;</highlight><highlight class="normal">,cl-&gt;dir);</highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__misc_1gab7608c4c6b40a734eb00a4b398e47ba5" kindref="member">lp_config_set_int</ref>(cfg,logsection,</highlight><highlight class="stringliteral">&quot;status&quot;</highlight><highlight class="normal">,cl-&gt;status);</highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmp=<ref refid="group__linphone__address_1ga24c1a16f49f8b72f2bab65cc5d8a51af" kindref="member">linphone_address_as_string</ref>(cl-&gt;from);</highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__misc_1ga2b9f058c7b12d124be96149100d9b079" kindref="member">lp_config_set_string</ref>(cfg,logsection,</highlight><highlight class="stringliteral">&quot;from&quot;</highlight><highlight class="normal">,tmp);</highlight></codeline>
<codeline lineno="93"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(tmp);</highlight></codeline>
<codeline lineno="94"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmp=<ref refid="group__linphone__address_1ga24c1a16f49f8b72f2bab65cc5d8a51af" kindref="member">linphone_address_as_string</ref>(cl-&gt;to);</highlight></codeline>
<codeline lineno="95"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__misc_1ga2b9f058c7b12d124be96149100d9b079" kindref="member">lp_config_set_string</ref>(cfg,logsection,</highlight><highlight class="stringliteral">&quot;to&quot;</highlight><highlight class="normal">,tmp);</highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(tmp);</highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(cl-&gt;start_date_time)</highlight></codeline>
<codeline lineno="98"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__misc_1ga3ce825cbf6fa62ecf0714540459f64b4" kindref="member">lp_config_set_int64</ref>(cfg,logsection,</highlight><highlight class="stringliteral">&quot;start_date_time&quot;</highlight><highlight class="normal">,(int64_t)cl-&gt;start_date_time);</highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/><ref refid="group__misc_1ga2b9f058c7b12d124be96149100d9b079" kindref="member">lp_config_set_string</ref>(cfg,logsection,</highlight><highlight class="stringliteral">&quot;start_date&quot;</highlight><highlight class="normal">,cl-&gt;start_date);</highlight></codeline>
<codeline lineno="100"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__misc_1gab7608c4c6b40a734eb00a4b398e47ba5" kindref="member">lp_config_set_int</ref>(cfg,logsection,</highlight><highlight class="stringliteral">&quot;duration&quot;</highlight><highlight class="normal">,cl-&gt;duration);</highlight></codeline>
<codeline lineno="101"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(cl-&gt;refkey)<sp/><ref refid="group__misc_1ga2b9f058c7b12d124be96149100d9b079" kindref="member">lp_config_set_string</ref>(cfg,logsection,</highlight><highlight class="stringliteral">&quot;refkey&quot;</highlight><highlight class="normal">,cl-&gt;refkey);</highlight></codeline>
<codeline lineno="102"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__misc_1gaeaa0ff38f2af3cefdf4c401b86ec9197" kindref="member">lp_config_set_float</ref>(cfg,logsection,</highlight><highlight class="stringliteral">&quot;quality&quot;</highlight><highlight class="normal">,cl-&gt;quality);</highlight></codeline>
<codeline lineno="103"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__misc_1gab7608c4c6b40a734eb00a4b398e47ba5" kindref="member">lp_config_set_int</ref>(cfg,logsection,</highlight><highlight class="stringliteral">&quot;video_enabled&quot;</highlight><highlight class="normal">,<sp/>cl-&gt;video_enabled);</highlight></codeline>
<codeline lineno="104"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__misc_1ga2b9f058c7b12d124be96149100d9b079" kindref="member">lp_config_set_string</ref>(cfg,logsection,</highlight><highlight class="stringliteral">&quot;call_id&quot;</highlight><highlight class="normal">,cl-&gt;call_id);</highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="106"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(;i&lt;lc-&gt;max_call_logs;++i){</highlight></codeline>
<codeline lineno="107"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>snprintf(logsection,</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(logsection),</highlight><highlight class="stringliteral">&quot;call_log_%i&quot;</highlight><highlight class="normal">,i);</highlight></codeline>
<codeline lineno="108"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__misc_1ga8ea8060c147dd9584644c52d4cd59a17" kindref="member">lp_config_clean_section</ref>(cfg,logsection);</highlight></codeline>
<codeline lineno="109"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="110"><highlight class="normal">}</highlight></codeline>
<codeline lineno="111"><highlight class="normal"></highlight></codeline>
<codeline lineno="112"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>call_logs_read_from_config_file(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc){</highlight></codeline>
<codeline lineno="113"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>logsection[32];</highlight></codeline>
<codeline lineno="114"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="115"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*tmp;</highlight></codeline>
<codeline lineno="116"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>uint64_t<sp/>sec;</highlight></codeline>
<codeline lineno="117"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__misc_1ga047b6550aab7dd244268e695fab98fd6" kindref="member">LpConfig</ref><sp/>*cfg=lc-&gt;config;</highlight></codeline>
<codeline lineno="118"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(i=0;;++i){</highlight></codeline>
<codeline lineno="119"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>snprintf(logsection,</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(logsection),</highlight><highlight class="stringliteral">&quot;call_log_%i&quot;</highlight><highlight class="normal">,i);</highlight></codeline>
<codeline lineno="120"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__misc_1ga15bf033627637f54ebc03380d5dfb2d1" kindref="member">lp_config_has_section</ref>(cfg,logsection)){</highlight></codeline>
<codeline lineno="121"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*cl;</highlight></codeline>
<codeline lineno="122"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref><sp/>*from=NULL,*to=NULL;</highlight></codeline>
<codeline lineno="123"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmp=<ref refid="group__misc_1ga9657ebf1d68b43184a796c9bdc68c29a" kindref="member">lp_config_get_string</ref>(cfg,logsection,</highlight><highlight class="stringliteral">&quot;from&quot;</highlight><highlight class="normal">,NULL);</highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmp)<sp/>from=<ref refid="group__linphone__address_1ga301c9884c0bc8b1050fe790d424e0b49" kindref="member">linphone_address_new</ref>(tmp);</highlight></codeline>
<codeline lineno="125"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmp=<ref refid="group__misc_1ga9657ebf1d68b43184a796c9bdc68c29a" kindref="member">lp_config_get_string</ref>(cfg,logsection,</highlight><highlight class="stringliteral">&quot;to&quot;</highlight><highlight class="normal">,NULL);</highlight></codeline>
<codeline lineno="126"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmp)<sp/>to=<ref refid="group__linphone__address_1ga301c9884c0bc8b1050fe790d424e0b49" kindref="member">linphone_address_new</ref>(tmp);</highlight></codeline>
<codeline lineno="127"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!from<sp/>||<sp/>!to)</highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">continue</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="129"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cl=linphone_call_log_new(<ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(cfg,logsection,</highlight><highlight class="stringliteral">&quot;dir&quot;</highlight><highlight class="normal">,0),from,to);</highlight></codeline>
<codeline lineno="130"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cl-&gt;status=<ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(cfg,logsection,</highlight><highlight class="stringliteral">&quot;status&quot;</highlight><highlight class="normal">,0);</highlight></codeline>
<codeline lineno="131"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sec=<ref refid="group__misc_1ga541795495eae7e7b7cde85beb096e20c" kindref="member">lp_config_get_int64</ref>(cfg,logsection,</highlight><highlight class="stringliteral">&quot;start_date_time&quot;</highlight><highlight class="normal">,0);</highlight></codeline>
<codeline lineno="132"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sec)<sp/>{</highlight></codeline>
<codeline lineno="133"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*new<sp/>call<sp/>log<sp/>format<sp/>with<sp/>date<sp/>expressed<sp/>in<sp/>seconds<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="134"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cl-&gt;start_date_time=(time_t)sec;</highlight></codeline>
<codeline lineno="135"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>set_call_log_date(cl,cl-&gt;start_date_time);</highlight></codeline>
<codeline lineno="136"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="137"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmp=<ref refid="group__misc_1ga9657ebf1d68b43184a796c9bdc68c29a" kindref="member">lp_config_get_string</ref>(cfg,logsection,</highlight><highlight class="stringliteral">&quot;start_date&quot;</highlight><highlight class="normal">,NULL);</highlight></codeline>
<codeline lineno="138"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmp)<sp/>{</highlight></codeline>
<codeline lineno="139"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strncpy(cl-&gt;start_date,tmp,</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(cl-&gt;start_date));</highlight></codeline>
<codeline lineno="140"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cl-&gt;start_date_time=string_to_time(cl-&gt;start_date);</highlight></codeline>
<codeline lineno="141"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="142"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="143"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cl-&gt;duration=<ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(cfg,logsection,</highlight><highlight class="stringliteral">&quot;duration&quot;</highlight><highlight class="normal">,0);</highlight></codeline>
<codeline lineno="144"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmp=<ref refid="group__misc_1ga9657ebf1d68b43184a796c9bdc68c29a" kindref="member">lp_config_get_string</ref>(cfg,logsection,</highlight><highlight class="stringliteral">&quot;refkey&quot;</highlight><highlight class="normal">,NULL);</highlight></codeline>
<codeline lineno="145"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmp)<sp/>cl-&gt;refkey=ms_strdup(tmp);</highlight></codeline>
<codeline lineno="146"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cl-&gt;quality=<ref refid="group__misc_1gad548422b00d41c9726062869d04cd6e4" kindref="member">lp_config_get_float</ref>(cfg,logsection,</highlight><highlight class="stringliteral">&quot;quality&quot;</highlight><highlight class="normal">,-1);</highlight></codeline>
<codeline lineno="147"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cl-&gt;video_enabled=<ref refid="group__misc_1ga36d08c0cbc78d88fd4f043e61e9b9637" kindref="member">lp_config_get_int</ref>(cfg,logsection,</highlight><highlight class="stringliteral">&quot;video_enabled&quot;</highlight><highlight class="normal">,0);</highlight></codeline>
<codeline lineno="148"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmp=<ref refid="group__misc_1ga9657ebf1d68b43184a796c9bdc68c29a" kindref="member">lp_config_get_string</ref>(cfg,logsection,</highlight><highlight class="stringliteral">&quot;call_id&quot;</highlight><highlight class="normal">,NULL);</highlight></codeline>
<codeline lineno="149"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmp)<sp/>cl-&gt;call_id=ms_strdup(tmp);</highlight></codeline>
<codeline lineno="150"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lc-&gt;call_logs=ms_list_append(lc-&gt;call_logs,cl);</highlight></codeline>
<codeline lineno="151"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="152"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="153"><highlight class="normal">}</highlight></codeline>
<codeline lineno="154"><highlight class="normal"></highlight></codeline>
<codeline lineno="155"><highlight class="normal"></highlight></codeline>
<codeline lineno="156"><highlight class="normal"></highlight><highlight class="comment">/*******************************************************************************</highlight></codeline>
<codeline lineno="157"><highlight class="comment"><sp/>*<sp/>Public<sp/>functions<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*</highlight></codeline>
<codeline lineno="158"><highlight class="comment"><sp/>******************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="159"><highlight class="normal"></highlight></codeline>
<codeline lineno="160"><highlight class="normal"></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*<ref refid="group__call__logs_1gae2a190bb030970e723f0c8d8505b83a7" kindref="member">linphone_call_log_get_call_id</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*cl){</highlight></codeline>
<codeline lineno="161"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>cl-&gt;call_id;</highlight></codeline>
<codeline lineno="162"><highlight class="normal">}</highlight></codeline>
<codeline lineno="163"><highlight class="normal"></highlight></codeline>
<codeline lineno="164"><highlight class="normal"><ref refid="group__call__logs_1ga779ac636d8b652c5130da18827c13e5a" kindref="member">LinphoneCallDir</ref><sp/><ref refid="group__call__logs_1ga847aa4ed07183ce7fdd69814683de953" kindref="member">linphone_call_log_get_dir</ref>(<ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*cl){</highlight></codeline>
<codeline lineno="165"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>cl-&gt;dir;</highlight></codeline>
<codeline lineno="166"><highlight class="normal">}</highlight></codeline>
<codeline lineno="167"><highlight class="normal"></highlight></codeline>
<codeline lineno="168"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="group__call__logs_1gad44b7d604092e48ab3b329d651176a09" kindref="member">linphone_call_log_get_duration</ref>(<ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*cl){</highlight></codeline>
<codeline lineno="169"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>cl-&gt;duration;</highlight></codeline>
<codeline lineno="170"><highlight class="normal">}</highlight></codeline>
<codeline lineno="171"><highlight class="normal"></highlight></codeline>
<codeline lineno="172"><highlight class="normal"><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref><sp/>*<ref refid="group__call__logs_1gaaafe867bd6bc91436b0064be70813151" kindref="member">linphone_call_log_get_from_address</ref>(<ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*cl){</highlight></codeline>
<codeline lineno="173"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>cl-&gt;from;</highlight></codeline>
<codeline lineno="174"><highlight class="normal">}</highlight></codeline>
<codeline lineno="175"><highlight class="normal"></highlight></codeline>
<codeline lineno="176"><highlight class="normal"></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>rtp_stats_t<sp/>*<ref refid="group__call__logs_1gafc32d586c890fb39c5486586366376e7" kindref="member">linphone_call_log_get_local_stats</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*cl){</highlight></codeline>
<codeline lineno="177"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>&amp;cl-&gt;local_stats;</highlight></codeline>
<codeline lineno="178"><highlight class="normal">}</highlight></codeline>
<codeline lineno="179"><highlight class="normal"></highlight></codeline>
<codeline lineno="180"><highlight class="normal"></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/><ref refid="group__call__logs_1ga9ddfd1fbcf4d04ec845ea60fd3bec40c" kindref="member">linphone_call_log_get_quality</ref>(<ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*cl){</highlight></codeline>
<codeline lineno="181"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>cl-&gt;quality;</highlight></codeline>
<codeline lineno="182"><highlight class="normal">}</highlight></codeline>
<codeline lineno="183"><highlight class="normal"></highlight></codeline>
<codeline lineno="184"><highlight class="normal"></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*<ref refid="group__call__logs_1ga5f7543296ee65b188d1fbf8b534ebff3" kindref="member">linphone_call_log_get_ref_key</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*cl){</highlight></codeline>
<codeline lineno="185"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>cl-&gt;refkey;</highlight></codeline>
<codeline lineno="186"><highlight class="normal">}</highlight></codeline>
<codeline lineno="187"><highlight class="normal"></highlight></codeline>
<codeline lineno="188"><highlight class="normal"><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref><sp/>*<ref refid="group__call__logs_1ga6c4eaeeb10d59d7a63fcc6e6be42a5c8" kindref="member">linphone_call_log_get_remote_address</ref>(<ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*cl){</highlight></codeline>
<codeline lineno="189"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(cl-&gt;dir<sp/>==<sp/><ref refid="group__call__logs_1ggaa3077de7d4214529094998ce441f61e1aa4030176bbddea10e361ce320946e202" kindref="member">LinphoneCallIncoming</ref>)<sp/>?<sp/>cl-&gt;from<sp/>:<sp/>cl-&gt;to;</highlight></codeline>
<codeline lineno="190"><highlight class="normal">}</highlight></codeline>
<codeline lineno="191"><highlight class="normal"></highlight></codeline>
<codeline lineno="192"><highlight class="normal"></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>rtp_stats_t<sp/>*<ref refid="group__call__logs_1gaebb6a63bab5d3271107227acae94d531" kindref="member">linphone_call_log_get_remote_stats</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*cl){</highlight></codeline>
<codeline lineno="193"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>&amp;cl-&gt;remote_stats;</highlight></codeline>
<codeline lineno="194"><highlight class="normal">}</highlight></codeline>
<codeline lineno="195"><highlight class="normal"></highlight></codeline>
<codeline lineno="196"><highlight class="normal">time_t<sp/><ref refid="group__call__logs_1gadc9c4a4551352805dcf2b187541db22b" kindref="member">linphone_call_log_get_start_date</ref>(<ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*cl){</highlight></codeline>
<codeline lineno="197"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>cl-&gt;start_date_time;</highlight></codeline>
<codeline lineno="198"><highlight class="normal">}</highlight></codeline>
<codeline lineno="199"><highlight class="normal"></highlight></codeline>
<codeline lineno="200"><highlight class="normal"><ref refid="group__call__logs_1gafd125fb704d3254856f4a826a6e60a11" kindref="member">LinphoneCallStatus</ref><sp/><ref refid="group__call__logs_1ga09169074d242befc7b1739c6a975aad8" kindref="member">linphone_call_log_get_status</ref>(<ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*cl){</highlight></codeline>
<codeline lineno="201"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>cl-&gt;status;</highlight></codeline>
<codeline lineno="202"><highlight class="normal">}</highlight></codeline>
<codeline lineno="203"><highlight class="normal"></highlight></codeline>
<codeline lineno="204"><highlight class="normal"><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref><sp/>*<ref refid="group__call__logs_1ga0105f29d6ade6835acd1cf6ae570ca91" kindref="member">linphone_call_log_get_to_address</ref>(<ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*cl){</highlight></codeline>
<codeline lineno="205"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>cl-&gt;to;</highlight></codeline>
<codeline lineno="206"><highlight class="normal">}</highlight></codeline>
<codeline lineno="207"><highlight class="normal"></highlight></codeline>
<codeline lineno="208"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="group__call__logs_1gac12aee1a611bcb6a899582a8d4705be1" kindref="member">linphone_call_log_set_ref_key</ref>(<ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*cl,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*refkey){</highlight></codeline>
<codeline lineno="209"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(cl-&gt;refkey!=NULL){</highlight></codeline>
<codeline lineno="210"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(cl-&gt;refkey);</highlight></codeline>
<codeline lineno="211"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cl-&gt;refkey=NULL;</highlight></codeline>
<codeline lineno="212"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="213"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(refkey)<sp/>cl-&gt;refkey=ms_strdup(refkey);</highlight></codeline>
<codeline lineno="214"><highlight class="normal">}</highlight></codeline>
<codeline lineno="215"><highlight class="normal"></highlight></codeline>
<codeline lineno="216"><highlight class="normal"></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*<sp/><ref refid="group__call__logs_1ga0710ace4194a6a8923014922c5f93b3d" kindref="member">linphone_call_log_to_str</ref>(<ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*cl){</highlight></codeline>
<codeline lineno="217"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*status;</highlight></codeline>
<codeline lineno="218"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*tmp;</highlight></codeline>
<codeline lineno="219"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*from=<ref refid="group__linphone__address_1ga24c1a16f49f8b72f2bab65cc5d8a51af" kindref="member">linphone_address_as_string</ref><sp/>(cl-&gt;from);</highlight></codeline>
<codeline lineno="220"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*to=<ref refid="group__linphone__address_1ga24c1a16f49f8b72f2bab65cc5d8a51af" kindref="member">linphone_address_as_string</ref><sp/>(cl-&gt;to);</highlight></codeline>
<codeline lineno="221"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal">(cl-&gt;status){</highlight></codeline>
<codeline lineno="222"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__logs_1gga0896daf3cb167a43e357c3955ab33f3faeff436dddb49d4bf17d2e05a94b5bd59" kindref="member">LinphoneCallAborted</ref>:</highlight></codeline>
<codeline lineno="223"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>status=_(</highlight><highlight class="stringliteral">&quot;aborted&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="224"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="225"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__logs_1gga0896daf3cb167a43e357c3955ab33f3fa998fe35d090ed76fb89b23b3a8dfb0ff" kindref="member">LinphoneCallSuccess</ref>:</highlight></codeline>
<codeline lineno="226"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>status=_(</highlight><highlight class="stringliteral">&quot;completed&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="227"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="228"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__call__logs_1gga0896daf3cb167a43e357c3955ab33f3fad26e9035dad755590a5a724c7ba69656" kindref="member">LinphoneCallMissed</ref>:</highlight></codeline>
<codeline lineno="229"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>status=_(</highlight><highlight class="stringliteral">&quot;missed&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="230"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="231"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="232"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>status=_(</highlight><highlight class="stringliteral">&quot;unknown&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="233"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="234"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmp=ms_strdup_printf(_(</highlight><highlight class="stringliteral">&quot;%s<sp/>at<sp/>%s\nFrom:<sp/>%s\nTo:<sp/>%s\nStatus:<sp/>%s\nDuration:<sp/>%i<sp/>mn<sp/>%i<sp/>sec\n&quot;</highlight><highlight class="normal">),</highlight></codeline>
<codeline lineno="235"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(cl-&gt;dir==<ref refid="group__call__logs_1ggaa3077de7d4214529094998ce441f61e1aa4030176bbddea10e361ce320946e202" kindref="member">LinphoneCallIncoming</ref>)<sp/>?<sp/>_(</highlight><highlight class="stringliteral">&quot;Incoming<sp/>call&quot;</highlight><highlight class="normal">)<sp/>:<sp/>_(</highlight><highlight class="stringliteral">&quot;Outgoing<sp/>call&quot;</highlight><highlight class="normal">),</highlight></codeline>
<codeline lineno="236"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cl-&gt;start_date,</highlight></codeline>
<codeline lineno="237"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>from,</highlight></codeline>
<codeline lineno="238"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>to,</highlight></codeline>
<codeline lineno="239"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>status,</highlight></codeline>
<codeline lineno="240"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cl-&gt;duration/60,</highlight></codeline>
<codeline lineno="241"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cl-&gt;duration%60);</highlight></codeline>
<codeline lineno="242"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(from);</highlight></codeline>
<codeline lineno="243"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(to);</highlight></codeline>
<codeline lineno="244"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>tmp;</highlight></codeline>
<codeline lineno="245"><highlight class="normal">}</highlight></codeline>
<codeline lineno="246"><highlight class="normal"></highlight></codeline>
<codeline lineno="247"><highlight class="normal">bool_t<sp/><ref refid="group__call__logs_1ga5787f07ce7705433f11f571809ba8066" kindref="member">linphone_call_log_video_enabled</ref>(<ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*cl)<sp/>{</highlight></codeline>
<codeline lineno="248"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>cl-&gt;video_enabled;</highlight></codeline>
<codeline lineno="249"><highlight class="normal">}</highlight></codeline>
<codeline lineno="250"><highlight class="normal"></highlight></codeline>
<codeline lineno="251"><highlight class="normal"></highlight></codeline>
<codeline lineno="252"><highlight class="normal"></highlight><highlight class="comment">/*******************************************************************************</highlight></codeline>
<codeline lineno="253"><highlight class="comment"><sp/>*<sp/>Reference<sp/>and<sp/>user<sp/>data<sp/>handling<sp/>functions<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*</highlight></codeline>
<codeline lineno="254"><highlight class="comment"><sp/>******************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="255"><highlight class="normal"></highlight></codeline>
<codeline lineno="256"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*<ref refid="group__call__logs_1ga7739aef07704316d9d92d50262ddd767" kindref="member">linphone_call_log_get_user_data</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*cl)<sp/>{</highlight></codeline>
<codeline lineno="257"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>cl-&gt;user_data;</highlight></codeline>
<codeline lineno="258"><highlight class="normal">}</highlight></codeline>
<codeline lineno="259"><highlight class="normal"></highlight></codeline>
<codeline lineno="260"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="group__call__logs_1gadb77bcb2b2beb031bcbf6f0bcc62652a" kindref="member">linphone_call_log_set_user_data</ref>(<ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*cl,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*ud)<sp/>{</highlight></codeline>
<codeline lineno="261"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cl-&gt;user_data<sp/>=<sp/>ud;</highlight></codeline>
<codeline lineno="262"><highlight class="normal">}</highlight></codeline>
<codeline lineno="263"><highlight class="normal"></highlight></codeline>
<codeline lineno="264"><highlight class="normal"><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*<sp/><ref refid="group__call__logs_1ga2f3af8bb19866a4bbeebefa17bf2b806" kindref="member">linphone_call_log_ref</ref>(<ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*cl)<sp/>{</highlight></codeline>
<codeline lineno="265"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>belle_sip_object_ref(cl);</highlight></codeline>
<codeline lineno="266"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>cl;</highlight></codeline>
<codeline lineno="267"><highlight class="normal">}</highlight></codeline>
<codeline lineno="268"><highlight class="normal"></highlight></codeline>
<codeline lineno="269"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="group__call__logs_1ga802bbd28cc29824d80a70ad33e5b8ea6" kindref="member">linphone_call_log_unref</ref>(<ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*cl)<sp/>{</highlight></codeline>
<codeline lineno="270"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>belle_sip_object_unref(cl);</highlight></codeline>
<codeline lineno="271"><highlight class="normal">}</highlight></codeline>
<codeline lineno="272"><highlight class="normal"></highlight></codeline>
<codeline lineno="273"><highlight class="normal"></highlight><highlight class="comment">/*******************************************************************************</highlight></codeline>
<codeline lineno="274"><highlight class="comment"><sp/>*<sp/>Constructor<sp/>and<sp/>destructor<sp/>functions<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*</highlight></codeline>
<codeline lineno="275"><highlight class="comment"><sp/>******************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="276"><highlight class="normal"></highlight></codeline>
<codeline lineno="277"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>_linphone_call_log_destroy(<ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*cl)<sp/>{</highlight></codeline>
<codeline lineno="278"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(cl-&gt;from!=NULL)<sp/><ref refid="group__linphone__address_1ga5777f2976c71a48cf2b3f03c61818f13" kindref="member">linphone_address_destroy</ref>(cl-&gt;from);</highlight></codeline>
<codeline lineno="279"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(cl-&gt;to!=NULL)<sp/><ref refid="group__linphone__address_1ga5777f2976c71a48cf2b3f03c61818f13" kindref="member">linphone_address_destroy</ref>(cl-&gt;to);</highlight></codeline>
<codeline lineno="280"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(cl-&gt;refkey!=NULL)<sp/>ms_free(cl-&gt;refkey);</highlight></codeline>
<codeline lineno="281"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(cl-&gt;call_id)<sp/>ms_free(cl-&gt;call_id);</highlight></codeline>
<codeline lineno="282"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(cl-&gt;reporting.reports[LINPHONE_CALL_STATS_AUDIO]!=NULL)<sp/>linphone_reporting_destroy(cl-&gt;reporting.reports[LINPHONE_CALL_STATS_AUDIO]);</highlight></codeline>
<codeline lineno="283"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(cl-&gt;reporting.reports[LINPHONE_CALL_STATS_VIDEO]!=NULL)<sp/>linphone_reporting_destroy(cl-&gt;reporting.reports[LINPHONE_CALL_STATS_VIDEO]);</highlight></codeline>
<codeline lineno="284"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(cl-&gt;reporting.reports[LINPHONE_CALL_STATS_TEXT]!=NULL)<sp/>linphone_reporting_destroy(cl-&gt;reporting.reports[LINPHONE_CALL_STATS_TEXT]);</highlight></codeline>
<codeline lineno="285"><highlight class="normal">}</highlight></codeline>
<codeline lineno="286"><highlight class="normal"></highlight></codeline>
<codeline lineno="287"><highlight class="normal"><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*<sp/>linphone_call_log_new(<ref refid="group__call__logs_1ga779ac636d8b652c5130da18827c13e5a" kindref="member">LinphoneCallDir</ref><sp/>dir,<sp/><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref><sp/>*from,<sp/><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref><sp/>*to)<sp/>{</highlight></codeline>
<codeline lineno="288"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*cl=belle_sip_object_new(<ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref>);</highlight></codeline>
<codeline lineno="289"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cl-&gt;dir=dir;</highlight></codeline>
<codeline lineno="290"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cl-&gt;start_date_time=time(NULL);</highlight></codeline>
<codeline lineno="291"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>set_call_log_date(cl,cl-&gt;start_date_time);</highlight></codeline>
<codeline lineno="292"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cl-&gt;from=from;</highlight></codeline>
<codeline lineno="293"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cl-&gt;to=to;</highlight></codeline>
<codeline lineno="294"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cl-&gt;status=<ref refid="group__call__logs_1gga0896daf3cb167a43e357c3955ab33f3faeff436dddb49d4bf17d2e05a94b5bd59" kindref="member">LinphoneCallAborted</ref>;<sp/></highlight><highlight class="comment">/*default<sp/>status*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="295"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cl-&gt;quality=-1;</highlight></codeline>
<codeline lineno="296"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cl-&gt;storage_id=0;</highlight></codeline>
<codeline lineno="297"><highlight class="normal"></highlight></codeline>
<codeline lineno="298"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cl-&gt;reporting.reports[LINPHONE_CALL_STATS_AUDIO]=linphone_reporting_new();</highlight></codeline>
<codeline lineno="299"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cl-&gt;reporting.reports[LINPHONE_CALL_STATS_VIDEO]=linphone_reporting_new();</highlight></codeline>
<codeline lineno="300"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cl-&gt;reporting.reports[LINPHONE_CALL_STATS_TEXT]=linphone_reporting_new();</highlight></codeline>
<codeline lineno="301"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cl-&gt;connected_date_time=0;</highlight></codeline>
<codeline lineno="302"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>cl;</highlight></codeline>
<codeline lineno="303"><highlight class="normal">}</highlight></codeline>
<codeline lineno="304"><highlight class="normal"></highlight></codeline>
<codeline lineno="305"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>DEPRECATED<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="306"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="group__call__logs_1ga786a33811a183f5891e997495914fb3f" kindref="member">linphone_call_log_destroy</ref>(<ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*cl)<sp/>{</highlight></codeline>
<codeline lineno="307"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>belle_sip_object_unref(cl);</highlight></codeline>
<codeline lineno="308"><highlight class="normal">}</highlight></codeline>
<codeline lineno="309"><highlight class="normal"></highlight></codeline>
<codeline lineno="310"><highlight class="normal">BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES(<ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref>);</highlight></codeline>
<codeline lineno="311"><highlight class="normal"></highlight></codeline>
<codeline lineno="312"><highlight class="normal">BELLE_SIP_INSTANCIATE_VPTR(<ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref>,<sp/>belle_sip_object_t,</highlight></codeline>
<codeline lineno="313"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(belle_sip_object_destroy_t)_linphone_call_log_destroy,</highlight></codeline>
<codeline lineno="314"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>NULL,<sp/></highlight><highlight class="comment">//<sp/>clone</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="315"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>NULL,<sp/></highlight><highlight class="comment">//<sp/>marshal</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="316"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>FALSE</highlight></codeline>
<codeline lineno="317"><highlight class="normal">);</highlight></codeline>
<codeline lineno="318"><highlight class="normal"></highlight></codeline>
<codeline lineno="319"><highlight class="normal"></highlight></codeline>
<codeline lineno="320"><highlight class="normal"></highlight><highlight class="comment">/*******************************************************************************</highlight></codeline>
<codeline lineno="321"><highlight class="comment"><sp/>*<sp/>SQL<sp/>storage<sp/>related<sp/>functions<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*</highlight></codeline>
<codeline lineno="322"><highlight class="comment"><sp/>******************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="323"><highlight class="normal"></highlight></codeline>
<codeline lineno="324"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>CALL_LOGS_STORAGE_ENABLED</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="325"><highlight class="normal"></highlight></codeline>
<codeline lineno="326"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_create_table(sqlite3*<sp/>db)<sp/>{</highlight></codeline>
<codeline lineno="327"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>errmsg=NULL;</highlight></codeline>
<codeline lineno="328"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ret;</highlight></codeline>
<codeline lineno="329"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ret=sqlite3_exec(db,</highlight><highlight class="stringliteral">&quot;CREATE<sp/>TABLE<sp/>IF<sp/>NOT<sp/>EXISTS<sp/>call_history<sp/>(&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="330"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;id<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>INTEGER<sp/>PRIMARY<sp/>KEY<sp/>AUTOINCREMENT,&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="331"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;caller<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>TEXT<sp/>NOT<sp/>NULL,&quot;</highlight><highlight class="normal"><sp/></highlight><highlight class="comment">//<sp/>Can&apos;t<sp/>name<sp/>a<sp/>field<sp/>&quot;from&quot;...</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="332"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;callee<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>TEXT<sp/>NOT<sp/>NULL,&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="333"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;direction<sp/><sp/><sp/><sp/><sp/><sp/>INTEGER,&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="334"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;duration<sp/><sp/><sp/><sp/><sp/><sp/><sp/>INTEGER,&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="335"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;start_time<sp/><sp/><sp/><sp/><sp/>TEXT<sp/>NOT<sp/>NULL,&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="336"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;connected_time<sp/>TEXT<sp/>NOT<sp/>NULL,&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="337"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;status<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>INTEGER,&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="338"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;videoEnabled<sp/><sp/><sp/>INTEGER,&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="339"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;quality<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>REAL&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="340"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;);&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="341"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>0,0,&amp;errmsg);</highlight></codeline>
<codeline lineno="342"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(ret<sp/>!=<sp/>SQLITE_OK)<sp/>{</highlight></codeline>
<codeline lineno="343"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;Error<sp/>in<sp/>creation:<sp/>%s.\n&quot;</highlight><highlight class="normal">,<sp/>errmsg);</highlight></codeline>
<codeline lineno="344"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sqlite3_free(errmsg);</highlight></codeline>
<codeline lineno="345"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="346"><highlight class="normal">}</highlight></codeline>
<codeline lineno="347"><highlight class="normal"></highlight></codeline>
<codeline lineno="348"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_update_call_log_table(sqlite3*<sp/>db)<sp/>{</highlight></codeline>
<codeline lineno="349"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>errmsg=NULL;</highlight></codeline>
<codeline lineno="350"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ret;</highlight></codeline>
<codeline lineno="351"><highlight class="normal"></highlight></codeline>
<codeline lineno="352"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>for<sp/>image<sp/>url<sp/>storage</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="353"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ret=sqlite3_exec(db,</highlight><highlight class="stringliteral">&quot;ALTER<sp/>TABLE<sp/>call_history<sp/>ADD<sp/>COLUMN<sp/>call_id<sp/>TEXT;&quot;</highlight><highlight class="normal">,NULL,NULL,&amp;errmsg);</highlight></codeline>
<codeline lineno="354"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(ret<sp/>!=<sp/>SQLITE_OK)<sp/>{</highlight></codeline>
<codeline lineno="355"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Table<sp/>already<sp/>up<sp/>to<sp/>date:<sp/>%s.&quot;</highlight><highlight class="normal">,<sp/>errmsg);</highlight></codeline>
<codeline lineno="356"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sqlite3_free(errmsg);</highlight></codeline>
<codeline lineno="357"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="358"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ret=sqlite3_exec(db,</highlight><highlight class="stringliteral">&quot;ALTER<sp/>TABLE<sp/>call_history<sp/>ADD<sp/>COLUMN<sp/>refkey<sp/>TEXT;&quot;</highlight><highlight class="normal">,NULL,NULL,&amp;errmsg);</highlight></codeline>
<codeline lineno="359"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(ret<sp/>!=<sp/>SQLITE_OK)<sp/>{</highlight></codeline>
<codeline lineno="360"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Table<sp/>already<sp/>up<sp/>to<sp/>date:<sp/>%s.&quot;</highlight><highlight class="normal">,<sp/>errmsg);</highlight></codeline>
<codeline lineno="361"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sqlite3_free(errmsg);</highlight></codeline>
<codeline lineno="362"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="363"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_debug(</highlight><highlight class="stringliteral">&quot;Table<sp/>call_history<sp/>updated<sp/>successfully<sp/>for<sp/>call_id<sp/>and<sp/>refkey.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="364"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="365"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="366"><highlight class="normal">}</highlight></codeline>
<codeline lineno="367"><highlight class="normal"></highlight></codeline>
<codeline lineno="368"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>_linphone_sqlite3_open(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*db_file,<sp/>sqlite3<sp/>**db)<sp/>{</highlight></codeline>
<codeline lineno="369"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>defined(ANDROID)<sp/>||<sp/>defined(__QNXNTO__)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="370"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>sqlite3_open(db_file,<sp/>db);</highlight></codeline>
<codeline lineno="371"><highlight class="normal"></highlight><highlight class="preprocessor">#elif<sp/>defined(_WIN32)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="372"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ret;</highlight></codeline>
<codeline lineno="373"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">wchar_t</highlight><highlight class="normal"><sp/>db_file_utf16[MAX_PATH_SIZE];</highlight></codeline>
<codeline lineno="374"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>MultiByteToWideChar(CP_ACP,<sp/>MB_PRECOMPOSED,<sp/>db_file,<sp/>-1,<sp/>db_file_utf16,<sp/>MAX_PATH_SIZE);</highlight></codeline>
<codeline lineno="375"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(ret<sp/>==<sp/>0)<sp/>db_file_utf16[0]<sp/>=<sp/></highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="376"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>sqlite3_open16(db_file_utf16,<sp/>db);</highlight></codeline>
<codeline lineno="377"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="378"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>db_file_locale[MAX_PATH_SIZE]<sp/>=<sp/>{</highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal">};</highlight></codeline>
<codeline lineno="379"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>db_file_utf8[MAX_PATH_SIZE]<sp/>=<sp/></highlight><highlight class="stringliteral">&quot;&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="380"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*inbuf=db_file_locale,<sp/>*outbuf=db_file_utf8;</highlight></codeline>
<codeline lineno="381"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>inbyteleft<sp/>=<sp/>MAX_PATH_SIZE,<sp/>outbyteleft<sp/>=<sp/>MAX_PATH_SIZE;</highlight></codeline>
<codeline lineno="382"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>iconv_t<sp/>cb;</highlight></codeline>
<codeline lineno="383"><highlight class="normal"></highlight></codeline>
<codeline lineno="384"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strncpy(db_file_locale,<sp/>db_file,<sp/>MAX_PATH_SIZE-1);</highlight></codeline>
<codeline lineno="385"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cb<sp/>=<sp/>iconv_open(</highlight><highlight class="stringliteral">&quot;UTF-8&quot;</highlight><highlight class="normal">,<sp/>nl_langinfo(CODESET));</highlight></codeline>
<codeline lineno="386"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(cb<sp/>!=<sp/>(iconv_t)-1)<sp/>{</highlight></codeline>
<codeline lineno="387"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ret;</highlight></codeline>
<codeline lineno="388"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>iconv(cb,<sp/>&amp;inbuf,<sp/>&amp;inbyteleft,<sp/>&amp;outbuf,<sp/>&amp;outbyteleft);</highlight></codeline>
<codeline lineno="389"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(ret<sp/>==<sp/>-1)<sp/>db_file_utf8[0]<sp/>=<sp/></highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="390"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>iconv_close(cb);</highlight></codeline>
<codeline lineno="391"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="392"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>sqlite3_open(db_file_utf8,<sp/>db);</highlight></codeline>
<codeline lineno="393"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="394"><highlight class="normal">}</highlight></codeline>
<codeline lineno="395"><highlight class="normal"></highlight></codeline>
<codeline lineno="396"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_core_call_log_storage_init(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc)<sp/>{</highlight></codeline>
<codeline lineno="397"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ret;</highlight></codeline>
<codeline lineno="398"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*errmsg;</highlight></codeline>
<codeline lineno="399"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sqlite3<sp/>*db;</highlight></codeline>
<codeline lineno="400"><highlight class="normal"></highlight></codeline>
<codeline lineno="401"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_call_log_storage_close(lc);</highlight></codeline>
<codeline lineno="402"><highlight class="normal"></highlight></codeline>
<codeline lineno="403"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ret=_linphone_sqlite3_open(lc-&gt;logs_db_file,<sp/>&amp;db);</highlight></codeline>
<codeline lineno="404"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(ret<sp/>!=<sp/>SQLITE_OK)<sp/>{</highlight></codeline>
<codeline lineno="405"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>errmsg<sp/>=<sp/>sqlite3_errmsg(db);</highlight></codeline>
<codeline lineno="406"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;Error<sp/>in<sp/>the<sp/>opening:<sp/>%s.\n&quot;</highlight><highlight class="normal">,<sp/>errmsg);</highlight></codeline>
<codeline lineno="407"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sqlite3_close(db);</highlight></codeline>
<codeline lineno="408"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="409"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="410"><highlight class="normal"></highlight></codeline>
<codeline lineno="411"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_create_table(db);</highlight></codeline>
<codeline lineno="412"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_update_call_log_table(db);</highlight></codeline>
<codeline lineno="413"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lc-&gt;logs_db<sp/>=<sp/>db;</highlight></codeline>
<codeline lineno="414"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="415"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Load<sp/>the<sp/>existing<sp/>call<sp/>logs</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="416"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_core_get_call_history(lc);</highlight></codeline>
<codeline lineno="417"><highlight class="normal">}</highlight></codeline>
<codeline lineno="418"><highlight class="normal"></highlight></codeline>
<codeline lineno="419"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_core_call_log_storage_close(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc)<sp/>{</highlight></codeline>
<codeline lineno="420"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lc-&gt;logs_db){</highlight></codeline>
<codeline lineno="421"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sqlite3_close(lc-&gt;logs_db);</highlight></codeline>
<codeline lineno="422"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lc-&gt;logs_db<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="423"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="424"><highlight class="normal">}</highlight></codeline>
<codeline lineno="425"><highlight class="normal"></highlight></codeline>
<codeline lineno="426"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>DB<sp/>layout:</highlight></codeline>
<codeline lineno="427"><highlight class="comment"><sp/>*<sp/>|<sp/>0<sp/><sp/>|<sp/>storage_id</highlight></codeline>
<codeline lineno="428"><highlight class="comment"><sp/>*<sp/>|<sp/>1<sp/><sp/>|<sp/>from</highlight></codeline>
<codeline lineno="429"><highlight class="comment"><sp/>*<sp/>|<sp/>2<sp/><sp/>|<sp/>to</highlight></codeline>
<codeline lineno="430"><highlight class="comment"><sp/>*<sp/>|<sp/>3<sp/><sp/>|<sp/>direction<sp/>flag</highlight></codeline>
<codeline lineno="431"><highlight class="comment"><sp/>*<sp/>|<sp/>4<sp/><sp/>|<sp/>duration</highlight></codeline>
<codeline lineno="432"><highlight class="comment"><sp/>*<sp/>|<sp/>5<sp/><sp/>|<sp/>start<sp/>date<sp/>time<sp/>(time_t)</highlight></codeline>
<codeline lineno="433"><highlight class="comment"><sp/>*<sp/>|<sp/>6<sp/><sp/>|<sp/>connected<sp/>date<sp/>time<sp/>(time_t)</highlight></codeline>
<codeline lineno="434"><highlight class="comment"><sp/>*<sp/>|<sp/>7<sp/><sp/>|<sp/>status</highlight></codeline>
<codeline lineno="435"><highlight class="comment"><sp/>*<sp/>|<sp/>8<sp/><sp/>|<sp/>video<sp/>enabled<sp/>(1<sp/>or<sp/>0)</highlight></codeline>
<codeline lineno="436"><highlight class="comment"><sp/>*<sp/>|<sp/>9<sp/><sp/>|<sp/>quality</highlight></codeline>
<codeline lineno="437"><highlight class="comment"><sp/>*<sp/>|<sp/>10<sp/>|<sp/>call_id</highlight></codeline>
<codeline lineno="438"><highlight class="comment"><sp/>*<sp/>|<sp/>11<sp/>|<sp/>refkey</highlight></codeline>
<codeline lineno="439"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="440"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>create_call_log(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*data,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>argc,<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>**argv,<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>**colName)<sp/>{</highlight></codeline>
<codeline lineno="441"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSList<sp/>**list<sp/>=<sp/>(MSList<sp/>**)data;</highlight></codeline>
<codeline lineno="442"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref><sp/>*from;</highlight></codeline>
<codeline lineno="443"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref><sp/>*to;</highlight></codeline>
<codeline lineno="444"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__logs_1ga779ac636d8b652c5130da18827c13e5a" kindref="member">LinphoneCallDir</ref><sp/>dir;</highlight></codeline>
<codeline lineno="445"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*log;</highlight></codeline>
<codeline lineno="446"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="447"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>storage_id<sp/>=<sp/>atoi(argv[0]);</highlight></codeline>
<codeline lineno="448"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>from<sp/>=<sp/><ref refid="group__linphone__address_1ga301c9884c0bc8b1050fe790d424e0b49" kindref="member">linphone_address_new</ref>(argv[1]);</highlight></codeline>
<codeline lineno="449"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>to<sp/>=<sp/><ref refid="group__linphone__address_1ga301c9884c0bc8b1050fe790d424e0b49" kindref="member">linphone_address_new</ref>(argv[2]);</highlight></codeline>
<codeline lineno="450"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dir<sp/>=<sp/>(<ref refid="group__call__logs_1ga779ac636d8b652c5130da18827c13e5a" kindref="member">LinphoneCallDir</ref>)<sp/>atoi(argv[3]);</highlight></codeline>
<codeline lineno="451"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>log<sp/>=<sp/>linphone_call_log_new(dir,<sp/>from,<sp/>to);</highlight></codeline>
<codeline lineno="452"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="453"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>log-&gt;storage_id<sp/>=<sp/>storage_id;</highlight></codeline>
<codeline lineno="454"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>log-&gt;duration<sp/>=<sp/>atoi(argv[4]);</highlight></codeline>
<codeline lineno="455"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>log-&gt;start_date_time<sp/>=<sp/>(time_t)atol(argv[5]);</highlight></codeline>
<codeline lineno="456"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>log-&gt;connected_date_time<sp/>=<sp/>(time_t)atol(argv[6]);</highlight></codeline>
<codeline lineno="457"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>log-&gt;status<sp/>=<sp/>(<ref refid="group__call__logs_1gafd125fb704d3254856f4a826a6e60a11" kindref="member">LinphoneCallStatus</ref>)<sp/>atoi(argv[7]);</highlight></codeline>
<codeline lineno="458"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>log-&gt;video_enabled<sp/>=<sp/>atoi(argv[8])<sp/>==<sp/>1;</highlight></codeline>
<codeline lineno="459"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>log-&gt;quality<sp/>=<sp/>atof(argv[9]);</highlight></codeline>
<codeline lineno="460"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="461"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(argc<sp/>&gt;<sp/>10)<sp/>{</highlight></codeline>
<codeline lineno="462"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(argv[10]<sp/>!=<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="463"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>log-&gt;call_id<sp/>=<sp/>ms_strdup(argv[10]);</highlight></codeline>
<codeline lineno="464"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="465"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(argv[10]<sp/>!=<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="466"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>log-&gt;refkey<sp/>=<sp/>ms_strdup(argv[11]);</highlight></codeline>
<codeline lineno="467"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="468"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="469"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="470"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*list<sp/>=<sp/>ms_list_append(*list,<sp/>log);</highlight></codeline>
<codeline lineno="471"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="472"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="473"><highlight class="normal">}</highlight></codeline>
<codeline lineno="474"><highlight class="normal"></highlight></codeline>
<codeline lineno="475"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_sql_request_call_log(sqlite3<sp/>*db,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*stmt,<sp/>MSList<sp/>**list)<sp/>{</highlight></codeline>
<codeline lineno="476"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>errmsg<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="477"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ret;</highlight></codeline>
<codeline lineno="478"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>sqlite3_exec(db,<sp/>stmt,<sp/>create_call_log,<sp/>list,<sp/>&amp;errmsg);</highlight></codeline>
<codeline lineno="479"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ret<sp/>!=<sp/>SQLITE_OK)<sp/>{</highlight></codeline>
<codeline lineno="480"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;linphone_sql_request:<sp/>statement<sp/>%s<sp/>-&gt;<sp/>error<sp/>sqlite3_exec():<sp/>%s.&quot;</highlight><highlight class="normal">,<sp/>stmt,<sp/>errmsg);</highlight></codeline>
<codeline lineno="481"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sqlite3_free(errmsg);</highlight></codeline>
<codeline lineno="482"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="483"><highlight class="normal">}</highlight></codeline>
<codeline lineno="484"><highlight class="normal"></highlight></codeline>
<codeline lineno="485"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>linphone_sql_request_generic(sqlite3*<sp/>db,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*stmt)<sp/>{</highlight></codeline>
<codeline lineno="486"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>errmsg<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="487"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ret;</highlight></codeline>
<codeline lineno="488"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ret<sp/>=<sp/>sqlite3_exec(db,<sp/>stmt,<sp/>NULL,<sp/>NULL,<sp/>&amp;errmsg);</highlight></codeline>
<codeline lineno="489"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ret<sp/>!=<sp/>SQLITE_OK)<sp/>{</highlight></codeline>
<codeline lineno="490"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;linphone_sql_request:<sp/>statement<sp/>%s<sp/>-&gt;<sp/>error<sp/>sqlite3_exec():<sp/>%s.&quot;</highlight><highlight class="normal">,<sp/>stmt,<sp/>errmsg);</highlight></codeline>
<codeline lineno="491"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sqlite3_free(errmsg);</highlight></codeline>
<codeline lineno="492"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="493"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>ret;</highlight></codeline>
<codeline lineno="494"><highlight class="normal">}</highlight></codeline>
<codeline lineno="495"><highlight class="normal"></highlight></codeline>
<codeline lineno="496"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_core_store_call_log(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc,<sp/><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*log)<sp/>{</highlight></codeline>
<codeline lineno="497"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lc<sp/>&amp;&amp;<sp/>lc-&gt;logs_db){</highlight></codeline>
<codeline lineno="498"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*from,<sp/>*to;</highlight></codeline>
<codeline lineno="499"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*buf;</highlight></codeline>
<codeline lineno="500"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="501"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>from<sp/>=<sp/><ref refid="group__linphone__address_1ga24c1a16f49f8b72f2bab65cc5d8a51af" kindref="member">linphone_address_as_string</ref>(log-&gt;from);</highlight></codeline>
<codeline lineno="502"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>to<sp/>=<sp/><ref refid="group__linphone__address_1ga24c1a16f49f8b72f2bab65cc5d8a51af" kindref="member">linphone_address_as_string</ref>(log-&gt;to);</highlight></codeline>
<codeline lineno="503"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>buf<sp/>=<sp/>sqlite3_mprintf(</highlight><highlight class="stringliteral">&quot;INSERT<sp/>INTO<sp/>call_history<sp/>VALUES(NULL,%Q,%Q,%i,%i,%lld,%lld,%i,%i,%f,%Q,%Q);&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="504"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>from,</highlight></codeline>
<codeline lineno="505"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>to,</highlight></codeline>
<codeline lineno="506"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>log-&gt;dir,</highlight></codeline>
<codeline lineno="507"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>log-&gt;duration,</highlight></codeline>
<codeline lineno="508"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(int64_t)log-&gt;start_date_time,</highlight></codeline>
<codeline lineno="509"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(int64_t)log-&gt;connected_date_time,</highlight></codeline>
<codeline lineno="510"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>log-&gt;status,</highlight></codeline>
<codeline lineno="511"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>log-&gt;video_enabled<sp/>?<sp/>1<sp/>:<sp/>0,</highlight></codeline>
<codeline lineno="512"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>log-&gt;quality,</highlight></codeline>
<codeline lineno="513"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>log-&gt;call_id,</highlight></codeline>
<codeline lineno="514"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>log-&gt;refkey</highlight></codeline>
<codeline lineno="515"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>);</highlight></codeline>
<codeline lineno="516"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_sql_request_generic(lc-&gt;logs_db,<sp/>buf);</highlight></codeline>
<codeline lineno="517"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sqlite3_free(buf);</highlight></codeline>
<codeline lineno="518"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(from);</highlight></codeline>
<codeline lineno="519"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(to);</highlight></codeline>
<codeline lineno="520"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="521"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>log-&gt;storage_id<sp/>=<sp/>sqlite3_last_insert_rowid(lc-&gt;logs_db);</highlight></codeline>
<codeline lineno="522"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="523"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="524"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lc)<sp/>{</highlight></codeline>
<codeline lineno="525"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lc-&gt;call_logs<sp/>=<sp/>ms_list_prepend(lc-&gt;call_logs,<sp/><ref refid="group__call__logs_1ga2f3af8bb19866a4bbeebefa17bf2b806" kindref="member">linphone_call_log_ref</ref>(log));</highlight></codeline>
<codeline lineno="526"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="527"><highlight class="normal">}</highlight></codeline>
<codeline lineno="528"><highlight class="normal"></highlight></codeline>
<codeline lineno="529"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>copy_user_data_from_existing_log(MSList<sp/>*existing_logs,<sp/><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*log)<sp/>{</highlight></codeline>
<codeline lineno="530"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(existing_logs)<sp/>{</highlight></codeline>
<codeline lineno="531"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*existing_log<sp/>=<sp/>(<ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*)existing_logs-&gt;data;</highlight></codeline>
<codeline lineno="532"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>(existing_log-&gt;storage_id<sp/>==<sp/>log-&gt;storage_id)<sp/>{</highlight></codeline>
<codeline lineno="533"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>log-&gt;user_data<sp/>=<sp/>existing_log-&gt;user_data;</highlight></codeline>
<codeline lineno="534"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="535"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="536"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>existing_logs<sp/>=<sp/>ms_list_next(existing_logs);</highlight></codeline>
<codeline lineno="537"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="538"><highlight class="normal">}</highlight></codeline>
<codeline lineno="539"><highlight class="normal"></highlight></codeline>
<codeline lineno="540"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>copy_user_data_from_existing_logs(MSList<sp/>*existing_logs,<sp/>MSList<sp/>*new_logs)<sp/>{</highlight></codeline>
<codeline lineno="541"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(new_logs)<sp/>{</highlight></codeline>
<codeline lineno="542"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*new_log<sp/>=<sp/>(<ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*)new_logs-&gt;data;</highlight></codeline>
<codeline lineno="543"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>copy_user_data_from_existing_log(existing_logs,<sp/>new_log);</highlight></codeline>
<codeline lineno="544"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>new_logs<sp/>=<sp/>ms_list_next(new_logs);</highlight></codeline>
<codeline lineno="545"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="546"><highlight class="normal">}</highlight></codeline>
<codeline lineno="547"><highlight class="normal"></highlight></codeline>
<codeline lineno="548"><highlight class="normal"></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MSList<sp/>*linphone_core_get_call_history(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc)<sp/>{</highlight></codeline>
<codeline lineno="549"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*buf;</highlight></codeline>
<codeline lineno="550"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>uint64_t<sp/>begin,end;</highlight></codeline>
<codeline lineno="551"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSList<sp/>*result<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="552"><highlight class="normal"></highlight></codeline>
<codeline lineno="553"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!lc<sp/>||<sp/>lc-&gt;logs_db<sp/>==<sp/>NULL)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>NULL;</highlight></codeline>
<codeline lineno="554"><highlight class="normal"></highlight></codeline>
<codeline lineno="555"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>buf<sp/>=<sp/>sqlite3_mprintf(</highlight><highlight class="stringliteral">&quot;SELECT<sp/>*<sp/>FROM<sp/>call_history<sp/>ORDER<sp/>BY<sp/>id<sp/>DESC<sp/>LIMIT<sp/>%i&quot;</highlight><highlight class="normal">,<sp/>lc-&gt;max_call_logs);</highlight></codeline>
<codeline lineno="556"><highlight class="normal"></highlight></codeline>
<codeline lineno="557"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>begin<sp/>=<sp/>ortp_get_cur_time_ms();</highlight></codeline>
<codeline lineno="558"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_sql_request_call_log(lc-&gt;logs_db,<sp/>buf,<sp/>&amp;result);</highlight></codeline>
<codeline lineno="559"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>end<sp/>=<sp/>ortp_get_cur_time_ms();</highlight></codeline>
<codeline lineno="560"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;%s():<sp/>completed<sp/>in<sp/>%i<sp/>ms&quot;</highlight><highlight class="normal">,__FUNCTION__,<sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal">)(end-begin));</highlight></codeline>
<codeline lineno="561"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sqlite3_free(buf);</highlight></codeline>
<codeline lineno="562"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="563"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lc-&gt;call_logs)<sp/>{</highlight></codeline>
<codeline lineno="564"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>copy_user_data_from_existing_logs(lc-&gt;call_logs,<sp/>result);</highlight></codeline>
<codeline lineno="565"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="566"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="567"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lc-&gt;call_logs<sp/>=<sp/>ms_list_free_with_data(lc-&gt;call_logs,<sp/>(void<sp/>(*)(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*))<ref refid="group__call__logs_1ga802bbd28cc29824d80a70ad33e5b8ea6" kindref="member">linphone_call_log_unref</ref>);</highlight></codeline>
<codeline lineno="568"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lc-&gt;call_logs<sp/>=<sp/>result;</highlight></codeline>
<codeline lineno="569"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="570"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>lc-&gt;call_logs;</highlight></codeline>
<codeline lineno="571"><highlight class="normal">}</highlight></codeline>
<codeline lineno="572"><highlight class="normal"></highlight></codeline>
<codeline lineno="573"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_core_delete_call_history(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc)<sp/>{</highlight></codeline>
<codeline lineno="574"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*buf;</highlight></codeline>
<codeline lineno="575"><highlight class="normal"></highlight></codeline>
<codeline lineno="576"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!lc<sp/>||<sp/>lc-&gt;logs_db<sp/>==<sp/>NULL)<sp/>return<sp/>;</highlight></codeline>
<codeline lineno="577"><highlight class="normal"></highlight></codeline>
<codeline lineno="578"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>buf<sp/>=<sp/>sqlite3_mprintf(</highlight><highlight class="stringliteral">&quot;DELETE<sp/>FROM<sp/>call_history&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="579"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_sql_request_generic(lc-&gt;logs_db,<sp/>buf);</highlight></codeline>
<codeline lineno="580"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sqlite3_free(buf);</highlight></codeline>
<codeline lineno="581"><highlight class="normal">}</highlight></codeline>
<codeline lineno="582"><highlight class="normal"></highlight></codeline>
<codeline lineno="583"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_core_delete_call_log(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc,<sp/><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*log)<sp/>{</highlight></codeline>
<codeline lineno="584"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*buf;</highlight></codeline>
<codeline lineno="585"><highlight class="normal"></highlight></codeline>
<codeline lineno="586"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!lc<sp/>||<sp/>lc-&gt;logs_db<sp/>==<sp/>NULL)<sp/>return<sp/>;</highlight></codeline>
<codeline lineno="587"><highlight class="normal"></highlight></codeline>
<codeline lineno="588"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>buf<sp/>=<sp/>sqlite3_mprintf(</highlight><highlight class="stringliteral">&quot;DELETE<sp/>FROM<sp/>call_history<sp/>WHERE<sp/>id<sp/>=<sp/>%i&quot;</highlight><highlight class="normal">,<sp/>log-&gt;storage_id);</highlight></codeline>
<codeline lineno="589"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_sql_request_generic(lc-&gt;logs_db,<sp/>buf);</highlight></codeline>
<codeline lineno="590"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sqlite3_free(buf);</highlight></codeline>
<codeline lineno="591"><highlight class="normal">}</highlight></codeline>
<codeline lineno="592"><highlight class="normal"></highlight></codeline>
<codeline lineno="593"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>linphone_core_get_call_history_size(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc)<sp/>{</highlight></codeline>
<codeline lineno="594"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>numrows<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="595"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*buf;</highlight></codeline>
<codeline lineno="596"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sqlite3_stmt<sp/>*selectStatement;</highlight></codeline>
<codeline lineno="597"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>returnValue;</highlight></codeline>
<codeline lineno="598"><highlight class="normal"></highlight></codeline>
<codeline lineno="599"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!lc<sp/>||<sp/>lc-&gt;logs_db<sp/>==<sp/>NULL)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="600"><highlight class="normal"></highlight></codeline>
<codeline lineno="601"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>buf<sp/>=<sp/>sqlite3_mprintf(</highlight><highlight class="stringliteral">&quot;SELECT<sp/>count(*)<sp/>FROM<sp/>call_history&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="602"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>returnValue<sp/>=<sp/>sqlite3_prepare_v2(lc-&gt;logs_db,<sp/>buf,<sp/>-1,<sp/>&amp;selectStatement,<sp/>NULL);</highlight></codeline>
<codeline lineno="603"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(returnValue<sp/>==<sp/>SQLITE_OK){</highlight></codeline>
<codeline lineno="604"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(sqlite3_step(selectStatement)<sp/>==<sp/>SQLITE_ROW){</highlight></codeline>
<codeline lineno="605"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>numrows<sp/>=<sp/>sqlite3_column_int(selectStatement,<sp/>0);</highlight></codeline>
<codeline lineno="606"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="607"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="608"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sqlite3_finalize(selectStatement);</highlight></codeline>
<codeline lineno="609"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sqlite3_free(buf);</highlight></codeline>
<codeline lineno="610"><highlight class="normal"></highlight></codeline>
<codeline lineno="611"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>numrows;</highlight></codeline>
<codeline lineno="612"><highlight class="normal">}</highlight></codeline>
<codeline lineno="613"><highlight class="normal"></highlight></codeline>
<codeline lineno="614"><highlight class="normal">MSList<sp/>*<sp/><ref refid="group__call__logs_1gac9f96ef8721da7b73157d29d34712f1c" kindref="member">linphone_core_get_call_history_for_address</ref>(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref><sp/>*addr)<sp/>{</highlight></codeline>
<codeline lineno="615"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*buf;</highlight></codeline>
<codeline lineno="616"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*sipAddress;</highlight></codeline>
<codeline lineno="617"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>uint64_t<sp/>begin,end;</highlight></codeline>
<codeline lineno="618"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSList<sp/>*result<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="619"><highlight class="normal"></highlight></codeline>
<codeline lineno="620"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!lc<sp/>||<sp/>lc-&gt;logs_db<sp/>==<sp/>NULL<sp/>||<sp/>addr<sp/>==<sp/>NULL)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>NULL;</highlight></codeline>
<codeline lineno="621"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="622"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*since<sp/>we<sp/>want<sp/>to<sp/>append<sp/>query<sp/>parameters<sp/>depending<sp/>on<sp/>arguments<sp/>given,<sp/>we<sp/>use<sp/>malloc<sp/>instead<sp/>of<sp/>sqlite3_mprintf*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="623"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sipAddress<sp/>=<sp/><ref refid="group__linphone__address_1gae14a9f3157cc4421e5e5195c9ece2038" kindref="member">linphone_address_as_string_uri_only</ref>(addr);</highlight></codeline>
<codeline lineno="624"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>buf<sp/>=<sp/>sqlite3_mprintf(</highlight><highlight class="stringliteral">&quot;SELECT<sp/>*<sp/>FROM<sp/>call_history<sp/>WHERE<sp/>caller<sp/>LIKE<sp/>&apos;%%%q%%&apos;<sp/>OR<sp/>callee<sp/>LIKE<sp/>&apos;%%%q%%&apos;<sp/>ORDER<sp/>BY<sp/>id<sp/>DESC&quot;</highlight><highlight class="normal">,<sp/>sipAddress,<sp/>sipAddress);<sp/></highlight><highlight class="comment">//<sp/>The<sp/>&apos;%%%q%%&apos;<sp/>takes<sp/>care<sp/>of<sp/>the<sp/>eventual<sp/>presence<sp/>of<sp/>a<sp/>display<sp/>name</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="625"><highlight class="normal"></highlight></codeline>
<codeline lineno="626"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>begin<sp/>=<sp/>ortp_get_cur_time_ms();</highlight></codeline>
<codeline lineno="627"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_sql_request_call_log(lc-&gt;logs_db,<sp/>buf,<sp/>&amp;result);</highlight></codeline>
<codeline lineno="628"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>end<sp/>=<sp/>ortp_get_cur_time_ms();</highlight></codeline>
<codeline lineno="629"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;%s():<sp/>completed<sp/>in<sp/>%i<sp/>ms&quot;</highlight><highlight class="normal">,__FUNCTION__,<sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal">)(end-begin));</highlight></codeline>
<codeline lineno="630"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sqlite3_free(buf);</highlight></codeline>
<codeline lineno="631"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_free(sipAddress);</highlight></codeline>
<codeline lineno="632"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="633"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lc-&gt;call_logs)<sp/>{</highlight></codeline>
<codeline lineno="634"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>copy_user_data_from_existing_logs(lc-&gt;call_logs,<sp/>result);</highlight></codeline>
<codeline lineno="635"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="636"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="637"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>result;</highlight></codeline>
<codeline lineno="638"><highlight class="normal">}</highlight></codeline>
<codeline lineno="639"><highlight class="normal"></highlight></codeline>
<codeline lineno="640"><highlight class="normal"><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*<sp/><ref refid="group__call__logs_1ga60dfe039e374675b32f78859909d0a4f" kindref="member">linphone_core_get_last_outgoing_call_log</ref>(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc)<sp/>{</highlight></codeline>
<codeline lineno="641"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*buf;</highlight></codeline>
<codeline lineno="642"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>uint64_t<sp/>begin,end;</highlight></codeline>
<codeline lineno="643"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSList<sp/>*list<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="644"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref>*<sp/>result<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="645"><highlight class="normal"></highlight></codeline>
<codeline lineno="646"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!lc<sp/>||<sp/>lc-&gt;logs_db<sp/>==<sp/>NULL)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>NULL;</highlight></codeline>
<codeline lineno="647"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="648"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*since<sp/>we<sp/>want<sp/>to<sp/>append<sp/>query<sp/>parameters<sp/>depending<sp/>on<sp/>arguments<sp/>given,<sp/>we<sp/>use<sp/>malloc<sp/>instead<sp/>of<sp/>sqlite3_mprintf*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="649"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>buf<sp/>=<sp/>sqlite3_mprintf(</highlight><highlight class="stringliteral">&quot;SELECT<sp/>*<sp/>FROM<sp/>call_history<sp/>WHERE<sp/>direction<sp/>=<sp/>0<sp/>ORDER<sp/>BY<sp/>id<sp/>DESC<sp/>LIMIT<sp/>1&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="650"><highlight class="normal"></highlight></codeline>
<codeline lineno="651"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>begin<sp/>=<sp/>ortp_get_cur_time_ms();</highlight></codeline>
<codeline lineno="652"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_sql_request_call_log(lc-&gt;logs_db,<sp/>buf,<sp/>&amp;list);</highlight></codeline>
<codeline lineno="653"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>end<sp/>=<sp/>ortp_get_cur_time_ms();</highlight></codeline>
<codeline lineno="654"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;%s():<sp/>completed<sp/>in<sp/>%i<sp/>ms&quot;</highlight><highlight class="normal">,__FUNCTION__,<sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal">)(end-begin));</highlight></codeline>
<codeline lineno="655"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sqlite3_free(buf);</highlight></codeline>
<codeline lineno="656"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="657"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(list)<sp/>{</highlight></codeline>
<codeline lineno="658"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>result<sp/>=<sp/>(<ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref>*)list-&gt;data;</highlight></codeline>
<codeline lineno="659"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="660"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="661"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lc-&gt;call_logs<sp/>&amp;&amp;<sp/>result)<sp/>{</highlight></codeline>
<codeline lineno="662"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>copy_user_data_from_existing_log(lc-&gt;call_logs,<sp/>result);</highlight></codeline>
<codeline lineno="663"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="664"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="665"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>result;</highlight></codeline>
<codeline lineno="666"><highlight class="normal">}</highlight></codeline>
<codeline lineno="667"><highlight class="normal"></highlight></codeline>
<codeline lineno="668"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="669"><highlight class="normal"></highlight></codeline>
<codeline lineno="670"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_core_call_log_storage_init(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc)<sp/>{</highlight></codeline>
<codeline lineno="671"><highlight class="normal">}</highlight></codeline>
<codeline lineno="672"><highlight class="normal"></highlight></codeline>
<codeline lineno="673"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_core_call_log_storage_close(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc)<sp/>{</highlight></codeline>
<codeline lineno="674"><highlight class="normal">}</highlight></codeline>
<codeline lineno="675"><highlight class="normal"></highlight></codeline>
<codeline lineno="676"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_core_store_call_log(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc,<sp/><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*log)<sp/>{</highlight></codeline>
<codeline lineno="677"><highlight class="normal">}</highlight></codeline>
<codeline lineno="678"><highlight class="normal"></highlight></codeline>
<codeline lineno="679"><highlight class="normal"></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>MSList<sp/>*linphone_core_get_call_history(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc)<sp/>{</highlight></codeline>
<codeline lineno="680"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>NULL;</highlight></codeline>
<codeline lineno="681"><highlight class="normal">}</highlight></codeline>
<codeline lineno="682"><highlight class="normal"></highlight></codeline>
<codeline lineno="683"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_core_delete_call_history(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc)<sp/>{</highlight></codeline>
<codeline lineno="684"><highlight class="normal">}</highlight></codeline>
<codeline lineno="685"><highlight class="normal"></highlight></codeline>
<codeline lineno="686"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_core_delete_call_log(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc,<sp/><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*log)<sp/>{</highlight></codeline>
<codeline lineno="687"><highlight class="normal">}</highlight></codeline>
<codeline lineno="688"><highlight class="normal"></highlight></codeline>
<codeline lineno="689"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>linphone_core_get_call_history_size(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc)<sp/>{</highlight></codeline>
<codeline lineno="690"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="691"><highlight class="normal">}</highlight></codeline>
<codeline lineno="692"><highlight class="normal"></highlight></codeline>
<codeline lineno="693"><highlight class="normal">MSList<sp/>*<sp/><ref refid="group__call__logs_1gac9f96ef8721da7b73157d29d34712f1c" kindref="member">linphone_core_get_call_history_for_address</ref>(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="group__linphone__address_1ga5af5a516ac253e3cda4f51b599a5385b" kindref="member">LinphoneAddress</ref><sp/>*addr)<sp/>{</highlight></codeline>
<codeline lineno="694"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>NULL;</highlight></codeline>
<codeline lineno="695"><highlight class="normal">}</highlight></codeline>
<codeline lineno="696"><highlight class="normal"></highlight></codeline>
<codeline lineno="697"><highlight class="normal"><ref refid="group__call__logs_1gab700f6646681d1f4614a049892bc764a" kindref="member">LinphoneCallLog</ref><sp/>*<sp/><ref refid="group__call__logs_1ga60dfe039e374675b32f78859909d0a4f" kindref="member">linphone_core_get_last_outgoing_call_log</ref>(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc)<sp/>{</highlight></codeline>
<codeline lineno="698"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>NULL;</highlight></codeline>
<codeline lineno="699"><highlight class="normal">}</highlight></codeline>
<codeline lineno="700"><highlight class="normal"></highlight></codeline>
<codeline lineno="701"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight></codeline>
    </programlisting>
    <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/call_log.c"/>
  </compounddef>
</doxygen>
